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

IRC log for #mojo, 2014-08-09

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

All times shown according to UTC.

Time Nick Message
00:01 hesco joined #mojo
00:02 * sri would still like a +1 from jberger though, since he and tempire are the ones building the cleanest apps
00:25 bc547 joined #mojo
00:27 komodo_ joined #mojo
00:28 good_news_everyon joined #mojo
00:28 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/BA9VYw
00:28 good_news_everyon mojo/master 206061b Sebastian Riedel: failed proxy connections need to set a response error
00:28 good_news_everyon left #mojo
00:38 good_news_everyon joined #mojo
00:38 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/LhAGxA
00:38 good_news_everyon mojo/master baa6828 Sebastian Riedel: simplify proxy test
00:38 good_news_everyon left #mojo
00:41 d4rkie joined #mojo
01:03 d4rkie joined #mojo
01:04 bc547 joined #mojo
01:07 hesco my test failures are lost due to an overflow of my scroll back buffer.  Is there some way to make my test suite halt on the first error when run with prove?
01:20 hesco looks like die_on_fail() might work, testing that now.
01:26 woz joined #mojo
01:31 klapperl joined #mojo
01:53 KCL joined #mojo
01:56 sri tempire: funny problem, how would we document nested helpers?
01:57 sri =head2 foo.bar
01:57 sri ?
02:08 tempire Meaning the helpers within a custom app?
02:08 tempire =head2 foo->bar
02:10 tempire I'm not worried. This will come, even if it's not today. It's inevitable.
02:10 tempire Like dancing in Norway
02:10 * tempire dances
02:11 * tempire dances onto the plane
02:44 GabrielVieira joined #mojo
02:46 miked joined #mojo
02:53 GabrielVieira joined #mojo
02:58 noganex_ joined #mojo
03:03 priodev joined #mojo
03:11 basic6 joined #mojo
03:12 jainmj joined #mojo
03:25 aghbas joined #mojo
03:42 r0b3rt joined #mojo
04:43 r0b3rt left #mojo
04:55 Adurah_ joined #mojo
04:56 Adurah joined #mojo
04:57 Adura joined #mojo
05:02 sujithm joined #mojo
05:04 sujithm_ joined #mojo
05:22 sujithm joined #mojo
05:47 sujithm joined #mojo
06:02 gatitskiy joined #mojo
06:06 gatitskiy joined #mojo
06:31 basic6_ joined #mojo
06:33 sujithm_ joined #mojo
06:35 basiliscos joined #mojo
06:43 GabrielVieira joined #mojo
07:07 denis_boyun joined #mojo
07:10 Vandal joined #mojo
07:22 batman sri: i won't give it a go, since after reading the patch i don't get it.
07:22 batman why would i want $c as the first argument in helper() ? (helper 'test.helper' => ...)
07:23 batman i thought i would have an instance of the plugin and then the controller: my ($plugin, $c, @args) = @_;
07:23 batman no idea where $plugin fits in all this.
07:24 batman at least that's what i get from reading git diff master...origin/nested_helpers
08:01 gatitskiy joined #mojo
08:14 gatitskiy joined #mojo
09:35 hotsnow joined #mojo
09:47 bodgix joined #mojo
10:46 jainmj joined #mojo
10:53 mr-foobar joined #mojo
10:58 sri batman: so my guess was right and you were about to propose $c->foo(bar => @_)? ;p
10:59 denis_boyun joined #mojo
10:59 batman no.
10:59 batman but it doesn't matter, since i don't know why you would have nested helpers without the plugin instance :(
11:00 sri because helpers don't need a plugin
11:03 mr-foobar joined #mojo
11:33 basiliscos joined #mojo
11:41 Adurah joined #mojo
11:45 sri batman: maybe you shouldn't vote until you get the patch
11:45 batman which patch?
11:45 purl which patch is this?
11:46 sri the one were are talking about since yesterday! nested_helpers
11:47 batman oh! "get" as in "understand" ?
11:47 batman i read "get" as in "receive"...
11:47 sri yes, as in understand
11:48 tempire It is done.
11:48 * tempire no longer has a full time job.
11:48 * tempire cheers
11:48 batman right. from what i understand, it doesn't make any sense to me :(
11:48 batman tempire: congratulations :)
11:52 stephan48 tempire: is that good or bad?
11:53 gatitskiy joined #mojo
11:53 tempire It's neither.
11:53 tempire It's glorious.
11:53 tempire Guess what I'm doing on Monday?
11:53 tempire WHATEVERIWANT MUHAHAHAHAHA
11:53 batman whateveryouwant
11:54 * batman is too slow
11:54 tempire hookers and penny candy.
11:54 tempire that's where the action is these days.
11:55 batman btw: the reason why i don't get nested helpers is that i read $c->some_helper->other_method as "call other_method on some_helper"
11:56 batman while it's more a convention on how to "hide" helpers under a namespace.
11:56 batman which i don't get how is any better than really_long_helper_name
11:56 batman i actually think it's worse, since it's super slow and not better in another way, imho
11:57 Adurah_ joined #mojo
11:57 Adurah joined #mojo
11:57 Adura joined #mojo
12:01 batman so if i'm wrong, then 1) i need someone to explain it to me 2) i'm voting -0, since i don't understand it
12:04 sh4 joined #mojo
12:13 GabrielVieira I'm in the same boat of batman
12:14 GabrielVieira I can't see a practical use of nested helpers
12:20 sri tempire: godspeed
12:20 purl godspeed is about darkuncle's favorite though. or about a punk bike messenger speedfreak in SF, at http://www.amazon.com/exec/obidos/tg/detail/-/0312286805/qid=1030569969/sr=8-1/ref=sr_8_1/102-9558966-3182555?v=glance&s=books&n=507846 and by (: lynn breedlove) or a track by BT (the Hybrid remix is exceptional) or short for Godspeed You! Black Emperor
12:22 sri oh well, i tried hard to make nested_helpers happen, maybe it's just not good enough
12:22 sri proposal rejected
12:33 batman this is how nested helpers would be useful to me: https://gist.github.com/jhthorsen/819f43ca15cc16c12ee0
12:40 Kripton joined #mojo
12:57 sri https://groups.google.com/forum/#!topic/mojolicious/Pn0FkpBzO4I # and it's official
12:58 sri i'm not blaming anyone, but if you were indifferent towards this discussion, i blame you
13:10 * tempire blames marcus
13:12 * sjn blames the boogie
13:14 d4rkie joined #mojo
13:25 * jberger blames Canada
13:27 jainmj joined #mojo
13:34 GabrielVieira batman: this would be the same but without nested helpers? https://gist.github.com/gabrielmad/741d778ad2e576582eb4
13:35 batman what's the difference between your gist and mine..?
13:36 batman not sure if i would call it nested helpers, but it would be a nicer way to say "this plugin method needs both $self and $c"
13:36 GabrielVieira mine returns an Moo object, or Moose, or any other kind... with too_cool as the helper, and its methods as "nested helpers"
13:37 batman oh crap. in that case, i forgot to do use Mojo::Base 'Mojolicious::Plugin';
13:37 batman it was supposed to be a plugin class, not just -any- class
13:39 sri it would be really sad if nested_helpers only got rejected because most folks didn't understand them
13:41 GabrielVieira humm
13:41 GabrielVieira you see it useful with plugins only?
13:53 KCL_ joined #mojo
13:59 zackiv31 joined #mojo
14:05 d4rkie joined #mojo
14:10 hotsnow joined #mojo
14:18 hesco joined #mojo
14:21 zivester joined #mojo
15:16 miked joined #mojo
15:44 good_news_everyon joined #mojo
15:44 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/_XjZ2A
15:44 good_news_everyon mojo/master 91aba61 Sebastian Riedel: fixed bug where Mojo::Transaction::WebSocket would build incorrect frames if the FIN bit was not set
15:44 good_news_everyon left #mojo
16:16 dexteruk_ joined #mojo
16:24 basiliscos joined #mojo
16:32 jberger_ sri: can you think of why hypnotoad -s app.pl would not release port 8080?
16:33 jberger_ https://github.com/TechEmpower/FrameworkBenchmarks/pull/933#issuecomment-51677003
16:48 jberger_ I can confirm with local testing
16:49 jberger_ after running hypnotoad -s app.pl, if I try to mojo get a page, it trys for a while and then gives Premature connection close
16:49 jberger_ after that attempt, future attempts give the correct Connection refused
16:50 Zx3 joined #mojo
16:52 geira joined #mojo
17:06 jberger_ seems to be a dangling keep alive
17:07 jberger_ and because of that and the graceful shutdown the server still has port 8080 bound
17:07 jberger_ I don't know much about manipulating that stuff
17:11 Adura What's strace say?
17:17 dexteruk joined #mojo
17:27 mr-foobar joined #mojo
17:29 jberger_ Adura: I don't think that's necessary
17:30 jberger_ hmm
17:30 jberger_ I just reduced the graceful_timeout on hypnotoad to 1 and now it shuts down much more quickly
17:31 Adura But, it's less graceful?
17:31 Adura It went from débutante to redneck?
17:32 jberger_ for the FrameworkBenchmark suite, I don't care
17:32 Adura True.
17:32 jberger_ they have told me that the testing is complete by the time that it calls the test.close() function (which stops hypnotoad)
17:32 jberger_ and then its failing because port 8080 was not release
17:32 jberger_ d
17:33 jberger_ so, screw the graceful stop
17:37 jberger_ drum roll please!
17:37 jberger_ https://api.travis-ci.org/jobs/32102308/log.txt?deansi=true
17:37 jberger_ ^^ follow along if you want
17:47 Adura Long read.
17:52 neyasov___ joined #mojo
18:01 jberger_ passing!
18:03 jberger_ https://travis-ci.org/TechEmpower/FrameworkBenchmarks/builds/32102268
18:15 jberger_ btw, the only thing that really matters is the last few screen lengths
18:45 good_news_everyon joined #mojo
18:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/FCwo-A
18:45 good_news_everyon mojo/master 0e1a85f Sebastian Riedel: test binary message in multiple frames
18:45 good_news_everyon left #mojo
18:57 jberger_ \o/     https://github.com/TechEmpower/FrameworkBenchmarks/pull/933#issuecomment-51695106
19:10 Eke- joined #mojo
19:12 sri since i'm a little upset about the unresearched performance remarks batman made earlier about nested_helpers... here's a comaprison to put things in perspective https://gist.github.com/anonymous/cb8c71e24eede4110ae9
19:12 sri (in case anyone actually cares)
19:13 sri merely returning the invocant from an intermediate helper makes up more than half of the difference
19:35 sri yea, i'll shut up about it now
19:39 jberger_ sri: I think what I dislike the most is the declaration syntax
19:39 neyasov___ joined #mojo
19:39 jberger_ what do you think about this usage (I don't have an implementation yet, but I think it might be easy enough from your starting point)
19:40 jberger_ http://pastie.org/9458426
19:40 jberger_ I'm thinking of it the way that I think of $app->routes
19:40 jberger_ my $r = $app->routes
19:40 jberger_ then declare (possibly nested) routes in that way
19:41 jberger_ no magic declaration string
19:50 sri jberger_: a less flexible version of nested_helpers
19:50 basiliscos1 joined #mojo
19:51 sri nested_helpers could have been a primitive for all kinds of higher level stuff like that
20:01 Adura joined #mojo
20:23 sri https://gist.github.com/anonymous/965bf877a45627545932 # added one more data point to really put things into perspective
20:23 * jberger_ is trying a few things
20:25 sri that's how much you pay for AUTOLOAD
20:26 jberger_ like I said, I'm not SO concerned about the penalty
20:26 jberger_ I don't like the structure/syntax
20:27 sri this is a new core concept, you can always sugar coat it later on
20:27 jberger_ I'm trying refining Mojolicious::Renderer::Helpers to something that can hold instances of instances
20:28 jberger_ so a helper might be a subref or an instance of ::Helpers
20:28 jberger_ and the AUTOLOAD does the pass forward
20:30 sri i don't believe that works
20:31 sri you have to handle my $first = $c->foo; my $second = $c->foo; $first->bar; $second->bar;
20:32 jberger_ I don't think that's a problem the way I'm envisioning
20:32 sri with different controller classes even
20:33 sri $first and $second have to hold a reference to $c
20:33 sri which means they have to be fresh objects, you can't pre-instantiate them when you register the helper
20:35 jberger_ IF you do the mechanism as you coded it :-)
20:40 neyasov___ joined #mojo
20:42 good_news_everyon joined #mojo
20:42 good_news_everyon [mojo] kraih pushed 1 new commit to nested_helpers: http://git.io/_zRx_w
20:42 good_news_everyon mojo/nested_helpers 09fb6e7 Sebastian Riedel: return a little earlier
20:42 good_news_everyon left #mojo
20:45 miked joined #mojo
21:08 preaction joined #mojo
21:22 sri jberger: what is your mechanism?
21:22 jberger_ ;-)
21:23 sri -.-
21:23 jberger_ I've been at a hackathon today, just did a quick mojo demo and impressed some people
21:23 jberger_ heading home now, but I will try to have something tonight
21:25 good_news_everyon joined #mojo
21:25 good_news_everyon [mojo] kraih tagged v5.26 at 3aa6011: http://git.io/I4Xegw
21:25 good_news_everyon left #mojo
21:26 good_news_everyon joined #mojo
21:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/91hT0g
21:26 good_news_everyon mojo/master f61c600 Sebastian Riedel: bump version
21:26 good_news_everyon left #mojo
21:31 sri i make so many little one-liner benchmarks these days... i kinda would like something in ojo ;p
21:33 sri perl - Mojo -E 'say z { foo() for 1 .. 10000 }'
21:36 neyasov___ joined #mojo
21:37 lsm joined #mojo
22:37 neyasov___ joined #mojo
23:07 bobkare joined #mojo
23:09 jberger merged! https://github.com/TechEmpower/FrameworkBenchmarks/pull/933
23:09 * jberger wipes brow
23:18 bodgix joined #mojo
23:24 jberger sri: this is my basic concept: http://pastie.org/9458830
23:25 jberger I think with some careful thought and appropriate overloading, this could be made to be 100% compatible with prior code
23:26 jberger the other AUTOLOADs would have to be tweaked to do the controller passing
23:26 sri jberger: i don't believe that to be true
23:26 jberger ::Renderer's helpers attribute would hold an instance of that
23:26 sri jberger: make a branch with some tests, like i did
23:26 jberger why not?
23:27 sri i don't really understand the concept
23:27 sri too much missing from the paste
23:27 sri the important bits actually, like controller passing
23:27 jberger lines 33 and 35 are the important bits
23:28 sri yea, that makes no sense to me i'm afraid
23:28 rwp joined #mojo
23:28 * jberger keeps working
23:28 sri the controller has to come from somewhere
23:28 jberger yeah, it will come from the first call in the chain
23:29 sri local $helper->{__controller__} = $c; return $helper;
23:29 sri that does nothing :)
23:29 jberger hehe ;-)
23:29 sri i have the feeling you will stumble over a design problem soon ;p
23:30 jberger challenge accepted
23:37 jberger sri: getting closer: http://pastie.org/9458848
23:37 neyasov___ joined #mojo
23:38 jberger unfortunately I have to pause here for a few minutes (I'm squeezing this in edgewise)
23:41 sri hmm, it's starting to look just the same as nested_helpers, just with a slightly different less backwards compatible implementation
23:43 jberger I'm not sure i can use the AUTOLOAD exactly like that, but worst case a little near code replication (like it was before) would fix that
23:43 sri with the difference that you want to store helpers in nested objects, instead of a hash with naming scheme
23:44 sri i don't see how you'll be able to deal with the controller problem, that local is never going to work
23:45 jberger Yeah, but that distinction lets it be a little more programmatic rather than magic string names
23:45 sri you have to return a unique object, since it needs to be bound to the current controller
23:45 jberger Why wouldn't that local work?
23:45 jberger That's what I'm doing
23:45 sri because you return, killing the stack frame used to store the localized data
23:46 jberger This isn't nonblocking, the execution happens before the return
23:53 jberger Or put it another way, i would be for the other method of we officially start encouraging dotted stash values
23:54 jberger Maybe even expose dotted stash values as hashes in templates
23:54 jberger But otherwise the magic dotted helpers seem very inconsistent
23:57 sri dotted stash values as hashes is a funny idea
23:58 sri problem with that is that it's really fricking expensive for little gain
23:59 sri i thought we already encourage dotted stash values for stuff that should be hidden from templates?

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