Camelia, the Perl 6 bug

IRC log for #mojo, 2012-01-19

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

All times shown according to UTC.

Time Nick Message
00:18 metaperl joined #mojo
00:39 Alias left #mojo
00:45 hshong joined #mojo
00:52 mire joined #mojo
00:54 mattastrophe joined #mojo
01:10 hshong joined #mojo
01:16 hernan joined #mojo
01:17 hernan joined #mojo
01:18 hernan joined #mojo
01:19 hernan joined #mojo
01:20 hernan joined #mojo
01:21 hernan joined #mojo
01:22 hernan joined #mojo
01:30 briang joined #mojo
01:36 briang_ joined #mojo
01:46 tempire The "Premature Connection Close" error…that's an event, right?
02:17 mire joined #mojo
02:18 hshong joined #mojo
02:20 mike_ joined #mojo
02:22 j3nnn1_ joined #mojo
03:20 abra_ joined #mojo
03:25 hshong` joined #mojo
03:38 Psyche^ joined #mojo
03:48 hshong joined #mojo
04:12 xaka joined #mojo
04:45 * crab ponders deeply.
04:53 nightmare joined #mojo
05:09 lukep joined #mojo
06:02 koban joined #mojo
06:03 metaperl joined #mojo
06:03 Vandal joined #mojo
06:20 mercutioviz joined #mojo
06:25 ryanc joined #mojo
06:41 ver joined #mojo
06:49 anparker joined #mojo
07:00 mire joined #mojo
07:01 batman joined #mojo
07:10 ver joined #mojo
07:17 plu joined #mojo
07:27 sugar joined #mojo
07:33 ki0 joined #mojo
07:33 Vandal joined #mojo
07:37 AmeliePoulain joined #mojo
07:39 Foxcool joined #mojo
08:00 berov joined #mojo
08:05 spleenjack joined #mojo
08:07 batman hi
08:08 batman i got a server that responds with "HTTP/1.1 405 only POST or M-POST" and Mojo::UserAgent (2.38) says "Bad response start line"
08:08 batman is that something which you would like to fix, or is the response start line "too" wrong?
08:11 batman it looks like it can be fixed if the $START_LINE_RE regex was changed to ([\w\'\s-]+)?
08:30 judofyr joined #mojo
08:51 random joined #mojo
09:21 cosmincx joined #mojo
09:27 driller_work joined #mojo
09:29 driller_work hey, how would I go on with creating dynamic pages with mojolicious? assuming I want the admin of the site to create a page in the backend and fill out that specific page with some text that is inserted into a MySQL database? I cannot wrap my head around on how to redirect to the page if it doesn't exist as a template?
09:32 driller_work would it be correct if I let the admin create a page through the backend; once he does that perl would 1) create a template file, 2) fill it with the SQL query to fetch the page content?
09:32 driller_work just not sure how to approach this
09:35 Foxcool joined #mojo
09:40 marty driller_work: If the admin is only going to be inserting some text (no template markup) then it sounds like you want a single dynamic page that calls different content block(s)
09:40 * marty come up for air
09:40 marty I'm alive!!!
09:42 driller_work marty: that sounds correct; where can I read up on the content blocks?
09:46 marty driller_work:  There are lots of ways to approach it.  For instance, you could call a single page with parameter(s) that identify content.  Ie. http://myurl.com/dynamic_p​age?dynamic_content=stuff
09:46 marty The entire rendering guide has lots of tools for the task.  Here is a link to the content blocks section.   http://mojolicio.us/perldoc/Mojolici​ous/Guides/Rendering#Content_blocks
09:53 GitHub54 joined #mojo
09:53 GitHub54 [mojo] kraih pushed 1 new commit to master: http://git.io/okfYSQ
09:53 GitHub54 [mojo/master] fixed small parser bug in Mojo::Message::Response - Sebastian Riedel
09:53 GitHub54 left #mojo
09:53 sri batman: fixed
10:04 GabrielVieira joined #mojo
10:08 GitHub48 joined #mojo
10:08 GitHub48 [mojo] kraih pushed 1 new commit to master: http://git.io/_6xJDA
10:08 GitHub48 [mojo/master] slightly better response tests - Sebastian Riedel
10:08 GitHub48 left #mojo
10:14 sri chansen: yea, just doesn't seem worth it
10:16 sri tempire: low level event, high level just an error message passed along with the tx
10:17 sri more specifically, a close event on the stream object
10:34 * sri yawns
10:46 crab batman: that seems like a perfectly valid response status-line to me.
10:48 crab oh.
10:48 crab oops. scroll up, but forget to scroll down all the way.
10:49 crab sri: you should disallow CTL too, iirc
10:49 sri crab: why would i care?
10:49 crab or rather, disallow all CTL not just CRLF
10:49 crab well, ok.
10:53 GitHub128 joined #mojo
10:53 GitHub128 [mojo] kraih pushed 1 new commit to master: http://git.io/8yCrhA
10:53 GitHub128 [mojo/master] added a few parameter examples - Sebastian Riedel
10:53 GitHub128 left #mojo
10:53 sri crab: i've actually just made it even more relaxed :)
10:57 koban joined #mojo
10:57 sri i wouldn't mind making it more strict if there's a reason
10:57 crab well, since i recently removed all head/body tags from my markup, i can't possibly argue based on standards compliance :-)
10:58 sri well, http is more trial and error than 2616 compliance anyway :)
10:59 sri crab: but removing head and body tags *is* spec compliant
10:59 sri you can even remove the html tag
11:00 sri or if you feel like it, just the closing tags
11:02 sri https://github.com/kraih/mojo/​blob/master/t/mojo/dom.t#L1232
11:02 sri here's a fun example
11:03 sri that's all valid html5
11:03 sri well… except for the td and th tags afair
11:06 crab sri: you mean i can still argue? great! i love html5!
11:12 * sri loves html5 too
11:12 sri except for tables… they have soooo many quirks
11:14 judofyr sri: how can I check (in a before_dispatch hook) if it's a static response?
11:15 sri you can't
11:15 sri static has not happened
11:15 judofyr ah
11:16 judofyr so where should I hook then?
11:16 sri after_static_dispatch?
11:16 purl i think after_static_dispatch is ALWAYS called
11:16 * sri pats purl
11:16 purl how condescending
11:17 judofyr sri: ah, but I actually want to do something if it's *not* a static
11:17 judofyr checking ref $c in a after_dispatch?
11:17 sri no, after_static_dispatch
11:17 sri like purl said, it is always called
11:17 judofyr ah
11:18 judofyr so how do I check if it's static or not? :S
11:19 sri just check response code
11:20 judofyr thanks
11:40 nightmare left #mojo
11:41 random left #mojo
11:41 briang joined #mojo
11:55 lukep joined #mojo
12:13 baton8 joined #mojo
12:54 bj5004 joined #mojo
12:55 mattastrophe joined #mojo
13:31 batman joined #mojo
13:42 Alias joined #mojo
13:46 Foxcool joined #mojo
13:49 cosmincx joined #mojo
13:57 mattp_ joined #mojo
14:01 koban joined #mojo
14:04 random joined #mojo
14:07 berov joined #mojo
14:10 r0b3rt Thinking about a wrapper API to call render_partial()->to_string()
14:14 berov joined #mojo
14:14 amoore joined #mojo
14:18 berov joined #mojo
14:25 GitHub104 joined #mojo
14:25 GitHub104 [mojo] kraih pushed 1 new commit to master: http://git.io/K_HxrA
14:25 GitHub104 [mojo/master] fixed small partial rendering bug - Sebastian Riedel
14:25 GitHub104 left #mojo
14:31 koban left #mojo
14:37 mattastrophe joined #mojo
14:48 sri down to 10897 lines of code :)
14:49 sri from 12100 a few months back
14:50 sri and a few hundred lines are still deprecated
14:52 briang joined #mojo
14:59 judofyr sri: how do deal with timeouts in UserAgent?
14:59 judofyr e.g. I just want to make sure I get a response after 5 seconds
14:59 judofyr or the callback fails
15:00 judofyr I'm not sure if connect_timeout does what I want…
15:04 mattp joined #mojo
15:04 judofyr sri: you here? :(
15:04 judofyr or anyone else?
15:04 purl it has been said that anyone else is welcome to answer also :P
15:21 alnewkirk joined #mojo
15:23 metaperl joined #mojo
15:32 memowe Hellomojo! \o
15:38 judofyr mojohello!
15:42 mire joined #mojo
15:43 Alias joined #mojo
15:46 kitt_vl judofyr: hi you still here?
15:46 judofyr kitt_vl: yeah
15:47 kitt_vl judofyr: how about this http://pastebin.com/Cf1SeaiG
15:48 judofyr kitt_vl: yeah, that's the way I solved it :)
15:48 judofyr kitt_vl: http://pastebin.com/xyc4z6ve
15:55 sri judofyr: didn't you ask that exact same question before?
15:55 judofyr I think
15:55 judofyr I must remember that I didn't get a pretty solution :/
15:55 sri i remember explaining it in great detail
15:56 judofyr ah
15:56 judofyr I'm very good at forgetting
15:56 judofyr unless it's pretty
15:56 judofyr pretty things stick
15:56 sri short answer, no it's not supported
16:06 memowe Does anyone know if Michael Mangelsdorf is here?
16:08 memowe He is mmangelsdorf on github.
16:10 Foxcool joined #mojo
16:12 judofyr sri: is my solution horrible? or good enough?
16:16 inokenty joined #mojo
16:19 mercutioviz joined #mojo
16:19 metaperl|2 joined #mojo
16:19 sri judofyr: i actually even have a patch to add response timeouts as a core Mojo::UserAgent feature
16:20 sri but i really don't want to design clever tests for it
16:21 sri http://pastie.org/3214194 # the smartest way i can come up with to do it
16:21 sri portable, blocking and non-blocking
16:21 sri perl -Ilib -Mojo -E'a("/" => sub { my $self = shift; Mojo::IOLoop->timer(3 => sub { $self->render_text("delayed.") }) })->start' get /
16:22 sri oneliner to run against it
16:22 sri "Problem loading URL "/". (Response timeout.)"
16:34 sri how often do you really want a hard timeout for a request?
16:39 sri if 3 people speak up in the next 10 minutes i'll add it, otherwise we'll never bring up the topic ever again ;p
16:41 mire joined #mojo
16:42 * sri pokes marcus, crab and tempire so nobody can complain later
16:44 bobkare sri: I can see how it could be useful in webapps where you want to leave the app useable even if some extra feature powered by an external request times out
16:44 cosmincx joined #mojo
16:44 DaTa response_timeout feels usefull to me
16:47 crab judofyr: read my article
16:48 judofyr sri: it's useful when you have external APIs that are not critical
16:48 judofyr so you don't want to bring down your site because it's slow
16:48 melmothX joined #mojo
16:48 crab judofyr: http://toroid.org/ams/etc/m​ojolicious-static-resources
16:48 crab now, what was i being poked about? /me reads
16:48 sri you gotta be kidding me… ultimatums work :)
16:49 sri and 3 people really spoke up in favor of it...
16:50 crab you're kidding me, a response timeout of 2s by default?
16:50 crab i predict 1e6 complaints in the first two weeks
16:50 sri yes i'm kidding you ;p
16:50 sri it's 0 by default
16:51 crab whew.
16:51 sri hmm, do i have to add it now?
16:52 crab sri: would it be very annoying if i asked a bunch of ioloop questions, very possibly stupid?
16:52 crab (unrelated to timeouts, except in the larger sense)
16:52 sri crab: not at all
16:53 crab ok. i'll make up a list and put it in some kind of order. (not right now, but sometime soon)
16:53 sri sure
16:53 crab i've been looking through the code
17:15 sri i'd like some feedback for the patch above
17:16 sri like is the name response_timeout appropritate?
17:16 sri "Maximum time in seconds receiving a response may take from the point where a connection has been established, defaults to C<0>. Setting the value to C<0> will allow the user agent to wait indefinitely."
17:17 sri also scope of the timeout
17:18 crab response_timeout seems ok. i'd say the maximum time in seconds that the useragent will wait for a response after establishing the connection (not sending the request?)
17:18 sri timeout covers everything, request and response
17:19 sri just not establishing the connection
17:19 sri since that has a separate timeout and additional complexity, like keep alive requests
17:19 crab ah. that's bound to surprise someone eventually, so it makes sense to try to make the name clearer. /me thinks
17:21 sri that's exactly why i'm asking :)
17:21 sri tx_timeout?
17:21 sri transaction_timeout?
17:22 sri request_timeout?
17:22 sri request is more of a generic term
17:29 tholen42 joined #mojo
17:29 kaare joined #mojo
17:29 sri still not 100% sure if adding it is a good idea
17:33 crab why?
17:33 sri additional complexity
17:33 sri a feature this complex really needs to be useful
17:35 * marcus just came back from examination, is go for major lazer at 7.30 tomorrow morning
17:35 marcus afterwards I have to stay in my room until monday.
17:35 sri eeeeep
17:36 Netfeed marcus: no light at all, right?
17:36 marcus Netfeed: well, she said I can use a computer if I'm able
17:36 marcus but should be wearing sunglasses when it's bright
17:36 marcus the reason I have to stay in my room is to avoid infections
17:37 Netfeed ah
17:37 Netfeed one at work fixed his eyes and he had to be in a black room for 4-5 days doing nothing
17:37 Netfeed i would go crazy :)
17:38 marcus I have audio books
17:39 Netfeed well, it's that then
17:39 marcus just bought the biography of albert einstein, and I have a very long stephen king novel
17:39 marcus I'll be allright
17:40 sri ok, i have the request_timeout implementation down to 8 lines of code
17:41 sri 5 if i get creative
17:42 marcus readable > creative
17:42 chansen joined #mojo
17:42 Netfeed marcus: i would never let anyone point a laser in my eyes and poke around in there
17:42 marcus Netfeed: wuss
17:42 marcus :)
17:42 Netfeed :P
17:42 * sri agrees with Netfeed
17:42 * marcus is tired of losing his glasses while playing squash.
17:43 marcus sri: you let the doctors inject you with crazy drugs tho ;)
17:43 Netfeed i'm considering contact lenses
17:43 sri you're upgrading yourself to be better at squash?
17:43 bigbootay joined #mojo
17:43 marcus easier life in general
17:43 sri marcus: touche
17:43 Netfeed marcus: i thought that you had to be awake and looke straight into the laser
17:43 marcus I'm a slob, so my glasses are often dirty :)
17:44 marcus Netfeed: you do, but you're sedated, so you don't feel pain.
17:44 Netfeed brrr
17:44 sri brrrr indeed
17:45 marcus I have several friends who took laser operation, and are very happy about it.
17:45 marcus I tried lenses, but I find them to be a hassle, and sometimes painful.
17:46 Netfeed i've got to pull out the thumb and go and try it, would be nice to not being forced to have glasses all the time
17:47 crab the thought of losing contrast scares me just as much as the idea of looking into a FRICKIN' LASER
17:48 marcus crab: you mean night vision?
17:49 marcus crab: contrast is supposed to return to normal levels after some weeks with LASIK.
17:50 crab marcus: i think night vision problems are a symptom of loss of contrast sensitivity, but it can also affect normal daytime vision
17:50 crab but i think you're right that it's an exceptional problem, not normally considered a major trouble
17:51 sri should request_timeout reset for every followed redirect?
17:51 * sri tends towards yes
17:51 gabriel joined #mojo
17:52 Netfeed http://www.youtube.com/watch?v=9crCGMh4j9g <-- that's how i imagine eye laser operation works
17:53 marcus sri: yes
17:53 Netfeed sri: i would probably interpret request_timeout to be something like "request timeout for the whole request, including redirects"
17:54 sri Netfeed: are you saying that it should be documented or that i should make it not reset?
17:55 Netfeed well, i think i'd say nay to resets, "i have 10 seconds that can be spared for this request, that's all i got"
17:56 sri it won't work like that anyway
17:57 sri you already have the connect phase, with a different timeout
17:58 Netfeed ok
17:59 bobkare if it's not all included anyway I'd say go for reset at redirect and note it in the documentation
18:03 noganex_ joined #mojo
18:07 sri is it even useful if it doesn't include everything?
18:25 sri suppose not
18:25 sri making it work with redirects would be a mess
18:27 marcus I think redirects is an exceptional case for this.
18:27 marcus since most of the time you will be calling APIs directly.
18:28 sri hmm
18:29 grim_fandango joined #mojo
18:31 jwang joined #mojo
18:41 sri hmm, github bot fails
18:41 sri https://github.com/kraih/mojo/commit/d19d7​aee330aa0e823ddc7560a8a63cc01c3f713#L2R775
18:49 abra joined #mojo
18:58 xaka joined #mojo
19:06 d4rkie joined #mojo
19:20 sri suppose for backend web services it does make sense
19:28 GabrielVieira joined #mojo
19:28 mire joined #mojo
19:33 bvierra joined #mojo
19:41 kaare_ joined #mojo
19:42 vervain joined #mojo
20:12 GitHub3 joined #mojo
20:12 GitHub3 [mojo] kraih pushed 1 new commit to master: http://git.io/jO220g
20:12 GitHub3 [mojo/master] make sure all templates end with a newline - Sebastian Riedel
20:12 GitHub3 left #mojo
20:46 lukep joined #mojo
21:11 marcus yay
21:11 sri great, looks like the os x lion patch for EV doesn't work anymore either :S
21:12 marcus :'(
21:12 marcus apple hates ev?
21:12 marcus sri: doesn't node.js bundle libev?
21:13 sri EV.xs is broken
21:13 sri not libev
21:13 marcus aah
21:42 GitHub191 joined #mojo
21:42 GitHub191 [mojo] kraih pushed 1 new commit to master: http://git.io/EmNNfw
21:42 GitHub191 [mojo/master] do not use deprecated variables - Sebastian Riedel
21:42 GitHub191 left #mojo
21:51 sri i give up on the mailing list conversation, clearly a language barrier problem
22:30 ki0_ joined #mojo
23:50 mire joined #mojo

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