Camelia, the Perl 6 bug

IRC log for #mojo, 2013-05-11

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

All times shown according to UTC.

Time Nick Message
00:06 good_news_everyone joined #mojo
00:06 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/lmQf0g
00:06 good_news_everyone mojo/master ab9195e Sebastian Riedel: merge parameters slightly more efficiently
00:06 good_news_everyone left #mojo
00:08 mrphilov joined #mojo
00:18 mrphilov joined #mojo
00:23 ka2u joined #mojo
00:27 good_news_everyone joined #mojo
00:27 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/ymFjqA
00:27 good_news_everyone mojo/master ec14f4a Sebastian Riedel: renamed shape_match method in Mojolicious::Routes::Pattern to match_partial
00:27 good_news_everyone left #mojo
00:28 mrphilov joined #mojo
00:33 cooper joined #mojo
00:35 sri and found a few more \o/
00:42 mrphilov joined #mojo
00:44 ka2u joined #mojo
00:46 good_news_everyone joined #mojo
00:46 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/sY6uNw
00:46 good_news_everyone mojo/master b287b49 Sebastian Riedel: removed hmac_md5_sum function and method
00:46 good_news_everyone left #mojo
00:50 sri other candidates for removal are b64_encode, b64_decode, md5_sum, md5_bytes, sha1_sum, sha1_bytes
00:51 sri b64_* functions kinda serve a purpose, since MIME::Base64 likes to segfault if it's not called correctly
00:52 sri md5/sha1 functions are just there so they are automatically picked up for Mojo::ByteStream ;p
00:52 mrphilov joined #mojo
00:56 tianon they're very nice for not having to remember exactly what module to pull each one from, but that's just me being lazy :)
00:57 * sri nods
00:58 sri we don't do that for all useful stuff in core though, no gzip/gunzip for example
01:02 mrphilov joined #mojo
01:03 sri oh, i could also change url_escape/unescape to the more correct names url_encode/decode
01:03 * sri wonders how much code that would break :)
01:04 sri wow, almost 200 lines of code removed during the last few days
01:05 sri down to 9050 lines now
01:13 mrphilov joined #mojo
01:23 mrphilov joined #mojo
01:34 mrphilov joined #mojo
01:36 KindTwo joined #mojo
01:44 mrphilov joined #mojo
01:50 jnbek joined #mojo
01:53 jnbek joined #mojo
01:55 mrphilov joined #mojo
02:05 mrphilov joined #mojo
02:15 mrphilov joined #mojo
02:18 jberger yay code removal!
02:19 sri almost forgot about Mojo::DOM::charset
02:19 jberger the b64 function are probably used for images in ::Lite single-file apps right
02:20 sri and more
02:20 sri session cookies too
02:20 jberger so why are they on the chopping block?
02:21 sri multipart boundary too i guess
02:21 sri because using MIME::Base64 is just as easy
02:21 sri well almost
02:22 sri aside from the segfault thing
02:22 sri websockets also use base64 :)
02:22 jberger preventing segfaults is much preferred :-)
02:23 sri https://github.com/kraih/mojo/b​lob/master/lib/Mojo/Util.pm#L47
02:23 sri it's not really much to it
02:23 jberger oh
02:23 jberger so what's the segfault problem?
02:23 sri bad arguments
02:24 sri it's very very picky
02:24 jberger and this wrapper is enough to prevent it?
02:24 sri ye
02:24 jberger as silly as it sounds, that almost sounds worth the two lines of code to keep it
02:24 sri i should have added a comment with details... because i barely remember :S
02:25 sri and of course, those functions are good for Mojo::ByteStream https://github.com/kraih/mojo/blob​/master/lib/Mojo/ByteStream.pm#L11
02:25 sri adding them manually would be *a lot* more code
02:25 sri like *A LOT*
02:26 mrphilov joined #mojo
02:28 mattp joined #mojo
02:30 sri yea, i guess i'll remove ->charset from Mojo::DOM for now
02:30 sri then everything is characters in the API
02:30 sri much easier to grok
02:33 human39 joined #mojo
02:34 sivoais joined #mojo
02:36 mrphilov joined #mojo
02:46 mrphilov joined #mojo
02:48 human39 joined #mojo
02:49 sri yea, it's so much cleaner
02:52 jberger the idea being if its not in utf8, decode it before passing it to Mojo::DOM?
02:52 sri eeeep
02:52 sri just say characters :)
02:52 sri but yea
02:53 jberger ok, yeah, characters
02:53 * jberger is only paying 1/2 attention right now
02:53 * sri sets jberger on fire again
02:53 jberger oh man, I'm always being set on fire~!
02:54 * jberger puts himself out with a comical seltzer sprayer
02:55 sri \o/
02:56 good_news_everyone joined #mojo
02:56 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/WhlO5A
02:56 good_news_everyone mojo/master 2dc883a Sebastian Riedel: removed charset support from Mojo::DOM
02:56 good_news_everyone left #mojo
02:57 mrphilov joined #mojo
02:57 sri the get command and ->dom method still know how to handle decoding though
02:57 sri so we have examples
02:58 human39 joined #mojo
02:58 sri and we are down to 9033 lines
03:02 jberger sri++
03:02 sri changelog is getting funky
03:02 sri https://github.com/kraih/mojo/blob/master/Changes
03:03 jberger well, its earned its "major release" status
03:04 moltar joined #mojo
03:08 mrphilov joined #mojo
03:19 mrphilov joined #mojo
03:21 sri being able to change absolutely everything is liberating, we should do major releases more often :)
03:29 mrphilov joined #mojo
03:30 jberger :-)
03:30 jberger wow! I visited this just last summer!
03:30 jberger http://boingboing.net/2013/04/22/i​nside-a-mile-deep-open-pit-co.html
03:31 sri wow
03:32 jberger I'm trying to decide if that building on the edge is the visitor center
03:39 preflex_ joined #mojo
03:41 mrphilov joined #mojo
03:42 ka2u joined #mojo
03:47 mattastrophe joined #mojo
03:49 basiliscos joined #mojo
03:52 mrphilov joined #mojo
03:52 fildon__ joined #mojo
04:02 mrphilov joined #mojo
04:05 ka2u joined #mojo
04:08 basiliscos joined #mojo
04:12 mrphilov joined #mojo
04:13 jberger called my friend out there
04:13 jberger the visitor's center is under the slide!
04:14 jberger :-o
04:14 jberger luckily they had lots of warning
04:14 jberger anyway, twas fun working on the stuff today, it all helps me get better at thinking non-blocking
04:14 jberger o/
04:15 sh4 joined #mojo
04:22 good_news_everyone joined #mojo
04:22 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/9P75nw
04:22 good_news_everyone mojo/master 18472f7 Sebastian Riedel: small optimizations
04:22 good_news_everyone left #mojo
04:23 sri \o
04:27 mrphilov joined #mojo
04:38 mrphilov joined #mojo
04:48 mrphilov joined #mojo
04:58 mrphilov joined #mojo
05:01 ka2u joined #mojo
05:09 mrphilov joined #mojo
05:19 mrphilov joined #mojo
05:20 zacts joined #mojo
05:29 mrphilov joined #mojo
05:40 mrphilov joined #mojo
05:46 jnbek joined #mojo
05:50 mrphilov joined #mojo
05:52 dod joined #mojo
05:53 xaka joined #mojo
06:00 mrphilov joined #mojo
06:10 mrphilov joined #mojo
06:14 dod joined #mojo
06:21 mrphilov joined #mojo
06:31 mrphilov joined #mojo
06:36 Mike-PerlRecruiter_ joined #mojo
06:41 mrphilov joined #mojo
06:43 Vandal joined #mojo
06:52 mrphilov joined #mojo
07:02 mrphilov joined #mojo
07:12 mrphilov joined #mojo
07:24 mrphilov joined #mojo
07:29 suy joined #mojo
07:34 mrphilov joined #mojo
07:45 mrphilov joined #mojo
07:55 mrphilov joined #mojo
08:01 rihegher joined #mojo
08:05 mrphilov joined #mojo
08:05 ka2u joined #mojo
08:15 Vandal joined #mojo
08:16 mrphilov joined #mojo
08:21 abra joined #mojo
08:25 rihegher left #mojo
08:26 mrphilov joined #mojo
08:36 denisboyun_ joined #mojo
08:36 mrphilov joined #mojo
08:47 mrphilov joined #mojo
08:52 dpetrov_ joined #mojo
08:57 mrphilov joined #mojo
09:01 ObseLeTe joined #mojo
09:02 iukai joined #mojo
09:02 ObseLeTe joined #mojo
09:07 iukai joined #mojo
09:07 mrphilov joined #mojo
09:07 basiliscos joined #mojo
09:08 denisboyun_ joined #mojo
09:18 mrphilov joined #mojo
09:28 mrphilov joined #mojo
09:37 mire joined #mojo
09:38 mrphilov joined #mojo
09:47 denisboyun_ joined #mojo
09:49 mrphilov joined #mojo
09:59 mrphilov joined #mojo
10:30 sh4 joined #mojo
10:56 hrupp joined #mojo
10:58 abra_ joined #mojo
11:06 inokenty joined #mojo
11:13 basiliscos joined #mojo
11:20 denisboyun_ joined #mojo
11:28 dabudabu joined #mojo
11:57 human39 joined #mojo
12:08 denisboyun joined #mojo
12:17 moltar joined #mojo
12:27 Vandal joined #mojo
12:32 suy joined #mojo
12:33 denisboyun joined #mojo
12:42 sh4 joined #mojo
12:52 rem_lex| joined #mojo
12:54 human39 joined #mojo
14:02 jzawodn joined #mojo
14:05 dpetrov_ joined #mojo
14:05 bpmedley left #mojo
14:18 jberger sri: any opposition to my writing a pre-4.0 blog post about the recent work
14:19 jberger I especially want to highlight the way that SO can drive innovation in projects
14:19 jberger but maybe it can build a little momentum for the release
14:20 jberger and I can mention your c10k results too
14:23 sh4 joined #mojo
14:28 sri jberger: sure, my announvement will use the same format as usual
14:28 jberger cool, I will work on it this morning
14:29 jberger won't be a big thing
14:29 jberger but I really do like it when this kind of interaction happens, so I thought I would highlight it
14:30 jberger and hey if I get to show off mojo and its performance enhancements and build to the release, so much the better
14:30 * jberger has drunk the open source koolaid
14:31 basic6 joined #mojo
14:32 memowe tempire: thanks! No time ATM, but will do it later. :)
14:36 sri jberger++
14:46 denisboyun joined #mojo
14:57 jberger :-/ hmmm, this doesn't sound promising:  http://blogs.perl.org/users/peter_rabb​itson/2013/05/belated-hello-world.html
15:12 sri some people just want to see the world burn
15:16 denisboyun joined #mojo
15:21 denisboyun_ joined #mojo
15:33 sri has anyone ever used Test::Mojo::or?
15:35 sri ah, jberger has
15:36 jberger I seem to recall that I have, where did I do it :-P
15:36 sri some galileo test
15:36 * jberger looks
15:38 jberger oh yeah, that was handy
15:40 jberger https://github.com/jberger/Galil​eo/blob/master/t/locations.t#L18
16:03 good_news_everyone joined #mojo
16:03 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/WOm-NQ
16:03 good_news_everyone mojo/master 08cb8f4 Sebastian Riedel: removed captures attribute from Mojolicious::Routes::Match
16:03 good_news_everyone left #mojo
16:08 * sri always forgets optimizing things that have been in since 0.9 days
16:10 denisboyun_ joined #mojo
16:17 dod joined #mojo
16:23 avkhozov joined #mojo
16:25 good_news_everyone joined #mojo
16:25 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/vAYeTA
16:25 good_news_everyone mojo/master 53a999e Sebastian Riedel: documentation tweaks
16:25 good_news_everyone left #mojo
16:25 denisboyun_ joined #mojo
16:50 crab announcement when?
16:56 sri when it's ready, i'm not in a hurry now
16:56 sri gonna clean up all the legacy stuff first
17:01 mrphilov joined #mojo
17:02 crab hmm, why was hmac_md5_sum removed?
17:02 Britzel joined #mojo
17:02 sri because it's not used in core anymore
17:05 jberger_ http://blogs.perl.org/users/joel_berger/2​013/05/mojolicious-40-is-coming-soon.html
17:11 sri jberger++
17:11 sri tracking that down was fun indeed
17:12 sri the new json stuff might also have been noteworthy, you've been pushing for that to be added for weeks :)
17:12 mrphilov joined #mojo
17:12 crab sri: ah
17:13 jberger_ I thought about it
17:13 jberger_ maybe I will add another paragraph
17:13 sri or another blog post tomorrow ;)
17:14 sri would be nice if blogs.perl.org had a way to embed gists
17:19 jberger_ updated
17:20 jberger_ oh, tomorrow would have worked :-P
17:20 jberger_ btw, it can, just by embedding the js snippet
17:20 jberger_ but the CSS looks bad
17:21 jberger_ I have tried to get them to fix it, but it has been on their back-burner
17:22 jberger_ oh! they fixed it!
17:22 jberger_ http://blogs.perl.org/users/joel_b​erger/2013/02/a-new-protocol-for-s​ending-files-over-websockets.html
17:22 jberger_ good
17:22 sri oh
17:22 jberger_ the problem was the line numbers and lines not matching up
17:23 jberger_ last block in here: http://blogs.perl.org/users/​joel_berger/styles/base.css
17:24 jberger_ they used my patch and everything!
17:24 jberger_ <3
17:24 jberger_ <3 css3
17:24 mrphilov joined #mojo
17:26 * sri is really happy with the removal of charset support from Mojo::DOM, makes the api so much nicer
17:29 crab now the caller handles it?
17:30 sri ye
17:31 crab sri: after reading scrollback: X-Powered-By => Server makes me happy, top hat is fine (but is it a unicode character? or are we moving away from that?)
17:31 sri you only have to look at all the doc changes no notice how much better it got https://github.com/kraih/mojo/commit/2dc88​3a6a607a965edd801305e908dffba8b982c#L1L469
17:31 crab yes, i was just reading the diff
17:31 crab looks good
17:31 sri jberger_: that's your cue :)
17:32 sri IS TOP HAT A UNICODE CHAR?
17:32 jberger_ its a named code point?
17:33 sri *cough*
17:33 * jberger_ crumbles under pressure!
17:33 sri jberger_: you were supposed to show the top hat!
17:33 jberger_ oh
17:33 jberger_ I thought you were testing me on my unicode knowledge
17:34 jberger_ 🎩
17:34 jberger_ :-)
17:34 jberger_ perl -CSAD -Mcharnames=:full -E 'say "\N{TOP HAT}"'
17:34 sri \o/
17:34 * jberger_ kinda likes the smiling emoticon under the top hat
17:35 jberger_ 🎩
17:35 jberger_ \o/
17:35 jberger_ hmmmm
17:35 jberger_ 🎩
17:35 jberger_ \o/
17:35 jberger_ gotta put a space before the hat to line it up
17:36 jberger_ I specifically didn't up the codename in my blog post btw
17:36 jberger_ even though its not really a secret, I thought thats best left to the official announcement
17:40 sri it could still change
17:41 sri say if marcus pops up to tell us that he has a phobia of top hats or so :)
17:42 crab i guess my unicode tables are out of date. sigh.
18:02 suy joined #mojo
18:02 ObseLeTe joined #mojo
18:08 good_news_everyone joined #mojo
18:08 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/a4za4Q
18:08 good_news_everyone mojo/master 917a4d4 Sebastian Riedel: fixed a few inconsistencies in Mojolicious::Routes::Match
18:08 good_news_everyone left #mojo
18:09 sri not sure where to go with the Mojolicious::Routes::Match api
18:10 sri it's our weakest api imo
18:13 jberger_ hmmm, I haven't ever used it
18:13 jberger_ but in the meantime, I gotta go
18:13 sri doubt anyone has ever used it directly :)
18:13 jberger_ maybe its ok for now
18:14 sri now is the time to clean up legacy ;)
18:15 * jberger_ trusts sri
18:16 * jberger_ goes to buy a nerdy gift for a friend's graduation party
18:16 jberger_ o/
18:23 sh4 joined #mojo
18:26 ynonp joined #mojo
18:33 bowtie joined #mojo
18:34 suy_ joined #mojo
18:36 Mike-PerlRecruiter_ joined #mojo
19:02 sri interesting "if length $foo" appears to be slightly slower than "if $foo ne ''"
19:04 sri on 5.16... on 5.10 it's the other way around :)
19:09 ObseLeTe joined #mojo
19:25 Britzel joined #mojo
19:42 tempire http://tempi.re/images/top_hat.png
19:42 tempire \o/
19:43 * Britzel eyes are bleedin'
19:59 sri \o/
20:14 jberger_ tempire: awesome!
20:15 jberger_ sri: I think we gotta stick with 🎩 then
20:15 sh4|2 joined #mojo
20:15 sri we don't know yet about marcus top hat phobia though
20:23 jberger_ is marcus likely to have top hat phobia?
20:24 marty I have a perl question that has be stumped.  It
20:25 marty I'm sure it's simple.  Why does $foo->{bar} = 1;  dump as a number while $foo->{bar} = 1.0; dumps as a string.
20:26 marty ie: when I dump $foo I get 1 and '1.0'
20:28 jberger_ you might get some help via Devel::Peek
20:29 jberger_ perl -MDevel::Peek -E '$foo->{bar} = 1.0; Dump $foo->{bar}'
20:29 yko ::Peek will give you different dumps for $thing = 1.0 and $thing = '1.0';
20:29 jberger_ I get that its an NV or number
20:30 jberger_ a string would be a PV
20:30 jberger_ I think you must be doing something a little more than what you're saying
20:31 jberger_ or else our perl's (yes lowercase) disagree
20:31 yko jberger_: $thing = 1 also gives IV which stands for signed int, when NV stands for double
20:31 jberger_ yko, was just about to say that :-)
20:32 jberger_ fear of hats: cocklaphobia
20:32 yko jberger_: I think marty refers to Data::Dumper behavior which really gives you a different dumps for 1 and 1.0
20:32 * jberger_ tries
20:32 yko it actually stringifies NV for some reason
20:33 yko well, it's kinda a little offtop here, isn't it? :)
20:33 jberger_ precision
20:33 jberger_ so that it can be eval-ed back in full precision
20:34 jberger_ safer that way
20:35 jberger_ marty, try using Data::Printer for more accurate representations
20:35 marty Thank you, guys.  I'll give your suggestions a try.
20:35 jberger_ for human inspection I should say, it is not meant for evaling
20:35 sivoais joined #mojo
20:35 yko dunno. eval '1.0001' gives a proper NV back. there's probably some historical reasons behind that decision in Data::Dumper
20:38 yko hmm. the fact that actual NV 1.0 is serialized into a string '1' seems wrong to me
20:51 sri perl -Mojo -E 'say j({test => 1.0})'
20:52 jberger_ perl -Mojo -E 'say r({test => 1.0})'
20:54 jberger_ yko, I think I agree with you
20:54 sri perl -Mojo -E 'say j(eval r({test => 1.0}))'
20:54 sri :(
21:02 yko since SvNV is not used at all in Dumper.xs, I think implementers didn't bother to serialize doubles at all, just convert them to PV and let perl deal with it
21:06 yko I think authors had enough headache dealing with integers 64 vs 32 bits, so just gave up on doubles
21:06 yko marty, by the way, wat was the problem that made you ask that question?
21:07 marty omg.  could it be possible that Data::Dumper modifies the data in memory?  Cuz if I remove any dumper commands things work as expected.
21:07 sri very likely yes
21:07 sri i heard about that before
21:07 * marty pulls hair out
21:08 sri yko: i assume it's about JSON/BSON serializing numbers
21:08 sri after Data::Dumper you get a string instead
21:09 marty yko.  I was inspecting mango queries.  I'm creating a query on a field that has doubles.  So I guess I just need to be aware of that in the future.
21:10 sri pretty annoying problem when you have to communicate with other languages than perl
21:10 yko it does. perl -MDevel::Peek -MData::Dumper -e '$x = 1.0;  Dump $x; print Dumper \$x; Dump $x'
21:10 marty It appreas that Data::Printer does not cause the problem.  Myabe I'll write a little help to use that in some situations.
21:11 marty s/help/helper/
21:11 yko well, just to say, it's not Data::Dumper, it's perl who does that.
21:12 sri if only there was flag telling us if something was defined as a number or string originally
21:12 * marty nods
21:13 yko perl doesn't guarantee you your data will keep it's type, because of conversion.
21:14 yko perl -MDevel::Peek -e '$x = 1.0;  Dump $x; "$x"; Dump $x'
21:14 sri yea, that wouldn't change such a flag though
21:14 yko after you do any stringification to a variable that was int/double, it becames a string.
21:15 sri nothing else we can do to make JSON/BSON work in perl :/
21:15 yko NV value still hangs around, but I think it have no priority over PV. or something like that.
21:15 sri basically every serializer uses that trick
21:16 yko which one?
21:16 sri https://github.com/kraih/mojo/bl​ob/master/lib/Mojo/JSON.pm#L295
21:18 yko I'm not sure I've got the point
21:18 perlite joined #mojo
21:18 sri i think we were talking past each other
21:18 yko Ah. I see
21:22 yko "if only there was flag" <-- it probably exists, but it's tricky though
21:25 yko as far as I can see NOK flag tells you that the variable has NV (double ) value that reflects exact value of the variable
21:40 sri i don't think it does, the discussion keeps coming up on p5p
21:52 russum left #mojo
21:52 BeDa joined #mojo
21:54 rem_lex| joined #mojo
21:57 good_news_everyone joined #mojo
21:57 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/gwIo9A
21:57 good_news_everyone mojo/master 037f2eb Sebastian Riedel: fixed a few more inconsistencies in Mojolicious::Routes::Match
21:57 good_news_everyone left #mojo
22:02 sri not entirely happy with the api yet, but it's at least a little better (and faster)
23:22 denisboyun joined #mojo
23:33 ka2u joined #mojo
23:43 good_news_everyone joined #mojo
23:43 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/2arTfw
23:43 good_news_everyone mojo/master c14ed25 Sebastian Riedel: documentation tweaks
23:43 good_news_everyone left #mojo
23:44 connor_goodwolf joined #mojo
23:57 btyler joined #mojo

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