Camelia, the Perl 6 bug

IRC log for #mojo, 2011-01-18

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

All times shown according to UTC.

Time Nick Message
00:19 otaviof_ joined #mojo
00:21 otaviof left #mojo
00:30 otaviof_ left #mojo
00:54 ashleydev left #mojo
00:56 ashleydev joined #mojo
01:03 ka2u joined #mojo
02:18 daviddelikat1 joined #mojo
02:22 daviddelikat left #mojo
02:41 perlrocks Twitter: "Check the awesome, creative talents of MojoLicious: http://www.facebook.com/mojoliciousart True skill at hand ready to be unleashed in 2011!" --UniArticle http://twitter.com/UniArtic​le/status/27193945482067968
02:43 ryan joined #mojo
02:48 ashleydev left #mojo
03:07 ryan left #mojo
03:47 daviddelikat joined #mojo
03:50 daviddelikat2 joined #mojo
03:52 daviddelikat1 left #mojo
03:52 tempire Mojolicious: True skill at hand, check the awesome!
03:55 daviddelikat left #mojo
04:14 crab joined #mojo
04:21 ashleydev joined #mojo
04:28 * tempire posted a mojolicious-related blog last week, and awaits a pat on the head
04:38 avkhozov joined #mojo
04:39 ashleydev left #mojo
05:09 tarski joined #mojo
05:55 kaare joined #mojo
06:22 tarski left #mojo
06:30 ispy_ left #mojo
06:33 ysyrota joined #mojo
07:00 pid joined #mojo
07:39 Christian joined #mojo
07:39 Christian good morning
07:39 purl For you maybe.
07:49 koban joined #mojo
08:01 breaker313 joined #mojo
08:09 MojoGuest686 joined #mojo
08:10 MojoGuest686 left #mojo
08:18 tholen joined #mojo
08:23 otaviof joined #mojo
08:30 MojoGuest793 joined #mojo
08:32 MojoGuest793 left #mojo
08:43 yko sri: don't mind at all
08:44 yko i'm stealing some code from you, you stealing some code from me. normal workflow :D
09:07 su-bzero_ joined #mojo
09:23 su-bzero joined #mojo
09:26 su-bzero_ left #mojo
09:27 esskar joined #mojo
09:28 arthas joined #mojo
09:52 tholen left #mojo
09:54 tholen joined #mojo
10:12 yakudzo sri: why before and after method renamed in Mojo::DOM? I thought you want easy reading and goodlooking like in jquery
10:55 avkhozov left #mojo
11:13 memowe left #mojo
11:13 memowe joined #mojo
11:17 AmeliePoulain joined #mojo
11:24 memowe left #mojo
11:25 memowe joined #mojo
11:25 memowe left #mojo
11:25 memowe joined #mojo
11:26 Akron joined #mojo
11:33 sri moin
11:33 sri yakudzo: because both are used by moose
11:40 yko well, DOM was still experimental those days. now it's not
11:43 sri i'm open for better suggestions btw
11:43 * sri liked before + after too
11:44 yakudzo left #mojo
11:51 stephan49 is now known as stephan48
12:17 AmeliePoulain left #mojo
12:38 yko Mojo::URL->query behavior with array/arrayref/hashref described anywhere? i forget how it works :)
12:39 sri yes it is
12:39 sri http://mojolicio.us/perldoc?Mojo/URL#query
12:39 * sri bonks yko on the noggin
12:39 yko damn.... i'm blind
12:40 yko i was looking at that snipped bu didn't read key names :)
12:40 yko s/ed/et/
12:41 yko thankyou. btw, i think starting Guides::Client would be nice idea one sweet day
13:13 bc5042 Mojolicious::Plugin::TagHelpers::select_field - there is no way to set default value selected?
13:14 sri it uses $self->param, so there is
13:16 bc5042 what you mean? how?
13:17 bc5042 all i can is something like: <%= select_field customerwizard_basic_data_country => \@country_names, id => 'id_customerwizard_basic_data_country' %>
13:19 daviddelikat joined #mojo
13:21 sri $self->param(customerwizard_basic_data_country => 'de');
13:22 bc5042 oh you mean sub param in template context?
13:22 sri wherever it is available
13:23 sri (which is pretty much everywhere)
13:23 bc5042 :) cool
13:24 daviddelikat2 left #mojo
13:35 bc5042 i think i got it, but i don't want set default whole country list, but set specified value from that list to be html 'selected'
13:39 sri thats done automatically
13:40 sri because the tag helpers uses $self->param for sticky form values
13:40 sri *-s
13:41 bc5042 to make sure that we understand each other - i mean this: http://www.htmlcodetutorial.co​m/forms/_OPTION_SELECTED.html
13:42 stephan48 bc5042: it will simply work. trust sri on that :)
13:42 bc5042 so we are thinking about the same? ;)
13:42 bc5042 ok, so i did something wrong ;)
13:43 stephan48 ;)
13:48 bc5042 it was because F5 in my browser was not enough, Ctrl+F5 helped, sorry again ;)
13:51 sri something like <% param foo => 'bar' unless param 'foo'; %> in the template might also just work
13:52 bc5042 this room rocks :)
13:52 * sri rocks the room
13:54 sri lets get stoned
13:55 sri hmm, normally marcus would pop up at this point to make a witty comment Oo
13:56 marcus troll bong!
13:56 purl LET THE TROLLING BEGIN! *Bubblebubblebubble* ... *coughhackgackkaffkaff* ... whoa ... dude... cool O_o
13:56 marcus oops, too stoned.
13:56 marcus :)
13:56 sri \o/
13:56 marcus just came back from a meeting
13:57 marcus sold 25k euro worth of consulting =)
13:57 sri http://openwetware.org/images/​1/19/Meetings_demotivator.jpg
13:58 * sri has one of those
13:58 marcus mhm
14:05 dotan joined #mojo
14:08 sri what the hell, a vampire show on syfi?
14:10 sri what happened to science fiction? :(
14:13 sri s/syfi/syfy/
14:13 dotan science fiction on syfi? there's a reason they changed the name from "the sci-fi channel"...
14:14 sri ye, just looked through their list of top shows...
14:14 sri wwe smackdown... seriously?
14:15 kaare left #mojo
14:16 sri there is pretty much no scifi left :(
14:18 sri looks like our only hope this year will be falling skies
14:24 ispy_ joined #mojo
14:25 fhelmber_ joined #mojo
14:38 mikegrb left #mojo
14:39 koban left #mojo
14:39 dotan there are at least 2 upcoming colony world series I've read about - Outcasts from BBC and Terra Nova which has Spielberg involvment - that's SFish.
14:41 mikegrb joined #mojo
14:42 sri outcasts does sound interesting
14:42 sri terra nova not so much
14:43 su-bzero_ joined #mojo
14:46 kaare joined #mojo
15:05 MojoGuest868 joined #mojo
15:05 MojoGuest868 From: http://news.ycombinator.com/item?id=1277067 (159 hits)
15:05 MojoGuest868 left #mojo
15:06 mobyu joined #mojo
15:20 sri coroutines should really be a core feature in perl
15:30 tholen left #mojo
15:35 jfuller joined #mojo
15:35 tholen joined #mojo
15:37 MojoGuest964 joined #mojo
15:37 MojoGuest964 From: http://news.ycombinator.com/item?id=1277067 (160 hits)
15:37 MojoGuest964 left #mojo
15:39 mxey left #mojo
15:39 su-bzero1 joined #mojo
15:39 MojoGuest586 joined #mojo
15:40 MojoGuest586 From: http://www.google.com/search?hl=fr&am​p;safe=off&amp;q=websocket+irc+client​&amp;aq=f&amp;aqi=&amp;aql=&amp;oq= (1 hits)
15:40 MojoGuest586 is now known as bishop
15:41 Akron left #mojo
15:42 bishop left #mojo
15:43 su-bzero_ left #mojo
15:44 ysyrota left #mojo
15:53 dotan left #mojo
16:01 Christian nice evening to you all
16:01 * sri waves
16:01 Christian left #mojo
16:20 mobyu left #mojo
16:36 snearch joined #mojo
16:39 yko im feeling stupid
16:39 sri that means you're a real programmer now! :)
16:40 snearch left #mojo
16:40 snearch joined #mojo
16:40 yko how to do something like $url->parse on '/foo?bar=baz' and keep existing in $url host, scheme?
16:40 yko i remember that questuion was discussed but i don't remember solution
16:41 sri keep those in $url->base?
16:42 sri don't think there is a really simple way
16:43 sri maybe $url->to_rel->parse('/foo?bar=baz')->to_abs or so
16:43 sri but i'm just guessing :)
16:43 yko trying in console. if i find something ill tell
16:44 yko even if you are not interested :)
16:44 sri $url->base($url->clone)->par​se('/foo?bar=baz')->to_abs;
16:44 sri maybe something like that
16:45 yko Client does that stuff when 302 correct
16:45 yko i think i  need somethink like that https://github.com/kraih/mojo/blo​b/master/lib/Mojo/Client.pm#L898
16:45 sri yea, thats the correct way, i'm looking for oneliners :)
16:46 yko aha, same
16:46 sri but it's actually a bit tricky, maybe there are none
16:47 yko print $url->clone->base($url)->p​arse("/brrr?roa!")->to_abs
16:48 sri that works?
16:48 sri would be a positive side effect of the recent relative url fix then :)
16:48 yko full example:
16:48 yko perl -MMojo::URL -e 'my $url = Mojo::URL->new("http://foo.bar/baz?roar"); print $url->clone->base($url)->pa​rse("/brrr?roa!")->to_abs'
16:49 yko sorry, long init. but ye, it works
16:49 sri the old to_abs merge code would have appended
16:49 yko thanks
16:49 yko you mean before changes?
16:49 sri ye
16:50 sri i'm glad it works just like URLs in browsers now
16:51 sri brrr?roa getting appended and /brrr?roa replacing
16:51 yko me too. with time will find recepie to make all who are mixed to understand
16:51 vel joined #mojo
16:51 yko or just kill them quickly..
16:51 yko exactly output: http://foo.bar/brrr?roa%21
16:51 yko lol
16:52 yko if >parse("/brrr") # no query
16:52 yko than it gettinbg query from base
16:52 sri hmm
16:53 yko perl -MMojo::URL -e 'my $url = Mojo::URL->new("http://foo.bar/baz?OLD_QUERY"); print $url->clone->base($url)->parse("/new")->to_abs'
16:53 sri fixing
16:53 yko sorry for long paste
16:56 yko oops. one more. mojo version: ... Mojolicious (1.02, Snowflake) .... You might want to update your Mojolicious to 1.01.
16:57 sri :)
17:02 esskar left #mojo
17:04 breaker313 left #mojo
17:10 ryan joined #mojo
17:46 MojoGuest715 joined #mojo
17:47 MojoGuest715 left #mojo
17:57 spleenjack left #mojo
18:05 pid left #mojo
18:29 non joined #mojo
18:30 non hello together.
18:31 non i've got a question regarding mojolicious routing/dispatching in the context of rpc
18:32 non i'd like to use JSONRPC with method names like "controller.action" and dispatch them to perl methods..
18:32 non how can i forward from one controller action to an action in an other controller?
18:35 non i'm sure there's a nice way beside loading the package class manually ...
18:35 * yko is thinking on it
18:36 sri no there is not, and thats intentional :)
18:36 sri internal redirects are evil
18:36 non why?
18:37 non another idea would be to plug a "rpc dispatcher" into the route
18:37 non maybe with conditions..
18:37 sri because it encourages non-RESTful web services
18:38 non yes. i'd like to build a non-RESTful RPC web service
18:38 non could be all POST requests
18:38 non one url
18:38 sri right, we don't encourage that :)
18:38 sri if you want to do it you should have to suffer ;)
18:38 non hm.. stick with catalyst...
18:38 yko lol
18:39 * sri is exaggregating
18:39 sri but i regret having affed forward to catalyst
18:39 sri *added
18:40 yko non: looks like you are going not-mojolicious way
18:40 sri a sub-dispatcher would be the right choice
18:40 yko sri: it's better to attach such stuff in hook?
18:40 non http://search.cpan.org/~jlmartin/Cat​alyst-Plugin-Server-JSONRPC-0.07/lib​/Catalyst/Plugin/Server/JSONRPC.pm
18:41 non i used ^^ that before
18:41 sri yko: ye, a hook would be a good idea
18:41 yko non: do you need catch all xhr requests?
18:41 vel left #mojo
18:41 sri all requests go to one path
18:42 non xhr are X- headers? think i don't need them
18:42 yko ooh...
18:42 sri he redispatches based on json data
18:42 non yes
18:42 non :)
18:42 yko non: X-Requested-With
18:43 non yko: sry. can't follow you. what is X-requested-With for?
18:43 yko ohh...
18:43 sri doesn't matter for your use case
18:43 yko non: for me (mojo-headed) that idea sounds terrible :)
18:43 sri you'll need a redispatcher, plain and simple
18:43 non ok
18:43 sri it can be based on a route or hook
18:44 non in my special case i can't do RESTful. i need more methods...
18:44 sri that doesn't sound right
18:44 kaare left #mojo
18:44 kaare_ joined #mojo
18:45 non maybe a use restful as abstraction layer for my objects ... but here i definitly need rpc
18:47 non before_dispatch?
18:48 non how can i change my destination controller and action from within a hook?
18:48 yko i would use after_static_dispatch and chech if ($c->rendered)
18:48 yko oops. lies
18:48 yko $c->stash->{'mojo.rendered'}
18:48 yko than you avoid requests to static files
18:49 sri non: a hook would be a whole new dispatcher, bypassing routes
18:49 sri a route condition could work for your case
18:49 yko sri++
18:49 sri if you want to extend routes
18:50 yko if you need to catch only single path - better do that from controller's action
18:50 sri $r->route('/rpc')->via(json_rpc => 1);
18:50 sri ops
18:51 sri $r->route('/rpc')->over(json_rpc => 1);
18:51 sri the condition can then set all the stash values it needs
18:51 non ok
18:51 sri http://mojolicio.us/perldoc?Mojol​icious/Guides/Routing#Conditions
18:51 non so i can just overwrite controller and action in stash?
18:52 sri those are in #captures
18:52 sri $captures
18:52 non i think i understand my alternatives.. dispatch from action, hook or condition. one step is unclear:
18:53 non howto set new destination?
18:53 sri depends what your destination is
18:53 sri controller + action?
18:53 non yes
18:53 sri $captures->{controller} = 'foo'
18:53 sri for the condition solution
18:53 non a... ok
18:53 non and for the action?
18:53 sri for the other two you would do everything manually
18:54 non ok
18:54 sri $captures->{action} = 'bar' :)
18:54 non sure..
18:54 sri you can make the whole thing a plugin too
18:54 non then i prefer the condition... there's also an example how to put it into an plugin... i like that
18:55 * sri nods
18:55 non thank you very much till here...
18:55 sri you could also get much more creative
18:56 non yeah.. i like to understand mojo much more...
18:56 sri $r->route('/rpc')->over(json_rpc => 'foo.bar')->to('bar#baz'); $r->route('/rpc')->over(json_rpc => 'yada.yada')->to('bar#yada');
18:56 non i stumbled over it 2 days ago...
18:57 sri those could even work in lite :)
18:57 sri get '/rpc' => (json_rpc => 'foo.bar') => sub {...};
18:57 non what's the ->to for, here?
18:57 sri controller and action
18:57 alnewkirk joined #mojo
18:57 non only executed if json_rpc condition is true..
18:58 sri right
18:58 non ok. that means one route per controller/action combination... right
18:58 sri it's one of the possibilities
18:59 sri the advantage is that it would go well with a Mojolicious::Lite app
18:59 sri since you can dispatch to callbacks
18:59 non i had this idea before.... but i'm unsure about performance and scalability
18:59 sri you could even support both
19:00 sri making json_rpc => 1 a special case that captures controller + action itself
19:00 sri many possibilities :)
19:01 non json_rpc => 1 ... hm...
19:01 non did not understand that :)
19:01 non special case
19:01 purl rumour has it special case is how you make a Computer Scientist quake in fear
19:01 sri from the previous example
19:01 sri ->over
19:01 non yes
19:01 non json_rpc => 'foo.bar'
19:01 non gives the condition a parameter foo.bar
19:01 sri ->over(json_rpc => 1) could capture controller and action
19:02 sri from the json message
19:02 non a
19:02 non cool
19:02 non :)
19:02 non yes
19:02 non i thought you meant it is already a special case...
19:03 non nice
19:03 seb_ left #mojo
19:18 pid joined #mojo
19:34 pid1 joined #mojo
19:36 pid left #mojo
19:37 arthas left #mojo
19:37 seb_ joined #mojo
19:45 snearch left #mojo
20:03 marty_ joined #mojo
20:03 marty left #mojo
20:22 ryan left #mojo
20:29 fhelmber_ left #mojo
20:48 seb_ left #mojo
20:54 mikegrb so, I'm new to mojolicious and am wondering about some functionality similiar to mason subcomponents, I have several actions in a controller, they all run a db query or two throw some data in the stash and then it is rendered with a template... in addition to calling them individualy, I'd like to have a kind of dashboard view where the output ...
20:54 mikegrb ... from each of them is included on one page a push in the right direction would be most appreciated
20:58 alnewkirk left #mojo
20:58 alnewkirk joined #mojo
21:04 sri hmm, think i have to remove IIS support
21:04 sri i'm trying to fix it for about 3 hours now...
21:04 sri doesn't seem worth it
21:09 sri anyone interested in maintaining it?
21:22 sri marcus: you maybe?
21:33 seb_ joined #mojo
21:35 janus` duh
21:36 janus` then i have to tell our admins... i wrote an webif for them
21:37 sri feel free to fix it
21:37 sri i've just stumbled over some inconsitencies in the test cases i can't verify
21:37 sri someone needs to verify every single case
21:39 sri IIS and a lot of time are needed for that
21:41 janus` hell yeah
21:43 janus` maybe better to use another httpd then and proxy to it... hoping iis does at least that easily *g*
21:44 GitHub108 joined #mojo
21:44 GitHub108 mojo: master Sebastian Riedel * 12f90b3 (14 files in 9 dirs): fixed URL merging in Mojo::URL and removed native IIS support for now since it has become unmaintainable - http://bit.ly/fXxxiW
21:44 GitHub108 left #mojo
21:45 janus` it never was!
21:45 sri well, it at least never caused problems
21:46 janus` reminds me that i fixed it once in cat
21:47 janus` including test...
21:47 sri it even changes from version to version...
21:48 janus` heh
21:59 janus` still sad to loose this selling point
21:59 sri nothing i can do
22:01 janus` just stating it while reading the changes and agreeing :)
22:02 non another little question: how do i stop my app rendering and sending exceptions as html?
22:03 non if mode eq 'development' STDOUT/ERR would be nice
22:03 janus` rm -rf log
22:04 non i guess that's a hack for console output. does this also stop rendering and sending html?
22:04 sri why would you ever want to stop html exceptions?
22:05 sri you can make your own exception.html.ep template though
22:05 non because i'm doing jsonrpc... my client does not speak html
22:06 sri then exceptions should be handled on a different layer
22:06 non yes
22:06 sri as in *you* do it
22:07 non in my case a controller died. somewhere this got catched and then comes html
22:07 sri rightm catch it yourself
22:07 sri *-m
22:08 sri but there are more ways
22:09 sri you can also overload render_exception in your controllers
22:09 non means: when i forget a catch, html is sent to a jsonrpc client anyway..
22:10 non overwrite default controller and set this as default?
22:10 sri sure
22:11 non k
22:13 non from another pov: you don't wanna send all this information in production mode, if html or json... i guess, it's less information in production mode, right?
22:14 non yes... ok
22:14 non (tried it)
22:15 perlrocks Twitter: "Maintainer needed for IIS support in #mojolicious. http://t.co/pgAMSWp #perl" --kraih http://twitter.com/kraih/status/27489316041138176
22:34 kaare_ left #mojo
22:39 otaviof left #mojo
22:43 otaviof joined #mojo
22:45 non left #mojo
23:15 kthakore sri: !!! guess what!
23:15 kthakore sri Attempting to close the SDL_Manual grant. Here is the work so far http://bit.ly/hvxc9V
23:22 sri kthakore: neat :)
23:46 perlrocks Twitter: "#Perl #mojolicious app to display #kippo SSH honeypot stats at http://goo.gl/rvrlx - I sense a topic for the next #Glasgow PM meeting ;)" --mfontani http://twitter.com/mfontan​i/status/27512274797199361

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