Camelia, the Perl 6 bug

IRC log for #mojo, 2011-11-18

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

All times shown according to UTC.

Time Nick Message
00:07 mire_ joined #mojo
00:23 alnewkirk joined #mojo
01:00 d4rkie joined #mojo
03:20 tempire what's all this talk about ponies and unicorns
03:20 tempire there is only one winner.
03:20 tempire clearly.
03:20 purl clearly is clueless about win32
03:21 tempire marcus: all your math is at khanacademy.org
03:21 tempire it's amazing.
03:21 purl It's the mirrors
03:21 tempire when you have time after ai-class, of course.
04:04 Alias joined #mojo
05:25 Sjors joined #mojo
05:34 mattastrophe joined #mojo
05:50 Eugene joined #mojo
05:54 xoma joined #mojo
06:32 Eugene joined #mojo
06:42 koban joined #mojo
07:10 Vandal joined #mojo
07:13 smpb joined #mojo
07:25 cosmincx joined #mojo
07:26 marcus I'm a little teapot / short and stout / here is my handle / here is my spout
07:26 marcus When I get all steamed up / Hear me shout / "Tip me over / and pour me out!"
07:38 batman joined #mojo
07:39 Foxcool joined #mojo
07:49 mire_ joined #mojo
07:50 sugar joined #mojo
07:53 kjeldahl joined #mojo
07:55 nnutter joined #mojo
07:58 nnutter joined #mojo
08:03 bj5004 joined #mojo
08:14 z4ph0d joined #mojo
08:31 berov joined #mojo
09:11 gabriel__ joined #mojo
09:15 arpadszasz joined #mojo
09:21 smpb joined #mojo
09:24 baton8_ joined #mojo
09:25 baton8 joined #mojo
09:41 judofyr joined #mojo
10:16 smpb_ joined #mojo
10:17 spleenjack joined #mojo
10:23 smpb joined #mojo
11:18 Shaeto joined #mojo
11:23 fmerges joined #mojo
11:23 MojoGuest606 joined #mojo
11:23 MojoGuest606 From: http://www.google.be/url?sa=t&rct=j&q=webs​ocket%20demo&source=web&cd=4&ved=0CEMQ​FjAD&url=http%3A%2F%2Fdev.xantus.org%2F&ei​=xT_GToioMMPCswbx1PimBw&usg=AFQjCNGw6nZv0wO42u​zUnHhWcD0vcKNULg&sig2=bA-otYtOyC6NUORhNomIFQ (1 hits)
11:26 MojoGuest266 joined #mojo
11:26 MojoGuest266 From: http://www.google.com/url?sa=t&rct=j&q=&a​mp;esrc=s&source=web&cd=2&ved=0CDUQFj​AB&url=http%3A%2F%2Fdev.xantus.org%2F&ei=​2j_GTryqN8fA2gWg7PnADw&usg=AFQjCNGw6nZv0wO42u​zUnHhWcD0vcKNULg&sig2=bXr05bGkt5rygv5ZqoY6HA (1 hits)
11:31 plu hmm. http://paste.scsys.co.uk/160996 this works just fine for one request
11:32 plu but if I do many using apache benchmark, it fails
11:32 plu I bet I'm doing something wrong there :)
11:56 cosimo joined #mojo
12:06 robinsmidsrod joined #mojo
12:07 crab hi plu.
12:08 crab how are you running that program?
12:08 plu hi crab. Just by perl test.pl daemon
12:12 Psyche^ joined #mojo
12:12 crab works fine for me.
12:13 crab ab -c 6 -n 50 runs to completion pretty quickly with no trouble.
12:13 plu hm interesting
12:13 plu what OS are you on?
12:15 plu bah. Works for me too on some ubuntu vm
12:15 plu but on mac os it does not :(
12:19 crab yes, i'm running ubuntu
12:49 MojoGuest118 joined #mojo
12:49 MojoGuest118 From: http://www.google.com.ar/url?sa=t&rct=j&q​=html5%20irc&source=web&cd=4&ved=0CEE​QFjAD&url=http%3A%2F%2Fdev.xantus.org%2F&​ei=NlPGTtfdOMPcgQfpqb1C&usg=AFQjCNGw6nZv0wO42​uzUnHhWcD0vcKNULg&sig2=Bm4dI0_QfpIA2sa1uOF8aw (1 hits)
12:50 MojoGuest118 ll
12:50 MojoGuest118 :P
13:03 MojoGuest21 joined #mojo
13:03 MojoGuest21 From: http://www.google.de/url?sa=t&rct=j&q=​websocket%20demo&source=web&cd=5&v​ed=0CFsQFjAE&url=http%3A%2F%2Fdev.xantus.o​rg%2F&ei=FVbGTsO3CeGB4ASvt7BR&usg=AFQj​CNGw6nZv0wO42uzUnHhWcD0vcKNULg&cad=rja (1 hits)
13:03 noganex joined #mojo
13:04 MojoGuest265 joined #mojo
13:04 MojoGuest265 From: http://www.google.de/url?sa=t&rct=j&q=​websocket%20demo&source=web&cd=5&v​ed=0CFsQFjAE&url=http%3A%2F%2Fdev.xantus.o​rg%2F&ei=FVbGTsO3CeGB4ASvt7BR&usg=AFQj​CNGw6nZv0wO42uzUnHhWcD0vcKNULg&cad=rja (2 hits)
13:13 mire_ joined #mojo
13:31 arthas joined #mojo
13:44 Foxcool joined #mojo
13:48 marcus sri: Something broke oauth2 for me: http://paste.scsys.co.uk/161057
13:49 * marcus wonders if he has done something deprecated
13:52 sri marcus: multipart content never had an asset attribute
13:52 marcus sri: but it breaks inside Mojo::Message?
13:52 marcus 78:     $params->parse($self->content->asset->slurp);
13:53 marcus confirmed on the latest cpan release
13:53 sri that's just wrong
13:53 purl Fire and brimstone coming down from the skies. Rivers and seas boiling! Forty years of darkness, earthquakes, volcanos. The dead rising from the grave! Human sacrifice, dogs and cats living together... mass hysteria!
13:54 marcus makes oauth2 plugin fail it's test
13:54 marcus tests
13:54 sri no idea, don't think anything changed there
13:54 marcus it used to work until I upgraded yesterday
13:55 sri send me a test case and i'll have a look
13:58 marcus sri: test case in Mojolicious::Plugin::OAuth won't suffice?
13:58 marcus it's on cpan
13:58 sri nope, something minimal
13:59 sugar hi all
14:00 sugar how can i get current url in controller?
14:00 sugar $self->req->url?
14:04 Shaeto $self->req->url or mb $self->req->url->path first if object second is scalar
14:05 sugar Shaeto: thanks
14:05 jnap joined #mojo
14:15 MojoGuest195 joined #mojo
14:15 MojoGuest195 From: http://www.google.co.kr/url?sa=t&rct=j&a​mp;q=html5%20extjs&source=web&cd=9&a​mp;ved=0CIgBEBYwCA&url=http%3A%2F%2Fdev.​xantus.org%2F&ei=cWjGTrHbBoikiAeYuM0H&am​p;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&amp​;sig2=zUX1clVk5Wr8Yuwl7Mgn7g&cad=rjt (1 hits)
14:15 MojoGuest195 left #mojo
14:21 sri marcus: preferably a t/mojo/request.t or t/mojo/message/response.t test
14:23 mire_ joined #mojo
14:25 MojoGuest757 joined #mojo
14:25 MojoGuest757 From: http://networkedblogs.com/33Knp (2 hits)
14:38 judofyr joined #mojo
14:39 elb0w_ joined #mojo
14:42 metaperl joined #mojo
14:44 koban left #mojo
14:47 marcus sri: having some trouble finding the actual cause
14:48 marcus tried copying out the code that fails in my unit tests to a minimal case, but it doesn't fail :/
14:49 marcus the failure happens inside a post inside another request on a call to ->code
14:49 marcus to $controller->param even
14:54 marcus sri: http://paste.scsys.co.uk/161059 is the request that fails, but I'm not able to generate such a request in my test
15:02 metaperl|2 joined #mojo
15:09 sri marcus: that kind of requests have very good unit tests
15:10 marcus sri: yeah, managed to generate it in my minimal test case now, and it still does not fail.
15:11 sri my best guess is a bug in your module that didn't show up earlier because something was more forgiving before
15:12 sri the actual error that shows up does not make any sense to me though, you would need urlencoded request with two content-type headers or so
15:12 sri *+an
15:12 metaperl|2 joined #mojo
15:20 MojoGuest494 joined #mojo
15:20 MojoGuest494 From: http://networkedblogs.com/33Knp (3 hits)
15:24 marcus sri: I think it's a fuckup with your new emit stuff that makes a request be upgraded without being a multipart body.
15:24 marcus but I have to go offline a bit now, will track further.
15:24 sri doubt it
15:25 sri it would be easy to reproduce
15:25 sri all you needed was to parse the exact same request again
15:25 elb0w_ joined #mojo
15:33 arthas joined #mojo
15:39 MojoGuest2 joined #mojo
15:39 MojoGuest2 From: http://www.google.de/url?sa=t&rct=j&q=​websocket%20demo%20mojolicious&source=web&​amp;cd=1&ved=0CC4QFjAA&url=http%3A%2F%​2Fdev.xantus.org%2F&ei=D3zGTvqqGYzLtAao0cm​ZBw&usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (1 hits)
15:55 judofyr joined #mojo
16:03 plu sri: can you do me a favour please? Run this http://paste.scsys.co.uk/160996 via `perl test.pl daemon` on your mac os and then try `ab -c 6 -n 50 http://127.0.0.1:3000/`
16:04 plu I'm getting a lot of errors like: Event "read" failed: Can't call method "res" on an undefined value
16:04 plu but only on mac os :(
16:06 metaperl joined #mojo
16:06 plu but not on ubuntu. Running same Mojolicious version: 2.28
16:07 kaare joined #mojo
16:13 marcus hmm, interesting, MOJO_EVENTEMITTER_DEBUG doesn't emit any upgrade event.
16:13 sri marcus: i know what causes it
16:14 marcus sri: is it my fault? :)
16:14 sri nope
16:15 marcus \o/
16:15 sri it's rather disappointingly trivial
16:15 marcus now I won't have to find a place to bury the body.
16:15 marcus I mean, great...
16:16 marcus sri: one would have hoped the test suite would start catching the trivial errors.
16:17 sri it's more of a facepalm kind of error
16:17 marcus is it the Transactor?
16:17 marcus (I've not seen that class before :)
16:17 sri not even close
16:18 sri just need to find a way to test it that's not totally stupid
16:18 Foxcool joined #mojo
16:20 marcus I don't even understand how something can become multipart without an upgrade being emitted
16:21 marcus but I'm totally happy to not worry my little head about it and leave it to the pros =)
16:24 jnap joined #mojo
16:28 sri upgrade event only gets emitted when there are subscribers
16:29 marcus even to debug?
16:29 sri always
16:29 GitHub68 joined #mojo
16:29 GitHub68 [mojo] kraih pushed 1 new commit to master: http://git.io/2MjT9Q
16:29 GitHub68 [mojo/master] fixed small bug in boundary and charset methods of Mojo::Content - Sebastian Riedel
16:29 GitHub68 left #mojo
16:30 sri no event is emitted without subscribers
16:30 sri it's an important optimization that makes them so cheap
16:30 marcus warn "EMIT $name (" . scalar(@subscribers) . ")\n" if DEBUG;
16:30 sri yes, that's never reached
16:30 marcus ah because of   return $self unless exists $self->{events}->{my $name = shift};
16:31 sri there is your fix btw
16:31 sri it detected a boundary "Mojolicious::Controller"
16:32 marcus regexes are hard, let's go shopping
16:32 sri !
16:33 sri the fact that $1 is not reset when a regex doesn't match is something i forget every few weeks :S
16:33 sri almost as stupid as eval not resetting $@ when it starts
16:34 marcus yupp, those are warts on perl
16:36 marcus All tests successful.
16:36 purl pass(); ok(1); is(1,1); done_testing();
16:36 marcus my OAuth module is happy again
16:37 marcus and I'm able to log in with my fb credentials \o/
16:37 GitHub118 joined #mojo
16:37 GitHub118 [mojo] kraih pushed 1 new commit to master: http://git.io/c46D1w
16:37 GitHub118 [mojo/master] found a better home for content tests - Sebastian Riedel
16:37 GitHub118 left #mojo
16:38 Akron joined #mojo
16:43 Akron Hi! I am often using hooks as described here: https://github.com/kraih/mojo/wik​i/Creating-new-plugins#wiki-Hooks As I never did async stuff, this works fine.
16:44 Akron However, when I am doing async, this won't work, right? For example, fetching a ressource in async. So is there a possibility for this "filter style" thing?
16:45 Akron To illustrate the "style": https://gist.github.com/1376998
16:45 marcus hmm, why would you use plugins->emit_hook rather  than just ->hook ?
16:45 Akron I have to establish the hook.
16:46 Akron And I have to emit the event.
16:46 sri plu: works flawless
16:46 Akron emit_hoook is the new run_hook.
16:47 marcus xah, I see
16:47 sri plu: you're not using the ab that ships with os x right?
16:47 sri because that one is totally broken
16:50 sri Akron: i've thought about that kind of event
16:50 sri you can also abuse call by reference
16:50 sri umm
16:50 sri pass by reference of course
16:51 sri https://github.com/kraih/mojo/blob​/master/t/mojo/eventemitter.t#L132
16:53 * sri is prolly missing the point though
16:55 Akron sri: Yes, but his wouldn't work, if I, for example, have to fetch a value wih my Async-UserAgent, right?
16:56 sri right, there is nothing built in that would help you with that
16:57 marcus but couldn't you emit the response inside the callback?
16:57 marcus emit the event even
16:57 Akron So a plugin for this kind of filter events would be possible? Unfortunately I have no idea about the IOLoop so I am rather scared.
16:58 sri no, that's nothing for core
16:58 Akron marcus: Sorry - I don't understand.
16:58 sri core events are specifically meant to have as little side effects as possible
16:58 marcus sri: but he wants to emit custom events. don't understand why it wouldn't work with async.
16:59 sri he specifically mentioned IOLoop, so i assumed he wants to extend the core
16:59 sri since IOLoop is completely unrelated to hooks
17:00 Akron sri: No, not the core. But I was wondering, If I am able to create such a plugin without touching IOLoop.
17:00 sri why would you touch IOLoop?
17:01 sri http://mojolicio.us/perldoc​/Mojo/EventEmitter#SYNOPSIS
17:01 Akron Can I do it without? Hm ... yeah, probably I can just handle over callbacks untill all filter subscribers are finished ...
17:01 sri events live there
17:02 marcus Akron: $self->ua->get('slashdot.org',sub { my ($c,$ua)=@_; $c->plugin->emit_hook(…);} ?
17:05 Akron marcus: That's not the use case. It's the other way around: A useragent call inside the hook.
17:07 marcus Akron: you mean inside the sub you pass to ->hook ?
17:08 Akron marcus: Yes. If in the line behind emit_hook something is waiting for the response of the useragent, I can not be async, if I am correct.
17:09 Akron sri: So it seems to be possible without touching IOLoop. Nice.
17:10 sri Akron: i don't see why you would want to touch anything in mojolicious, looks more like an enitrely different hook system that can run separately
17:12 Akron sri: Yes, I see. Mojolicious::Plugin::Filter. ;)
17:13 sri we actually have a use case like that in core
17:13 grim_fandango joined #mojo
17:14 sri http://mojolicio.us/perldoc/Mojolicious#on_process
17:14 sri it's a callback
17:21 Akron Ah ... right. A system that works equivalent to the EventEmitter however would need to allow and process multiple callbacks of the subscribers.
17:21 sri think at some point i considered $plugins->emit_chained(around_dispatch => $c); hook around_dispatch => sub { my ($next, $c) = @_ }
17:22 Akron Ah, yeah! What was the reason you didn't allow it?
17:22 sri wasn't sure about the api
17:22 Akron The "next"-thing is ugly.
17:23 marcus for my next trick...
17:23 sri well, feel free to make a totally pretty proposal that is equally simple :)
17:23 Akron I just had a look at http://caolanmcmahon.com/posts​/asynchronous_code_in_node_js
17:23 Akron No - I meant it's equally ugly in my ghist! Hehe.
17:23 sri they like callback as last argument
17:24 sri Connect.js works that way too
17:24 Akron Ah, okay. Will have a look at that.
17:25 sri in the end i really couldn't come up with anything that was more pretty than the plain old callback solution we've used for years
17:26 sri to sum it up… make app->on_process pretty and you've convinced me to add it to core
17:26 Akron I am not as nearly as good in API design as you are, but I see your point.
17:28 andrefs joined #mojo
17:32 plu sri: ah thanks for that tip, will exchange ab then :)
17:32 plu sri++
17:43 marcus yko: did you annoy vti as well? I see your module is included in his latest blog post ;-)
17:44 lammel2 joined #mojo
17:44 marcus I need to get some of the stuff he's smoking, his posts are getting increasingly outlandish.
17:45 marcus next week: AVOID OBJECTS, FUNCTIONAL PROGRAMMING IS THE PATH OF LIGHT
17:48 sri marcus: but… it is
17:49 marcus sri: shouldn't you be coding lisp right now? :p
17:50 sri i should
17:50 lammel2 isn't avoiding objects the dark path to unmaintainable code?
17:50 lammel2 I think the combo is going to make it ;-)
17:50 lammel2 functional programming, using objects passing around alot in the back
17:53 mercutioviz joined #mojo
18:01 abra joined #mojo
18:12 abra_ joined #mojo
18:15 cosmincx joined #mojo
18:21 baton8 joined #mojo
18:37 Foxcool joined #mojo
18:44 andrefs joined #mojo
18:59 Kovensky joined #mojo
19:03 kjeldahl joined #mojo
19:06 jnap_ joined #mojo
19:17 smpb joined #mojo
19:20 Eugene joined #mojo
19:20 tempire lisp lisp lisp!!
19:23 tempire jobs.perl.org has been consistently getting better and better job posts lately
19:23 tempire \o/
19:24 marcus http://jobs.perl.org/search?​q=mojolicious&location=
19:24 marcus http://jobs.perl.org/search?q=cat​alyst&location=&offsite=
19:26 tempire These are perl companies, after all.  Something that started is 2008 is about 2 years too young for them to notice.
19:27 marcus yeah, only 3 dancer jobs as well.
19:27 marcus jobs mentioning dancer even
19:32 mattastrophe joined #mojo
19:35 Patterner Half of the companies where I applied didn't even bother to answer.
19:35 sugar joined #mojo
19:36 andrefs joined #mojo
19:38 marcus Patterner: I recommend filling up https://metacpan.org/author/PATTERNER - Best CV you can get ;-)
19:38 Patterner still kinda impolite
19:38 marcus agree.
19:39 tempire Patterner: are you outside the us?
19:39 Patterner unfortunately...
19:39 * marcus has never hired anyone through job ads. Only through networks.
19:40 tempire networks, as in word-of-mouth?
19:40 marcus as in people I know or have met.
19:40 marcus or people people I know know
19:40 tempire I've had good experiences with jobs.perl.org; but my experience is likely different being in the us.
19:42 tempire Then again, I rarely have a job.  So probably not a  good measure.
19:43 sri not many good perl jobs in germany
19:43 Patterner Oh, and I didn't say it wasn't working. I got two job offers from it. it's just that some aren't answering...
19:45 Patterner Can you trust Text::Unidecode?
19:46 Patterner answer: no
19:46 elb0w__ joined #mojo
19:49 kjeldahl Just for the logs; if people wonder about whether I managed to get morbo to quit itself, I did. But I've been very very bad doing it...
19:50 kjeldahl Get it to execute ps eW | grep perl in a shell, using $$, figure out the parent and issue a kill. Like I said; very very bad.
19:51 kjeldahl in a shell meaning my $output = `ps eW | grep perl`, in case I confused anybody.
19:51 marcus kjeldahl: why would you want to?
19:51 kjeldahl sri: My apologies in advance.
19:52 kjeldahl marcus: I need morbo to shut down for updates/upgrades, and start up again. Automatically.
19:52 kjeldahl marcus: On Windows/Cygwin.
19:53 kjeldahl Like sri said; Windows isn't a deployment, and I agree. Tell it to my employer. ;-)
19:53 kjeldahl deployment TARGET that should have been
19:54 marcus :)
19:54 marcus kjeldahl: norsk? :p
19:54 kjeldahl marcus: Ja. Vi har chattet litt før også såvidt jeg husker...
19:55 xaka does mojo have some response length limitations?
19:55 marcus hmpf
19:55 * marcus has no memory, apparently
19:56 kjeldahl Or maybe not; With you perl rock stars, it's like people from television. "Sure, I've seen you before..", before you remember you saw them on television. Probably my bad... :-)
19:57 marcus kjeldahl: you could be right. I blame the drugs.
19:59 marcus kjeldahl: come to a oslo.pm meeting some time and I promise to remember ;-)
20:00 sri but bring drugs
20:00 * kjeldahl laughs
20:00 marcus yeah, but seriously… ;-)
20:00 kjeldahl I actually did participate in a Nordic.pm one day conference a few years ago; even have a T-shirt!
20:01 kjeldahl In Oslo it was.
20:01 marcus kjeldahl: I've helped arrange a few of those.
20:01 marcus the one at the university, and the one at go open.
20:01 kjeldahl Great experience.
20:02 kjeldahl To bad most norwegian companies are still clueless about technology...
20:02 kjeldahl The right tool for the right job etc..
20:02 marcus that's why I started my own company :p
20:04 kjeldahl Yeah, I have had a few of those myself. But 15 years after graduating, I figured I would try to get a real job. I did, but am struggling a bit... A "Windows only" shop. But I didn't join because of technology either, to be fair... But tech stuff just seem to have a tedency to flow my way, even when I try to avoid it.
20:06 kjeldahl I participated in the University one I think.
20:17 jnap joined #mojo
20:39 yko marcus, there's chance he wrote that post specially to promote Mojo::Base XS impl
20:39 yko a very little chance though, hehe
20:40 marcus yko: guess he doesn't fear your bear ;-)
20:41 yko he shouldn't, I have staffordshire terrier for that purposes
20:42 marcus but they are soo cute ;-)
20:43 marcus actually, I've seen russian dogs. I take it back.
20:43 yko yeah, till you are near his feeder or didn't smell like a cat
20:44 marcus I want this dog - http://en.wikipedia.org/wi​ki/Danish_Swedish_Farmdog
20:44 marcus but I have to convince my wife first.
20:44 yko lol, you're right. but mine one is a very glamor and exalted
20:44 yko hey. noo pictures there!
20:44 marcus http://no.wikipedia.org/wiki​/Dansk-svensk_g%C3%A5rdshund pictures in the norwegian version
20:45 yko oh, they're really cute
20:45 marcus they are very similar to jack russell terriers, but easier to handle.
20:46 yko I had a boxer once. that was most gently and friendly dog ever
20:46 marcus I also like http://en.wikipedia.org/wiki/French_Bulldog
20:46 marcus but I heard they are prone to sickness.
20:46 yko All children around loved him
20:47 yko well, you never know how things will go, yep?
20:47 marcus yep
20:47 yko mine one was very healthy and we never had problems with him on that ground
20:48 yko actually, we didn
20:48 yko Mojolicious!
20:48 purl mojolicious is teh awesome and at http://mojolicio.us
20:48 yko actually this channel have different topic than dogs :)
20:49 yko this week I was upgrading one my application from 1.21 to 2.25
20:49 yko and I have to say that was not very hard
20:49 sri i promise more bugs in the future!
20:49 yko All I had to do - patch a bit MojoX::Run and send pull request to bfg and change 25-50 lines in my app
20:50 yko sri, I hate you in advance :)
20:50 sri just let MojoX::Run die :(
20:50 yko nope
20:51 yko oh.. I thought you are promising more bugs and backward incompatible changes in Mojolicious :D
20:51 sri i did!
20:51 yko that I don't hate you in advance, no
20:51 yko oh...
20:51 yko I'm switching back
20:52 yko I'm thinking in following way: let things that works - work. I have 3-4 LOC that was working about a year month and brought me some money and a good customer
20:53 yko and system I built with all this stuff upgrades from system packages from my private repo
20:54 yko so no Mojolicious or MojoX::Run or other risky modules wont appear in production till I test it
20:54 yko and for sure I wont do that till I really need :)
20:54 sri in the end all modules you don't maintain yourself are risky ;p
20:54 yko sri++
20:55 * sri cowers in fear every time he upgrades IO::Socket::SSL
20:55 yko that's why last few month I'm looking for some very basic PSGI-based custom 'framework' I can maintain by myself
20:56 yko I'm too greedy to keep my hands away from sexy mojolicious features. but if I don't do so I suffer a lot
20:56 sri i think staging development/deployment environments with good testing are better
20:57 sri in the end stuff always breaks, you screw up too
20:58 yko if stuff breaks in the end - let it be. but if it breaks in the middle... :)
20:59 yko at some point I realized that maybe I'm not mature enough and try to be on bleeding age too much
20:59 yko *edge -_-
21:03 sri why not just stick with stable features from mojolicious?
21:03 MojoGuest299 joined #mojo
21:03 MojoGuest299 From: http://www.google.com.br/url?sa=t&rct=j&amp​;q=html5%20%2B%20extjs&source=web&cd=10​&ved=0CHcQFjAJ&url=http%3A%2F%2Fdev.xan​tus.org%2F&ei=FsjGTrC1CIji0QHIyo0V&usg=​AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg&cad=rja (1 hits)
21:04 sri we've had no real backcompat breakage of features in ages
21:04 yko I explained above. There was time I was addicted to Mojolicious
21:05 MojoGuest299 dsadadasd
21:05 * sri didn't understand then
21:05 yko and it was too hard not to use every new and cool features
21:06 yko and well... you know what happens in next month in such situations
21:06 sri indeed
21:06 yko stuff breaks, butt hurts, people blame sri
21:06 marcus if you're on the bleeding edge, expect to bleed :)
21:06 yko that's why I step back
21:07 marcus I only blame sri when he breaks stuff for realz, like this regex bug thing ;-)
21:07 yko but I have to say being on the bleeding edge of mojolicious is cool
21:08 yko when something breaks most people need to blame someone. because realize that actually you are that bastard almost impossible :)
21:10 yko but as I said before applications done right don't breaks or almost don't. one year, one major release, and everything that was broken - external (and blamed by Mojolicious author) library and two little features
21:11 yko and most of things was broken that was just brittle tests
21:12 yko I wanna say that it's actually good, because app was complex enough - custom renderer, delayed responses, etc
21:27 perlite_ joined #mojo
22:01 Akron joined #mojo
22:03 Akron sri: I was thinking about something like that: https://gist.github.com/1377904 . A next method is still in there, but not the need for parameters.
22:09 sri Akron: i don't like the instance concept
22:09 sri seems like a waste for just one method
22:10 Akron A closure would be possible as well.
22:24 Akron With a closure it looks somehow like this https://gist.github.com/1377960
22:25 sri Akron: here's my version http://pastie.org/2885713
22:26 sri still feels like somethign is missing
22:27 sri http://pastie.org/2885722 # the hook for deprecating on_process
22:30 tholen_ joined #mojo
22:32 Akron You think closures are really a good idea?
22:32 sri well, better than object with a single method
22:33 Akron OVERLOADING NEXT!
22:33 sri https://github.com/senchalabs/connec​t/blob/master/lib/middleware/csrf.js
22:33 sri here's how connect does it for middleware
22:34 sri next is a clusure there, just passed as last argument
22:36 Akron Hm, pretty close.
22:37 mattastrophe joined #mojo
22:37 Akron But I like first argument better.
22:39 Akron So you would make hook allow for hooking into chained as well as event based hooks?
22:40 sri not sure i understand that sentence
22:40 sri to me it's just a slightly different kind of hook
22:41 sri what i'm not so sure about is if there is really any value in using it over a plain old callback attribute
22:41 Akron But if the closure is the first argument, it's not there in case of other hooks.
22:42 sri right
22:42 Akron My initial example was the usage in plugins.
22:42 sri different kind of hook
22:43 Akron Yes, but you used the ->hook method in http://pastie.org/2885722, which may be confusing.
22:43 sri why?
22:44 sri we have many different hooks with different arguments
22:46 Akron Normally I can say which arguments I ship, in case of the chained hooks the closure is always the first one. I use a "plugin first" style, so the first argument of every hook is always the plugin, the second is nearly always the controller class. This would be confusing.
22:47 Akron I would prefer a different method, so I know that I should never forget calling the closure.
22:47 sri i don't see it that way
22:48 sri please elaborate
22:50 Akron ->hook_chain() -> first element is the closure, I always have to call it! ->hook() -> No prediction on the arguments, don't bother regarding the closure. Semantically both are pretty close, but the way they work and the way they should be treated is rather different.
22:51 Akron I would expect some users wondering, why there system don't
22:51 Akron doesn't work anymore because they forgot a next->() in a hook they expected to be normal event hook.
22:51 sri wait...
22:52 sri and Mojolicious::Lite would need a new hook_chain function?
22:52 sri that seems really ugly
22:52 Akron Hmmm.
22:52 sri also
22:53 sri for core i would use the around_* prefix convention
22:53 Akron Ah, okay.
22:54 Akron Yeah, sounds good to have the convention in the hook's name.
22:56 Akron An you are right - you should never blindly expect some arguments from a hook.
23:10 metaperl joined #mojo
23:21 mire_ joined #mojo
23:21 sri hmm
23:26 Sjors sri: hmm, I've got another problem here, in Mojolicious 2.27...
23:27 Sjors sri: I have a page that takes up to three seconds to render, and I noticed that if it renders quickly (<1 second) it works correctly, but when it takes a few seconds to render I get no response at all
23:27 Sjors it's not like the request is cancelled; it just finishes after three seconds, I can see the page rendered correctly, but it's never sent over the socket
23:27 Sjors I found out about this problem today while doing my last tests before a huge presentation tomorrow, for an audience of 100 people
23:27 GabrielVieira joined #mojo
23:28 Sjors there's another option: I can disable this feature completely, so it's not like I'm in deep shit if I don't get this working tonight
23:28 Sjors but I would be very, very greatful if you could help me debug this, sri
23:29 Sjors the problem /seems/ to come down to: a certain page renders correctly when it takes only one second to load, but it results in no response (Mojolicious closing the socket without writing anything) if it took more than a few seconds
23:29 Sjors I /could/ try chunking the response, but I've got no initial data to send (and IIRC sending the empty string as a chunk means it's the end of the response), so that'll be spaces then
23:42 Sjors I've hotfixed it by chunking the response, /and/ cancelling the operation that could take a few seconds if it took longer than 0.5 seconds...
23:42 Sjors sucks, but it works... that's important
23:44 tempire yko: the key is to have a solid, dead-simple testing and deployment system in place.
23:44 tempire then constant releases just don't matter.
23:45 tempire and you immediately know what changes may cause problems, 'cause you can track them from point version to point version
23:46 tempire everyone should have this.  fast pace advancement just makes it more apparent.
23:46 tempire *paced
23:46 tempire which, coincidentally, if you can track changes from point version to point version, you can easily fix each problem by itself, one at a time.
23:46 tempire and then it's not such a big deal.
23:47 tempire it actually matters very little
23:48 tempire sri: have you considered my suggestion of associating changes with commits?
23:48 tempire If that convention were worked out, I would commit to writing a tool to identify them for devs
23:48 tempire so people could get an idea of what problems where would be between two arbitrary points of changes
23:59 sri tempire: what suggestion?
23:59 purl rumour has it suggestion is that you don't need a package statement

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