Camelia, the Perl 6 bug

IRC log for #mojo, 2013-08-26

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

All times shown according to UTC.

Time Nick Message
00:22 good_news_everyone joined #mojo
00:22 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/Kf3IsA
00:22 good_news_everyone mojo/master 6ea3982 Sebastian Riedel: added SO_REUSEPORT recipe
00:22 good_news_everyone left #mojo
00:22 sri does that look sensible?
00:24 phillipadsmith sri: reads sensibly, if that's what you're asking. :)
00:26 good_news_everyone joined #mojo
00:26 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/90xAeA
00:26 good_news_everyone mojo/master 861be3f Sebastian Riedel: use tmp directory in recipe
00:26 good_news_everyone left #mojo
00:26 sri phillipadsmith: so you have no trouble understanding it?
00:27 * sri is also not sure about the recipe title
00:31 asarch joined #mojo
00:33 StinkfooT joined #mojo
00:50 shmuel joined #mojo
01:07 jberger__ Can't look now, but I will later
01:10 basic6 joined #mojo
01:34 russum joined #mojo
01:35 russum left #mojo
01:43 howcome joined #mojo
01:45 howcome ?? how come ->render( title... ) is ok with <%= title =%> but if i ->render( varvar ...  I need dollar <%= $varvar =%>
01:45 d4rkie joined #mojo
02:40 howcome ?? how come ->render( title... ) is ok with <%= title =%> but if i ->render( varvar ...  I need dollar <%= $varvar =%>
02:50 howcome aha, title is a function https://metacpan.org/module/Mojolic​ious::Plugin::DefaultHelpers#title
02:55 stokachu is $regex supported in mango? i didnt see any examples in the unittests
03:04 stokachu think i got it
03:18 preflex_ joined #mojo
03:22 russum1 joined #mojo
03:22 russum1 left #mojo
03:28 dvinciguerra_ joined #mojo
03:35 KindOne joined #mojo
03:44 laouji joined #mojo
04:00 jberger_ joined #mojo
04:15 russum joined #mojo
04:30 dqw joined #mojo
04:39 hummeleBop joined #mojo
04:55 KindTwo joined #mojo
05:13 ilbot2 joined #mojo
05:13 Topic for #mojo is now 🎩, indubitably | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
05:22 KindOne joined #mojo
05:38 fhelmber_ joined #mojo
06:00 jquery joined #mojo
06:00 jquery how to get /mojo/jquery/ in production mode?
06:07 dpetrov_ joined #mojo
06:11 Lee joined #mojo
06:44 phillipadsmith sri: Yep, made sense to me and no trouble understanding it as written. '
06:50 fhelmbe__ joined #mojo
06:53 fhelmb___ joined #mojo
07:01 Vandal joined #mojo
07:05 Vandal joined #mojo
07:10 batman jberger: Memorize++ :)
07:16 Britzel joined #mojo
07:19 dod joined #mojo
07:24 dod joined #mojo
07:25 arpadszasz joined #mojo
07:42 maxhq joined #mojo
07:53 mire joined #mojo
08:17 denisboyun joined #mojo
08:18 basiliscos joined #mojo
08:33 cosmincx joined #mojo
09:11 denis_boyun_ joined #mojo
09:19 Gedge joined #mojo
09:23 migo sri: shouldn't * be shell-escaped in http://*:8080?reuse=1 ?
09:33 basiliscos joined #mojo
09:40 basiliscos joined #mojo
09:42 dotan joined #mojo
09:50 fhelmber_ joined #mojo
10:24 fhelmbe__ joined #mojo
10:43 da5id joined #mojo
10:43 Grrrr we are seeing funny interaction between Data::Dump and Mojo::JSON;  while Data::Dump is doing something it probably should not be doing, it seems to me that Mojo::JSON is a bit too clever with its numeric-or-not determination:
10:43 Grrrr https://gist.github.com/anonymous/6340200
10:50 fhelmber_ joined #mojo
10:55 batman Grrrr: at least the first part of the statement is true :)
10:58 Grrrr batman: using SVp flags does not seem like a good idea to me;  they tell us "this SV has an IV/NV in it", not "this SV represents a number"
10:58 bowtie_ joined #mojo
10:58 batman but would you detect if it's a number?
10:59 Grrrr did you mean s/but would/but how would/ ?
10:59 batman s/but/how/
10:59 batman sorry. trying to keep two thoughts in my head at once :(
11:00 Grrrr well one can always use the method that Data::Dump is using  :-)    honestly, I do not know what is the "right" way to do it
11:01 batman Grrrr: https://rt.cpan.org/Public​/Bug/Display.html?id=86592
11:01 batman i do believe your problem is Data::Dump...
11:04 Grrrr batman: I am not sure;  technically, it is totally clear what is going on;  as for judging, which module is "wrong", I can argue both ways
11:05 Grrrr batman: for example, pretty much any method in perldoc -q 'How do I determine' would fsck up the pIOK and pNOK flags
11:05 batman but how do you detect "this SV represents a number" without SVp flags ?
11:06 Grrrr batman: well the the perldoc -q above :-)
11:06 Grrrr the problem is ambiguity in what "represents" or "is" actually means
11:06 batman are you kidding me?
11:07 Grrrr whether it is a "looks like" or "the relevant SV field is populated"
11:07 batman how whould you then send "1.23" as a string using json?
11:07 Grrrr do I need to?
11:08 batman i don't know if you need to, but you should be able to!
11:09 Grrrr using p flags is very fragile - as soon as I, totally by accident, use a strin value in a numeric context, poof, Mojo::JSON would output 0
11:09 batman that's why you would write tests
11:10 basiliscos1 joined #mojo
11:12 da5id I would rather have my values stringified, than my strings set to zero - even if I write tests
11:13 batman regardless of what you would mean is correct: you need to be able to make the receiving end get data with the correct type.
11:14 Grrrr what da5id said
11:14 Grrrr batman: no argument there
11:14 dsteinbrunner joined #mojo
11:14 Grrrr batman: so let's agree that Data::Dump is wrong
11:14 batman javascript (which some use...) actually makes the distinction between a number and a string
11:14 Grrrr batman: but now, consider the fallback behavior
11:14 Grrrr of Mojo::JSON vs JSON::XS, for example
11:15 Grrrr if I use Data::Dump, Mojo::JSON will convert all my strings into zeros
11:15 Grrrr while JSON::XS will stringify all my numbers
11:15 Grrrr which repescts POLA better?
11:15 Grrrr jeez, cannot type today
11:16 batman please write a test that proves your point. i don't see how that's possible.
11:16 Grrrr how what's possible?
11:17 batman that it turns the strings into 0
11:17 Grrrr batman: run the script from the gist I pasted, supplying either "pp" or "num" as the argument
11:20 batman and you expect it to output what?
11:23 Grrrr the last line should ideally be '{"number":42,"string":"Mojolicious"}';  kinda okay if it is '{"number":"42","string":"Mojolicious"}';  definitely not ok if it is '{"number":42,"string":0}'
11:30 batman right... i don't see how this is not possible to test though.
11:31 batman i mean: don't use evil dump libraries and make a test that makes sure you're data is what you expect.
11:34 jberger_ We have had this question a lot lately
11:35 jberger_ And we have basically decided that Data::Dump is broken
11:36 jberger_ Actually I'm surprised at how many people it
11:37 jberger_ Personally core Data::Dumper and the few JSON modules are good enough for serialization
11:38 jberger_ And Data::Printer for human inspection
11:38 Grrrr jberger_: as I mentioned, I do not disagree that Data::Dump is broken, the issue (for me) now is a severe violation of POLA by Mojo::JSON as opposed to other JSON modules
11:39 jberger_ I'm not sure what D::Dump's niche is supposed to be
11:39 sri Grrrr: what is more likely, a number being accidentally used as a string or a string being accidentally used as a number?
11:40 sri seriously, the JSON::XS fallback behavior is less useful
11:40 sri $foo =~ /\d+/ is a lot more common than Data::Dump like screwups imo
11:41 sri why would anyone ever intentionally use a string as a number?
11:41 Grrrr sri: I guess that if you subscribe to the "let it break in an obvious way" school then it makes sense
11:42 sri Grrrr: what?
11:42 Grrrr sri: heh;  what I meant is that usually, the consequences of having 42 replaced with "42" are less severe than the consequences of having "hello" replaced with 0
11:43 jberger_ I'm on a phone here so I can't try the snippet
11:43 sri yea, lets break more often because it will surprise Grrrr less
11:43 sri the point is to do the right thing more often then not
11:44 batman POLA? Japan's top cosmetics manufacturer...?
11:45 batman Grrrr: are you serious?? where are you using your json data?
11:45 batman perl <-> perl..?
11:45 batman sri: it is..? i thought the right thing would be to do the wrong thing...............
11:46 batman :)
11:47 sri not using SV flags is crazy talk
11:51 sri if Data::Dump did the right thing we wouldn't even have this talk
11:51 sri because normal people don't use strings as numbers
11:51 Britzel joined #mojo
11:52 Britzel_ joined #mojo
11:57 sri sooo
11:57 sri http://mojolicio.us/perldoc/Mojolicious/Guid​es/Cookbook#Zero_downtime_software_upgrades
11:57 sri does that recipe have the right title and is at the right place in the cookbook?
11:59 peaches joined #mojo
12:04 batman sri: looks nice
12:08 marcus sri: +1
12:08 sri \o/
12:19 fhelmbe__ joined #mojo
12:25 maxhq joined #mojo
12:31 jberger joined #mojo
12:41 mire joined #mojo
12:51 jberger sri: my only question is why use a url parameter rather than a command line switch?
12:52 sri jberger: because it's listen socket specific, and you can have multiple per server
12:52 jberger Not that I care all that much, I just thought I would ask
12:52 sri it's also much less code and documentation
12:53 sri switch means it would apply to all unconditionally
12:53 jberger All good reasons
12:53 sri it may not matter much for the commands, but Mojo::Server::Daemon is supposed to be versatile
12:54 sri Mojo::Server::Daemon->new(listen => ['http://*:4000', 'https://*:5000?cert=/foo/server.crt', 'http://*:3000?reuse=1'])
12:54 sri :)
12:54 jberger Oh true. All commands would have to implement the switch to be able to pass it to the Daemon module
12:55 * jberger like s
12:55 jberger s/ //
12:56 jberger I love how responsive mojo development is:-)
12:57 jberger sri++
12:57 sri http://paste.ubuntu.com/6023147/ # i actually had a patch with a --reuse-port flag first :)
12:58 sri it wasn't just command line, hypnotoad config needs an option too
12:58 jberger right
13:16 good_news_everyone joined #mojo
13:16 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/ZInI-g
13:16 good_news_everyone mojo/master b94af50 Sebastian Riedel: moved timer recipe to prefork section
13:16 good_news_everyone left #mojo
13:22 yakudza joined #mojo
13:25 btyler joined #mojo
13:27 dqw joined #mojo
13:37 fhelmber_ joined #mojo
13:50 dvinciguerra_ joined #mojo
13:52 gryphon joined #mojo
13:57 dqw joined #mojo
14:06 dqw joined #mojo
14:13 espent joined #mojo
14:59 xaka joined #mojo
15:04 bluescreen joined #mojo
15:07 cit joined #mojo
15:07 cit hi
15:09 cit I'm using Mojolicious::Plugin::WWWSession to make use of server-side session management. However, mojolicious sets a client-side signed_cookie and I can't disable the client-side cookie. Does anyone have an idea?
15:16 og01 joined #mojo
15:17 og01 Hi im looking for the documentation that determines automatic filename for a template if the controller is just called with ->render
15:22 og01 the name of the controller just lc()'ed or is it more like the old CGI dispatcher that turns MyModuleName into my-module-name etc
15:23 og01 i guess its just lower case, but i would like to know where in the docs this infomation is
15:27 sh4 joined #mojo
15:28 good_news_everyone joined #mojo
15:28 good_news_everyone [mojo] kraih tagged v4.27 at edb39db: http://git.io/bDc_hA
15:28 good_news_everyone left #mojo
15:32 btyler joined #mojo
15:37 marty joined #mojo
15:38 good_news_everyone joined #mojo
15:38 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/dyulQQ
15:38 good_news_everyone mojo/master 65ece54 Sebastian Riedel: mention hot deployment more often
15:38 good_news_everyone left #mojo
15:47 good_news_everyone joined #mojo
15:47 good_news_everyone [mojo] kraih pushed 1 new commit to master: http://git.io/WvmSNA
15:47 good_news_everyone mojo/master 84188c0 Sebastian Riedel: no need to link to the module
15:47 good_news_everyone left #mojo
15:54 og01 nope i found it, there are examples in  Mojo::Utils under camelize/deacamelize
16:13 btyler joined #mojo
16:27 fhelmber_ joined #mojo
16:33 dod joined #mojo
16:46 sri batman: !
16:47 sri when you tested SO_REUSEPORT, did you update the libc headers?
16:48 sri because that's where the constants come from
16:49 sri so there might just be a kernel/libc headers version mismatch
16:49 sri considering a hardcoded 15 worked
16:51 dotan joined #mojo
16:52 basiliscos joined #mojo
17:07 gryphon joined #mojo
17:15 dqw joined #mojo
17:28 dqw joined #mojo
17:30 denisboyun joined #mojo
17:40 zacts joined #mojo
17:46 d4rkie joined #mojo
17:59 rem_lex joined #mojo
18:04 btyler joined #mojo
18:51 russum joined #mojo
18:55 russum left #mojo
19:06 sjn joined #mojo
19:06 Moataz-E joined #mojo
19:07 Moataz-E joined #mojo
19:11 russum1 joined #mojo
19:12 russum1 left #mojo
19:23 zackiv31 joined #mojo
20:10 dvinciguerra__ joined #mojo
20:15 jnbek joined #mojo
20:18 btyler_ joined #mojo
20:23 btyler joined #mojo
20:24 bluescreen joined #mojo
20:32 russum joined #mojo
20:32 russum left #mojo
20:58 batman sri: no, i don't think so.
20:59 batman i've only installed linux-headers+image
20:59 sri batman: i bet that's the problem :)
20:59 sri solved! \o/
20:59 batman i would be surprised if you where wrong :)
21:00 * batman thinks it's super weird that he released the eight release of mojolicious-plugin-cgi
21:00 sri LeoNerd actually thought of it
21:00 batman i almost feel a bit dirty...
21:00 * tempire tries around_action
21:00 batman LeoNerd++
21:01 sri around_tempire
21:07 peaches joined #mojo
21:20 arthas joined #mojo
21:44 russum joined #mojo
21:52 SmokeMachine joined #mojo
22:00 perlite joined #mojo
23:08 btyler joined #mojo
23:12 tempire Mojolicious::Routes::_walk
23:12 tempire seems like a good place to use a deferred.
23:12 * tempire ducks
23:13 tempire Nested routes as they currently work don't work with anything non-blocking
23:18 sri tempire: i don't think you've thought that through
23:19 dqw joined #mojo
23:37 jberger joined #mojo

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