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

IRC log for #mojo, 2016-06-22

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

All times shown according to UTC.

Time Nick Message
00:03 good_news_everyon joined #mojo
00:03 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vo6Px
00:03 good_news_everyon mojo/master 503dec9 Sebastian Riedel: remove Mojolicious::Plugin::Charset
00:03 good_news_everyon left #mojo
00:03 sri if anyone wants to adopt it, please speak up
00:11 nic sorry, had to dash away to child troubles
00:11 bpmedley No worries, how many kids do you have?
00:11 nic 2 last time I checked
00:12 bpmedley Sounds like they give you as much trouble as you've dished out to the world.. :-P
00:12 nic wow, that was supposed to be flippant, not morbid.  Hope that didn't offend anyone
00:13 bpmedley I thought you were just playing the role of a happy parent..
00:13 nic :)
00:13 bpmedley Perhaps I was more off topic than I should have been.. back to IOLoop::Delay?
00:16 nic your example answers my question.  It proves that 'other stuff' is allowed to happen between steps, so there's value in keeping my action broken up that way
00:16 bpmedley Cool.  It's really a fun excursion reading the internals of the IOLoop and other parts of the framework code..
00:16 nic and when I run your example, no weird stuff happens, which right now is a rock I'm holding onto :D
00:18 bpmedley Maybe the MOJO_IOLOOP_DEBUG and MOJO_EVENTEMITTER_DEBUG env vars could help?
00:18 bpmedley You might also try running your code in daemon mode and using -d for debugging with $DB::single..
00:19 nic nice ideas
00:20 nic right now I have a simpler path: two similar-looking examples, one that works and one that does weird stuff.  I'm going to interpolate them till I find where I leave the path of sanity
00:23 nic got it
00:23 bpmedley Found your issue?
00:24 nic yeah, I'll show you in a sec
00:27 nic https://gist.github.com/niczero/ab2c950f6aa9b477ba16a16b7713f791
00:34 sri talking about docker :D https://twitter.com/tianon/status/745410069953548288
00:35 nic nice
00:38 bpmedley sri++ # That should be quite a stimulus boost
00:38 bpmedley nic: Sorry for my confusion.  Is that gist code working for you?
00:38 jberger Aloha!
00:39 nic bpmedley: no, that's the broken code
00:40 nic evening, jberger
00:40 bpmedley https://gist.github.com/brianmed/4166e7acdf5c850502b463a597d20a77 <-- Does this work?  I hope it uses good practice, as well..
00:40 sri jberger: i broke all the things while you were away ;p
00:41 preaction jberger: mahalo!
00:41 sri ¯\_(ツ)_/¯
00:41 nic tbf you have warned him not to go away
00:42 nic is jberger in Hawaii?
00:42 preaction give the man at least a day of tropical island paradise, c'mon!
00:44 * sri hides the shambles under the channel carpet
00:44 jberger :o
00:45 preaction eh. i get penninsular island paradise, and soon, a kingdom of magic!
00:45 preaction wait. how can a peninsula be an island...
00:47 bpmedley nic: my $delay = shift->pass(3);  <-- I believe that works, as well
00:49 jberger I'm trying to remember what i wanted to break at 7.0
00:50 jberger Was there anything that needed breaking for transaction refactoring?
00:50 jberger Looking towards http/2?
00:51 sri there is only one preparation step remaining i think
00:51 sri which was the refactoring of the connection management in Mojo::Server::Daemon
00:51 sri to support multiple streams per connection
00:51 sri but we didn't have a plan for that yet
00:51 jberger There were some awkward events emitted weren't there
00:52 jberger Maybe there was nothing better tho
00:52 * jberger gets distracted by tropical amazing
00:52 sri in the transactions?
00:52 jberger Yeah
00:52 sri i think we cleaned that up already
00:52 jberger Ok
00:52 jberger Just trying to think back
00:52 sri i remember being happy with the transactions
00:53 jberger Don't have my lappy handy atm
00:53 sri no hurry, go and relax
00:53 sri release won't be before next week i think
00:54 sri gotta draw an image and prepare all the graphs about how mojolicious evolved over the years ;p
00:54 sri will take forever
00:55 preaction or you could, like, not. and then it'd take no time at all! \o/
00:55 Grinnz_ can confirm, doing nothing and playing overwatch instead is much faster
00:56 nic bpmedley: https://gist.github.com/niczero/ab2c950f6aa9b477ba16a16b7713f791 almost does what I want, but the final step doesn't happen
00:59 jberger Will do
01:02 bpmedley nic: $delay->begin; <-- I think this is necessary imbetween lines 25 and 26.
01:03 zivester joined #mojo
01:03 nic does that fix it for you?  (still broken for me)
01:05 bpmedley nic: https://gist.github.com/brianmed/4166e7acdf5c850502b463a597d20a77 <-- Is this what you have?
01:05 nic I've updated my gist
01:06 nic so the only thing still not working is making it say 'four'
01:07 bpmedley Do you also need "Mojo::IOLoop->timer(1 => sub { say "three: $value"; $next->() })" ?   Note the $next->() ?
01:07 bpmedley Would you try my updated gist?
01:12 nic I've got mine working now.  It was due to the timer in the final step.  It just looked like it wasn't working cos the ioloop didn't hang around long enough
01:12 nic I've update my gist and I'll hug it to sleep
01:12 bpmedley That makes sense..
01:12 nic thanks for your help bpmedley, twas indeed fun
01:15 bpmedley nic: If a timer is desired in the 4th step, then perhaps you can call IOLoop->start and IOLoop->stop instead of delay->wait?
01:16 nic yeah, that would be neat too
01:19 bpmedley https://gist.github.com/brianmed/4166e7acdf5c850502b463a597d20a77 , my final answer, I hope.. :)
01:57 cuechan_ joined #mojo
02:03 kaare joined #mojo
02:08 dave joined #mojo
02:11 mishanti1 joined #mojo
02:12 jberger Historically we've called the return value of ->begin $end
02:13 jberger But i wonder if $next isn't a better idea
02:19 noganex_ joined #mojo
02:35 sri hmm, judging by cpantesters results, it looks like perl 5.25 is a total mess
02:35 sri don't think i've ever gotten this many fail reports for a perl dev release
02:44 mattp thats.. unfortunate
03:02 leejo joined #mojo
03:04 aborazmeh joined #mojo
03:15 ivi joined #mojo
04:14 jberger This is the early part of the cycle
05:06 che-quest joined #mojo
05:11 eseyman joined #mojo
05:16 inokenty-w joined #mojo
06:17 kaare joined #mojo
07:12 Vandal joined #mojo
07:14 trone joined #mojo
07:16 AndrewIsh joined #mojo
07:58 leejo joined #mojo
08:12 ashimema joined #mojo
08:31 inokenty joined #mojo
08:39 osfabibisi joined #mojo
08:42 berov joined #mojo
09:39 dod joined #mojo
09:44 dod joined #mojo
10:11 dod joined #mojo
10:12 meshl joined #mojo
10:28 prajith joined #mojo
10:31 kvorg joined #mojo
10:38 crab joined #mojo
11:08 tchaves joined #mojo
11:16 tchaves joined #mojo
11:18 tchaves joined #mojo
11:27 leejo_ joined #mojo
11:28 dvinciguerra joined #mojo
11:51 kvorg joined #mojo
11:52 prgr joined #mojo
11:55 leejo joined #mojo
12:08 zivester joined #mojo
12:09 prgr joined #mojo
12:30 sri argh, a lot of the stuff on the current wishlist thread is already possible
12:33 nic sub silly { my $x; Mojo::IOLoop->delay(sub {...}, sub {...; $x = $value}); return $x }
12:33 nic obviously doesn't work
12:34 nic but if you can see what it's trying to do (return a calculated value in a concurrency-friendly way) can you think of a way to do it?
12:35 sri you can't do that without coroutines
12:35 nic ah
12:35 nic thanks
12:39 cuechan joined #mojo
12:56 sri Atom really annoys me today
12:56 sri somehow they managed to release a completely broken version of the default theme
12:56 kamyl joined #mojo
12:57 sri editor tab titles are so small that you can't switch between them anymore because the x for closing tabs takes up the entire width
12:59 sri who designs this shit? http://i.imgur.com/JsW6S7n.png
13:01 logioniz joined #mojo
13:02 logioniz left #mojo
13:03 logioniz joined #mojo
13:03 kvorg joined #mojo
13:05 logioniz Hi, i have question: "how can i get certificate info in controller?"
13:06 logioniz Could anybody answer to me?
13:08 logioniz I mean "client certificate info"
13:15 good_news_everyon joined #mojo
13:15 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/voiSY
13:15 good_news_everyon mojo/master 2c139a0 Sebastian Riedel: fix trailing slash bug in Mojo::URL (closes #975)
13:15 good_news_everyon left #mojo
13:16 sri weird bug
13:16 sri affected a surprisingly large number of tests
13:17 nic logioniz: this might help: http://irclog.perlgeek.de/mojo/2016-06-07#i_12621157
13:19 logioniz it seems to be true
13:21 good_news_everyon joined #mojo
13:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/voi9U
13:21 good_news_everyon mojo/master b368c81 Sebastian Riedel: no need for extra method calls
13:21 good_news_everyon left #mojo
13:21 sri the whole to_abs method is still kinda sketchy
13:28 sri that fix will prolly cause CGI problems, and we'll only hear about it in 6 months or so because there's only one person in the world using it ;p
13:35 leejo joined #mojo
13:49 logioniz nic: thanks it works
13:52 dod joined #mojo
13:55 leejo joined #mojo
13:56 gizmomathboy joined #mojo
14:02 marty joined #mojo
14:03 kvorg joined #mojo
14:35 zivester joined #mojo
15:37 prajith joined #mojo
15:41 disputin joined #mojo
15:50 sri person of interest really was one of the best scifi shows of all time
16:03 dod joined #mojo
16:15 disputin joined #mojo
16:23 dvinciguerra joined #mojo
16:41 punter joined #mojo
17:10 kes joined #mojo
17:12 val40 joined #mojo
17:52 webstrand joined #mojo
17:53 sri is having discussions in commit comments really a thing? https://github.com/kraih/mojo/commit/503dec92a504a68165d62ad4cc22f5c05f5e6a9a#commitcomment-17973269
17:54 webstrand Is it possible to define helper functions depending on the route so that the helper function only exists for  routes under a specific base?
17:54 sri webstrand: no
17:54 webstrand Or is it possible to define helper functions for specific controllers?
17:54 sri no
17:55 dave what about $self->isa(...)?
17:56 dave just test that against the base you want to restrict the helper from?
17:56 webstrand Well, I'm looking for a way to provide different kinds of error pages for different routes. Routes that return JSON when successful should return JSON errors and so forth. What would be the best way to do this?
17:57 sri normally you'd use content negotiation
17:57 sri if your app is RESTful
17:59 webstrand I'm porting an existing app to mojo. It is, unfortunately, not restful. What I'm currently doing is rendering the errors inline: return $self->render(json => $whatever, status=>404) etc
17:59 webstrand But the code duplication is annoying
17:59 PryMar56 joined #mojo
18:01 kvorg joined #mojo
18:13 dave sri: where is the proper place to inquire about the rationale of mojolicious changes?
18:18 Nei left #mojo
18:19 sri here
18:20 dod joined #mojo
18:20 sri discussing it in commit comments seems silly, since there's pretty much always a back and forth, not just question+answer
18:21 punter joined #mojo
18:25 dave Is there a record of mojolicious changes that might possibly break people's code? If so, perhaps a brief statement of the idea behind the change included with the breakage would help prevent such commentary.
18:25 dave You could say "go look here for why we did that" :)
18:26 sri https://github.com/kraih/mojo/wiki/Upgrading
18:26 sri maintained by the community though
18:27 sri last 6 month is missing already
18:27 sri +s
18:28 dave heh I upgraded to your demon release and have only the barest of ideas of what you changed...I don't have any code in production yet tho
18:28 dave my testcases aren't showing anything really bad yet
18:29 mpapec was there some mojo talk @yapc?
18:33 mpapec btw, is there a possibility to convert this function to use signatures?
18:33 mpapec https://gist.github.com/mpapec/7fd7724cdfaeb8ac96dd2cde06b82146
18:33 mpapec (subroutine signatures)
18:52 disputin joined #mojo
18:59 disputin joined #mojo
19:00 marty joined #mojo
19:01 jacoby joined #mojo
19:17 jberger webstrand: you can make controller methods though
19:18 jberger sri: commit comments are very useful in conjunction with pull request reviews
19:22 jberger mpapec: there are no simple ways to do that
19:22 jberger But there are some only slightly insane ones
19:22 jberger http://irclog.perlgeek.de/mojo/2016-06-06#i_12614011
19:23 jberger The rare actually use for &func
19:23 jberger s/ly//
19:29 marty_ joined #mojo
19:29 sri jberger: for reviewing code sure, but not really for discussing the reasons for a commit
19:29 marty joined #mojo
19:41 ashimema joined #mojo
19:50 jberger Agreed
19:50 jberger Linking to the commit/line is usually enough for discussion
19:50 leejo joined #mojo
20:30 meshl joined #mojo
20:44 mpapec joined #mojo
20:58 disputin joined #mojo
21:02 dmanto joined #mojo
21:05 tempire joined #mojo
21:13 sri it's ridiculous how bloated and slow chrome has become
21:16 meshl joined #mojo
21:43 cfedde I'm blaming my chrome performance problems on stupidly busy javascript code running in tabs I'm not looking at.
21:52 sri naah, it's just chrome being terrible
21:53 sri google just started a new initiative to make chrome faster, and on os x chrome canary is already like twice as fast
21:54 sri but they also broke a lot... so it's unusable :S
22:04 leejo joined #mojo
22:10 disputin joined #mojo
22:14 bpmedley The UI is much faster eith
22:15 bpmedley *with no backend.. :)
22:17 disputin joined #mojo
22:19 disputin joined #mojo
22:19 disputin joined #mojo
22:20 disputin joined #mojo
22:22 disputin joined #mojo
22:25 disputin joined #mojo
22:28 disputin joined #mojo
23:08 zivester joined #mojo
23:15 orev joined #mojo
23:23 disputin joined #mojo
23:23 dvinciguerra joined #mojo
23:25 sri tempted to try firefox as my main browser
23:26 bpmedley I've noticed that the developer tools (and firebug) are not as good as chrome; although, that can be very subjective..
23:26 sri doesn't feel much faster though
23:26 inokenty joined #mojo
23:27 bpmedley I miss omniweb
23:27 sri it's like all browsers are slacking
23:27 sri safari is super fast, but i can't share bookmarks easily with my nexus phone
23:28 bpmedley Isn't cross browser sync frustrating?
23:47 dvinciguerra joined #mojo
23:59 nicomen not sure how good the extra tweaks Civaldi does on top of Chrome are, but I feel obligated to using it given 90% of the people in Vivaldi were my colleagues in Opera :-)
23:59 nicomen my 70 tabs+ seem to work almost as good as old Opera days at least

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