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

IRC log for #mojo, 2014-10-14

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

All times shown according to UTC.

Time Nick Message
00:09 Gedge_ joined #mojo
00:10 D4RK-PH0ENiX joined #mojo
00:18 Adura joined #mojo
00:32 sri do we have any fans of the (??) placeholder from DBIx::Simple?
00:34 d4rkie_ joined #mojo
00:42 sri still on the edge about adding custom placeholders
00:54 laouji joined #mojo
01:02 D4RK-PH0ENiX joined #mojo
01:25 klapperl_ joined #mojo
02:29 woz joined #mojo
02:46 disputin joined #mojo
02:49 noganex joined #mojo
03:02 woz joined #mojo
03:50 KCL joined #mojo
03:53 firnsy joined #mojo
04:00 basic6_ joined #mojo
04:04 cpan_mojo Galileo 0.037 by Joel Berger - http://metacpan.org/release/JBERGER/Galileo-0.037 (depends on Mojolicious::Plugin::Memorize)
04:26 preaction jberger++
04:37 jberger szabgab opened several useful bug reports
04:37 jberger that was fixing the tougher but still doable ones
04:39 jberger I still need to update the heroku app demo
04:39 jberger guys that will be tomorrow
04:40 jberger *guess
04:53 irq joined #mojo
05:16 chankey joined #mojo
05:30 davido_ joined #mojo
05:37 laouji joined #mojo
06:05 trone joined #mojo
06:32 Vandal joined #mojo
06:37 irq joined #mojo
07:12 arpadszasz joined #mojo
07:13 dod joined #mojo
07:15 d4rkie_ joined #mojo
07:15 dp_ joined #mojo
07:34 odc gud morning *
07:38 rawler joined #mojo
07:38 tianon joined #mojo
07:43 neyasov joined #mojo
07:48 arpadszasz joined #mojo
07:49 trone joined #mojo
07:59 chankeypathak joined #mojo
08:01 basiliscos joined #mojo
08:04 denis_boyun joined #mojo
08:05 woz joined #mojo
08:10 trone joined #mojo
08:28 arthas joined #mojo
08:45 woz_ joined #mojo
09:00 tianon joined #mojo
09:05 dod joined #mojo
09:09 arpadszasz joined #mojo
10:03 tudorconstantin joined #mojo
10:44 denis_boyun joined #mojo
10:46 arpadszasz joined #mojo
11:05 dod joined #mojo
11:14 arpadszasz joined #mojo
11:38 D4RK-PH0ENiX joined #mojo
11:39 neyasov joined #mojo
11:40 neyasov_ joined #mojo
11:40 d4rkie joined #mojo
11:43 D4RK-PH0ENiX joined #mojo
11:56 D4RK-PH0ENiX joined #mojo
11:59 sujithm joined #mojo
12:05 neilhwatson joined #mojo
12:24 asarch joined #mojo
12:38 sri o/
12:40 Akron joined #mojo
12:41 Akron I wish there would be a Perl Cookbook solely dealing with memory leak avoiding patterns ... is there one?
12:46 sri i only know two patterns, plain old weaken and inside-out storage with fieldhash
12:46 sri still waiting for someone to explain the DBIx::Class pattern to me
12:51 Akron I think the class destroy pattern can also be considered a recipe.
12:51 Insane joined #mojo
12:52 ignacio_ joined #mojo
12:52 Insane hi all, how could log format => sub {} works? could I pass Mojo helper as a callback for it?
12:52 Akron Oh - or maybe a web game "Does it leak?" with example code and you have to guess, if it leaks. I'm really bad in this.
12:53 Insane I have a helper which performs user lookup (ip, id, etc) and want to add it into mojolicious $log->level('message') calls
13:01 Insane sri, are u alive? ;)
13:04 cpan_mojo Mojolicious-Plugin-NYTProf 0.10 by Lee Johnson - http://metacpan.org/release/LEEJO/Mojolicious-Plugin-NYTProf-0.10
13:04 sri i don't know
13:05 sri how do you know you're alive?
13:06 Insane if you still can write something maybe...?
13:06 sri i do like how your avatar in convos looks like the flying spaghetti monster though
13:07 sri http://i.imgur.com/YdJOew6.png
13:07 Insane xD
13:07 Insane probably you can advice me with og formatting? (:
13:07 Insane s/og/log/
13:24 trone joined #mojo
13:25 cpan_mojo Mojolicious-Plugin-NYTProf 0.11 by Lee Johnson - http://metacpan.org/release/LEEJO/Mojolicious-Plugin-NYTProf-0.11
13:29 lipizzan joined #mojo
13:30 BooK joined #mojo
14:04 tbushell_ joined #mojo
14:04 sri diegok: can you op Bender?
14:04 diegok o/
14:04 sri diegok++
14:06 sri \o
14:08 sujithm joined #mojo
14:11 * sri wonders if ssl 3.0 will die tomorrow
14:16 mishantil It's interesting to see if this is The Big One.
14:20 _eugen joined #mojo
14:31 tbushell joined #mojo
14:31 tbushell_ left #mojo
14:33 tbushell_ joined #mojo
14:38 tbushell joined #mojo
14:38 tbushell_ joined #mojo
14:43 ryozi joined #mojo
15:13 ashimema joined #mojo
15:21 sh4 joined #mojo
15:46 * sri wonders if he should split up ->query() in Mojo::Pg into 3 methods
15:48 sri something like $db->sql('insert into foo values (?, ?, ?)')->with('bar', 'baz', 'yada')->execute;
15:48 sri (most likely with better method names)
15:49 sri maybe it's just me... but once the sql and number of placeholders grows things get less pretty rather quick
15:50 sri $db->query('insert into foo values (?, ?, ?)', 'bar', 'baz', 'yada', sub {...});
15:50 KCL_ joined #mojo
15:50 sri $db->sql('insert into foo values (?, ?, ?)')->with('bar', 'baz', 'yada')->execute(sub {...});
15:51 sri it's a little longer, but looks nicer once you reach 80 characters and things need to be wrapped
15:59 huskar12 joined #mojo
16:00 sri oh noes... perltidy doesn't like that
16:00 sri same problem as promises
16:00 huskar12 hello. how can I have a subroutine in a controller without having the appropriate view in my template directory?
16:00 huskar12 I don't need one since I am returning JSON only
16:02 sri https://gist.github.com/anonymous/91b7bc7217ec0abcfbb1
16:03 sri old style wins the perltidy test :S
16:07 sri huskar12: http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Rendering-JSON
16:25 jberger_ this is why I don't submit to the perltidy test
16:25 jberger_ (in my projects)
16:30 batman i've started a new orm-like project on top of Mojo::Pg and Mojo::mysql...
16:30 batman not sure if i will complete it, but feedback is wanted
16:30 batman https://github.com/jhthorsen/mad-mapper
16:51 preaction joined #mojo
16:59 basiliscos joined #mojo
17:01 davido___ Tonight is Salt Lake Perl Mongers, with a presentation on Asynchronous programming patterns with Mojo::IOLoop::Delay, from Scott Wiersdorf
17:01 davido___ http://saltlake.pm.org has directions, time, etc.
17:01 davido___ tempire ^^
17:01 tempire noted
17:02 davido___ We typically do video, and w
17:02 davido___ will post it after the fact.
17:07 bc547 davido___: interesting
17:11 batman sri: https://groups.google.com/d/msg/mojolicious/aSNQlJGie-w/2LSj5KAXNCUJ <-- should i take that seriously or not..?
17:12 dod joined #mojo
17:21 alanminter joined #mojo
17:24 disputin joined #mojo
17:27 alanminter left #mojo
17:40 sri batman: what do you think? Oo
17:41 tempire batman: Translation: Do whatever you want, but I don't think it's a good idea, and I'm not going to support it unless you prove that it's necessary.
17:44 batman sri: i have no idea what to make of it, but i will take tempire's translation
17:44 batman i was hoping for some more details though
17:47 sri yea, tempire is right
17:48 sri i'm going to take a more open anti-orm stance
17:51 sri i guess my humorous attempt to show it failed
17:53 * tempire got the joke
17:56 batman i was hoping for that, but i wasn't sure sri :9
17:56 batman :)
18:04 disputin joined #mojo
18:08 Trelane er, help
18:08 Trelane https://gist.github.com/2shortplanks/da718370e8ca78efa396
18:09 Trelane I'm having some problem with Mojo::DOM and a nested dl list
18:12 Trelane basically, it's not round tripping even without any manipulation
18:12 Trelane Mojolicious-5.49
18:22 Trelane I think it's something to do with the self-closing tags
18:22 Trelane we're prematurely closing
18:22 Trelane i.e. we're seeing the next opening <dl> and self closing
18:24 sri patches welcome
18:24 purl rumour has it patches welcome is always true or even for metacpan.org or swahili for "Put up or shut up."
18:24 Trelane sri: I'm looking at the code
18:24 sri (and an explanation for how the spec has been misinterpreted)
18:24 Trelane however, I'm not entirely sure what the correct behavior is right now
18:24 sri yea, that's kinda important :)
18:25 Trelane yeah, I can tell what we have now is wrong...;-)
18:26 Trelane ah, ha.  Yes.  We say:
18:26 Trelane dd   => [qw(dt dd)],
18:27 Trelane dd ends an open dd.  Which makes sense in <dl><dd>foo<dd>bar</dl>
18:27 Trelane but doesn't make sense in <dl><dd><dl><dd>foo</dd></dl></dl>
18:29 Trelane we need to somehow keep track of how many dl are open
18:30 Trelane a dd and dt only can auto-close at the same level of dl
18:34 sri there is scoping rules for tables and stuff already
18:40 sri if you stop them at the <dl> it should be fine
18:42 sri i think ul/li have scoping rules applied already
18:43 sri allright, seems rather easy, i'm going to stop now before i fix it myself by accident ;p
18:44 Mso150 joined #mojo
18:45 sri it's a good task for getting to know the html spec and the parser, and we need more people who can do it
18:46 sri if you decide you won't or can't do it please open an issue on github, so others can give it a try
18:50 Trelane I'll start the first step, a failing test case
19:00 jamesaxl joined #mojo
19:13 sri well, crap, i know the fix now
19:14 Trelane So:
19:14 Trelane # "dd" and "dt"
19:14 Trelane elsif ($start eq 'dd' || $start eq 'dt') {
19:14 Trelane _close($current, {$_ => 1}, {dl => 1}) for qw(dd dt);
19:14 Trelane }
19:14 sri please no pasting into the channel
19:15 Trelane okay
19:17 sri close
19:18 sri i see where you got the "for qw()" idea though
19:19 Trelane what's wrong with the for qw(...)
19:19 sri not wrong, just a little less efficient than it can be :)
19:19 Trelane what you want two statements?  the dd has to close both dt and dd and vice versa
19:20 sri nope, it can be _close($current, {dd => 1, dt => 1}, {dl => 1});
19:20 Trelane ah
19:21 Mso150 joined #mojo
19:21 Trelane ...and the tests pass
19:21 sri with that addition it might be worth looking into optimizations for that block again
19:22 Trelane yeah, I should commit this first though
19:23 sri if you want to send a pull request you could also optimize the one below to _close($current, {td => 1, th => 1}, {table => 1});
19:23 sri :)
19:23 sri i assume that's where you got the for qw()
19:23 Trelane yeah
19:26 Trelane two thoughts;  Firstly this could be a dispatch routine with a hash containing subroutines.  Though I'm not sure how much more efficent an extra subroutine call would make things.
19:27 sri i was thinking a hash with a data structure to pass to _close()
19:27 sri little like %END
19:27 Trelane secondly, that first for loops seems a little obviously inefficent
19:29 sri easy to prove :)
19:31 Trelane well, I need to work out how to get the patched Mojo::DOM onto the dev servers so that we can develop against it until a new Mojolicious gets packaged
19:32 sri should be out in a matter of days
19:33 sri Trelane++ # high quality patch
19:34 good_news_everyon joined #mojo
19:34 good_news_everyon [mojo] kraih pushed 3 new commits to master: http://git.io/wDNxMA
19:34 good_news_everyon mojo/master 09bb483 Mark Fowler: Mojo::DOM work properly with nested defintion lists
19:34 good_news_everyon mojo/master 0c8fa4d Mark Fowler: Mojo::DOM optomization: replace for loop with passing multiple params
19:34 good_news_everyon mojo/master 9d06a53 Sebastian Riedel: Merge pull request #688 from 2shortplanks/master...
19:34 good_news_everyon left #mojo
19:43 good_news_everyon joined #mojo
19:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/6q_UbQ
19:43 good_news_everyon mojo/master b46894b Sebastian Riedel: a few small formatting fixes
19:43 good_news_everyon left #mojo
19:44 sri you didn't run perltidy, it folded the %END structure :)
19:45 Trelane oh, I didn't even read the contributing guide.  Ooops
19:46 sri you were close enough, i go ocd on every merged patch anyway
20:23 berov joined #mojo
20:26 Ptolemarch joined #mojo
20:27 sri argh... turning the special rules into a structure is not actually faster :S
20:27 sri and more code
20:27 purl more code is better!
20:28 * sri sets purl on fire
20:28 * purl basks in the warm glow HEY WAIT A MINUTE
20:28 sri the idea was something like this... https://gist.github.com/anonymous/c361fe4abce69334a90d
20:30 Ptolemar_ joined #mojo
20:32 ignacio_ joined #mojo
20:32 sri (currently profiling by parsing the reddit frontpage 100 times)
20:34 sri whoops, i missed somthing in the patch
20:35 good_news_everyon joined #mojo
20:35 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/6B_4fA
20:35 good_news_everyon mojo/master a88befb Sebastian Riedel: that for loop is not necessary
20:35 good_news_everyon left #mojo
20:35 jojo joined #mojo
20:39 irq joined #mojo
20:50 sri Trelane: which for loop were you referring to with "secondly, that first for loops seems a little obviously inefficent"?
20:55 Trelane sri:     if (my $end = $END{$start}) { _end($_, 0, $current) for @$end }
20:55 sri ah, that's actually not inefficient :)
20:55 Trelane seems like you should be passing all $end into _end
20:56 sri it usually just has one element
20:56 sri there are like 3 cases where it has two
20:57 hernan joined #mojo
20:57 sri and the cases are <rt> and <rp> ;p
21:00 sri i suppose you could make it a scoping rule with the <ruby> element too and get rid of the for
21:01 Trelane this seems like the kind of thing we should be running a profiler against a large number of web pages to see what's what
21:01 sri have you ever seen a website use <ruby>?
21:03 sri anyway... i would still like to see a patch that reduces the code here https://github.com/kraih/mojo/blob/master/lib/Mojo/DOM/HTML.pm#L272-L291
21:04 sri i'm almost certain there's a way... but i just can't seem to find it
21:11 Nei I saw some <ruby> on chinese sites once
21:12 Nei for kids helping them how to read
21:25 good_news_everyon joined #mojo
21:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/gmEZZg
21:25 good_news_everyon mojo/master 7d47d93 Sebastian Riedel: made handling of optional end tags a little faster
21:25 good_news_everyon left #mojo
21:26 sri ideas for how to simplify this further would be very welcome https://github.com/kraih/mojo/commit/7d47d938b5cef82039648dc5cbd481038564c1a3#diff-4038e5010c692a1de70d31706fbc4b5fR68
21:27 denis_boyun joined #mojo
21:28 sri it's a bit of a tricky strucutre... you have a bunch of elements triggering the rules... and then a bunch of elements that can be closed... and a bunch of elements you stop on when walking up the stack
21:32 Trelane okay, so I walked the dog, came back, found another bug
21:33 Trelane https://gist.github.com/2shortplanks/1311a130cc4738550876
21:34 Trelane nope, nope, I'm an idiot
21:34 Trelane that test suite was broken.  Let me try to narrow it down again
21:35 Trelane I obviously removed too much ;-)
21:48 Trelane okay, I found out what the bug was.  I was calling at() on a collection that was returning a collection
21:49 Trelane which was surprising to me, I would have expected a single Mojo::DOM
21:53 sri you might be interested in commenting on https://github.com/kraih/mojo/issues/684
21:57 Ptolemarch joined #mojo
22:05 sri i actually wonder if Mojo::DOM should stringify at all
22:05 sri yes... it should ;p
22:05 sri of course... $dom->find(...)->join("\n")->say
22:12 sri looks like the robot apocalypse is near... eliza bots have taken over twitter
22:14 sri dammit... this is so amazingly brilliant... an eliza bot monitoring the #gamergate hashtag
22:17 sri i've been avoiding that hashtag like the plague, but this is amazing
22:32 tbushell joined #mojo
22:50 disputin joined #mojo
22:57 powerman joined #mojo
22:57 powerman hi. is it possible to set max_message_size() for async ua requests?
22:58 powerman async $ua->get() returns stream $id, but to set max_message_size I need $tx
22:58 powerman how to get $tx from $id?
22:59 powerman or only way is use global env var, one for all useragent objects?
23:27 disputin joined #mojo
23:57 sri purl: seen crab
23:57 purl crab was last seen on #mojo 25 days, 19 hours, 32 minutes and 44 seconds ago, saying: i take it these are not registers like %eax  [Sep 19 04:24:20 2014]
23:57 sri hmm

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