Camelia, the Perl 6 bug

IRC log for #mojo, 2011-05-26

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

All times shown according to UTC.

Time Nick Message
00:04 sri http://www.cpantesters.org/distro​/M/Mojolicious.html#Mojolicious-1.34
00:04 sri WTF?
00:04 sri 3 fail reports and 2 of those are for another module
00:16 tardisx that's weird
00:16 AigleNoir left #mojo
00:17 miyagawa looks like a bug on cpantesters site
00:20 tardisx I went to some other module's cpantesters page and the same problem exists
00:21 tardisx I feel like it's cpantesters (module) itself that is broken, so when people upgrade it is a dependency (because they are test bots) it fails, and it looks like the fault of the module being tested
00:22 miyagawa I doubt it
00:22 tardisx http://www.cpantesters.org/cpan/report​/05458955-b19f-3f77-b713-d32bba55d77f
00:22 tardisx from API::Plesk results
00:22 tardisx looks rather similar
00:23 AigleNoir joined #mojo
00:23 tardisx maybe the links are just buggered, because that doesn't even mention the module in question
00:24 miyagawa yep.
00:24 miyagawa reporter is normal. The website is broken.
00:24 tardisx if only they'd used a better web framework!
00:45 AigleNoir left #mojo
00:46 AigleNoir joined #mojo
00:46 AigleNoir left #mojo
00:47 perlrocks Twitter: "@ Kraih Can you pretty please replace Storable with something else, maybe JSON in Mojolicious:: Sessions? It causes compatibility problems ..." (ru) --skaurus http://twitter.com/skaurus​/status/73550733219340288
00:51 AigleNoir joined #mojo
01:07 AigleNoi1 joined #mojo
01:08 AigleNoir left #mojo
01:15 sri https://github.com/kraih/mojo/issues/151 # thoughts?
01:20 * marty added his thoughts on the issue
01:25 perlrocks Twitter: "Mojolicious::Plugin::Toto 0.02: A simple tab and object based site structure http://twurl.nl/jmtxz0" --lordnaastik http://twitter.com/lordnaast​ik/status/73560338741739520
01:25 perlrocks Twitter: "New release: Mojolicious::Plugin::Toto 0.02 http://bit.ly/m6O3bx" --softpedialinux http://twitter.com/softpedial​inux/status/73560339463143425
01:25 perlrocks Twitter: "Mojolicious::Plugin::Toto 0.02: A simple tab and object based site structure http://bit.ly/lJw8vs" --J03_PY http://twitter.com/J03_PY/status/73560340176175105
01:26 sri added more thoughts
01:32 marty Added more more thoughts
01:33 sri BSON seriously?
01:33 marty not?  :)
01:33 sri while i do have a complete pure perl implementation it would again require a switch to Perl 5.10+ -.-
01:34 * marty loves the idea of 5.10+
01:35 sri are you volunteering to manage the switch? :)
01:36 marty Ummm, does that mean I have to take all that venomous spewing like you got on the last effort to switch?  :)
01:36 sri https://github.com/kraih/mojo/issues/151 # JSON is an option, but i'd like to see cold hard data first
01:36 sri marty: that's exactly what it means ;p
01:38 sri for the next 5.10+ switch attempt i'll prolly get marcus drunk and try to talk him into becoming the release manager or so :D
01:40 marty hehe.  I will definitely volunteer to be a Marcus fan boy and back him up with "why 5.10+ is the only SANE solution" rhetoric.  :)
01:43 marty I'll admit that I am becoming very fond of JSON for these days, very easy to work with.
01:43 marty s/for//
01:43 * sri loves JSON
01:44 sri the only problem is size
01:47 sri wtf
01:47 sri json looks actually smaller
01:47 marty WTF?
01:48 mikegrb I'll buy one of the beers for marcus
01:48 marty Even Hommer would say... WFT?
01:48 sri confirmed, json serialized sessions are smaller than Storable :O
01:48 sri by a lot actually
01:48 marty Makes one wonder, what is storable putting in there?
01:49 sri 88 bytes JSON, 120 bytes Storable
01:49 sri could be base64
01:50 sri storable binary data might be harder to base64 encode
01:52 marty That's interesting.  Very counter intuitive at first look.
01:54 GitHub121 joined #mojo
01:54 GitHub121 mojo: master Sebastian Riedel * 9de03e8 (4 files in 3 dirs): switched from Storable to JSON serialization for Mojolicious sessions - http://bit.ly/jcp64Y
01:54 GitHub121 left #mojo
01:54 marty wow, that was quick
01:54 * marty is downloading now...
01:54 sri had teh code written for testing anyway
01:57 * crab sniffles sadly
01:58 marty crab:  You don't like the change?
02:00 crab i like storable
02:01 sri more than json? Oo
02:01 crab (btw, binary data is no harder to base64 encode than anything else.)
02:01 crab sri: well, i am the storable maintainer, it's in my contract ;-)
02:01 sri was just my first guess, kinda weird Storable is bigger
02:02 sri crab: ooooh, so you are to blame for the size of its output? :D
02:02 * sri hands out pitchforks
02:03 crab i can't be held responsible if you put in, uh, big-boned data into it.
02:03 sri heh
02:03 marty crab: \o/   !!
02:05 crab hm. i wonder if sending content-disposition: attachment; filename=foo.bar works well these days.
02:06 bgsmith joined #mojo
02:09 GitHub179 joined #mojo
02:09 GitHub179 mojo: master Sebastian Riedel * f22bfe5 (1 files in 1 dirs): micro optimization - http://bit.ly/iFCxjR
02:09 GitHub179 left #mojo
02:10 j3nnn1 left #mojo
02:22 GitHub39 joined #mojo
02:22 GitHub39 mojo: master Sebastian Riedel * 48133a7 (1 files in 1 dirs): ignore invalid session data - http://bit.ly/lRvJwK
02:22 GitHub39 left #mojo
02:23 bgsmith left #mojo
02:28 perlrocks Twitter: "This really surprised me, json serialization is actually more efficient than storable for #mojolicious sessions. http://t.co/pO27qaw #perl" --kraih http://twitter.com/kraih/status/73576210755633153
02:32 alnewkirk joined #mojo
02:39 bgsmith joined #mojo
02:42 sri looks like Storable keeps a lot more meta data
02:43 sri perl -MMojo::JSON -MStorable=freeze -e'my $data = {user => $ARGV[0]}; print length(freeze $data), "\n", length(Mojo::JSON->new->encode($data)),"\n"' Sebastian
02:46 sri 39 vs 20
02:49 crab yeah. magic numbers and whatnot.
02:49 crab do you still base64 encode? (sorry, haven
02:49 crab 't looked at the patch yet)
02:49 sri yea of course
02:50 sri json can contain unicode chars
02:50 crab right
02:50 sri json is really a binary format that can look ascii if you use the right data
02:53 crab i wrote a really nice c++ json implementation once, but the project it was for fell through. pity. i wish it had seen some real use.
02:53 sri guess we could also compress it with zlib
02:54 * sri really likes json
02:54 crab especially because i wrote it on the shore of the pong dam reservoir in the himalayan foothills, with only the rfc for company :-)
02:54 sri it only has very few flaws
02:54 sri how very zen :)
02:55 crab i wish i had a laptop with more battery life. hacking in the mountains is sometimes really great.
03:16 AigleNoir joined #mojo
03:20 AigleNoi1 left #mojo
03:28 mattastrophe joined #mojo
03:32 bgsmith left #mojo
03:42 crab sigh. there are so many ways to introduce XSS vulnerabilities.
03:47 bgsmith joined #mojo
04:08 ua left #mojo
04:08 marty_ joined #mojo
04:09 mattp left #mojo
04:10 bgsmith left #mojo
04:10 ryanc left #mojo
04:10 meraxes left #mojo
04:10 daviddelikat1 left #mojo
04:10 marty left #mojo
04:10 ryanc joined #mojo
04:13 ua joined #mojo
04:23 meraxes joined #mojo
04:26 mattp joined #mojo
04:26 daviddelikat joined #mojo
04:27 bgsmith joined #mojo
05:34 AmeliePoulain joined #mojo
05:50 abra left #mojo
05:54 d4rkie_ left #mojo
05:59 marcus mikegrb: beer?? where?? ;)
06:02 abra joined #mojo
06:04 tabbi joined #mojo
06:04 tabbi left #mojo
06:07 Alias joined #mojo
06:10 marcus sri: I'd love to take the heat for 5.10+
06:13 * crab gently warms marcus over a bunsen burner
06:13 marcus turn it up more!
06:13 Alias left #mojo
06:13 koban` joined #mojo
06:30 fhelmber_ joined #mojo
06:32 marcus http://www.reuters.com/article/2011/0​5/24/us-yandex-idUSTRE74M3BS20110524 Guess Yandex must be one of the biggest perl companies out there
06:34 crab christ. the sidebar on that site is annoying. i wanted to look at it, but it kept scrolling down, down, down and hiding itself.
06:42 d4rkie joined #mojo
06:51 abra left #mojo
06:53 bgsmith left #mojo
06:57 zakame joined #mojo
06:58 arthas joined #mojo
07:35 ysyrota joined #mojo
07:36 cosmincx joined #mojo
07:57 ajgb joined #mojo
08:10 abra joined #mojo
08:55 Sugar joined #mojo
08:59 Foxcool joined #mojo
09:43 sh4 joined #mojo
10:16 tempire left #mojo
10:22 Sugar left #mojo
10:26 sh4 left #mojo
10:27 sh4 joined #mojo
10:42 perlrocks Twitter: "koorchik's Perl blog: Mojo:: JSON for the sessions in Mojolicious http://ff.im/EdHr4" (ru) --planetperlru http://twitter.com/planetper​lru/status/73700582694719488
11:07 Akron joined #mojo
11:07 fhelmber_ left #mojo
11:07 fhelmber_ joined #mojo
11:22 baton8 left #mojo
11:27 mattastrophe left #mojo
11:29 Sugar joined #mojo
11:51 d4rkie left #mojo
11:52 d4rkie joined #mojo
12:03 marty_ is now known as marty
12:12 elb0w :o
12:13 crab when my elbow says :o, it's usually because i banged it against something
12:17 daviddelikat left #mojo
12:18 elb0w lol
12:20 Akron left #mojo
12:38 * marcus bangs elb0w against something
12:57 Foxcool left #mojo
13:04 crab oh no! causality has been reversed! we're in a singularity!
13:11 ysyrota left #mojo
13:15 ysyrota joined #mojo
13:16 Foxcool joined #mojo
13:21 AmeliePoulain left #mojo
13:27 metaperl left #mojo
13:40 daviddelikat joined #mojo
13:41 daviddelikat left #mojo
13:50 sh4 left #mojo
13:55 perlrocks Twitter: "Mojolicious:: Lite in writing and testing code that returns JSON, Jenkins in the CI. Great weight. Behind the scenes is a good test of the client as it is after this line." (ja) --pepe_la_phew http://twitter.com/pepe_la_p​hew/status/73749047617392640
14:08 d4rkie left #mojo
14:09 metaperl joined #mojo
14:19 sri hmm
14:19 sri why did nobody point out that freeze was wrong? :S
14:20 sri nfreeze is a lot more efficient
14:24 marty I still get JSON as being slighly more efficient than nfreeze
14:24 marty perl -MMojo::JSON -MStorable=nfreeze -e'my $data = {user => $ARGV[0]}; print length(nfreeze $data), "\n", length(Mojo::JSON->new->encode($data)),"\n"'
14:24 sri slightly
14:25 GitHub181 joined #mojo
14:25 GitHub181 mojo: master Sebastian Riedel * 2c35c45 (4 files in 3 dirs): switched back from JSON to Storable serialization for Mojolicious sessions - http://bit.ly/kYmni3
14:25 GitHub181 left #mojo
14:25 sri in my tests by only 2 bytes
14:25 marty I got 3 bytes on mine  (64 bit)
14:27 Foxcool left #mojo
14:31 zakame left #mojo
14:33 crab sri: er, what?
14:33 crab nfreeze is just freeze, but in network byte order.
14:34 sri and creates results that are half the size of freeze
14:34 sri perl -MMojo::JSON -MStorable=nfreeze -e'my $data = {user => $ARGV[0]}; print length(nfreeze $data), "\n", length(Mojo::JSON->new->encode($data)),"\n"' Sebastian
14:38 Akron joined #mojo
14:41 sri https://github.com/kraih/mojo/issues/151 # and the issue is alive again
14:41 crab that makes no sense
14:41 purl Chewbacca!
14:41 * sri hugs purl
14:41 purl sri: bathe first
14:42 crab i think it's just because your test data is so small that the difference in the size of the magic number at the start is predominating
14:42 crab nfreeze doesn't emit byte order information, while freeze does. but that's just a one-time thing at the beginning.
14:42 sri makes a big difference for normal sessions
14:43 crab really? it should be <16 bytes
14:44 dekimsey joined #mojo
14:45 Foxcool joined #mojo
14:45 sri for {user => 'Sebastian'} it is 39 bytes for freeze and 26 bytes for nfreeze
14:45 amoore joined #mojo
14:45 sri json is 20 bytes
14:46 crab 39-26 = 13
14:46 sri 6 byte difference between json and nfreeze is consistent btw
14:47 crab so should the 13-byte difference between freeze and nfreeze be, at least with modern storables
14:47 sri hmm
14:47 crab (i'm not arguing that you should not use nfreeze, btw.)
14:47 sri structures are so expensive in nfreeze
14:47 sri i'm unsure again
14:47 crab just that "half the size of freeze" is totally wrong.
14:48 sri perl -MMojo::JSON -MStorable=nfreeze -e'my $data = {user => [[[$ARGV[0]]]]}; print length(nfreeze $data), "\n", length(Mojo::JSON->new->encode($data)),"\n"' Sebastian
14:48 sri 44 vs 26
14:48 crab nfreeze stores numbers as strings, so it might even be larger in theory, for some data. but its header is consequently smaller (because it doesn't have to send sizeof(int), sizeof(double) etc, which freeze does)
14:48 sri json wins by a lot with nested structures
14:50 sri hmm
14:50 crab (er, not "numbers", but floating-point numbers)
14:52 crab (hah. there's actually code in storable which sends integers as strings on systems without htonl! i wonder when the last such system ever saw the light of day, if there ever was one.)
14:54 sri https://github.com/kraih/mojo/issues/151 # anyway, discussion is back on, say what you have to there
14:57 d4rkie joined #mojo
15:00 kaare joined #mojo
15:00 sri if there's no clear winner in the thread i think we stick with Storable, since there is less potential for breakage
15:04 koban` left #mojo
15:19 GitHub74 joined #mojo
15:19 GitHub74 mojo: master Sebastian Riedel * 93a44b4 (4 files in 3 dirs): switched from Storable to JSON serialization for Mojolicious sessions to increase efficiency - http://bit.ly/mez6pU
15:19 GitHub74 left #mojo
15:22 sri and we are going with json
15:29 sri btw. BSON is only a little more efficient than nfreeze
15:29 sri JSON wins against both
15:39 crab i'm not sure how much three one-liner tests really tell you about the efficiency of the representation in general. i'd expect json to start losing its advantage for arrays with many strings etc. but then if you're stuffing arrays with many strings into a cookie, you deserve whatever you get.
15:42 moritz I guess BSON mostly wins when storing many integers
15:47 tabbi joined #mojo
15:47 tabbi left #mojo
15:57 cosmincx left #mojo
16:16 sri crab: that's why i'm testing more common session data
16:16 sri {user => 'foo'} being the most common
16:18 kaare left #mojo
16:19 sri perl -MMojo::JSON -MStorable=nfreeze -e'my $data = {roles => [qw/admin user tester/]}; print length(nfreeze $data), "\n", length(Mojo::JSON->new->encode($data)),"\n"'
16:19 sri that one shouldn't be uncommon either
16:19 sri and it's 43 bytes for Storable and 35 bytes for JSON
16:21 sri i've not seen a single one yet where JSON was bigger than Storable
16:27 Akron left #mojo
16:27 perlrocks Twitter: "selfvars::autoload : Write #Mojolicious apps with #Dancer syntax! — https://github.com/audreyt/selfvars/​blob/master/lib/selfvars/autoload.pm" --audreyt http://twitter.com/audreyt​/status/73787339234738177
16:33 crab sri:
16:33 crab $ perl -MMojo::JSON -MStorable=nfreeze -e'my $data = {roles => [qw/admin user tester/x3452]}; print length(nfreeze $data), "\n",
16:33 crab length(Mojo::JSON->new->encode($data)),"\n"'
16:33 crab 72514
16:33 crab 82859
16:33 crab gah. sorry. i expected that to paste as only two lines.
16:35 crab but you don't have to go so far as 3452. even with x5, storable output is a few bytes less than json.
16:37 crab with x4, storable is one byte smaller :-)
16:38 crab that audreyt module is funny. you don't need to write $self->blah() any more, you can just blah()
16:43 sri crab: that doesn't fit in a cookie
16:48 ysyrota left #mojo
16:49 sri haha, that audreyt module is really funny
16:53 crab 131 bytes fits in a cookie
16:54 crab (it's s:127 j:131 for x5 in the example above)
16:55 sri seems like a very good tradeoff
16:55 crab but really, i don't know why i'm arguing. i don't think it matters either way.
16:56 sri yea, don't think you can make it matter inside 4096 bytes (which doesn't even include base64 and hmac checksum yet)
16:58 sri big hash would be the msot realistic i guess
16:58 crab if it has more than a dozen key/values, i'd expect storable to win again, but still, just a few bytes
16:58 sri perl -MMojo::JSON -MStorable=nfreeze -e'my $data = {}; $data->{"foo$_"} = "bar$_"  for 1 .. 20 ;print length(nfreeze $data), "\n", length(Mojo::JSON->new->encode($data)),"\n"'
16:58 sri nope, json wins
16:59 sri by 6 bytes :)
16:59 crab try 25?
16:59 sri 6 bytes
16:59 sri even at 50
17:00 crab oh well.
17:02 sri that audreyt module is crazy
17:08 Sugar left #mojo
17:11 elb0w hows mojo::json vs json::xs?
17:12 sri one is pure perl the other xs and c
17:12 elb0w Yeah I know that
17:12 elb0w have you bench marked them for fun?
17:12 sri not really
17:13 sri xs should be many times faster
17:13 sri i only benchmarked against JSON::PP
17:13 sri mojo::json is about 3 times faster than json::pp
17:14 elb0w nice
17:19 metaperl serving JSON is not likely to be the biggest bottleneck in web service is it?
17:20 sri always the database
17:22 crab it's like sucking huge fibrous gobs of elephant dung through a thin straw and optimising the grass:straw percentage in the elephant's feed
17:22 AigleNoir left #mojo
17:22 AigleNoir joined #mojo
17:22 AigleNoir left #mojo
17:22 metaperl lol
17:23 sri mojo::json will serialize thousands of data structures per second... if you can serialize 10k or 100k doesn't really make a difference for a web service, no
17:23 sri lol
17:23 sri that has to become a purl factoid
17:27 AigleNoir joined #mojo
17:33 sh4 joined #mojo
17:33 AigleNoir left #mojo
17:34 AigleNoir joined #mojo
17:34 AigleNoir left #mojo
17:39 AigleNoir joined #mojo
17:43 marcus sri: https://gist.github.com/993598 think this is a problem in the reloader, or somewhere in our app?
17:45 sri leaking descriptors could be everywhere
17:45 marcus yeah true. it's a pretty plain mojo app tho
17:46 sri mojo version?
17:46 marcus but I'm actually a bit suspicious of our mojo based web service client
17:46 marcus sri: not sure, it was on arne's machine. Can check tomorrow.
17:47 sri should be easy to find out by testing it without --reload
17:47 marcus sri: I think this occured after developing with the server running for a while
17:47 sri if you're leaking descriptors that heavily it shouldn't take too long
17:48 marcus well, I've not seen it on my installation
17:48 sri i've recently noticed that IO::KQueue for example leaks
17:48 marcus he probably has an older mojo version.
17:50 sri i don't think --reload leaks descriptors here though
17:51 sri 10k requests just worked flawless
17:51 sri with the default 128 descriptor limit
17:52 sri --realod got a lot of fixes recently though, try upgrading first
17:54 sri if your web service client was instantiating new useragents all the time that would likely leak too though
17:55 sri or actually not, you would have to screw up pretty bad to make DESTROY not work
17:58 AigleNoir left #mojo
17:58 AigleNoir joined #mojo
17:58 AigleNoir left #mojo
18:03 AigleNoir joined #mojo
18:05 daviddelikat joined #mojo
18:06 daviddelikat left #mojo
18:09 GabrielVieira joined #mojo
18:28 daviddelikat1 joined #mojo
18:28 sh4 left #mojo
18:29 daviddelikat1 left #mojo
18:40 d4rkie left #mojo
18:43 elb0w gvim 3gb file ftw
19:10 fhelmber_ left #mojo
19:11 tempire joined #mojo
19:19 dwiereng1 joined #mojo
19:19 dwierenga left #mojo
19:19 Akron joined #mojo
19:25 dwiereng1 left #mojo
19:25 dwierenga joined #mojo
19:33 dwierenga left #mojo
19:33 dwierenga joined #mojo
19:33 GabrielVieira left #mojo
19:34 GabrielVieira joined #mojo
19:37 elb0w http://www.gamespy.com/articles/117/1170884p1.html
19:41 vel joined #mojo
19:43 Kulag left #mojo
19:44 Kulag joined #mojo
20:05 Akron left #mojo
20:21 d4rkie joined #mojo
20:22 Foxcool left #mojo
20:23 sugar joined #mojo
20:33 metaperl left #mojo
20:40 sugar_ joined #mojo
20:42 sugar left #mojo
20:43 sugar_ is now known as sugar
20:46 tabbi joined #mojo
20:48 tabbi left #mojo
20:54 dekimsey left #mojo
21:11 amoore left #mojo
21:45 sugar left #mojo
22:08 Akron joined #mojo
22:15 AigleNoir left #mojo
22:15 AigleNoir joined #mojo
22:16 AigleNoir left #mojo
22:20 AigleNoir joined #mojo
22:33 metaperl joined #mojo
22:49 Akron left #mojo
22:54 trone joined #mojo
22:59 trone_ left #mojo
23:02 AigleNoir left #mojo
23:02 AigleNoir joined #mojo
23:17 GitHub39 joined #mojo
23:17 GitHub39 mojo: master Sebastian Riedel * 4c166bf (1 files in 1 dirs): added GET/POST parameter example to lite tutorial - http://bit.ly/jloTes
23:17 GitHub39 left #mojo
23:17 sri that one was really missing from the tutorial
23:19 sri an example for file uploads is missing too
23:19 AigleNoir left #mojo
23:20 sri wonder how much detail it needs
23:20 AigleNoir joined #mojo
23:21 AigleNoir left #mojo
23:25 AigleNoir joined #mojo
23:35 perlrocks Twitter: "One small change and the whole #mojolicious lite tutorial has become a lot more well rounded. :) http://t.co/36ZpTHh #perl" --kraih http://twitter.com/kraih/status/73895055353593857
23:37 AigleNoir left #mojo
23:37 AigleNoir joined #mojo

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