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

IRC log for #mojo, 2016-01-11

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

All times shown according to UTC.

Time Nick Message
00:14 good_news_everyon joined #mojo
00:14 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vuprN
00:14 good_news_everyon mojo/master 6e729ea Sebastian Riedel: no need for a next attribute
00:14 good_news_everyon left #mojo
00:14 sri if we are rethinking channels, we might as well not have that attribute
00:53 marty joined #mojo
01:34 plicease joined #mojo
01:35 good_news_everyon joined #mojo
01:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vupH7
01:35 good_news_everyon mojo/master c697b50 Sebastian Riedel: these checks do not actually serve a purpose
01:35 good_news_everyon left #mojo
02:02 jontaylor joined #mojo
02:30 marty joined #mojo
02:33 binlei joined #mojo
02:34 kaare joined #mojo
03:07 good_news_everyon joined #mojo
03:07 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vuhOP
03:07 good_news_everyon mojo/master 355b925 Sebastian Riedel: no need for a default value
03:07 good_news_everyon left #mojo
03:07 sri turns out, the user agent does not need $tx->is_writing at all
03:07 jberger sri: nice
03:08 jberger That ought to help
03:08 sri daemon is more tricky though
03:08 sri i can't quite figure out why it's required there
03:09 sri part of the reason will certainly be that "$tx->on(resume => sub { $self->_write($id) });" is assigned very late
03:21 sri lots of stuff breaking if i try to remove $tx->is_writing from the daemon :(
03:22 KindOne joined #mojo
03:22 sri considering i've stumbled over dead code, it might be a good idea to audit the whole thing
03:23 sri _read and _write in Mojo::UserAgent and Mojo::Server::Daemon are a collection of hacks that have accumulated over time
03:24 sri like this https://github.com/kraih/mojo/blob/master/lib/Mojo/Server/Daemon.pm#L239-L244
03:24 sri it's a performance hack
03:25 sri and a timing hack to make sure the finish event of Mojo::Transaction gets emitted after the last byte has been written
03:28 jb360 joined #mojo
03:31 marty joined #mojo
03:42 jberger sri: did you see the one line I pointed out a while ago
03:42 jberger ?
03:45 jberger https://github.com/kraih/mojo/commit/992467e706c882903cde1b76e45dbd5c79f81afa#commitcomment-15363096
03:45 jberger Makes me suspicious about that line
03:50 sri jberger: yes, i'm going through related code, and it appears there's some stuff that doesn't make sense
03:51 sri like, i have no idea where $c->write_chunk(sub {...}) came from, it makes no sense
03:51 sri there's some legacy code to clean up
03:57 noganex_ joined #mojo
04:01 jontaylor joined #mojo
04:19 firnsy joined #mojo
04:28 c--_ joined #mojo
04:33 marty joined #mojo
04:53 melo joined #mojo
04:53 sri hehe, yea that can all be removed :o
04:54 sri even found broken tests
04:54 sri there is a race condition by design that the tests somehow didn't stumble over
04:54 sri which is the server-side finish event
04:55 sri it can fire after the client has received the entire response
04:56 sri there's a scary amount of those tests
05:37 sri pretty crazy, tests failing randomly for me actually means the code works :)
05:37 sri and explains some very very rare cpantesters fail reports
05:38 sri the old code appears to be slightly inefficient enough to cause a long enough delay for the finish event to fire before Test::Mojo could receive the response
05:38 sri think i'll try to give this a full audit tomorrow
05:39 sri and i got rid of another $tx->is_writing
05:39 sri just one more to go
06:00 marty joined #mojo
06:02 jontaylor joined #mojo
06:26 binlei joined #mojo
06:29 sri jberger: yea, i can remove $tx->is_writing completely
06:29 sri tomorrow :)
06:29 cpan_mojo WebService-MyAffiliates-0.07 by BINARY https://metacpan.org/release/BINARY/WebService-MyAffiliates-0.07
06:30 sri https://gist.github.com/anonymous/8519a14930e32972fa24
06:30 sri in case you want to play with it
06:53 punter joined #mojo
06:55 batman sri, jberger: maybe we should have "tx" has one "protocol" which has many "channel"?
06:56 batman Protocol = Mojo::Protocol::(HTTP,HTTP2,WebSocket)
06:57 batman And channel = Mojo::Protocol::(HTTP,HTTP2,WebSocket)::Channel
06:57 batman So HTTP and WebSocket will only have one channel, but HTTP2 can have many..?
06:58 batman Just thinking out loud...
07:01 marty joined #mojo
07:14 batman i forgot Client/Server in the structure :/
07:29 jontaylor joined #mojo
07:48 dod joined #mojo
07:53 dod joined #mojo
08:01 marty joined #mojo
08:12 binlei joined #mojo
08:16 Vandal joined #mojo
08:17 osfabibisi joined #mojo
08:19 AndrewIsh joined #mojo
08:30 trone joined #mojo
09:01 jontaylor joined #mojo
09:02 marty joined #mojo
09:08 vanHoesel joined #mojo
09:35 sue joined #mojo
09:41 odc joined #mojo
10:02 berov joined #mojo
10:03 marty joined #mojo
10:19 vytas joined #mojo
10:26 vytas joined #mojo
10:29 sugar__ joined #mojo
10:55 punter joined #mojo
11:04 marty joined #mojo
11:06 bpmedley_ joined #mojo
11:09 sue joined #mojo
11:12 AndrewIsh joined #mojo
11:19 sue joined #mojo
11:31 melo joined #mojo
12:01 bpmedley joined #mojo
12:04 marty joined #mojo
12:09 sue joined #mojo
12:12 kaare joined #mojo
12:15 coolo hi! is there a way to have perlcritic checking templates?
12:23 HtbaaPi joined #mojo
12:27 binlei joined #mojo
12:39 sue joined #mojo
12:47 punter is there going to be a mojoconf this year?
12:48 marty joined #mojo
13:16 bpmedley Congratulations on your hackathon weekend.  Hope it went well.
13:22 odc` joined #mojo
13:23 kes joined #mojo
13:26 jberger punter: I hope so, sigh, I've been meaning to work on a call for proposals for months now
13:26 jberger bpmedley: thanks much was learned, an mojo already is reaping the benefits
13:27 jberger If not exactly the benefits we expected
13:27 neilhwatson joined #mojo
13:27 jberger But some good code cleanup in hard to reach places
13:27 jberger sri: reading that patch now
13:30 jberger Yeah that's way over my head
13:31 jberger But very cool that detangling continues
13:36 jberger coolo: I haven't seen that work yet, though I'm not a critic user myself so I may not be a good source
13:37 coolo jberger: arguably most checks don't make sense on them
14:12 zivester joined #mojo
14:26 vanHoesel joined #mojo
14:34 marcus Sri: http://blogs.perl.org/users/jt_smith/2016/01/perl-6s-killer-app---async.html enough to drive a man to drink....
14:36 nic marcus: http://irclog.perlgeek.de/mojo/2016-01-10#i_11864084
14:36 sue joined #mojo
14:38 vanHoesel joined #mojo
14:39 sri marcus: ^^
14:39 sri ;p
14:42 sri even managed to remove two $tx->is_finished calls
14:43 sri and i can't get over $c->write_chunk(sub {...}), that does not make the slighttest bit of sense
14:43 sri can't even figure out what it was supposed to do
14:44 sri must have been cargo culted from early designs
14:46 sri $c->write_chunk() on the other hand does actually make sense, it finalizes headers
14:52 mullagain joined #mojo
14:55 marcus Sri: was referring to the comments on the Reddit.
14:57 marcus I saw your original response too.
14:58 sri marcus: you didn't link to reddit
14:58 marcus Damnit
14:58 jberger "Perl 5 async is horse shit compared to Javascript" sigh
14:59 jberger JT admitted after my Mojo talk that if he had seen mojo commands he probably never would have written their internal application framework (Wing)
14:59 marcus https://reddit.com/r/perl/comments/40d51f/perl_6s_killer_app_async/
15:00 jberger but that does tell me (that and his other allusions to Dancer) that he hasn't used Mojo much
15:02 sue Tiny LOL. Any comparison containing "horse shit" bound to be well-reasoned. :)
15:03 jberger its a bit of JT's style, but I do wish he'd be more informed before he applied that style
15:06 sue it's a bit ignorant
15:07 preaction we tried getting him to use mojo, but he's the type that needs to make his own mistakes before he can learn
15:21 jberger spotify's top 50 Bowie playlist doesn't have Suffragette City??!
15:21 jberger https://play.spotify.com/user/spotify/playlist/7MQd3rOe8kuP2KDjtuiynJ
15:22 Lee i guess they couldn't afford the ticket
15:22 jberger Lee++
15:22 jberger well played
15:24 punter joined #mojo
15:24 Lee when i gave my little talk on mojo at LPW people seemed to be interested in the non-blocking and async stuff
15:24 jberger I watched it online, I recall liking it
15:25 jberger Lee++ # take some more untracked karma
15:25 Lee it was a bit improvised because i wasn't expecting to be giving it :)
15:25 * jberger remembers purl and weeps anew
15:25 Grinnz am i going to have to write a karmabot plugin now :P
15:25 jberger wow, for an improvised talk it was quite good indeed
15:26 Lee well, i had given it about 18 months prior so not totally improvised
15:28 PopeFelix joined #mojo
15:49 sri argh, one test still broken and i can't figure out why :S
15:55 sri haha, it's always something simple
15:55 sri like closing over $c with a closure -.-
15:56 jberger and usually venting your frustrations "out loud" is when you figure the problem out
15:56 jberger sri++
15:59 sri looks like performance went up a little with the cleanup
15:59 sri very little though, like 50 rps at 1700 rps
15:59 asarch joined #mojo
16:03 lluad joined #mojo
16:04 sri yay, $tx->is_writing is removed and all tests still pass
16:05 sri time to take a look at some of the more sketchy tests in longpoll_lite_app.t
16:06 sri some of those have been there unchanged since like 2008, that can't be good :)
16:18 voldemortensen joined #mojo
16:33 disputin joined #mojo
16:34 sue joined #mojo
16:52 good_news_everyon joined #mojo
16:52 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vzfAP
16:52 good_news_everyon mojo/master cce3b85 Sebastian Riedel: fix a lot of timing bugs
16:52 good_news_everyon left #mojo
16:53 sri not done yet, gonna keep looking for more dead code
16:54 jberger go, sri++, go!
16:56 sri those "Mojo::IOLoop->one_tick until $stash->{finished};" are not a great solution, but i can't think of anything else
16:57 jberger that's just in the test?
16:58 jberger I'm ok with stuff like that in the tests
16:58 sri i don't like tests that block forever if they fail
16:59 sri maybe i can at least get rid of a few of them, seem a little redundant mostly
16:59 jberger timer with some kind of bail out
16:59 jberger ?
16:59 Grinnz_ was going to say, set a guard timer than sets $stash->{finished}?
17:00 sri then an already complicated test case gets even more complicated :S
17:09 bwf Is there a reason "mojo generate app" does not make a "log" subdirectory?  Seems like a nice thing to have since it "just works" if it is there.  Maybe most people do not use the default?
17:14 sri hahahahahaha
17:14 sri we had to remove the log directory because people would come here every other day to complain that mojolicious doesn't log to STDERR
17:15 preaction heh
17:15 preaction *cough* maybe mojo needs to report where it's logging every time it starts up :p
17:16 preaction i for one love getting e-mails that consist of one line: "Logging to log/whatever"
17:32 jabberwok i am trying to figure whether there is any way to use Mojolicious::Plugin::OAuth2  or something else to do "app-level authentication" with Facebook. I want to write a service that does caching of a f.b. feed, for display on a client's site. so there is no user involved. i am getting hopelessly confused. Anyone have a lifeline ?
17:35 disputin joined #mojo
17:42 jabberwok and then assuming I figure that out,  once I get an access token (for an "app" not a user), what do I do with it and how? Ughhh.... all the documentation assumes you already know so much of this.
17:46 jberger jabberwok: in that case you probably want to attach it to the app, likely as an attribute (has)
17:46 good_news_everyon joined #mojo
17:46 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vzJnl
17:46 good_news_everyon mojo/master a8b45c0 Sebastian Riedel: a few less finish event tests
17:46 good_news_everyon left #mojo
17:47 melo joined #mojo
17:48 jabberwok right.  but then i do not see how to call the "fb api" or where it would go in a call to whatever that would be.
17:52 gryphon joined #mojo
17:52 jabberwok going on forty years programming and stuff like this makes you feel like a n00b
17:53 patrickz joined #mojo
18:17 sri jberger: any other ideas for cleanups?
18:22 mohij joined #mojo
18:30 bpmedley joined #mojo
18:57 good_news_everyon joined #mojo
18:57 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vzJyf
18:57 good_news_everyon mojo/master b95fb6f Sebastian Riedel: test when the drain event gets emitted
18:57 good_news_everyon left #mojo
18:59 jberger sri: anything that streamlines the code we attempted to extract over the weekend (making the next extraction easier) and anything that does the same for my "transaction context" classes too
18:59 jberger I'm $work-ing now, so I can't really dive in
19:03 PryMar56 joined #mojo
19:05 dod joined #mojo
19:36 batman Pretty cool: "We saved more than 35,000 years of page loading time by speeding up web requests for every visit to a site on the CloudFlare network."
19:36 batman :)
19:37 lluad Of course they're not counting all the page loads they lost when they switched to cloudflare.
19:39 lluad (There's a fairly widespread bug at some large webhosting providers that causes CNAME resolution to fail for a large fraction of users, causing websites to just ... vanish ... when they move to cloudflare).
19:41 jabberwok (answering own question)   mojo get "https://graph.facebook.com/FBUserName/feed?key=value&amp;access_token=1234_app_id_5678|00e0__secret__b000" <-- returns json directly without any fuss
19:41 jabberwok as usual, one month of head-banging results in a one-line program.
19:41 lluad Once you know how to do it, doing it is easy.
19:41 kaare joined #mojo
19:43 batman lluad: can't be very serious. If it was, cloudflare would be out of business.
19:44 lluad Users smart enough to notice that their website is invisible to some large chunk of the internet probably aren't hosting on crappy webhosting providers. Nor are they likely to be the ones actually paying Cloudflare money.
19:48 kaare joined #mojo
19:55 kaare joined #mojo
20:02 kaare joined #mojo
20:33 sri jberger: btw. i think some frameworks call it a codec
20:33 sri Mojo::Codec::HTTP::Server
20:33 sri Mojo::Codec::WebSocket
20:33 jberger I guess I can see that
20:34 jberger then we'd have something else that handles the context rather than the message parsing/generation
20:34 genio Codec tends to make me think of an audio or video stream rather than generic streams (probably need to retrain my brain)
20:34 sri you want two new namespaces?
20:35 sri the stuff that goes into $c->{...} is so implementation specific, don't think i'd want that in an object
20:36 jberger my thought was that it could also handle things like websocket upgrade and redirect's cb movement logic, but I'd have to actually try that before I could know if that was going to feel nicer
20:36 jberger genio: I had the same gut reaction, but of course that's what it is
20:37 jberger encode/decode not as audio/video but rather as an http message or websocket frame
20:38 sri http://netty.io/4.0/api/io/netty/handler/codec/package-summary.html
20:39 sri http://netty.io/4.1/api/io/netty/handler/codec/http2/package-summary.html
20:42 jberger wow, they split it into lots of classes
20:43 sri you wouldn't believe how many layers netty has
20:43 sri yet, some classes are as big as half of the entire mojolicious dist
20:44 sri but objects cost nothing in java, so it's still crazy efficient
20:44 disputin joined #mojo
20:49 patrickz joined #mojo
21:11 voldemortensen1 joined #mojo
21:23 jberger if I want to programmatically indicate that a resource is locked, can I use HTTP status 423, even if I'm not doing WebDAV?
21:27 sri i've seen members of the http working group say yes
21:27 jberger excellent, that's just what I wanted to hear
21:29 sri "507 Insufficient Storage" also seems very useful outside of webdav
21:30 sri or "422 Unprocessable Entity"
21:31 jberger yea
21:33 good_news_everyon joined #mojo
21:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vzT9L
21:33 good_news_everyon mojo/master 5f40612 Sebastian Riedel: more consistent comments
21:33 good_news_everyon left #mojo
21:38 sri jberger: looks like this is coming up again https://github.com/kraih/mojo/commit/2ccaefe4c0b44c4324fa322fffea454c46cd8512
21:38 sri why did we do that again?
21:38 jberger local lib
21:38 jberger perlbrew
21:38 punter joined #mojo
21:39 sri hmm, doesn't trigger any memories
21:39 jberger basically if you run hypnotoad with your non env perl crazy things happen
21:39 jberger it was framework benchmarks
21:39 Grinnz_ not the #!perl, but the 'use lib'
21:39 sri oh no, i don't mean #!perl
21:39 sri yea, use lib
21:39 Grinnz_ it just came up on the mailing list
21:39 jberger that was just in documentaiton
21:39 Grinnz_ generated app too
21:39 sri searching thought the irclog, even batman stumbled over it a few weeks ago
21:40 genio Why #!perl over #!/usr/bin/env perl ?
21:40 jberger the installable version moved here: https://github.com/kraih/mojo/commit/2ccaefe4c0b44c4324fa322fffea454c46cd8512#diff-b659d9bfeffa6b78a1f2950c7e72259bR1450
21:40 Grinnz_ because the latter doesn't get rewritten
21:40 jberger further down in that commit
21:40 Grinnz_ when installed by cpan installers
21:40 jberger I'd rather never use lib
21:40 Grinnz_ if you install something and then running it doesn't default to using the perl it installed with, you have problems
21:41 jberger I'm pretty sure I recall being told to make that example "use lib" for simplicity
21:41 genio ah.  I really need to retain more knowledge on the install process
21:41 sri ah, did we want to remove the script rewriting step from the growing guide?
21:41 sri that makes sense
21:41 jberger it was something related to consistency with the guides yes
21:41 Grinnz_ could you just use FindBin from the start?
21:41 Grinnz_ i can't think of a reason not to
21:42 jberger I'm absolutely ok with ditching "use lib"
21:42 sri well, then i'm open to proposals using FindBin
21:42 sri has to cover all the stuff the commit did though
21:42 sri generators, growing guide, cookbook
21:42 jberger I assume I tried to argue for FindBin then, so I'm not involved in this one
21:43 sri pretty sure i just wanted somethign consistent
21:44 Grinnz_ genio: there was an idea about making it rewrite /usr/bin/env perl, but then people stopped working on EUMM and it stagnated
21:45 genio EUMM is a gigantic ball of confusion
21:45 Grinnz_ https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/58
21:45 Grinnz_ i guess now there is jsut nobody that wants to dig into that part of EUMM anymore ;)
21:45 jberger and yet the MB witchhunt continues ... sigh
21:46 Grinnz_ jberger: more people working on EUMM than MB, still :P
21:46 jberger maybe because it needs it
21:47 pink_mist lol
21:47 genio I tried to like MB...
21:47 Grinnz_ i wonder how much more work leont's extensible version of MBT needs
21:47 jberger I have been using MBT for simple dists lately
21:47 jberger I'd like to see his next thing
21:48 Grinnz_ https://github.com/Leont/dist-build i believe this is it
21:48 jberger Alien::Base would never have been possible on EUMM
21:50 Grinnz_ as far as i'm concerned, they're all just dzil plugins ;)
21:50 genio yea, and dzil is not something I care to use. :/
21:51 sri https://groups.google.com/d/msg/mojolicious/jrpVjZL5lcI/fKfCR5bpCQAJ
21:51 sri anyone want to work on it?
22:07 * sri opened https://github.com/kraih/mojo/issues/896
22:10 pink_mist should create a bot named 'bad_news_everyone' that announces when issues are created :P
22:10 sri ;p
22:11 sri lets see how long a simple documentation task stays open
22:11 jberger seeing as this is just doc, this is a great chance for someone to Get Involved (TM) in Mojo development even if you aren't (or don't consider yourself) very technical
22:12 sri yea
22:17 ajr_ joined #mojo
22:31 melo joined #mojo
23:19 mrEriksson joined #mojo
23:42 good_news_everyon joined #mojo
23:42 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vzIri
23:42 good_news_everyon mojo/master 966f804 Sebastian Riedel: add completed method to Mojo::Transaction
23:42 good_news_everyon left #mojo
23:42 sri jberger: you'll like this, $tx->{state} is completely gone
23:43 sri Mojo::Transaction::HTTP only has a {writing} flag now it shares with no other class, websockets don't need anything
23:44 sri i think of $tx->completed as something like $c->rendered
23:46 sri bottom line, the {state} problem is resolved
23:50 sri oh, the http push module for nginx is back https://nchan.slact.net/
23:55 Grinnz_ interesting, even has a redis backend of its own
23:56 jberger sri: WOW!

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