Camelia, the Perl 6 bug

IRC log for #mojo, 2010-08-24

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

All times shown according to UTC.

Time Nick Message
00:50 kimoto joined #mojo
01:14 BlueT_ left #mojo
01:25 BlueT_ joined #mojo
01:30 kimoto MojoX::Dispatcher::Routes::Controller - Controller Base Class
01:30 kimoto maybe, description is wrong.
01:30 kimoto http://search.cpan.org/~kraih/Mojolicious/
02:35 janus left #mojo
02:55 yakudzo joined #mojo
03:07 janus joined #mojo
04:04 tholen42 joined #mojo
04:06 tholen left #mojo
04:11 Foxcool joined #mojo
04:19 perlrocks Twitter: "Mojolicious Japanese translation project documents - livedoor Wiki (wiki) http://htn.to/CfjgwH" (ja) --koba04 http://twitter.com/koba04/status/21972921684
04:19 perlrocks Twitter: "RT koba04: Mojolicious Japanese translation project documents - livedoor Wiki (wiki) http://htn.to/CfjgwH http://twitter.com/koba04/status/21972921684" (ja) --polocky http://twitter.com/polocky/status/21972925506
04:25 [1]awnstudio joined #mojo
04:56 yakudzo left #mojo
05:12 [1]awnstudio is now known as alnewkirk
05:13 koban joined #mojo
05:26 yakudzo joined #mojo
05:45 koban left #mojo
05:45 koban joined #mojo
05:49 koban left #mojo
05:51 koban joined #mojo
07:11 skaurus left #mojo
07:32 ltriant left #mojo
07:33 dynax60 joined #mojo
07:34 dynax60 Hello all. How to do $dbh be active after starting Mojo application with daemon_prefork --daemonize? Code snippet: http://gist.github.com/547116
07:35 dynax60 Now I've got an exception: DBD::mysql::db selectall_arrayref failed: MySQL server has gone away at ...
07:44 arthas joined #mojo
07:46 dotan joined #mojo
07:49 crab dynax: use DBIx::Connector and create a new connector in your sub startup.
07:50 dynax60 crab: have you an example?
07:56 Htbaa joined #mojo
07:59 crab no. but in sub startup, do $dbh = DBIx::Connector->new($dsn, $user, $pass, { ...options... }); and $self->defaults(db => $dbh);
07:59 crab and then in your other methods you can fetch $dbh from the stash.
08:00 dynax60 i see
08:00 dynax60 ok
08:13 crab the options are just like with DBI->connect
08:46 dynax60_ joined #mojo
08:46 dynax60 left #mojo
08:56 achromic left #mojo
08:58 achromic joined #mojo
09:20 koban left #mojo
09:22 jest joined #mojo
09:31 zag joined #mojo
09:34 zag left #mojo
09:34 fod left #mojo
09:37 yko joined #mojo
09:46 koban joined #mojo
09:58 jest left #mojo
10:28 janus ALL HAIL TO THE HYPNOTOAD!
10:29 * crab licks the hypnotoad
10:29 crab mmm.
10:44 sri ALL GLORY TO THE HYPNOTOAD!
11:05 yakudzo left #mojo
11:06 tardisx would I be right in saying that a plugin could override a route? or more correctly, add a new route?
11:07 sri absolutely
11:07 sri a plugin could contain a whole application
11:07 sri and automatically plug it into another when loaded
11:09 tardisx sweet
11:30 tardisx is after_dispatch => sub { shift; shift->app->routes->route(...) } the sort of thing I should be doing?
11:30 tardisx in my plugin register
11:31 sri not at all
11:31 sri i think there is an example for what you want in the guides
11:35 tardisx the werewolf one?
11:37 tardisx nailed it
11:38 tardisx I forgot $app was already available to me :-P
11:38 tardisx $app->routes->route('/comment')->to(cb => sub { shift->render(text=>'foo') });
12:11 [1]awnstudio joined #mojo
12:11 dotan left #mojo
12:11 dynax60_ left #mojo
12:11 arthas left #mojo
12:11 alnewkirk left #mojo
12:11 su-bzero_ left #mojo
12:11 und3f[A] left #mojo
12:11 y0j left #mojo
12:11 xantus left #mojo
12:11 flu left #mojo
12:11 fish_ left #mojo
12:12 tholen42 left #mojo
12:12 kimoto left #mojo
12:12 perlite left #mojo
12:12 chansen_ left #mojo
12:12 esskar left #mojo
12:12 baton8 left #mojo
12:12 stephan48 left #mojo
12:12 hidek___ left #mojo
12:12 Yappo left #mojo
12:12 awnstudio left #mojo
12:12 marcus left #mojo
12:12 gabiruh left #mojo
12:12 tempire left #mojo
12:12 bedi left #mojo
12:12 ashleydev_logbot left #mojo
12:12 sri left #mojo
12:12 al left #mojo
12:12 crab left #mojo
12:12 DaTa left #mojo
12:12 diegok left #mojo
12:12 charsbr left #mojo
12:12 [1]awnstudio is now known as awnstudio
12:13 arthas joined #mojo
12:13 Foxcool left #mojo
12:15 fish_ joined #mojo
12:16 tardisx left #mojo
12:16 und3f[A] joined #mojo
12:19 dotan joined #mojo
12:31 flu joined #mojo
12:32 tardisx joined #mojo
12:40 perlrocks Twitter: "Very excited about the new #mojolicious server, hot deployment will be dead simple. :) #perl" --kraih http://twitter.com/kraih/status/21997337303
12:45 yakudza joined #mojo
12:48 awnstudio left #mojo
12:48 dynax60 joined #mojo
12:48 charsbr joined #mojo
12:48 crab joined #mojo
12:48 ashleydev_logbot joined #mojo
12:48 sri joined #mojo
12:48 bedi joined #mojo
12:48 DaTa joined #mojo
12:48 diegok joined #mojo
12:48 tempire joined #mojo
12:48 gabiruh joined #mojo
12:48 al joined #mojo
12:48 marcus joined #mojo
12:48 awnstudio joined #mojo
12:48 Yappo joined #mojo
12:48 hidek___ joined #mojo
12:48 stephan48 joined #mojo
12:48 baton8 joined #mojo
12:48 esskar joined #mojo
12:48 chansen_ joined #mojo
12:48 perlite joined #mojo
12:48 tholen42 joined #mojo
12:48 xantus_ joined #mojo
12:48 su-bzero joined #mojo
12:48 y0j joined #mojo
12:49 [1]awnstudio joined #mojo
12:53 MojoGuest772 joined #mojo
12:53 MojoGuest772 is now known as ezjs
13:06 sri really fun, kill -s USR1 and hot deployment just works, always :)
13:06 sri tcp or unix socket
13:09 yakudza left #mojo
13:13 crab how does it work?
13:16 sri just like nginx
13:16 bedi left #mojo
13:16 bedi joined #mojo
13:17 sri fork/exec and graceful shutdown of the old instance, inheriting all file descriptors
13:20 sri i just need to make the window between graceful shutdown and takeover small enough and you can do software updates during ab benchmarks
13:20 tardisx hehe
13:20 tardisx the new benchmark - restart your server while benchmarking
13:21 sri ye
13:21 sri and it requires no effort, no configuration, no setup, just works
13:21 tardisx thanks for your help before sri, the 'hard' things are done now, just a lot of hard easy things left :-)
13:22 sri don't thank me, just spread the word :)
13:22 tardisx I am I am! :-)
13:23 sri interesting how unicorn sends file descriptors via env vars
13:24 sri ♥ UNIX
13:27 sri still unsure if i should enable multiple parallel clients per worker or not
13:27 fish_ anyone aware of a fair benchmark comparing perl, python, ruby, php and so on?
13:27 sri there was one
13:28 sri but i don't remember :/
13:28 sri they compared standard algorithms
13:29 sri http://shootout.alioth.debian.org/ # could have been this
13:31 sri the fastest dynamic language atm is Lua btw
13:31 sri thanks to LuaJIT
13:32 fish_ i guess i should have a look at lua.. there are so many problems perl is too big for and (ba)sh is too ugly ;)
13:32 sri or javascript
13:33 sri i so wish there was a really good perl binding for a javascript engine
13:34 fish_ that would be very, very nice..
13:34 sri spidermonkey binding that bundles all c code and just installs, that would be cool
13:34 sri (or tracemonkey)
13:37 fish_ oh.. according to this: http://shootout.alioth.debian.org/u32q/wh​ich-programming-languages-are-fastest.php perl is _WAY_ slower than python. in fact, its the slowest language from all..
13:37 ezjs left #mojo
13:38 sri not unlikely
13:40 sri python is quite fast
13:42 fish_ i tought perl was one of the fastest, because i don't have the complexity python has..
13:42 sri perl is better at text manipulation though
13:43 sri the 5.10 regex engine is pretty much unbeatable i think
13:44 fish_ well yes.. regex are important.. but in a reallife app: how much time it spends on runnig regexps?
13:44 sri in mojolicious it's huge
13:45 fish_ oh okay
13:45 sri yko recently had a Mojo::DOM app go from 20 seconds to 1 second after an upgrade from 5.8 to 5.10 :)
13:45 fish_ well, lets benchmark mojo vs some python, php and ruby framework =)
13:46 sri i also don't think the benchmarks use that many language features
13:47 sri ruby performance will go down dramatically for bigger apps
13:47 fish_ yes.. probably a application benchmark is more enlighting than such basic stuff like the benchmark apps
13:47 sri good benchmarks are hard
13:47 fish_ i know, i try to do some system benchmarks right now and procrastinating with asking stupid questions about perl performance ;)
13:48 sri for real world apps i think python and perl can be considered pretty mcuh equal
13:50 fish_ sri: but python has a much "better" oo interface i think.. and more complex/abstract datatypes. thought that would slow down it
13:51 sri i would disagree there, python oo is just as bolted on as perl oo
13:51 sri at least thats my impression after writing ruby :)
13:55 sri the big difference between python and perl is philosophy
13:55 vel joined #mojo
13:55 sri python: batteries included, there is only one way to do it
13:56 sri perl: cpan, there is more than one way to do it
13:57 sri when it comes to networking i really love python, they include ssl, epoll, kqueue, ipv6... basically everythig you need
13:57 sri text manipulation totally sucks though
13:58 sri and there is no room for creativity, sleek DSLs are impossible
13:58 fish_ i guess i have to work more with python..
13:58 fish_ DSLs?
13:58 sri get '/foo' => sub {...};
13:59 sri not possible in python to do domain specific languages
14:00 sri they have to decorate functions
14:00 sri @route('/foo')
14:00 sri def foo(req):
14:01 sri only one way to do it
14:01 sri no creativity
14:02 fish_ well, get('/foo', method) should work, right? where method is some kind of coderef/method ref
14:02 sri nope
14:03 sri they don't have good lambdas
14:05 fish_ urgs.. so no hashes with coderefs in it for example?
14:05 sri ye
14:05 sri it's more of an academic language, no hacks
14:06 fish_ thats the idea
14:06 fish_ the reality is, the hacks are just more ugly - i bet ;)
14:06 * sri loves hacks
14:07 sri if i was switching langauges it would be ruby
14:08 sri lets say apple would start pushing ruby seriously with MacRuby, thats something that could push me over the edge
14:08 fish_ I had to say how a app I want wo write would look like in python vs perl vs ruby
14:09 fish_ thats much more imporant than speed and mem usage i think.. most important is, if i think the code looks nice :)
14:09 sri exactly
14:10 fish_ a few hours ago i stumbled about a few hunderd LOC of if/elif.. uhhh
14:10 sri computers get faster every year, programmers not
14:10 sri so you should optimize for programmer performance
14:12 fish_ yep, nice said :)
14:35 vti i am back
15:04 marcus hi kids
15:08 * sri waves
15:09 sri feel free to join the latets sharifulin discussion on the list where he proposes to get rid of reserved stash values without giving a real alternative
15:11 marcus I suggest prefixing them all with 'mojo.
15:11 marcus but I suck at mailing lists
15:11 marcus can't deal with the latency
15:12 sri ->route('/:mojo.controller/:mojo​.action')...->render('mojo.text' => 'Hello!')?
15:12 marcus nah, the route should just use :controller
15:12 sri thats a reserved stash value then
15:12 marcus and it'd be translated to mojo.controller in $self->stash
15:12 sri huh?
15:13 marcus : could mean prefix with 'mojo.'
15:13 sri routes don't know anything about reserved stash values right noe
15:13 sri *now
15:13 sri what about ->route('/:something')?
15:13 sri ->route('/:marcus')
15:13 marcus ok, it's not very consistent
15:13 marcus I agree
15:14 sri to put it into perspective
15:14 sri http://search.cpan.org/dist/Mojolicious​/lib/Mojolicious/Guides/Cheatsheet.pod # those are all reserved stash values without prefix
15:15 vti the best way is to use your *own* prefix :)
15:15 sri basically everything would need to be redesigned, and a lot of simplicity sacrificed to get rid of those few
15:15 vti to make sure you don't break mojo
15:15 vti myapp.foo
15:16 sri i don't really mind the redesign part, but i'm not willing to sacrifice simplicity for nothing
15:17 sri or myfoo
15:17 sri or xfoo
15:26 marcus foox
15:27 crab why does he want to get rid of reserved stash values?
15:27 crab also: can i, in a handler, modify the request and redispatch so the routes are examined again?
15:29 koban left #mojo
15:29 marcus urgh
15:29 marcus install_utf8_columns qw/name/; # for utf8 columns
15:29 marcus this is not one of DBIx::Skinny's best features
15:29 marcus why can't I just say that everything should be unicode?
15:30 sri ignorant americans
15:30 sri crab: no redispatching
15:31 marcus sri: ignorant japanese even. :p
15:31 sri crab: you can only preprocess a request in a plugin hook
15:32 sri redispatching is very bad style, breaking RESTfulness and stuff
15:33 crab sri: good
15:47 perlrocks Twitter: "Mojolicious-Plugin-Mail-0.5, Анатолий Шарифулин. CPAN: http://tinyurl.com/2csgk6z * Changes: http://tinyurl.com/23yeqpv" --cpan_linked http://twitter.com/cpan_linked/status/22010639024
15:50 crab i wish i could subscribe to the list without a google account. oh well.
16:01 koban joined #mojo
16:09 [1]awnstudio left #mojo
16:48 sri http://www.reserveresult.com/2010/06/ga​reth-edwards-monsters-15000-budget.html # wow
16:49 sri http://www.imdb.com/title/tt1470827/ # this looks way more expensive
16:56 dotan marcus: (or anyone) what does the +{...} thing used in DBIx::Skinny mean? Does the + mean anything or is it just a style thing?
17:04 crab it's the optimism operator. if you change it to -{...}, the contents of the hash will be viewed in a more jaundiced light.
17:04 sri lol
17:19 vti dotan: scalar context
17:19 dotan vti++  - thanks
17:20 vti is now known as a_better_marcus
17:20 a_better_marcus :)
17:20 * dotan vti is now in scalar context
17:20 a_better_marcus is now known as vti
17:28 perlrocks Twitter: "Skin a Perl app based on Mojolicious Framework (Design/HTML ready) - oDesk I have single-page (at the frontend) web a http://bit.ly/9D5cYU" --cebu_smartbro http://twitter.com/cebu_sm​artbro/status/22017740928
17:30 sri a_better_marcus++
17:31 sri btw. what features would the production perl server of your dreams contain?
17:31 perlrocks Twitter: "Skin a Perl app based on Mojolicious Framework (Design/HTML ready) - oDesk I have single-page (at the frontend) web a http://bit.ly/9D5cYU" --cebu_ofw http://twitter.com/cebu_ofw/status/22017932337
17:31 perlrocks Twitter: "Skin a Perl app based on Mojolicious Framework (Design/HTML ready) - oDesk I have single-page (at the frontend) web a http://bit.ly/9D5cYU" --dash_engineer http://twitter.com/dash_en​gineer/status/22017936807
17:33 sri i guess for now i will focus on which features i can leave out :)
17:35 vti sri: thinking about providing perl hosting? :)
17:36 sri nope
17:36 sri redesigning daemon_prefork
17:36 perlrocks Twitter: "Skin a Perl app based on Mojolicious Framework (Design/HTML ready) - oDesk: I have single-page (at the frontend) w... http://bit.ly/bJFpBO" --biztiger http://twitter.com/biztiger/status/22018284935
17:36 sri new name is hypnotoad and it will have dead simple hot deployment
17:37 sri you just send kill -s USR1 and it just works
17:37 sri serious hot deployment with fork+exec and inherited file descriptors
17:38 sri it also defaults to production mode and stuff
17:38 sri hypnotoad myapp.pl
17:38 vti nice
17:38 sri it has almost no command line options, but will read a perl config file
17:38 sri it basically works like nginx
17:39 sri so people will have a lot of fun combining them
17:40 vti can we forget about fcgi now? :)
17:41 sri absolutely
17:43 dotan Have given up on using fastcgi with apache, now trying to use Apache as a reverse proxy to the prefork daemon.
17:48 crab should be trivial, no?
17:49 crab ProxyRequests off, ProxyPass / http://127.0.0.1:3000/, and ProxyPassReverse / http://127.0.0.1:3000/ works for me.
17:50 dotan It works!
17:50 dotan What does ProxyRequests off do?
17:50 crab it means don't try to be squid
17:50 dotan I'm not using it. I do have a <Proxy *>,... block, though (I think that prevents access forbidden messages)
17:51 dotan Ok.
17:51 dotan I just copied the deployment recipe from the Cat****t book
17:52 crab Catsplat
17:57 yko left #mojo
18:05 esskar_ left #mojo
18:07 skaurus joined #mojo
18:25 * xantus_ yawns
18:27 xantus_ I started another mojo couchdb project last night
18:32 xantus_ all glory to the hypnotoad!
18:45 sri ALL GLORY TO THE HYPNOTOAD!
18:54 arthas left #mojo
19:02 dotan left #mojo
19:27 perlrocks Twitter: "Really liking the MissingDrawer plugin for TextMate. http://twitpic.com/2httko http://bit.ly/9Vnx60 #perl #mojolicious" --kraih http://twitter.com/kraih/status/22025000116
19:29 marcus I liked it better when you guys were yelling Revolution...
19:29 perlrocks Twitter: "Viva la revolucion! #perl #mojolicious" --kraih http://twitter.com/kraih/status/22025148013
19:29 sri :)
19:32 marcus sri: I want really good logging of any troubles from a production daemon.
19:32 marcus any a pony
19:33 sri AnyPony
19:36 marcus also, as much shared memory as possible between the children
19:38 sri perl configuration file makes that easy
19:40 sri app is preloaded anyway, but you can just manually load dynamic stuff in the config file
19:40 marcus nice
19:59 Htbaa left #mojo
20:00 vel left #mojo
20:05 perlrocks Twitter: "RT @warming: @kraih ALL GLORY TO THE HYPNOTOAD! #mojolicious" --kraih http://twitter.com/kraih/status/22027294492
20:07 awnstudio is now known as alnewkirk
20:38 koban left #mojo
20:54 perlrocks Twitter: "GneZdo: Mojolicious:: Plugin:: dbi http://ff.im/pEReO" (pl) --planetperlru http://twitter.com/planetperlru/status/22030229267
22:02 ltriant joined #mojo
22:03 tab joined #mojo
22:26 tab left #mojo
23:10 su-bzero_ joined #mojo
23:15 su-bzero left #mojo
23:22 fod joined #mojo
23:25 ispeak joined #mojo
23:41 skaurus how to redirect to previous page inside controller?
23:41 skaurus say, in case of failed login attempt
23:54 achromic left #mojo
23:55 ispeak left #mojo

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