Camelia, the Perl 6 bug

IRC log for #mojo, 2012-05-02

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:09 Psyche^ joined #mojo
00:54 scott joined #mojo
01:00 tempire return of the ops
01:01 * tempire gives crab some vitamin c
01:10 bird joined #mojo
01:14 jnap joined #mojo
01:25 xaka1 joined #mojo
01:36 * tempire gives sri some scopolamine
01:57 scott_ joined #mojo
01:58 scott_ joined #mojo
02:01 d4rkie joined #mojo
02:07 arpadszasz joined #mojo
02:15 scott joined #mojo
02:17 jnap joined #mojo
02:28 irq_ joined #mojo
02:29 scott joined #mojo
03:02 atmh_ joined #mojo
03:02 scott_ joined #mojo
04:46 bird joined #mojo
04:47 plenum joined #mojo
04:55 tempire shnikies
04:55 bird joined #mojo
04:56 tempire use all adobe cs6 apps for $30 per month
04:56 tempire seems like kind of a no-brainer if you use any adobe apps at all
05:06 Leandr joined #mojo
05:48 Leandr joined #mojo
06:08 Vandal joined #mojo
06:11 batman joined #mojo
06:42 rem_lex|pivo joined #mojo
06:57 cosmincx joined #mojo
06:59 amirite joined #mojo
07:08 batman joined #mojo
07:10 Foxcool joined #mojo
07:11 fhelmber_ joined #mojo
07:13 Foxcool joined #mojo
07:19 scott joined #mojo
07:20 black joined #mojo
07:44 spleenjack joined #mojo
08:13 marcus hmm
08:19 marcus tempire: isn't it 49$?
08:21 cosmincx joined #mojo
08:23 omega upgrade is 29$
08:23 omega if you are eligable
08:25 marcus oh, but then you need to own it already.
08:26 omega yeah
08:26 tempire $30 introductory price, I think
08:26 tempire or something
08:29 tempire I'm happy with sketch 2 for the moment
08:29 tempire haven't opened pixelmator for months
08:33 Htbaa joined #mojo
08:36 AmeliePoulain joined #mojo
08:42 marcus me neither
08:42 marcus or any other drawing program for that matter ;)
08:43 hugh joined #mojo
09:05 bird joined #mojo
09:43 daxim joined #mojo
10:40 bird_ joined #mojo
11:02 bo joined #mojo
11:04 bo Hello. I want t odo something probaly nasty... I wish to stash pure HTML into a template but the HTML always gets encoded. Is there a way to tell Mojo to not encode variables when rendered into the template?
11:07 vervain <%== foo %> is probably what you want
11:07 vervain http://mojolicio.us/perldoc/​Mojolicious/Guides/Rendering
11:08 vervain 'Embedded Perl' -> '<%== Perl expression, replaced with result %>'
11:08 bo vervain, thans a lot!
11:08 bo thanks
11:08 vervain np
11:39 Akron joined #mojo
12:03 kjeldahl joined #mojo
12:04 kjeldahl I'm guessing changes to relaxed placeholders in routes (allowing empty URL fragments) broke one of my apps... Any pointers to workarounds?
12:18 marcus kjeldahl: From the changelog - https://gist.github.com/2576185
12:20 judofyr joined #mojo
12:21 kjeldahl Thanks. Any idea what "(.foo)" becomes with the new syntax?
12:21 kjeldahl Not sure, but when I get empty parts in the URL the route fails...
12:22 marcus ignore me, those are ancient changes
12:22 kjeldahl Not sure WHEN it started happening.
12:22 kjeldahl Last couple of months I guess.
12:23 spleenjack joined #mojo
12:23 hugh joined #mojo
12:24 kjeldahl I found something in mid april about "#foo" taking over as the relaxed placeholder, but can't get it working (route fails with empty URL fragment).
12:26 kjeldahl I'll keep digging.
12:37 D4RK-PH0ENiX joined #mojo
12:38 * sri yawns
12:39 preflex_ joined #mojo
12:40 whee when my cats yawn I try to sneak things into their open mouths
12:40 whee just so you know.
12:41 sri :o
13:07 noeleon joined #mojo
13:09 Htbaa joined #mojo
13:21 jnap joined #mojo
13:28 mattastrophe whee: eww
13:28 mattastrophe but, yeah, I like to stick my finger in :)
13:45 sri :S
14:13 ispy_ joined #mojo
14:19 inokenty joined #mojo
14:42 psimanx1 joined #mojo
15:03 harry joined #mojo
15:27 mire joined #mojo
15:45 xaka1 joined #mojo
15:48 Psyche^ joined #mojo
16:01 mire joined #mojo
16:07 Htbaa joined #mojo
16:37 jnap joined #mojo
16:56 ruz joined #mojo
17:12 batman joined #mojo
17:32 Vandal joined #mojo
17:54 marcus sri: better phear
17:54 marcus ;)
18:18 * sri phears
19:05 * tempire pears
19:39 d4rkie joined #mojo
19:43 baton8 joined #mojo
20:00 Leandr joined #mojo
20:06 xaka1 joined #mojo
20:22 jnap joined #mojo
21:13 mattastrophe joined #mojo
21:22 * sri looks around
21:22 * sri yawns
21:26 * whee lunges
21:33 lukep joined #mojo
21:45 psimanx1 sri: re: the pull request I just made: http://pastebin.com/fNHWr24N  - if you run that on 32 bit perl it fails - it works fine on 64 bit perl.  I believe the reason is that shifting 32 bits in 32 bit perl is an undefined operation.
21:46 sri psimanx1: still requires a real test case
21:46 * psimanx1 starts to read up on creating tests... :)
21:47 sri i also want to know what exactly you changed, i don't really remember how the 64bit code worked
21:48 sri https://github.com/kraih/mojo/blob​/master/t/mojo/websocket_frames.t # i'm sure you will find many examples here
21:49 * sri does not have a 32bit perl, so will be very very conservative with applying patches for it
21:49 psimanx1 The bit I changed was how the length of the payload was converted into a quad - you can use the Q template in 64 bit perl but converting to two 32 bit values using NN was failing before.  I suspected you were running 64 bit.
21:49 sri maybe tempire, marcus or crab have a 32bit perl and can take over?
21:51 sri make the test case a 64bit roundtrip, so we know parse and build work
21:52 psimanx1 okies
22:00 sri psimanx1: what does your fix exactly do, i don't quite grok it?
22:01 psimanx1 It properly converts the payload length into a quad.  The old code failed on an environment running 32 bit perl and succeeded on 64 bit perl.  Has taken a whole bunch of hours to track down...
22:03 * psimanx1 is puzzled as there seems to be a test that sends 500k on a 64 bit payload which appears to pass the test - I am unsure how.  Looking into it.
22:05 sri interesting
22:11 ispy_ joined #mojo
22:30 psimanx1 sri: ok - figured out why the tests pass.  When the frame is parsed in the UA it throws away the most significant 32 bits and only uses a 32 bit value rather than the 64 bit value that was passed to it.
22:31 psimanx1 so the tests pass - but it fails in real life when talking to firefox for example.
22:31 psimanx1 As I discovered today.. :)
22:36 sri if i understand this right... a proper test would require *a lot* of memory
22:37 psimanx1 :) yep
22:37 sri hmm, that sucks
22:37 purl The rock is now off.
22:37 psimanx1 One way round it would be to only accept 32 bit values in and out
22:37 psimanx1 4Gb payload becomes the limit?
22:37 sri or just die on 32bit perl for 64bit values
22:38 psimanx1 or warn
22:38 sri no die
22:38 sri i don't want having to worry about it
22:38 psimanx1 I guess - I suppose you'd want to know.
22:39 psimanx1 I'll amend the pull request then?
22:39 sri i'm not sure how to handle this exactly
22:40 psimanx1 Well the test is already there for the ivsize - if $len % 0xFFFFFFFF is > 0 then die.
22:40 sri tests need to be changed too
22:41 psimanx1 As you say - will be hard to test
22:41 sri not really
22:41 * psimanx1 is listening
22:41 sri i'll move the 64bit test to frames and skip it on 32bit platforms
22:42 psimanx1 ah ok
22:43 psimanx1 Hang on though - the 64 bit payload still works on 32 bit - it's just been calculating wrong up until now?
22:44 psimanx1 iirc the 64 bit payload is used for anything over 65k?
22:44 sri i don't care particularly about 32bit perls
22:44 psimanx1 That's just grumpiness  ;)
22:45 psimanx1 So am I leaving this in your capable hands or do you want me to do anything with it?
22:45 sri well, i think it's best to just kill it completely
22:46 psimanx1 What?  64 bit payloads on 32 bit perl?
22:46 sri workarounds that none of our core devs can support seems like a pretty bad idea
22:46 sri yea
22:47 psimanx1 That's a bit excessive though - you're effectively stopping anyone on 32 bit perl from sending more than 65Kb over a websocket!
22:47 sri right
22:48 sri if there's a foolproof solution that works cross platform for all 32bit perls please shoot
22:48 psimanx1 I guess I'll have to maintain my own fork then - I'm fairly advanced down the path of writing an EPOS system with Mojolicious and there are cases where I need to send a few hundred Kb.
22:48 sri otherwise, it seems unrealistic and annoying to try and support it
22:49 psimanx1 ok - will look into it
22:51 psimanx1 btw - what about limiting the payload to 4Gb?  As an example Firefox by default only accepts up to 2Gb in one shot?
22:51 sri i have no opinion about that
22:52 sri but there is a message size limit
22:53 psimanx1 Well to my mind the easiest solution is to hardcode the code to 32 bit - it's already doing that in the parse - just needs to happen in the build_frame as well.
22:55 psimanx1 maybe tempire, marcus or crab can give their opinions when next around?
22:56 lukep joined #mojo
22:57 tempire I've never looked into running a 32b perl specifically
22:57 tempire does perlbrew have an option?
22:57 * tempire has forgotten anything about compiling since perlbrew came along
22:58 sri i don't think you can just compile a 32bit perl on os x, you need to customize a few things first
22:58 psimanx1 Well - I use activestate on windows (and use 32 bit on that) but on my servers tend to use 64 bit perl (through gentoo so compiled).
22:59 tempire oh dear
22:59 sri 32bit perl seems very rare these days, which is why i care very little
22:59 tempire I definitely don't have a windows install
23:00 tempire I would be willing to look into windows installations if someone donated a windows 7 and vmfusion license
23:00 rem_lex|pivo joined #mojo
23:01 tempire and maybe some cookies
23:01 sri you've got a cookie problem dude
23:02 psimanx1 I'm afraid I eat the cookies - and some gingerbread bunnies as well - was yummy.
23:02 tempire I can stop whenever I want
23:02 tempire I'll give up cookies when you give up pizza.
23:02 tempire oh snap.
23:02 sri :S
23:02 tempire ETOOMANYCOOKIES
23:03 tempire speaking of cookies
23:03 tempire I think I'll go purchase one right now.
23:15 psimanx1 sri: btw (and sorry to harp on about this I know you don't care about 32 bit! just wanting a resolution) my earlier patch is a cross-platform fix.  The current tests should really be failing on 32 bit.  Am I best fixing the parse frame function to handle 64 bit input as best it can?  32 bit perl can kinda handle up to 53 bit without losing precision as it converts to floats behind the scenes?
23:15 GitHub123 joined #mojo
23:15 GitHub123 [mojo] kraih pushed 1 new commit to master: http://git.io/XeIYvA
23:15 GitHub123 [mojo/master] more WebSocket frame tests - Sebastian Riedel
23:15 GitHub123 left #mojo
23:16 sri psimanx1: i don't know
23:16 psimanx1 okies
23:16 sri really, i have no idea how to handle 32bit perl problems
23:16 sri i'm just guessing
23:17 psimanx1 ok leave with me and I'll come up with something and put it forward.
23:17 sri that's why i prefer a die() solution over tons of research :)
23:19 sri psimanx1++ # if you want to do the research, more power to you! :)
23:20 sri my biggest concern is that a workaround might not be portable, in which case our cpantesters results would turn very red
23:22 psimanx1 I can't see that being the case - the code is already effectively checking whether it's running as 32 bit or 64 bit. It just needs a few tweaks IMHO (and a test case or two that work)...
23:22 sri well, a true 64bit test case is out of the question :)
23:23 * psimanx1 fires up his quantum computer...
23:23 psimanx1 Apprently the result was 42
23:23 psimanx1 *Apparently
23:24 sri purl: 42?
23:24 purl i think 42 is right one
23:24 psimanx1 There you go then - problem solved.
23:34 sri hmm
23:35 sri the current 32bit fallback code works with a 64bit perl
23:38 sri chrome, firefox and webkit nightly
23:52 sri psimanx1: perl -E'my $i = 400000; say unpack("B*", pack("NN", $i >> 32, $i & 0xFFFFFFFF));'
23:52 sri what does that produce on a 32bit perl?
23:52 psimanx1 00000000000001100001101010000000​00000000000001100001101010000000
23:52 sri hmm
23:54 sri psimanx1: and perl -E'my $i = 400000; say unpack("B*", pack("NN", 0x00000000, $i & 0xFFFFFFFF));'
23:55 psimanx1 00000000000000000000000000000000​00000000000001100001101010000000
23:55 sri hmm
23:56 psimanx1 Don't think bitwise works as it forces perl to integers (and limits to 32 bit) - the way I did it allows perl to go to doubles in the background - although my understanding may be faulty.

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary