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

IRC log for #mojo, 2015-11-21

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

All times shown according to UTC.

Time Nick Message
00:10 marty joined #mojo
00:10 woz joined #mojo
00:11 marty joined #mojo
00:44 cpan_mojo Mercury-0.006 by PREACTION https://metacpan.org/release/PREACTION/Mercury-0.006
00:59 jontaylor joined #mojo
01:11 woz joined #mojo
01:21 genio Let the Jessica Jones marathon begin
01:32 aborazmeh joined #mojo
01:42 Grinnz ^
01:44 genio So far so good.
01:56 * sri opened https://github.com/kraih/mojo/issues/876
01:57 sri needs volunteers
01:57 sri not often there's a chance for someone to add completely new classes to mojolicious
02:01 jontaylor joined #mojo
02:10 * sri goes back to watching jessica jones too!
02:15 genio done with episode one.  wow.
02:22 Zoffix joined #mojo
03:22 jontaylor joined #mojo
03:22 noganex_ joined #mojo
03:32 genio It's a pretty good show so far! I like
03:39 sri it's awesome so far
03:40 Grinnz oh the main actress was pinkman's girlfriend in breaking bad, thats where i know her from
04:22 genio This might be my favorite "superhero" show yet
04:29 jontaylor joined #mojo
05:26 kaare joined #mojo
05:35 jontaylor joined #mojo
05:38 Grinnz interesting role for david tennant...
05:40 sri best marvel villain yet
05:42 jberger Just saw Spectre, liked it, but the plot again made no sense at all
05:43 mattastrophe joined #mojo
05:45 * jberger made a mojo based websockify replacement that was so little code it almost isn't worth packaging
05:58 jontaylor joined #mojo
05:58 mattastrophe joined #mojo
06:02 preaction that's what a blog post is for ;)
06:25 panshin joined #mojo
06:41 jontaylor joined #mojo
06:50 melo joined #mojo
07:37 melo1 joined #mojo
07:47 dod joined #mojo
07:52 dod joined #mojo
08:10 jontaylor joined #mojo
08:22 Vandal joined #mojo
08:30 panshin joined #mojo
08:55 woz joined #mojo
09:25 jontaylor joined #mojo
09:25 woz joined #mojo
09:30 dod joined #mojo
10:04 trone joined #mojo
10:07 trone_ joined #mojo
10:31 panshin joined #mojo
10:31 jontaylor joined #mojo
10:34 sue joined #mojo
10:46 buu sri: What's the relationship between UserAgent, Channel::HTTP and Transaction::HTTP? has-a, is-a, does?
10:59 woz joined #mojo
11:25 dod joined #mojo
11:27 sh4 joined #mojo
12:14 woz joined #mojo
12:19 crab buu: yes
12:24 buu ?
12:25 crab sorry. i misread the last bit of your question. UserAgent has a channel, which opens a transaction (or, eventually, as many as it needs)
12:26 crab so UserAgent would have a Channel::HTTP::Client, and Server::Daemon would have a Channel::HTTP::Server
12:28 buu So would the channel return transactions?
12:29 buu What about all of the UserAgent->transactor code?
12:33 Eric1 joined #mojo
12:33 panshin joined #mojo
12:39 crab it'd have to be untangled
12:41 buu Yeah..
12:42 buu I went through the code but I couldn't figure out what sri was trying to accomplish
12:42 buu The post is a tad vague!
12:42 melo joined #mojo
13:05 sue joined #mojo
13:07 woz joined #mojo
13:09 woz joined #mojo
13:45 Zoffix joined #mojo
14:03 padd173 joined #mojo
14:03 panshin joined #mojo
14:12 ipunter joined #mojo
14:14 woz joined #mojo
14:18 Zoffix joined #mojo
14:24 woz joined #mojo
14:29 woz joined #mojo
14:35 bjakubski joined #mojo
14:37 buu $options in the renderer->add_handler code is the stash right?
14:52 asarch joined #mojo
15:21 ipunter joined #mojo
15:24 Zoffix joined #mojo
15:25 ipunter joined #mojo
16:00 voldemortensen joined #mojo
16:00 asarch joined #mojo
16:01 woz joined #mojo
16:07 sri buu: the refactoring task does include quite a bit of design work
16:08 sri not much code, but it gets accessed from a lot of places
16:10 sri https://github.com/kraih/mojo/issues/876
16:10 sri it's rather vague because i don't know the intermediate steps to take yet either
16:14 buu Ok seriously how does Mojo::Template even work
16:15 buu return $self->parse(shift)->build->compile || $self->interpret(@_);
16:15 buu How does that *ever* produce text
16:18 abra joined #mojo
16:23 PryMar56 joined #mojo
16:23 sri #876 is a little deceiving, since it doesn't look very significant, but it will have a big influence on future work
16:23 sri one of the most important tasks we've had in years
16:25 buu sri: does ->compile ever produce text?
16:26 sri buu: what are you doing?
16:26 buu Just trying to figure out how to write a renderer
16:27 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Adding-your-favorite-template-system
16:27 buu ?
16:27 buu That's like 5 lines long
16:28 buu What does ->{inline} return? When do I use it? Should I use template_path to look into other directories?
16:28 buu Do I check files before data_templates?
16:31 buu What variable should I look into for template vars?
16:32 buu Do I need to explicitly call template_for ?
16:33 good_news_everyon joined #mojo
16:33 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v4hrD
16:33 good_news_everyon mojo/master ff23a45 Sebastian Riedel: there can now be multiple DATA sections and "templates" directories
16:33 good_news_everyon left #mojo
16:33 sh4|2 joined #mojo
16:42 buu Now I'm just eternally confused by   return $self->parse(shift)->build->compile || $self->interpret(@_);
16:42 buu compile returns a subref
16:42 buu interpret returns text
16:43 sue joined #mojo
16:49 sri no, compile doesn't
16:50 marty joined #mojo
16:57 buu wait
16:57 buu what the fuck
16:57 buu THAT EXECUTES BOTH?
16:58 buu That's awful
17:00 good_news_everyon joined #mojo
17:00 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v4h1W
17:00 good_news_everyon mojo/master d1b9ff5 Sebastian Riedel: mention return values
17:00 good_news_everyon left #mojo
17:01 buu So does mojo controller call template_for?
17:02 buu Yes, yes it does.
17:02 woz joined #mojo
17:08 jberger buu: calm down
17:08 sri hmm, not sure if i should add to #876 what i believe the refactoring will end up as, or just leave it open for interpretation so smart folks can surprise me with an even better solution
17:13 stephen joined #mojo
17:14 thowe joined #mojo
17:40 lluad joined #mojo
17:46 sri https://github.com/kraih/mojo/issues/876#issuecomment-158664866
17:47 sri tried to make it a little more clear
17:50 woz joined #mojo
18:21 buu jberger: are you not calm or something?
18:22 buu jberger: I think it's ok for you to be calm now though
18:30 woz joined #mojo
18:47 woz joined #mojo
18:54 Adura joined #mojo
18:57 woz joined #mojo
19:04 woz joined #mojo
19:15 panshin joined #mojo
19:19 sri buu: what does that mean?
19:40 nigel joined #mojo
19:44 dod joined #mojo
19:51 sri re technical debt, i'm almost certain we've accumulated some here too https://github.com/kraih/mojo/blob/master/lib/Mojolicious/Routes/Match.pm#L38-L92
19:51 sri not much, but there should be ways to simplify that
19:57 voldemortensen joined #mojo
20:06 buu sri: I was trying to figure out what jberger was talking about
20:12 sri buu: fwiw. your aggressive tone made me stop trying to help
20:22 jberger sri: can you think of a clean way to weaken in this so that it cleans itself up?
20:22 jberger http://pastie.org/10572677
20:25 sri jberger: does it leak at all?
20:26 sri creative use of ->tap, me likes
20:28 jberger I assume it must leak, $ws closes over $tcp (as ::Stream) and $tcp closes over $ws
20:28 jberger s/as/a/
20:28 sri don't assume, test ;p
20:28 * jberger fumbles about with Devel::Cycle
20:29 jberger the fun thing is, this code totally works
20:29 jberger in-browser vnc over websocket
20:29 sri sometimes it's hard to say what leaks and what doesn't :S
20:30 sri even and undef $tcp in the finish closure might do the trick
20:30 sri s/d//
20:35 jberger sri: hunh, your gut was right, Devel::Cycle (placed in the finish callback) doesn't see a problem
20:35 sri and just to be sure, open and close 10000 websockets and watch the memory usage :)
20:37 * sri is really unsure about https://github.com/kraih/mojo/issues/876#issuecomment-158664866
20:38 sri on the one hand, it might answer common questions, on the other it might set the bar too high, or even get in the way of a simpler and more elegant solution i might have missed :S
20:39 sri it would be really cool if we had a few more folks who knew that part of the code inside out
20:40 sri even the event loop has lower bus factor
20:40 sri *+a
20:41 sri which is so much more complicated
20:41 ichi joined #mojo
20:43 sri if anyone here wants to look into the Mojo::Transaction business, i'm available for answering questions
20:46 jberger I don't even notice a memory blip
20:47 jberger though I do occaisonally get (in cleanup) Can't call method "remove" on an undefined value at /Users/joel/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.0/Mojo/IOLoop/Client.pm line 70, <DATA> line 2231 during global destruction.
20:52 buu sri: Would you accept a patch to change $template->build->parse->compile || $template->interpret; in the render code to a more common perl idiom?
20:57 tyldum joined #mojo
21:09 tyldum joined #mojo
21:12 voldemortensen joined #mojo
21:21 tyldum joined #mojo
21:28 jberger sorry I'm not jumping on the Transaction refactor, I've got $work reasons I'm working on this
21:29 sri excuses excuses
21:29 * sri cracks the whip
21:31 sri hope crab will succeed, but i have a feeling it might be a job for a team
21:42 tyldum joined #mojo
21:49 woz joined #mojo
21:53 kyshtynbai joined #mojo
22:06 buu sri: I realize you're ignoring me but this would be a really good example to replace the code in the 'adding your own renderer' documentation https://metacpan.org/source/BFAIST/Mojolicious-Plugin-HTMLTemplateRenderer-0.04/lib/Mojolicious/Plugin/HTMLTemplateRenderer.pm
22:11 voldemortensen joined #mojo
22:24 tyldum joined #mojo
22:29 voldemortensen joined #mojo
22:38 Zoffix joined #mojo
22:40 meshl joined #mojo
22:41 meshl [Off topic!] Hey, does anyone know an equivalent of plink.exe in pure Perl (I need to create a tcp tunnel through SSH2 not using any external executable)
22:42 good_news_everyon joined #mojo
22:42 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/v4jxf
22:42 good_news_everyon mojo/master d040ec4 Sebastian Riedel: return an empty list if the return value is significant
22:42 good_news_everyon left #mojo
22:46 meshl Seems like I am not the first one... http://www.perlmonks.org/?node_id=1028223
22:51 tyldum joined #mojo
22:53 woz joined #mojo
23:08 mattastrophe joined #mojo
23:13 good_news_everyon joined #mojo
23:13 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vBee9
23:13 good_news_everyon mojo/master c7a22d7 Sebastian Riedel: improve renderer not to require a return value from handlers
23:13 good_news_everyon left #mojo
23:15 sri that actually fixes a bug too, where a handler would return true, but leave $output set to undef, making the charset stuff die
23:15 Zoffix \o/
23:24 sue joined #mojo
23:35 good_news_everyon joined #mojo
23:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vBeJs
23:35 good_news_everyon mojo/master e6f5d1e Sebastian Riedel: better descriptions for renderer methods
23:35 good_news_everyon left #mojo

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