Camelia, the Perl 6 bug

IRC log for #mojo, 2011-09-01

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

All times shown according to UTC.

Time Nick Message
00:27 blabos joined #mojo
00:28 blabos joined #mojo
01:00 perlrocks Twitter: "I closed the port was open Mojolicious. Have come to feel heavy from the back service again. 'll just be dnscache. Wait and see." (ja) --purasiibo http://twitter.com/purasiib​o/status/109068054717145088
01:03 d4rkie joined #mojo
01:35 ka2u joined #mojo
01:52 Kulag joined #mojo
01:54 perlrocks Twitter: "to all my fellow iphone users out there... you know you want to buy one of my cases!!  http://t.co/WlDd6DE" --mojo_licious__ http://twitter.com/mojo_liciou​s__/status/109081683684360192
02:51 perlrocks Twitter: "http://t.co/5Iwgind Mojolicious for oneliners XD" --idryman http://twitter.com/idryman​/status/109095969731256320
03:36 sherr joined #mojo
03:39 nicomen joined #mojo
03:39 kmx joined #mojo
03:39 bzero joined #mojo
03:39 DaTa joined #mojo
03:39 mmcleric joined #mojo
03:39 diegok joined #mojo
04:19 mmcleric_ joined #mojo
04:21 nicomen joined #mojo
04:21 kmx joined #mojo
04:21 bzero joined #mojo
04:21 DaTa joined #mojo
04:22 diegok joined #mojo
04:25 DaTa_ joined #mojo
04:31 nicomen joined #mojo
04:31 bzero joined #mojo
04:33 kmx joined #mojo
05:47 GitHub109 joined #mojo
05:47 GitHub109 [mojo] kraih pushed 2 new commits to master: http://git.io/1acjKg
05:47 GitHub109 [mojo/master] Some typos - Nils Diewald
05:47 GitHub109 [mojo/master] Merge pull request #213 from Akron/typos - Sebastian Riedel
05:47 GitHub109 left #mojo
05:52 alpha6 joined #mojo
05:53 * sri yawns
06:06 gshank joined #mojo
06:09 blabos joined #mojo
06:09 eugen joined #mojo
06:11 alpha6 joined #mojo
06:17 koban joined #mojo
06:19 crab hi sri
06:20 * sri waves
06:22 * crab measures sri's wavelength, but is unsure about the frequency
06:29 xaka joined #mojo
06:43 * sri changes frequency
07:05 gshank joined #mojo
07:12 arpadszasz joined #mojo
07:13 arthas joined #mojo
07:25 crab what's the frequency, kenneth?
07:29 marcus shiny happy people...
07:31 * marcus puts on R.E.M on the office musicbox
07:33 marcus shit, I haz no shiny happy people.
07:33 * marcus & # pirating music
07:37 sugar joined #mojo
07:40 Firkin joined #mojo
07:45 jkitazawa joined #mojo
07:51 gshank joined #mojo
07:52 alpha6 joined #mojo
08:06 espent joined #mojo
08:11 Eugene joined #mojo
08:22 preflex_ joined #mojo
08:27 spleenjack joined #mojo
08:34 riaa & # raiding marcus
08:34 perlrocks Twitter: "CSS4 ... 啊 First Century (Kao) / Mojolicious hack of the day completed a 這樣 selector CSS requirements when 寫 就想: CSS4 - Sebastian Riedel about Perl and the ... http://t.co/0IMXidn" (ja) --gugod http://twitter.com/gugod/status/109182320333959168
08:39 marcus sri: YOU SANK MY BATTLESHIP!
08:47 crab a battleship full of mixtapes?
08:47 cosmincx joined #mojo
08:59 cosmincx joined #mojo
09:07 judofyr joined #mojo
09:10 Alias joined #mojo
09:18 Properler joined #mojo
09:18 judofyr joined #mojo
09:25 koban joined #mojo
09:26 koban joined #mojo
09:31 random left #mojo
09:40 alpha61 joined #mojo
10:11 tabbi joined #mojo
10:11 tabbi left #mojo
10:11 marcus a battleship full of lols
10:43 Akron joined #mojo
11:01 sromanov joined #mojo
11:36 judofyr sri: is there a way to do a Mojo::Collection-method on an array?
11:36 judofyr Mojo::Collection->map(@foo, …)
11:39 judofyr nevermind
11:40 arpadszasz joined #mojo
12:15 d4rkie joined #mojo
12:25 cosimo sri: shouldn't response cookie values like 'ba r' be quoted, as in 'foo="ba r"' ?
12:25 spleenjack joined #mojo
12:29 cosimo played with this a bit,
12:29 sugar joined #mojo
12:29 cosimo https://github.com/cosimo/mojo/commit/d​74e767ea0c0c35f3f826bf7195717181d056007
12:31 sri cosimo: what's the motivation?
12:31 purl somebody said the motivation was brownies
12:31 * sri pats purl
12:31 * purl purrs
12:32 sri cosimo: what we have seems to work rather well, considering that nobody gives a damn about specs i'm rather reluctant to make any changes without very good reasons
12:38 sri here's a gem from google.com "Set-Cookie: PREF=ID=1430a6d1cfaa40b6:FF=0:TM=131488​0642:LM=1314880642:S=3ee52DRtWqP-jB1K; expires=Sat, 31-Aug-2013 12:37:22 GMT; path=/; domain=.google.com"
12:40 marcus Huzzah
12:41 cosimo sri: motivation is essentially to prevent people from shooting themselves in the foot with things like $cookie->value(q{here's my value, hello; lalala});
12:41 cosimo especially when there's $variables involved
12:43 cosimo sri: actually that google example is similar to what i'm working on, and I was wondering whether i needed to quote values
12:43 cosimo something like SsoSession=v=1&user=xyz&sid=abc123 ...
12:44 sri good luck finding out
12:44 sri your only option is to check all implementation out there
12:44 sri *s
12:44 crab there's no preventing people from shooting themselves in the foot when it comes to cookies
12:44 judofyr isn't it supposed to be escaped? (like a form component)
12:44 sri i actually would be very much interested in such a study
12:44 marcus I prefer shooting other people in the foot and stealing their cookies.
12:45 judofyr Rack uses URI.encode_www_form_component()
12:45 sri judofyr: LOL!
12:45 sri there is no spec, nobody is supposed to do anything
12:45 judofyr :)
12:45 sri encoding is a relic from the netscape spec, RFCs dropped it in favor of http style quoting
12:46 sri *but* nobody cares about specs
12:46 marcus This is not the spec you are looking for *waves hand*
12:46 sri it's a mess, please someone make a study :)
12:49 vel joined #mojo
12:49 sri bottom line, there is no chance i'm gonna change the cookie code unless there is real evidence that it makes us more portable
12:50 sri like the 307 redirect field study recently
12:50 sri that was very very well done
12:50 judofyr sri: not even handling ; as a value?
12:50 sri judofyr: you can quote that too
12:52 sri http://dazjorz.com/fwd/
12:52 sri that was the redirect study
12:52 sri something like that for different cookie types would be awesome
13:05 marcus sri: would be nice to have http://travis-ci.org/ for mojolicious
13:11 d4rkie joined #mojo
13:19 marcus sri: https://github.com/travis-ci/travis-ci/issues/224
13:25 rwstauner joined #mojo
13:41 gshank joined #mojo
13:45 GitHub6 joined #mojo
13:45 GitHub6 [mojo] kraih pushed 1 new commit to master: http://git.io/fOs5GQ
13:45 GitHub6 [mojo/master] improved cookie generation slightly - Sebastian Riedel
13:45 GitHub6 left #mojo
13:45 sri that should allow a few more values to work without changing any existing behavior
13:54 sri cosimo: it's not quite what you had in mind, but should help
13:55 sri (assuming that you had these rather complicated cases in mind)
13:55 sri as far as i can see everything else can only be solved with url encoding
13:56 sri or is a case of being more RFC compliant
13:56 Eugene joined #mojo
13:57 marcus durr
13:58 sri durr
13:59 judofyr rrud
13:59 sri WEBSOCKETS!
13:59 purl websockets is the replacement for comet
14:00 sri purl WEBSOCKETS is also the battle cry of #mojo
14:00 purl okay, sri.
14:00 judofyr wow, purl actually said something useful…
14:00 judofyr oh, not anymore :)
14:01 sri # "Poor Bender. Without his brain he's become all quiet and helpful."
14:02 sri poor purl
14:02 purl *snif*
14:03 crab battle cry!
14:04 * marty rubs eyes
14:04 sri you're doing it all wrong crab
14:04 marty WEBSOCKETS
14:04 purl WEBSOCKETS is the replacement for comet or the battle cry of #mojo
14:04 ispy_ joined #mojo
14:04 marty stroke purl
14:04 sri purl: no, WEBSOCKETS is <reply> WEBSOCKETS!!!
14:04 purl okay, sri.
14:04 sri WEBSOCKETS!
14:04 purl WEBSOCKETS!!!
14:06 sri o/~  Stroke the furry wall  o/~
14:07 marty Haaa, That's what a vagina used to look like in the 70's!
14:08 judofyr joined #mojo
14:10 GitHub68 joined #mojo
14:10 GitHub68 [mojo] kraih pushed 1 new commit to master: http://git.io/77l7hg
14:10 GitHub68 [mojo/master] updated changes - Sebastian Riedel
14:10 GitHub68 left #mojo
14:10 sri purl: hypnotoad?
14:10 purl hmmm... hypnotoad is at http://www.r33b.net/ or ALL GLORY TO THE HYPNOTOAD!
14:14 koban left #mojo
14:21 crab if i just want to delay a response (e.g. on consecutive login failures), what's the best way? just render_later, $id=timer($delay => sub { $self->render... }); $self->on_finish(sub{drop($id)})?
14:23 sri normal timers are one time use, no need to cleanup
14:24 sri Mojo::IOLoop->timer(3 => sub { $self->render });
14:24 sri that will do just fine
14:28 crab the on_finish was to kill the callback if the client closed the connection
14:31 gshank joined #mojo
14:32 kaare joined #mojo
14:34 cosimo sri: looks good, even if I don't exactly get why in M::C::Request too
14:35 sri cosimo: we are server *and* client side
14:36 SmokeMachine joined #mojo
14:41 eugen_ joined #mojo
14:41 shonorio joined #mojo
14:52 abra joined #mojo
15:03 vel joined #mojo
15:08 alpha6 joined #mojo
15:16 ghandi joined #mojo
15:18 ghandi Hi There! How do i create urls within my template wie mojolicious? i'm used to $c->uri_for("some", "path"); which will take into account in which controller i am and will produce the new relative url accordingly. I found url_for as a helper for EPRender. But this doesn't seem to do what i want?
15:33 alnewkirk joined #mojo
15:34 vel joined #mojo
15:37 cosmincx joined #mojo
15:39 crab url_for takes the name of a route and generates a url to match it
15:40 crab so name the routes you want to link to, i guess
15:42 ghandi left #mojo
15:46 SmokeMachine joined #mojo
15:46 xaka joined #mojo
15:56 marty joined #mojo
16:06 sugar joined #mojo
16:06 elb0w Weird one of my builds failed on a win system
16:06 elb0w for mojo
16:06 elb0w well for perl 5.12
16:06 elb0w http://code.activestate.com/​ppm/Mojolicious-Plugin-Geo/
16:08 njlg joined #mojo
16:11 tabbi joined #mojo
16:11 tabbi left #mojo
16:14 SmokeMachine joined #mojo
16:36 xaka joined #mojo
16:45 rhaen huh, help :)
16:45 rhaen <img src="hello.png />
16:45 rhaen that's the correct way to check the attribute value in a test?
16:46 rhaen like: $t->get('/')->text_is('img[src]  => qr/Hellp.png/, 'correct attribute');
16:47 rhaen won't work - that's the corrrect way to test an attribute.
16:47 rhaen Think I am missing something, but don't know where
16:50 sri don't think there is a built in way yet
16:51 rhaen puuuh. ok. Thanks, I am building a plugin for QR code generation right now
16:51 rhaen I want to check an img src value for the correctness.
16:51 rhaen That's why I am asking. Any ideas?
16:53 rhaen ony chance would be to test with Mojo::DOM on a string level without fancy syntax
16:54 sri oh wait
16:54 sri of course there is a way
16:55 sri element_exists with an attribute value slector
16:55 sri *+e
16:55 rhaen hm, well, this brings me the img existance, right - not it's src value
16:56 sri use the css luke
16:56 sri http://mojolicio.us/perldoc/M​ojo/DOM/CSS#E5Bfoo3D22bar225D
16:58 rhaen ah. $t->get('/')->text_is('img[src="Hello.png]....
16:58 rhaen text is might be wrong tho
16:58 sri it is wrong
16:58 rhaen it surely is
16:59 rhaen element_exists
16:59 rhaen that's the right on
16:59 rhaen e
16:59 rhaen ugh, handy gprs connection
16:59 sri http://mojolicio.us/perldoc/Mo​jo/DOM/CSS#E5Bfoo2A3D22bar225D # there are more value selectors
17:00 rhaen k, thx. Everything is documented
17:00 rhaen but just where? :)
17:01 rhaen thanks, I'll get into it.
17:01 rhaen works!
17:02 rhaen works!
17:02 rhaen :)
17:02 rhaen c'ya l8 :)
17:14 tempire when did web sockets become popular again in here?
17:14 tempire I thought they were the new pariah
17:16 omega joined #mojo
17:16 sri WEBSOCKETS!
17:16 purl WEBSOCKETS!!!
17:17 sri they are almost a standard now, it's ok to like them again
17:20 sugar when does it planned to release 2.0?
17:22 GitHub122 joined #mojo
17:22 GitHub122 [mojo] kraih pushed 1 new commit to master: http://git.io/4kKu-A
17:22 GitHub122 [mojo/master] link to latest WebSocket spec - Sebastian Riedel
17:22 GitHub122 left #mojo
17:22 chorny joined #mojo
17:22 sri sugar: why do you ask?
17:23 sugar interesting
17:23 sugar i think update my projects to latest mojo now or later
17:24 sri not decided yet, but i don't expect bigger changes anymore
17:25 sugar ok, that sounds good
17:25 sri could theoretically release 2.0 today, but crab says releasing too often scares people… so i'm waiting as long as i can :)
17:25 tempire sugar: mojolicious is like apple.  there will always be an upgrade.  it will be awesome.  but upgrading now is still awesome.
17:26 sri everybody blame crab ;p
17:27 tempire new yapcna site looks decent
17:27 tempire lots of pretty colors
17:27 tempire don't know about that logo.  but at least it's cute.
17:27 sugar ok, thanks for answers
17:27 sugar i suppose crab is right
17:28 tempire stephan48: do you already have mirror brain set up?
17:29 stephan48 sure
17:29 sri i like the new mozilla versioning
17:29 sri Firefox Update 8
17:29 sri Firefox Update 9
17:29 sri ...
17:30 sri makes big number appealing for end-users
17:30 sri *+s
17:30 sri Firefox Update 213
17:30 tempire that's one of the things I wonder about with that whole number updates
17:30 tempire it loses something after a while
17:31 anaio joined #mojo
17:31 tempire but maybe that's just current perception
17:31 sri well, Update 200 is still 50 years away :D
17:31 tempire Microsoft Office 24 doesn't sound as cool as Microsoft Office XP, or whatever
17:31 stephan48 why you ask tempire?
17:31 stephan48 360!!!
17:31 sri tempire: that's the point
17:32 sri they don't advertise firefox version numbers
17:32 sri users just need it as a reference for features
17:32 tempire yeah but part of that process includes automatic updates
17:32 tempire which you can't do with server-side software
17:33 sri theoretically you could
17:33 sri we have zero downtime upgrades, why not an updater? :D
17:33 tempire 'cause then your deprecation policy has to run in terms of a billionty years
17:34 tempire unless you distribute a git repo as a part of your software
17:34 stephan48 why?
17:34 tempire which, actually, is a neat idea
17:34 stephan48 ye
17:34 sri firefox addons break too
17:34 tempire have it automatically checkout the appropriate version according to the source
17:34 tempire of the app
17:35 tempire stephan48: was thinking of taking you up on the offer of geolocating dns for the mojocasts.
17:35 stephan48 mirrorbrain is a http based redirector
17:35 tempire but I'm a little concerned about the latency from the us for the dns, since the highest priority is california for hackernews
17:35 sri is it weird that i've never watched 30 rock?
17:35 tempire oh
17:36 stephan48 and dns we could do something i guess
17:36 stephan48 i will ask some people from opennic :) if they know something decent
17:42 Eugene joined #mojo
17:43 elb0w http://technabob.com/blog/wp-content/uploads​/2010/08/supercoder_2000_binary_keyboard.jpg
17:43 elb0w my new keyboard is sick
17:49 stephan48 tempire: some opennic informants tell me that it wouldnt matter that much(max 1/10th of a sec dns resolve time)
17:49 stephan48 tempire:
17:50 stephan48 tempire: i would say that we would have to test it
17:56 SmokeMachine_ joined #mojo
17:59 sri isn't it about geo optimized video delivery?
18:00 sri dns would be resolved once for the website and is cached afterwards
18:02 noganex joined #mojo
18:07 tempire stephan48: for the http redirector, I presume I would forward, say, videos.mojocasts.com to your mirror brain installation, and it would forward to usa.videos.mojocasts.com, europe.videos.mojocasts.com.
18:08 tempire there's not much load, though, so I wonder if using something like IP::Location would work just fine.
18:09 sri eu.cdn.mojocasts.com :)
18:18 rwstauner joined #mojo
18:26 vel joined #mojo
18:27 gizzlon sri: ALl tests are successfull on my freebsd now :)
18:41 stephan48 tempire: ye
18:42 stephan48 you would then push the content to the main node(the mirrorbrain) and to the mirrors
18:43 stephan48 it would scan the mirrors check which one has which files and then redirect accordingly
18:43 stephan48 a - is that it cant autodetect ipv6 locations
18:44 stephan48 it can check via rsync(fastest), ftp, http(slowest)
19:00 Foxcool_ joined #mojo
19:08 Firkin left #mojo
19:14 metaperl joined #mojo
19:16 arpadszasz joined #mojo
19:19 sri http://hackerne.ws/item?id=2951046 # so scala has the same problems as perl?
19:20 sri val foo = bar ~-> 45 <~< "Fred" %% x
19:20 sri but perl is line noise? :D
19:24 Foxcool_ joined #mojo
19:33 mattastrophe joined #mojo
19:44 sugar joined #mojo
19:48 SmokeMachine joined #mojo
19:52 vel joined #mojo
19:59 tabbi joined #mojo
19:59 tabbi left #mojo
20:02 bjones joined #mojo
20:04 alpha6 joined #mojo
20:11 bjones anyone experienced odd slowness in apps that wrap some legacy code using a database?
20:12 bjones it is kinda weird, call the same lib from a dancer wrapper and no slowness
20:13 perlrocks Twitter: "New blog post about testing and Mojolicious and CSS3 selectors http://t.co/NSwmtfP #mojolicious #perl #mojo" --rabenfeder http://twitter.com/rabenfede​r/status/109358280622604288
20:13 rhaen ah.
20:32 bjones is there a simple way to make specific request of a mojo app from command line without running a server, something like 'echo "GET /" | ./app cgi'
20:32 rhaen hm, you just want to run a Get request??
20:32 bjones yes
20:33 bjones goal is to run the profiler on the request
20:34 rhaen perl -Mojo -e 'g("http://www.perl.org");' would be the shortest
20:34 rhaen checkout perldoc ojo for examples
20:34 bjones oh sorry, no i mean i want to run the application to process 1 request
20:34 SmokeMachine joined #mojo
20:34 rhaen sorry, I am on a gprs connectionn and tyyping is hard
20:36 Akron joined #mojo
20:36 bjones ahh
20:37 bjones get /
20:37 rhaen hm, I don't understand. just run perl -Mojo -e 'a("/" => {text => "Hello Mojo!"})->start' daemon
20:37 bjones ./app get /
20:37 rhaen for a oneline daemon
20:37 rhaen ah, ok.
20:38 GitHub142 joined #mojo
20:38 GitHub142 [mojo] kraih pushed 1 new commit to master: http://git.io/0w5nVA
20:38 GitHub142 [mojo/master] fixed Mojo::IOLoop to not ignore SIGPIPE - Sebastian Riedel
20:38 GitHub142 left #mojo
20:39 sri bjones: please try the latest github version, ignoring sigpipe could have been the cause
20:40 sri just done some tests and it seems we don't need it anymore with the new ioloop code
20:41 sri bjones: btw. get / will start a server internally
20:41 rwstauner joined #mojo
20:42 sri your question also has way too little context to give a definitive answer, you didn't even mention which web server you used for the comparison
20:44 bjones plackup in both cases
20:45 bjones no options
20:46 bjones nytprofhtml is a beast
20:46 sri ok, then i see no reason for why mojolicious should interfere with your legacy code as described
20:51 perlrocks Twitter: "Mojolicious 1.95 by SRI - http://t.co/AuMbOty" (ms) --cpan_new http://twitter.com/cpan_new​/status/109367799499063297
20:51 bjones @sri spent 7.11s (2.70+4.41) within Mojo::Exception::trace which was called 85 times, avg 83.7ms/call: # 85 times (2.70s+4.41s) by Mojo::Exception::throw at line 30, avg 83.7ms/call
20:53 sri ah, you're using exceptions for flow control
20:54 sri not nice, but you can make it faster by localizing $SIG{__DIE__}
20:54 bjones kinda weird, our old code uses die and confess sometimes
20:55 bjones is this stuff in mojo picking up on all those?
20:55 sri we wrap exceptions to provide pretty stack traces
20:56 sri since in well written code exceptions tend to be *exceptional* ;)
20:57 sri it's also rather pointless to profile before knowing the basics, mojolicious apps run in a much slower development mode by default
20:58 GitHub169 joined #mojo
20:58 GitHub169 [mojo] kraih pushed 1 new commit to master: http://git.io/snVOTg
20:58 GitHub169 [mojo/master] updated jQuery to version 1.6.3 - Sebastian Riedel
20:58 GitHub169 left #mojo
20:59 bjones @sri yea i wasn't sure how to change mode when running under plackup to production, well, i saw a similar ref to something, but just haven't got that far
21:01 sri although, in depth profiling and optimizations later on would be very much appreciated :)
21:06 bjones @sri thanks, that resolved the issue
21:08 bjones @sri while i'm at it, is there any means of prefixing a set of routes easily, because I didn't find it if it does exist... except for when you wrap an entire app
21:09 sri http://mojolicio.us/perldoc/Mojolicious/Lite#Under
21:13 bjones aww man missed that 2nd use of under, thanks again :)
21:19 tempire rhaen: mojo get www.perl.org is shorter :)
21:28 sri hmm, i might have made a mistake
21:30 sri ignoring sigpipe might have been the better default
21:32 ispy_ joined #mojo
21:37 perlrocks Twitter: "just discovered #Angular JS template/form toolkit. Offers 2way binding. http://t.co/wXdLK61 Should be great together with #mojolicious #perl" --henq http://twitter.com/henq/status/109379445655216128
22:03 sri well, lets see how many complaints we get
22:22 tempire dude
22:23 tempire the erlang vm has built-in hypnotoad
22:23 sri it has a lot more
22:23 tempire well yeah.  but that's the easiest way to reference it within context
22:26 sri it would be a lot cooler if it wasn't so damn slow though
22:26 tempire slow?  or are you referring to the response time of an event-driven system.
22:27 sri erlang is beyond ruby slow
22:34 jwang joined #mojo
22:34 nicomen joined #mojo
22:34 bzero joined #mojo
22:38 GitHub128 joined #mojo
22:38 GitHub128 [mojo] kraih pushed 1 new commit to master: http://git.io/R_YxJw
22:38 GitHub128 [mojo/master] fixed Mojo::IOLoop to ignore SIGPIPE - Sebastian Riedel
22:38 GitHub128 left #mojo
22:40 sri too dangerous, going back
22:42 perlrocks Twitter: "Mojolicious 1.96 by SRI - http://t.co/fxYNgVC" (ms) --cpan_new http://twitter.com/cpan_new​/status/109395852929417216
22:47 perlrocks Twitter: "trying to understand why mojolicious > 1.66 does not trigger cascade *::TO_JSON method calls for JSON module #mojo #perl - any hint welcome" --areggiori http://twitter.com/areggior​i/status/109397094174965760
23:18 ispy_ joined #mojo
23:20 abra joined #mojo
23:20 arpadszasz joined #mojo
23:41 perlrocks Twitter: "Mojolicious-Plugin-YamlConfig 0.1.2 by DATA - http://t.co/whGMVVm" --cpan_new http://twitter.com/cpan_new​/status/109410582624600064
23:51 janus joined #mojo

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