The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2014-05-12

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

All times shown according to UTC.

Time Nick Message
00:00 meshl joined #mojo
00:09 laouji joined #mojo
00:14 asarch joined #mojo
00:15 sri same for mango now https://github.com/kraih/mango/commit/819e4a5a7803d56895d1cfc95ad2327f5155d91c
00:16 sri tempire: i dislike the name nb_url
00:23 shmuel joined #mojo
00:44 good_news_everyon joined #mojo
00:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/UJqVPw
00:44 good_news_everyon mojo/master deaa1be Sebastian Riedel: small optimizations
00:44 good_news_everyon left #mojo
00:45 good_news_everyon joined #mojo
00:45 good_news_everyon [mojo] kraih tagged v4.99 at fba306d: http://git.io/uDuzqA
00:45 good_news_everyon left #mojo
00:45 sri whatever, we are out of versions :)
00:47 cpan_mojo Mojolicious 4.99 by Sebastian Riedel - http://metacpan.org/release/SRI/Mojolicious-4.99
00:55 good_news_everyon joined #mojo
00:55 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/A6EX2w
00:55 good_news_everyon mojo/master 901e4b1 Sebastian Riedel: bump version
00:55 good_news_everyon left #mojo
00:55 sri the code name is temporary :)
01:00 btyler joined #mojo
01:10 laouji joined #mojo
01:17 klapperl_ joined #mojo
01:21 disputin joined #mojo
01:55 zacts joined #mojo
01:55 laouji joined #mojo
01:56 laouji_ joined #mojo
02:32 d4rkie_ joined #mojo
03:08 basic6 joined #mojo
04:05 d4rkie joined #mojo
04:38 tempire ->param(['foo', 'bar']) is great.
04:46 laouji joined #mojo
05:04 laouji joined #mojo
05:41 sugar joined #mojo
06:04 Eke- joined #mojo
06:13 sujithm joined #mojo
06:19 Negor joined #mojo
06:22 edestler joined #mojo
06:26 Vandal joined #mojo
06:27 laouji joined #mojo
06:29 sujithm_ joined #mojo
06:32 laouji_ joined #mojo
06:34 poletti joined #mojo
06:38 contempative joined #mojo
06:39 contempative left #mojo
06:39 contempative joined #mojo
06:40 contempative left #mojo
06:41 contemplative joined #mojo
06:49 contemplative left #mojo
06:56 cmihai joined #mojo
06:57 igorsutton___ joined #mojo
07:01 Negor joined #mojo
07:04 dpetrov_ joined #mojo
07:07 Kulag joined #mojo
07:08 eseyman joined #mojo
07:08 laouji joined #mojo
07:11 laouji_ joined #mojo
07:14 basiliscos joined #mojo
07:18 laouji joined #mojo
07:18 rawler joined #mojo
07:19 ladnaV joined #mojo
07:20 sujithm joined #mojo
07:20 odc oh i missed that trick
07:20 odc very nice indeed
07:21 laouji_ joined #mojo
07:24 d4rkie joined #mojo
07:30 laouji joined #mojo
07:32 sujithm_ joined #mojo
07:33 laouji joined #mojo
07:33 trone joined #mojo
07:40 laouji joined #mojo
07:44 hummeleBop joined #mojo
07:55 laouji joined #mojo
07:56 cmihai_ joined #mojo
07:58 maxhq joined #mojo
08:03 laouji joined #mojo
08:13 laouji joined #mojo
08:14 arthas joined #mojo
08:18 laouji joined #mojo
08:34 marcus ooh oh
08:35 marcus I suggest code name http://www.fileformat.info/info/unicode/char/1f42f/index.htm
08:36 marcus Because https://en.wikipedia.org/wiki/History_of_Oslo's_name#Nickname
08:58 sujithm joined #mojo
09:03 igorsutton joined #mojo
09:13 laouji joined #mojo
09:16 laouji_ joined #mojo
09:18 trone joined #mojo
09:22 laouji joined #mojo
09:28 cmihai joined #mojo
09:45 denis_boyun joined #mojo
09:48 cmihai_ joined #mojo
09:58 sujithm joined #mojo
10:03 laouji joined #mojo
10:05 mire joined #mojo
10:07 dod joined #mojo
10:23 odc joined #mojo
10:24 d4rkie_ joined #mojo
10:25 d4rkie joined #mojo
10:36 ver joined #mojo
10:40 sujithm joined #mojo
10:40 ente joined #mojo
10:40 ente hello
10:40 purl niihau, ente.
10:41 ente I have a website that's grown beyond of what's reasonably doable with CGI.pm and decided to give mojolicious a try
10:41 sjn what an excellent choice \o/
10:43 ente right now I'm writing a login system
10:44 ente based on Mojolicious::Plugin::Authentication and heavy copypasting
10:44 ente so I'm not currently sure I do everything right yet
10:44 ente :P
10:46 ente the documentation is massive and so far I'm not desparate yet
10:46 ente I guess that's good
10:48 ente okay, first question: I have this in a template: Hello <%= session 'user' || 'World' %>!<br>
10:48 ente it gives me "Hello !"
10:49 meshl joined #mojo
10:49 ente I'm a bit confused about that, shouldn't it be "World" in this case? Did I get the template wrong?
10:49 ente oh wait
10:49 ente parentheses.
10:49 purl parentheses are required with that form of 'if'
10:51 ente is there a difference between $self->session( foo => bar ) and $self->session->{foo} = bar?
10:52 alnewkirk joined #mojo
11:06 sujithm_ joined #mojo
11:13 Akron joined #mojo
11:16 Akron I totally missed that 5.20 is announced for 20th of may - so we could play with signatures at the hackathon.
11:19 Bravo13 joined #mojo
11:22 newbie joined #mojo
11:31 Akron That would at least introduce breaking changes for the next major version. ;)
11:34 sujithm joined #mojo
11:50 jberger ente: I don't believe so
11:50 jberger Akron: that sounds like fun!
11:51 Akron Indeed.
11:53 jberger sigs are still experimental in 5.20 though right?
11:55 Akron I think so.
11:58 igorsutton joined #mojo
12:02 btyler joined #mojo
12:08 cmihai joined #mojo
12:11 Akron jberger: http://techblog.bozho.net/?p=1423 :)
12:12 good_news_everyon joined #mojo
12:12 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/65176704fef3a307609e844c3c0c988877473292
12:12 good_news_everyon mojo/master 6517670 Sebastian Riedel: use a different code name
12:12 good_news_everyon left #mojo
12:24 eseyman joined #mojo
12:31 sri hmm, no comments on thew patch from yesterday? https://github.com/kraih/mojo/commit/4a03caab6eeb9392175fc756518f538d193f8f1c
12:48 maxhq joined #mojo
12:50 asarch joined #mojo
12:50 neilhwatson joined #mojo
13:02 cmihai_ joined #mojo
13:05 zivester joined #mojo
13:15 jberger_ joined #mojo
13:16 jberger_ sri: I didn't quite understand the impact until I re-read the doc change to Mojo.pm
13:17 jberger_ I kinda agree with tempire, I don't especially like the name nb_url
13:17 jberger_ But that's a minor point
13:19 jberger_ Maybe this is something we can discuss at mojoconf: I still don't understand how the UserAgent emulates blocking via Nonblocking
13:19 r0b3rt joined #mojo
13:22 jberger_ Akron: cool link. I would love it if I could somehow make a living improving scientific coding
13:22 jberger_ I just haven't figured it out yet
13:22 jberger_ (The make a living part)
13:26 Akron jberger_++
13:27 sri jberger_: that's pretty much all https://github.com/kraih/mojo/blob/master/lib/Mojo/UserAgent.pm#L59
13:28 sri that and using the ioloop stored in the attribute
13:28 mishantil Whenever I see 'nb' I think 'Norwegian Bokmaal'
13:29 jberger_ And that is a different ioloop than the main loop in the app right?
13:29 sri the main ioloop is usually Mojo::IOLoop->singleton
13:30 mishantil Clearly I need to start doing more non-blocking work.
13:30 sri which is what all non-blocking apis use
13:30 sri internally Mojo::UserAgent is all non-blocking really, only difference is which ioloop it uses at the time, which is why the silly $nb needs to be passed around now
13:31 sri $nb is used to make this decision https://github.com/kraih/mojo/blob/master/lib/Mojo/UserAgent.pm#L276
13:31 sri my $current_loop = $self->_loop($nb)
13:36 dexteruk joined #mojo
13:38 jberger__ joined #mojo
13:46 d4rkie joined #mojo
13:47 basic6__ joined #mojo
13:51 gryphon joined #mojo
13:51 dexteruk joined #mojo
14:02 bluescreen joined #mojo
14:14 jb360 joined #mojo
14:19 sh4 joined #mojo
14:31 sh4|2 joined #mojo
14:40 sh4 joined #mojo
14:41 sri haarg came up with a rather nice way to detect numbers and strings in serializers http://pastie.org/9168777
14:41 sri only problem is the performance, what i do like is that real dualvars end up with their string representation
14:42 sh4|2 joined #mojo
14:43 sh4|3 joined #mojo
14:46 sh4|4 joined #mojo
14:49 sri it handles all tricky cases very dwim
14:49 sri "23" used in numeric context becomes a number, "bar" used in numeric context is still a string and 23 used in string context is still a number
14:50 eugen joined #mojo
14:50 sh4 joined #mojo
14:55 sri quoting myself "[16:53:18]  <sri> 100000 iterations of encode_json({foo => "bar" x 20000, baz => 23}) go from 27.398 to 29.621 seconds"
14:55 sri so it's not that bad
14:55 marty joined #mojo
14:55 sri the results are pretty awesome
14:56 nicomen what kind of corner cases are fixed?
14:57 sri "<@sri> "23" used in numeric context becomes a number, "bar" used in numeric context is still a string and 23 used in string context is still a number"
14:57 sri the second affects us
14:57 sri "bar" used in numeric context
14:57 sri and real dualvars get serialized to their string representations
14:58 sri perl -Mojo -E 'my $foo = "bar"; $foo + 0; say j([$foo])'
14:58 sri specifically that one
14:59 sri goes from [0] to ["bar"]
14:59 sri it handles the cases where Mojo::JSON breaks, *and* it handles the cases where JSON::XS breaks
15:00 nicomen cool ;)
15:00 sri in our tests there is actually just one case that would break
15:01 sri my $foo = "0 but true"; $foo + 0;
15:01 sri we expect currently 0, new semantics give us "0 but true"
15:01 sri which is imo better
15:10 gryphon joined #mojo
15:11 nicomen yes, indeed
15:11 nicomen but the patch is just doing what we have discussed before right?
15:11 good_news_everyon joined #mojo
15:11 good_news_everyon [mojo] kraih created better_json (+1 new commit): http://git.io/8oxl1g
15:11 good_news_everyon mojo/better_json 44056e2 Sebastian Riedel: smarter number and string detection for Mojo::JSON
15:11 good_news_everyon left #mojo
15:12 nicomen making a copy, and see manually if it is a number-ish?
15:12 sri that branch makes it obvious
15:12 nicomen seems legit
15:12 nicomen apparently a copy wasn't that exepensive after all
15:12 sri only problem is that copies are expensive, which lowers performance a bit
15:13 sri well... it's not *that* expensive, but it makes a difference
15:13 nicomen is there some way to quicker return if it's an obvious integer or similar?
15:13 sri you're welcome to try :)
15:13 nicomen before copying, and not affecting it
15:14 sri time perl -Ilib -MMojo::JSON=encode_json -E 'encode_json({foo => "bar" x 20000, baz => 23}) for 1 .. 100000'
15:14 sri that should do for naive benchmarking
15:15 rem_lex joined #mojo
15:19 sri tempire, jberger, marcus, crab: review!
15:19 sri this is something i prolly won't dictate
15:22 igorsutton joined #mojo
15:27 Adura joined #mojo
15:27 zackiv31 joined #mojo
15:29 elik joined #mojo
15:34 beyondcreed joined #mojo
15:36 basiliscos joined #mojo
15:43 meshl joined #mojo
15:44 dwierenga joined #mojo
15:46 disputin joined #mojo
15:48 laouji joined #mojo
15:51 davemenninger joined #mojo
15:52 davemenninger i'm seeing something odd that i can't explain
15:52 davemenninger when i run my app locally, it works fine,
15:53 davemenninger but when i run it in a Dcoker container, it runs, but it can't find any of my templates other than index.html.ep
15:53 davemenninger *Docker
15:53 davemenninger missing something obivous?
15:54 davemenninger wait, dumb mistake
15:54 davemenninger sorry to bother
15:55 davemenninger left #mojo
15:59 davido_ My vote is the new Mojo::JSON proposed DWIM behavior, even if it costs a few cycles.
16:00 nicomen doing support is so easy ^^^
16:00 nicomen peopel answering their own questions ;-D
16:01 sri it doesn't work before perl 5.14 :O
16:01 sri https://travis-ci.org/kraih/mojo/builds/24985812
16:01 davido_ Reducing the element of surprise is likely to reduce the propensity for people to write buggy code, which should be a more important goal than time efficiency.
16:01 sri wtf?
16:04 davido_ That's too bad.
16:14 tempire I don't care about the slight speed decrease for json
16:14 tempire If I need über fast json, I use JSON::XS
16:24 marcus I just need über.
16:24 aggrolite joined #mojo
16:26 good_news_everyon joined #mojo
16:26 good_news_everyon [mojo] kraih pushed 1 new commit to better_json: http://git.io/_YDY9Q
16:26 good_news_everyon mojo/better_json 6ed79b5 Sebastian Riedel: fixed support for Perl 5.10 and 5.12
16:26 good_news_everyon left #mojo
16:27 sri ok, that fixes 5.10/12 support and makes it a little faster
16:29 sri 28.161 seconds to be precise
16:32 sri ok, i made a pull request for votes https://github.com/kraih/mojo/pull/620
16:32 sri from 27.398 to 28.161 is not so bad for the gain
16:36 good_news_everyon joined #mojo
16:36 good_news_everyon [mojo] kraih pushed 1 new commit to better_json: http://git.io/0JxIFw
16:36 good_news_everyon mojo/better_json 79396d7 Sebastian Riedel: added dualvar test
16:36 good_news_everyon left #mojo
16:37 denis_boyun joined #mojo
16:37 val40 joined #mojo
16:37 Coke joined #mojo
16:37 sri would be nice to have perfect dwim semantics for Mojo::JSON
16:38 Coke are there setup instructions for mojo on IIS? (I found https://groups.google.com/forum/#!topic/mojolicious/f1Sh7aJpeJg , but nothing in mojo docs.)
16:39 sri as far as i remember it involves human sacrifice
16:40 Coke mmheheh. :)
16:40 Coke (trying to encourage a cpan author to start migrating his legacy perl web app to mojo)
16:48 nicomen Coke: if there is some proxy possiblities in IIS, that might be the way to go
16:49 Coke any other windows options for mojo?
16:50 good_news_everyon joined #mojo
16:50 good_news_everyon [mojo] kraih pushed 1 new commit to better_json: http://git.io/P93K1g
16:50 good_news_everyon mojo/better_json b125143 Sebastian Riedel: explain new behavior
16:50 good_news_everyon left #mojo
16:51 sri Coke: just go with PSGI
16:51 sri it's best for shitty platform
16:51 sri s
16:52 rem_lex joined #mojo
16:52 sri you're not going to use any of the cool features anyway with IIS
16:58 Coke does PSGI work with IIS?
16:58 Coke (didn't see anything obvious on the google)
17:01 sri haha, and i have the performance problem solved
17:06 good_news_everyon joined #mojo
17:06 good_news_everyon [mojo] kraih pushed 1 new commit to better_json: http://git.io/btrSfw
17:06 good_news_everyon mojo/better_json 9934604 Sebastian Riedel: improved number detection performance
17:06 good_news_everyon left #mojo
17:07 sri now it only ever copies numbers, which should be cheap
17:12 sri well, since we had the votes before already... :)
17:12 good_news_everyon joined #mojo
17:12 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/fBW7jQ
17:12 good_news_everyon mojo/master fc1819b Sebastian Riedel: Merge pull request #620 from kraih/better_json...
17:12 good_news_everyon left #mojo
17:13 tempire \o/
17:13 sri \o/
17:18 good_news_everyon joined #mojo
17:18 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/erMF1Q
17:18 good_news_everyon mojo/master ba50bae Sebastian Riedel: updated Changes, CREDITS and documentation
17:18 good_news_everyon left #mojo
17:19 good_news_everyon joined #mojo
17:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/Xuw8Bw
17:19 good_news_everyon mojo/master 4839539 Sebastian Riedel: fixed typo in Changes
17:19 good_news_everyon left #mojo
17:35 cmihai joined #mojo
17:39 dod joined #mojo
17:44 sri ok, Mango::BSON does the same now
17:51 dod joined #mojo
17:52 mire joined #mojo
17:53 punter joined #mojo
17:58 asarch joined #mojo
17:59 elik I was wondering, how would one go about creating infinitely deep routes in mojo, say I was to create a rest api for a file system? Exporting all the routes seems like a bad model
18:05 stephan48 good q
18:05 met joined #mojo
18:06 elik I've tried to find example about that, but to no avail
18:11 stephan48 you could make a relaxed route i think
18:11 stephan48 which also would match on something resembling a path
18:17 elik Hum, so in the end, I wouldn't really be using the router
18:17 stephan48 no
18:17 elik I was thinking maybe replacing the router
18:17 elik Like, creating my own router
18:17 elik has anyone ever done that?
18:24 tempire I think I'm officially in the ::Delay camp now.
18:25 tempire though I wonder
18:26 tempire Passing a $delay object is kind of like passing a series of promises
18:26 tempire Promises can get crazy.
18:26 tempire Whereas ->steps promotes a structure, even if it doesn't force it
18:45 elik How would one go about replacing the mojolicious router
18:45 stephan48 why do you want to do this?
18:46 elik A recursive router makes more sense to my application than a matching based router
18:48 elik or maybe trying to use mojolicious for that application is not appropriate
18:58 berov joined #mojo
19:04 sujithm joined #mojo
19:04 gtodd joined #mojo
19:10 igorsutton joined #mojo
19:26 eugen joined #mojo
19:29 sri do we want to do something about generate_port? maybe remove Mojo::IOLoop->generate_port to discourage its use?
19:30 sri it's only used in a few places now, which could also just use Mojo::IOLoop::Server->generate_port
19:47 meshl joined #mojo
19:53 cpan_mojo Mojolicious-Plugin-DigestAuth 0.07 by sshaw - http://metacpan.org/release/SHAW/Mojolicious-Plugin-DigestAuth-0.07
19:53 dvinciguerra joined #mojo
20:19 good_news_everyon joined #mojo
20:19 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/8DTM_A
20:19 good_news_everyon mojo/master 8f369a9 Sebastian Riedel: removed generate_port method from Mojo::IOLoop
20:19 good_news_everyon left #mojo
20:22 sri oh, and i wanted to change Mojo::Log::format into a callback
20:22 sri so it's easier to modify log messages
20:28 sri meh, it's not really that useful... considering it doesn't affect the log messages on 404/500 pages
20:53 gtodd guess you folks saw this last week:  http://perltricks.com/article/85/2014/5/5/Just-how-much-heavier-is-Catalyst-than-Dancer2-
20:55 gtodd I guess Mojo's stratopan stack chart/graphic   would be sort of boring
21:11 ente are there ready-made plugins for login/email verification?
21:11 ente signup etc
21:11 ente I hate reinventing the wheel and this stuff is so widespread
21:13 beyondcreed joined #mojo
21:15 beyondcreed joined #mojo
21:16 igorsutton joined #mojo
21:18 mire joined #mojo
21:30 meshl joined #mojo
22:54 mire joined #mojo
23:11 sri i guess we will be playing with perl 5.20 at the hackathon :)
23:13 jberger fwiw I would have voted for the json patch even before review
23:14 jberger anything that reduces our traffic of "why does this thing work strangely" at modest loss in performance, I'm in
23:16 btyler joined #mojo
23:42 zivester joined #mojo
23:47 d4rkie joined #mojo

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