Camelia, the Perl 6 bug

IRC log for #mojo, 2010-08-04

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

All times shown according to UTC.

Time Nick Message
00:16 MojoGuest552 joined #mojo
00:30 MojoGuest971 joined #mojo
00:40 [1]awnstudio joined #mojo
01:05 xantus_ the translate wasn't working for me
01:29 spleenjack joined #mojo
01:42 xantus_ http://twitpic.com/photos/theonetruebix
01:44 xantus_ ok
01:45 xantus_ I made it multi server, multi channel
01:45 xantus_ couchdb config backed
01:45 xantus_ if the config changes, it updates live
01:46 xantus_ oh, and it uses poco irc
01:47 xantus_ now I just need it to respond to certain config changes
02:05 ask joined #mojo
02:15 FlyingY3ti_ joined #mojo
02:56 xantus_ heh, I did not know that mojo bytestream did sha1
02:56 xantus_ now I can drop Digest::SHA1
02:57 xantus_ hah, it uses it internally
03:00 janus joined #mojo
03:02 Foxcool joined #mojo
03:02 xantus_ hm, why would mojo not serve html/etc if I do $loop->tick_cb(sub { POE::Kernel->run_one_timeslice; });
03:05 yakudzo joined #mojo
04:03 tl joined #mojo
04:24 Foxcool joined #mojo
04:33 yakudzo joined #mojo
05:24 lee7 joined #mojo
05:38 MojoGuest367 joined #mojo
05:45 MojoGuest249 joined #mojo
05:46 MojoGuest248 joined #mojo
05:46 MojoGuest248 test
05:46 MojoGuest248 hello
05:58 ashleydev joined #mojo
06:07 alex joined #mojo
06:09 crab hi.
06:41 MojoGuest257 joined #mojo
06:41 MojoGuest257 hello, world
06:42 crab hi.
06:46 xantus__ joined #mojo
06:46 xantus__ hey hey
06:52 crab i don't understand how to organise my code such that i can talk to postgres from mojolicious.
06:54 ashleydev joined #mojo
06:55 crab i'm going to use DBI, and it's blocking, so i'm limited to serving one db-based request per process at one time.
06:57 crab so i have to use a suitable server. say Starman. fine. but what's the right place to create my db connection?
07:02 crab hmm. i get an error when i try to start my mojolicious app with Starman.
07:02 crab Warning: Use of "require" without parentheses is ambiguous at (eval 69) line 1.
07:02 ysyrota joined #mojo
07:02 crab er: Bareword "x.pm" not allowed while "strict subs" in use at (eval 69) line 1.
07:03 crab oh, i get it no matter what server i use.
07:07 crab i wonder what i'm doing wrong.
07:09 mvuets joined #mojo
07:19 xantus__ hm
07:19 xantus__ you're using postgresql :P
07:20 crab ?
07:21 crab i haven't gotten to that point, actually. if i do "mojolicious generate app x; cd x; plackup script/x" i get that error whenever i make a request.
07:21 crab so postgresql is nowhere in the picture.
07:22 crab does it work for you if you do the above?
07:23 crab (note: the server starts without errors, it breaks when i make a request)
07:23 xantus__ http://search.cpan.org/dist/DBD​-Pg/Pg.pm#Asynchronous_Queries
07:25 xantus__ lowercase package name
07:25 xantus__ use generate app X
07:25 crab xantus: thanks. but that alone doesn't solve my problem. where do i create the connection such that i can have one per process?
07:25 crab (the connection==DBI->connect)
07:26 yko joined #mojo
07:26 xantus__ well, it blocks
07:26 crab generate X works! thanks.
07:26 xantus__ you can use a plugin
07:26 xantus__ and stash the dbh
07:27 crab what plugin?
07:27 crab blocking in queries shouldn't be a problem, right? or am i missing something?
07:28 xantus__ if you're using something that preforks you'll be ok
07:28 xantus__ 1 sec, finding code
07:29 yko http://github.com/yko/Mojolicious-Plugin-Db that plugin :p
07:29 yko hehehe
07:31 xantus__ oh good, you also check res->code
07:31 crab yko: so if i use this plus a preforking server, each of my processes will get their own db handle and everything will be happy?
07:31 xantus__ can you use this with DBIx::Simple?
07:31 perlrocks Twitter: "RT: @kraih: #oauth 1.0 really ruins quick @twitter hacks... oauth 2.0 can't come soon enough. #perl #mojolicious" --sharifulin http://twitter.com/sharifulin/status/20287223530
07:32 xantus__ ;>
07:32 crab oh, Mojolicious::Plugin::Db is not on CPAN? no wonder i didn't find it.
07:32 yko xantus_: i wrote that plugin based on code stolen from you :p
07:32 yko crab it's not on cpan yet, ye. my fault
07:32 xantus__ thief!
07:32 xantus__ :)
07:32 yko ye.. so what? :D
07:33 crab xantus: i'm still interested to read the code yko cribbed from, if you can find it
07:33 xantus__ I was only looking for the plugin hook name
07:33 yko actually there's possible to use anything over dbi, just writing own db handler instead of Dbi.pm
07:34 xantus__ and the code to skip when a static file is chosen
07:34 crab if i drop yko's plugin into my lib, it should just work, right? let me try that.
07:34 yko it's configurable actually :)
07:34 crab explain?
07:35 yko that was for xanuts. let me show little example
07:36 xantus__ and use lib 'lib';
07:37 crab use lib join '/', File::Spec->splitdir(dirname(__FILE__)), 'lib';
07:37 crab (from script/x)
07:39 yko crab: http://pastebin.com/iazBrG3J that's little init example
07:40 yko and there's http://bit.ly/aE9Adk usage example
07:41 yko there's still no DBIx::Simple handler, i was going to write it about year ago (right after stolen that code from xantus)
07:42 yko but since i'm very lazy and xantus does not pasting DBIx handler code somewhere so i can steal it...
07:42 crab so what do i want for get_key? before_dispatch?
07:43 yko i think you should leave it default 'after_static_dispatch'
07:44 crab so the handle will be created when the first request comes to that process, right?
07:44 yko let me remember :)
07:45 yko i just found another variant that can solve this problem without any plugin at all
07:45 yko :(
07:45 yko just init connection to db in your startup { }
07:45 xantus__ lol
07:45 yko and then place it into defaults
07:46 xantus__ look in cometdesktop
07:46 crab that's what sri told me to do yesterday. i am a dumbass.
07:46 xantus__ I used it some places
07:46 yko $self->default(db => $dbh);
07:46 xantus__ I'm going to rip it out too, and replace with couch
07:46 yko so you will have db in stash in each controller
07:46 yko xantus__: there some code in comet to steal? yam yam! :D
07:47 xantus__ look at CometDesktop.pm
07:47 xantus__ http://github.com/xantus/comet-desktop/blob​/master/libs/comet-desktop/CometDesktop.pm
07:48 xantus__ also lots of juicy stuff in comet-desktop
07:48 xantus__ like multiconfig plugin
07:48 xantus__ and multiple static fallback
07:48 xantus__ you can have overlaying paths
07:49 yko hmm. that's good
07:49 xantus__ where one can take precedence over the other
07:49 xantus__ like if you don't want to touch a dir, copy it to a fallback dir with the same path
07:50 xantus__ static-fallback in the plugins dir
07:50 yko i wanted to look into comet about year ago. right afte rstealing your code for plugin-db :)
07:50 yko but since i'm very lazy...
07:50 xantus__ http://github.com/xantus/comet-desktop/​blob/master/plugins/static-fallback/lib​/Mojolicious/Plugin/StaticFallback.pm
07:50 crab doesn't plack give you that kind of thing?
07:51 xantus__ perhaps
07:51 xantus__ but I did it in mojo with less than 100 lines
07:51 xantus__ with lots of space
07:54 xantus__ yko: did you see the static __DATA__ support?
07:54 xantus__ @@ js/myfile.js
07:55 xantus__ @@ favicon.ico;base64
07:55 xantus__ mmmmm
07:55 xantus__ yko: http://dev.xantus.org:3000/source
07:56 xantus__ inflate too
07:57 yko i've heard about it but didn't use that
07:57 crab i thought mojo did that (static files in __DATA__) already. or is it only for templates?
07:57 yko actually i don't like lite apps at all :D
07:57 yko crab, base64 encoded
07:57 yko for images, etc
07:58 yko sometimes i hate thing that i can not place <%= %> inside js which are static
07:58 crab xantus: what is comet-desktop? (sorry, the readme only tells me how to run it)
07:58 yko you dont know what is comet desctop?
07:58 yko rly?
07:59 yko http://cometdesktop.com/
07:59 yko dont waste your life, everyone should know that :D
07:59 yko btw, xantus: when irc will back on that desktop?
08:00 perlrocks Twitter: "WebSocket server, http server, and required static files.  All in a single file.  http://bit.ly/9frmGA  #html5 #mojo #perl" --xantus http://twitter.com/xantus/status/20288394426
08:01 xantus__ http://dev.xantus.org/
08:01 MojoGuest867 joined #mojo
08:01 yko but in desktop....
08:01 MojoGuest683 joined #mojo
08:02 yko i can not drag that irc window between browser's windows onto CD :)
08:02 xantus__ when I put up v2
08:02 yko oh...
08:02 yko christmas? )
08:02 xantus__ now that mojo supports websockets, etc
08:03 xantus__ back then the support was soso
08:03 xantus__ probably christmas
08:03 xantus__ lol
08:03 xantus__ oh, back to what I was doing
08:03 xantus__ I have mojo and poe in the same app
08:04 xantus__ serving from mojo doesn't play too well with poe
08:04 xantus__ the loop is probably too active /w poe
08:09 xantus__ yeah, fuggin poe
08:10 crab xantus: where's the code that does this static base64 thing?
08:11 xantus__ its in mojo github
08:11 crab oh
08:11 xantus__ just do the normal make and make install walk
08:12 xantus__ see for an example http://dev.xantus.org:3000/source
08:12 xantus__ you can create base64 blocks uing a program called recode
08:12 xantus__ recode ../b64 <file.jpg >>myscript.pl
08:13 xantus__ that'll append the base64 to the bottom, after you've added @@ file.jpg;base64
08:13 crab ok, thanks. (i thought it was something you did for comet-desktop that wasn't in mojo yet.)
08:13 xantus__ I'm sure someone can come up with a mojo command for that
08:15 xantus__ run_one_timeslice is waiting too long, boooo
08:16 crab i've been using AnyEvent. it's nice.
08:20 xantus__ yeah it is
08:26 MojoGuest876 joined #mojo
08:29 MojoGuest914 joined #mojo
08:30 MojoGuest807 joined #mojo
08:30 xantus__ fixed
08:31 xantus__ Mojo::IOLoop->singleton->tick_cb(sub { $poe_kernel->loop_resume_time_watcher(time()); $poe_kernel->run_one_timeslice; });
08:31 koban joined #mojo
08:31 xantus__ basically I'm setting the timeout to the current time, allowing it to never wait for the next tick
08:32 xantus__ I suppose you could also use idle_cb
08:33 xantus__ instead
08:34 xantus__ sri: ^^
08:35 xantus__ nice and fast
08:36 diegok joined #mojo
08:38 dotan joined #mojo
08:40 arthas joined #mojo
08:50 perlite joined #mojo
08:51 perlrocks Twitter: " RT @sharifulin: RT: @kraih: #oauth 1.0 really ruins quick @twitter hacks... oauth 2.0 can't come soon enough. #perl #mojolicious" --pimenov http://twitter.com/pimenov/status/20290430274
08:54 koban hi all!
08:55 koban kraih: i get latests mojo version from github and my program fails with complainta about deep recursion
08:57 koban Deep recursion on subroutine "Mojolicious::handler" at /usr/local/perl-5.10/lib/site_perl​/5.10.1/MojoX/Dispatcher/Routes.pm line 178.
08:57 koban Deep recursion on subroutine "Mojolicious:rocess" at /usr/local/perl-5.10/lib/sit​e_perl/5.10.1/Mojolicious.pm line 225.
08:57 koban Deep recursion on subroutine "Mojolicious:ispatch" at /usr/local/perl-5.10/lib/sit​e_perl/5.10.1/Mojolicious.pm line 236.
08:57 koban Deep recursion on subroutine "MojoX:ispatcher::Routes:ispatch" at /usr/local/perl-5.10/lib/sit​e_perl/5.10.1/Mojolicious.pm line 166.
08:57 koban Deep recursion on subroutine "MojoX:ispatcher::Routes::_walk_stack" at /usr/local/perl-5.10/lib/site_perl​/5.10.1/MojoX/Dispatcher/Routes.pm line 74.
08:57 koban Deep recursion on subroutine "MojoX:ispatcher::Routes::_dispatch_controller" at /usr/local/perl-5.10/lib/site_perl​/5.10.1/MojoX/Dispatcher/Routes.pm line 272.
08:58 koban sorry - i must put it in gist, my big fault :(
08:59 koban http://gist.github.com/507865
09:02 crab what is this "RT @sharifulin: RT @kraih" stuff?
09:03 crab $self->app->log->info(...) is a lot to type.
09:03 crab btw, how can i make ./foo daemon print logs to stdout with a mojolicious app the way it does with m::lite?
09:08 vti crab: log->path(undef)
09:13 MojoGuest503 joined #mojo
09:17 marcus goooood morning, vietnam!
09:20 vti oO
09:23 MojoGuest144 joined #mojo
09:23 marcus woot. xantus__ is now known as xanuts ? :)
09:35 crab how can i get the same effect as an under sub { ... } in Mojolicious-not-Lite?
09:41 crab ah, using a bridge.
09:46 crab i must be doing something wrong. i have lib/X/Home.pm with a sub index { ... } that renders either the "user_home" or "admin_home" template. in lib/X.pm i say $r->route('/')->to('home#index'), and it works.
09:47 crab but if i add a bridge('/')->to(cb => sub{ ... return 1; }) and add the route to that, then it tries to render templates/home/index.html.ep
09:57 MojoGuest757 joined #mojo
09:58 dotan joined #mojo
09:58 MojoGuest757 hi
09:59 crab i must be missing something simple. i'm basically just following the example in Routing.pod
10:15 crab my bridge cb gets called twice and my action not at all.
10:16 crab even if i do bridge('/x') and ->route('/y') rather than bridge('/') ->route('/') (the latter is what i want)
10:39 MojoGuest704 joined #mojo
10:44 MojoGuest757 left #mojo
10:51 chansen joined #mojo
11:06 alex joined #mojo
11:34 crab i don't understand this problem at all.
11:34 crab is anyone successfully using bridges?
11:49 dotan joined #mojo
11:53 MojoGuest736 joined #mojo
11:54 ohYEAH /server
11:54 ohYEAH /help
11:54 ohYEAH left #mojo
11:55 ohYEAH joined #mojo
11:55 ohYEAH left #mojo
12:05 dotan joined #mojo
12:16 ysyrota joined #mojo
12:16 ysyrota left #mojo
12:43 Alias_ joined #mojo
12:49 Akron joined #mojo
12:54 MojoGuest264 joined #mojo
13:16 Akron Hi - I've got a little question regarding stash values in router plugins ...
13:16 Akron Why does this not work: http://gist.github.com/508114 ?
13:18 doubi joined #mojo
13:24 Akron I set a stash value before dispatching - but it's not in the capture-stash-hash in a route condition ...
13:40 sri Akron: inside routes you don't have access to the real stash
13:41 sri just what has been captured from routes
13:41 Akron So the value I set is only available on rendering?
13:42 sri nope, both get merged right after routes finished matching
13:42 sri so right before controllers run
13:42 Akron Okay - so I have to misuse env or something similar to get what I want.
13:43 sri or you just set the category inside routes
13:43 sri ->to(category => 'lalala')
13:44 sri no idea why you would use a plugin hook for something route related
13:44 Akron It's necessary for the controller switch.
13:45 Akron The category value has information regarding the subdomain of the host.
13:46 Akron It's more like a path information ... but I don't want to rewrite the path for routing, because this would lead to a mess with redirect_to, url_for etc.
13:49 sri ok, that could be a valid use case
13:49 Akron :)
13:49 sri Akron: if you make a test case i 'll add the functionality
13:50 Akron You mean the functionality of reaching the stash from plugins?
13:50 sri from conditions
13:50 Akron In fact, I think env is not THAT semantically wrong. So - I'm fine with this solution.
13:50 Akron Ah - okay.
13:54 Akron Can you give me a brief definition what you mean by saying "test case". (Sorry ...)
13:55 sri a test i can add to the test suite
13:55 sri that currently fails
13:56 Akron So - with treating the captures hash in the condition like the real hash. Okay.
14:04 Akron Are there currently no condition tests in the suite?
14:05 Akron I exprected them in t/mojox/routes.t ...
14:12 sri conditions are tested indirectly, http method checks are implemented with conditions
14:17 Foxcool joined #mojo
14:17 tl joined #mojo
14:17 perlrocks joined #mojo
14:17 Alikus joined #mojo
14:17 stephen joined #mojo
14:17 BlueT_ joined #mojo
14:17 hidek___ joined #mojo
14:17 stephan48 joined #mojo
14:17 murakoma joined #mojo
14:17 xantus_ joined #mojo
14:17 sekimura joined #mojo
14:19 diegok joined #mojo
14:22 Alias_ joined #mojo
14:22 perlite joined #mojo
14:22 koban joined #mojo
14:22 mvuets joined #mojo
14:22 DaTa joined #mojo
14:22 memememomo joined #mojo
14:22 und3f joined #mojo
14:22 bedi joined #mojo
14:22 sri joined #mojo
14:22 xantus joined #mojo
14:22 gabiruh joined #mojo
14:22 ashleydev_logbot joined #mojo
14:22 ryanc joined #mojo
14:22 crab joined #mojo
14:22 ka2u joined #mojo
14:22 charsbr joined #mojo
14:22 lbr joined #mojo
14:39 stephan48 a example use case
14:39 stephan48 sry was in backlog
14:40 sri Akron: if the test case is too hard for you i can take over, the implementation is finished :)
14:41 Akron Haha ... yeah. Well - I had to do other things in the meantime. The only thing I came up with was this:
14:41 vti sri: we need a cpan release, latest tt doesn't work with cpan version
14:41 sri vti: oh noes
14:41 arthas_ joined #mojo
14:41 Akron http://gist.github.com/508232
14:41 vti sri: and here is another problem (not cpan related) reported earlier today http://gist.github.com/507865
14:42 sri vti: thats not a test case
14:42 vti not my peace of code too :D
14:42 Akron sri: I had no idea how to set an initial stash value ...
14:43 sri vti: what am i supposed to do with that?
14:44 vti sri: i don't know, i thought you haven't seen it :)
14:44 vti koban: ping
14:44 koban sri: it's my messy code
14:44 sri i still can't read minds...
14:45 sri koban: test case please
14:45 koban i think bug don't related with mojo
14:45 sri hmm
14:45 sri ok
14:45 koban but i cat locate bug
14:46 koban *can't
14:46 koban it seem to me that my program fail in deep recursion when trying to disputch income request
14:47 ashleydev joined #mojo
14:47 koban if i swith on MOJOX_ROUTES_DEBUG flag i see endless dispathing
14:48 sri it's nothing i've ever seen
14:50 vti http://blog.doloreslabs.com/2009/05/the-pro​gramming-language-with-the-happiest-users/
14:50 vti haha
14:56 sri lol
14:58 perlrocks Twitter: "#perl is the programming language with the happiest users, viva la revolucion! http://bit.ly/PeOoG #mojolicious" --kraih http://twitter.com/kraih/status/20310344337
14:58 sri \o/
15:00 sri !tweet i accidentally a tweet
15:00 perlrocks sri: http://twitter.com/perlrocks/status/20310520039
15:00 sri everybody here can tweet btw :)
15:02 perlrocks Twitter: "RT @ kraih: # perl is the programming language with the happiest users, viva la revolucion! http://bit.ly/PeOoG # mojolicious" (de) --discordianfish http://twitter.com/discord​ianfish/status/20310654916
15:03 perlrocks Twitter: "RT @kraih: #perl is the programming language with the happiest users, viva la revolucion! http://bit.ly/PeOoG #mojolicious" --ficovh http://twitter.com/ficovh/status/20310706425
15:03 sri i might want to filter retweets
15:03 vti time for beer, have a nice evening
15:03 sri mmmmmmmm
15:03 sri beer
15:03 perlrocks Twitter: "RT @kraih: #perl is the programming language with the happiest users, viva la revolucion! http://bit.ly/PeOoG #mojolicious" --TabTwo http://twitter.com/TabTwo/status/20310757991
15:04 sri you too!
15:04 Akron Bye!
15:04 Akron sri: Was the test case nearly what you expected?
15:05 sri Akron: almost, but my solution is a little bit different
15:06 sri there is no $stash argument
15:06 sri i've just switched $tx with $c
15:06 sri so you get $c->stash and $captures separated
15:06 Akron Don't you think this will break some implementations?
15:07 sri nope
15:07 sri $c is very very similar to $tx
15:08 Akron My current solution with $tx->req->env would be broken, I guess.
15:09 sri nope
15:09 sri $c->req works the same
15:10 Akron Oh ... I thought it has to be $c->tx->req->env ... so - sounds good!
15:10 GitHub138 joined #mojo
15:10 GitHub138 mojo: master Sebastian Riedel * 5e3c19f (9 files in 8 dirs): improved conditions by allowing them to access the stash
15:10 GitHub138 mojo: master Sebastian Riedel * b15a317 (1 files in 1 dirs): fixed typo
15:10 GitHub138 mojo: master commits e8cf2af...b15a317 - http://bit.ly/9WGKcX
15:10 GitHub138 left #mojo
15:10 Akron sri: Thank you very much!
15:10 perlrocks Twitter: "RT @kraih: #perl is the programming language with the happiest users, viva la revolucion! http://bit.ly/PeOoG #mojolicious" --AFreshOne http://twitter.com/AFreshOne/status/20311240681
15:11 sri Akron: tweet it! :)
15:11 perlrocks Twitter: "RT @kraih: #perl is the programming language with the happiest users, viva la revolucion! http://bit.ly/PeOoG #mojolicious" --rainboxx http://twitter.com/rainboxx/status/20311298498
15:12 perlrocks Twitter: "RT: @kraih: #perl is the programming language with the happiest users, viva la revolucion! http://bit.ly/PeOoG #mojolicious" --sharifulin http://twitter.com/sharifulin/status/20311345795
15:12 sri holy retweet batman
15:13 dotan joined #mojo
15:13 Akron !tweet Mojolicious route conditions now have access to stash values - brilliant! http://bit.ly/bxoF83
15:13 perlrocks Akron: http://twitter.com/perlrocks/status/20311437612
15:13 perlrocks Twitter: "Mojolicious route conditions now have access to stash values - brilliant! http://bit.ly/bxoF83 - Akron" (de) --perlrocks http://twitter.com/perlrocks/status/20311437612
15:14 sri :)
15:14 Akron :)
15:19 stephan48 this i strange....
15:27 koban joined #mojo
15:32 crab sri: did you see my question about bridges?
15:34 sri crab: nope
15:35 crab sri: ok, i have a mojolicious (i.e. not-lite) app. in startup, i say $r->route('/')->to('home#index'), and my App::Home::index does $self->render($cond? "foo" : "bar") and renders templates/{foo,bar}.html.ep. all this works fine.
15:37 crab sri: now i try to use the example of using a bridge to do authentication from Routing.pod. so i say $b = $r->bridge('/')->to(cb => sub { return 1 }), and then $b->route('/')->to('home#index')
15:37 sri double / looks invalid
15:37 sri ->bridge->to(...) maybe?
15:37 crab but now it (a) runs the cb twice, not once, (b) doesn't call my App::Home::index, (c) tries to render templates/home/index.html.ep
15:38 crab same thing with bridge('/x') and route('/y') or just bridge->to and route.
15:38 sri ah, you're usign the cpan version?
15:38 crab github head.
15:38 sri Oo
15:38 sri there was a bug with callbacks in the cpan version
15:39 sri it is pretty much impossible to inherit callbacks with head
15:39 sri would be a bug if it happened
15:40 sri please try turning it into a simple test case, i'll fix it then
15:42 sri i remember it breaking stuff like "under sub {...}; get = {text => 'lalala'};"
15:43 sri because the get would inherit the callback from under
15:43 sri thats one of the tested cases
15:43 sri (under is a wrapper around bridge)
15:44 crab yes. in fact i'm trying to get the same behaviour as under in a non-lite app, and found the example in Routing.pod
15:45 crab does head report the same $VERSION as what is on CPAN?
15:45 sri don't think so
15:45 sri 27 is head
15:46 sri guess it's time to make a snapshot and release to cpan
15:46 crab i get: 0.999927
15:46 sri could be a bug then
15:47 MojoGuest571 joined #mojo
15:50 crab sri: i have a test case made by generate-ing a new app and making three changes. shall i give you a tarball? or do you want a description of what i did?
15:50 sri pastie please
15:51 crab it's multiple files...
15:51 sri doesn't matter
15:54 crab ok. so i do "mojolicious generate app X". here is the modified lib/X.pm: http://pastie.org/1075261
15:54 crab here is the modified lib/X/Example.pm: http://pastie.org/1075263
15:54 crab templates/x.html.ep contains just "foo bar"
15:54 crab and i rm templates/example/welcome.html.ep
15:55 crab now if i run script/x daemon and go to http://localhost:3000, i get a 404
15:55 crab and you can see in the log that the bridge sub is called twice, the welcome sub not at all, and it's trying to render example/welcome.html.ep
15:57 crab and this happens even if i say bridge('/x') and ->route('/y') and try to access http://0:3000/x/y
15:58 crab also, of course, if you remove the bridge() call and just add the route(), then "foo bar" is correctly rendered.
16:12 spleenjack joined #mojo
16:15 crab can you reproduce it?
16:15 sri taking a look now
16:15 sri but i'll have to turn it into a real test first...that takes time
16:16 crab thanks, much appreciated.
16:16 crab what puzzles me is what i'm doing differently from the examples and the already-tested cases.
16:16 crab it seems a very straightforward situation.
16:18 tempire joined #mojo
16:18 sri bridge with callback is very rare
16:18 sri it's a new concept
16:19 crab but isn't it exactly how under sub { ... } works? (and in my lite app, under works for me and does exactly what i want)
16:19 sri it's suppose to be the same
16:19 sri *+d
16:23 sri oh damn
16:26 ask joined #mojo
16:28 doubi joined #mojo
16:30 crab i take it you found the problem?
16:39 Akron left #mojo
16:45 sri yea, previous fix only affected lite apps
16:47 GitHub54 joined #mojo
16:47 GitHub54 mojo: master Sebastian Riedel * 5a3db1e (6 files in 6 dirs): fixed a route callback inheritance bug - http://bit.ly/ca7og7
16:47 GitHub54 left #mojo
16:48 sri crab: there ya go
16:53 crab that fixes it. thank you.
16:53 crab i will include a copy of the latest mojo in my lib (but of course, a cpan release would be handy too, as you mentioned)
16:56 Noah joined #mojo
17:05 perlrocks Twitter: "RT @kraih: #perl is the programming language with the happiest users, viva la revolucion! http://bit.ly/PeOoG #mojolicious" --tempiretech http://twitter.com/tempiretech/status/20318893400
17:07 tempire joined #mojo
17:09 Akron joined #mojo
17:14 tempire joined #mojo
17:21 GabrielVieira joined #mojo
17:25 tempire joined #mojo
17:28 Foxcool joined #mojo
17:32 crab Plugin::JsonConfig expects myapp.json to contain a single object?
17:33 tempire joined #mojo
17:35 keith joined #mojo
17:36 tempire joined #mojo
17:38 tempire joined #mojo
17:47 plenum joined #mojo
17:53 perlrocks Twitter: "@sheeshee I would prefer a version using #mojolicious, but yes. :)" --kraih http://twitter.com/kraih/status/20321873957
17:57 sri crab: yes
18:02 stephen joined #mojo
18:04 ashleydev joined #mojo
18:13 stephen joined #mojo
18:20 ask joined #mojo
18:27 MojoGuest331 joined #mojo
18:27 MojoGuest331 blargh
18:34 crab blargh to you too!
18:37 tempire I blarghed once.  It didn't live up to the hype.
18:38 sri blargh!
18:43 MojoGuest284 joined #mojo
18:43 MojoGuest284 left #mojo
18:58 ask joined #mojo
19:00 Foxcool joined #mojo
19:05 koban joined #mojo
19:08 Htbaa joined #mojo
19:20 Foxcool joined #mojo
19:48 perlrocks Twitter: "RT @kraih: #perl is the programming language with the happiest users, viva la revolucion! http://bit.ly/PeOoG #mojolicious" --xantus http://twitter.com/xantus/status/20328639271
19:54 xantus_ I am xaNUTS
19:58 Akron I simply don't understand conditions. Can't I nest them? Why is there no successfull dispatching here: http://gist.github.com/508691
20:00 Akron I expected them to work like routes ...
20:01 xantus_ did you try the routes command
20:01 xantus_ to see if your route table has anything in it
20:01 xantus_ script/foo routes
20:09 xantus_ what do you guys think about combining the v8 js engine and mojo in some way
20:09 xantus_ as a project
20:09 sri i've thought about it actually :)
20:09 sri but the binding seems rather crappy
20:10 xantus_ bind from perl to v8
20:10 sri Akron: you just forgot ->route()
20:11 sri they are only attributes of a route...but i guess you got that by now anyway :)
20:11 Akron I have to figure out the "routes" command ... hm ...
20:11 sri xantus_: ye
20:11 xantus_ I was trying to point him that direction
20:11 Akron xantus_: Thanks!
20:12 xantus_ I'm really getting sick of the node.js talk and hype
20:12 xantus_ they have to build everything we already have
20:13 sri i'm not sold on the idea of javascript as a general purpose language
20:13 xantus_ neither am i
20:13 sri for domain specific tasks like in a browser or couchdb views it's amazing
20:14 xantus_ downloading v8 now
20:14 xantus_ http://github.com/pmurias/perl-v8
20:14 sri i'm waiting for the day when nginx beats node.js performance wise with embedded LuaJIT :D
20:15 xantus_ sweet, this guy has done most of the work
20:15 sri xantus_: the spidermonkey bindings seem way better
20:15 xantus_ yeah, thats what couch uses
20:16 sri i guess with jaegermonkey you could reach similar performance
20:16 sri (not that it matters that much)
20:17 xantus_ JavaScript::SpiderMonkey
20:17 xantus_ may 2010
20:19 sri http://search.cpan.org/~claesjac/​JavaScript-1.16/lib/JavaScript.pm
20:19 xantus_ was just looking at that one too
20:20 Akron sri & xantus_: Thank you! Now it's working.
20:20 xantus_ yw
20:21 xantus_ v8 fails to build for me
20:24 yko joined #mojo
20:24 * xantus_ pokes yko
20:24 yko ouch
20:24 xantus_ gotcha
20:24 yko damn :\
20:24 yko hehe
20:35 sri http://kraih.com/usingperl6-sri.jpg # my first book cover :)
20:49 xantus_ nice
21:14 xantus_ the same sex marriage ban was overturned in california
21:29 MojoGuest910 joined #mojo
21:29 MojoGuest910 hdhjfsdf
21:29 MojoGuest910 ldlfdf
21:29 MojoGuest910 dkdkf
21:30 MojoGuest910 lkfelò
21:39 MojoGuest975 joined #mojo
21:40 MojoGuest975 hhhhhhhhhhh
21:40 MojoGuest910 mmmmmmmmmmmmmmmm
21:42 MojoGuest910 kkkkkkkkkkkkk
21:43 xantus_ ok
21:43 xantus_ your chat skills are legendary
21:44 xantus_ retweet character: ♺
21:44 xantus_ hard to see, but its like a recycle icon
21:45 MojoGuest677 joined #mojo
21:45 MojoGuest677 hhhhhhhhhhhh
21:46 xantus_ lol
21:46 xantus_ problem?
21:48 * sri grabs the shotgun
21:48 sri get off my lawn!
21:49 MojoGuest767 joined #mojo
21:57 GabrielVieira joined #mojo
22:02 xantus_ you're scaring them away
22:02 xantus_ lol
22:05 sri :D
22:06 * sri goes back to his rockingchair and grabs a beer
22:06 xantus_ :)
22:06 xantus_ sri: are you doing anything with the js idea
22:07 sri whats the idea?
22:07 xantus_ lol, senile too
22:07 xantus_ some combo of mojo and js
22:08 sri heh, "some combo" is not really an idea ;p
22:08 xantus_ well, I was being very general
22:09 xantus_ a module that ties mojo controller functions into js and make it routable
22:10 sri doesn't sound that exciting tbh
22:11 xantus_ k
22:11 xantus_ I may mess with it anyway tonight
22:11 sri :)
22:11 xantus_ did you see my blather about the bot
22:12 sri don't think so
22:12 xantus_ I used poco irc, multiple servers, multiple channels
22:13 xantus_ couchdb configured
22:13 sri interesting
22:13 xantus_ it watches _changes on couch and updates the config live
22:13 xantus_ and has a websocket web interface
22:13 xantus_ when I finish that part, you can talk through the bot from a browser
22:16 sri how are you handling oauth?
22:20 xantus_ using your signing
22:20 xantus_ I store the keys, etc in couch
22:20 xantus_ I also have a twitter_watch for each channel
22:21 xantus_ it opens a stream for each unique term set
22:21 xantus_ I'm thinking of adding logging to couchdb
22:22 xantus_ and use that to provide an infininite scrollback or something for the html interface
22:22 xantus_ ft search maybe
22:22 xantus_ couchdb-lucene :)
22:27 ltriant joined #mojo
22:36 MojoGuest506 joined #mojo
22:39 sri wow
22:46 sri kinda strange that mozilla is not working on an answer to node
22:49 sri then again, node has not proven itself yet
22:58 sri Zzz
23:27 Akron Bye!
23:27 Akron left #mojo
23:35 MojoGuest72 joined #mojo
23:35 MojoGuest72 test
23:37 MojoGuest570 joined #mojo
23:38 MojoGuest570 sdad
23:38 MojoGuest466 joined #mojo
23:38 MojoGuest570 /server irc.nixtrixirc.net
23:38 MojoGuest930 joined #mojo
23:39 TonyRockz joined #mojo
23:40 MojoGuest930 left #mojo
23:40 TonyRockz left #mojo
23:40 MojoGuest764 joined #mojo
23:40 MojoGuest9 joined #mojo
23:57 MojoGuest106 joined #mojo
23:57 MojoGuest106 left #mojo
23:58 TheFatNinja joined #mojo

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