Camelia, the Perl 6 bug

IRC log for #mojo, 2012-05-25

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

All times shown according to UTC.

Time Nick Message
00:12 tempire joined #mojo
01:12 scott joined #mojo
01:14 tempire joined #mojo
01:18 amirite joined #mojo
01:49 xaka1 joined #mojo
01:56 jnap joined #mojo
01:57 GabrielVieira joined #mojo
02:02 d4rkie joined #mojo
02:15 GabrielVieira how to share an object or string between helps (sub routines)? without passing them to each other and with no danger of been seen by a different user?
02:20 GabrielVieira stash :)
03:21 SmokeMachine joined #mojo
04:13 Leandr joined #mojo
04:17 spacebat joined #mojo
04:18 spacebat I've been trying to get a lite app to route as I want it to, but it seemed no matter how I expressed it I could not get a parameter to match in the route
04:19 spacebat turns out changing the name from 'path' to 'filepath' was the trick - so, one can't have a route parameter named path
04:19 spacebat are there other reserved words like that?
04:20 asarch joined #mojo
04:38 GabrielVieira2 joined #mojo
04:40 amirite joined #mojo
05:03 * sri yawns
05:07 spacebat hi
05:07 purl what's up, spacebat.
05:07 spacebat trying to stay awake
05:07 spacebat sometimes work is like that
05:08 * sri waves
05:09 spacebat we're a perl shop here in the marketing dept of the university of adelaide
05:09 Leandr joined #mojo
05:09 spacebat lots of legacy NIH code that we tame and replace with catalyst and mojolicious
05:10 sri full list is here http://mojolicio.us/perldoc/​Mojolicious/Controller#stash
05:11 sri eeep, typo
05:11 spacebat its funny being a tech in marketing - the marketing people don't understand or pretend to poorly
05:11 spacebat better than being in the IT department where they'd be incensed at the notion that they don't understand
05:12 spacebat thanks sri that makes it a lot clearer
05:12 spacebat :)
05:12 sri that list is also linked multiple times from the guides
05:12 spacebat not my day :)
05:13 spacebat perhaps a warning is in order when these special words are used in routes
05:14 spacebat I'd be happy to make a patch if its a good idea
05:16 sri afraid not
05:16 sri many of them are supposed to be usable in routes for special features
05:16 sri especially :path
05:17 sri it is a prefix catching stash value for embedded apps
05:17 spacebat oh ok
05:18 spacebat perhaps an AI to warn when I'm clueless and appear to be stabbing in the dark
05:24 GitHub42 joined #mojo
05:24 GitHub42 [mojo] kraih pushed 1 new commit to master: http://git.io/By5vdA
05:24 GitHub42 [mojo/master] fixed typo in stash description - Sebastian Riedel
05:24 GitHub42 left #mojo
05:28 sri we actually do warn in some cases already https://github.com/kraih/mojo/blob/mas​ter/lib/Mojolicious/Controller.pm#L455
05:30 spacebat classic comment above that sub
05:30 sri :)
05:34 ovnimancer joined #mojo
05:38 sri perl -Mojo -E 'a("/:text")->start' get /foo
05:38 sri even this is a feature
05:43 lukep joined #mojo
06:03 Foxcool joined #mojo
06:13 amirite joined #mojo
06:18 Vandal joined #mojo
06:34 marcus good morning, monsters.
06:56 sri MOO!
07:01 marcus NNST
07:03 batman joined #mojo
07:55 fhelmber_ joined #mojo
07:55 spleenjack joined #mojo
08:16 batman is it possible to find xml tags with namespace using Mojo::DOM::CSS ?
08:16 batman like $dom->at('ns:foo'); ?
08:16 batman i can't seem to make it work, but maybe i'm doing it wrong?
08:17 sri does the tag look like <ns:foo...>?
08:19 sri otherwise it doesn't work
08:21 batman yes
08:25 batman print Data::Dumper::Dumper($dom->tree) looks fine...
08:30 batman https://gist.github.com/2786635 <-- the at(...) returns undef
08:30 sri i wouldn't dumper the tree, print "$dom" usually shows parse errors much better
08:30 batman ok
08:30 batman urk.
08:30 batman typo in the gist :(
08:31 batman i've just updated the gist without the typo in the xml
08:32 spleenjack1 joined #mojo
08:33 sri haha
08:33 batman ?
08:33 sri try ->at('ns\:foo')
08:33 batman works like a charm :)
08:34 batman as expected, or..?
08:34 sri yes, even documented
08:34 batman oh. sorry about the fuzz then :(
08:34 spleenjack1 joined #mojo
08:34 sri http://mojolicio.us/perldoc/Mojo/DOM#at
08:35 sri http://mojolicio.us/perldoc/Mojo/DOM#namespace
08:35 batman oh. i was looking in Mojo::DOM::CSS
08:36 sri it's pretty obvious when you think about it ;)
08:36 sri unescaped : of course stands for pseudoclass
08:36 batman of course
08:36 batman aiai...
08:37 batman thanks
08:38 sri well, i forgot about it too :P
08:41 stephan48 i hate system perls...
08:42 stephan48 /home/stephan/perl5/perlbrew​/perls/perl-5.12.4/bin/perl /home/stephan/perl5/perlbrew​/perls/perl-5.12.4/bin/morbo <script>
08:43 batman sri :)
08:43 stephan48 is my current cmdline for launching one of my apps
08:43 batman stephan48: export PATH="/home/stephan/perl5/perlbr​ew/perls/perl-5.12.4/bin:$PATH"; morbo script
08:43 stephan48 true
08:44 stephan48 thanks
08:44 sri echo "source ~/perl5/perlbrew/etc/bashrc" >> .zshrc
08:44 stephan48 i got that
08:44 sri perlbrew does all that already for you
08:45 stephan48 but sadly i cant switch the full account yet to a perlbrewed perl
08:45 sri the whole point is to have perlbrew take care of ENV switching for you
08:45 stephan48 jup
08:45 sri umm
08:45 stephan48 perlbrew use <ver> works nicely in shell
08:46 stephan48 but not so nicely in scripts
08:46 sri "perlbrew on" and "perlbrew off"
08:47 marcus sri: yay for \:foo
08:49 stephan48 sri: on is now known..
08:50 sri whatever... off should be enough
08:50 stephan48 thanks will think about that
09:05 daxim joined #mojo
09:24 memowe \o/
09:27 sharifulin joined #mojo
09:36 sri \o\
09:37 crab oh?
09:45 nicomen my controllers all return render(json => ...) but I would like to add some hook after the rendering process to for instance return the json as nicely syntax highlighted html if one uses format=html, can I avoid having to define a ( html => ... ) inside every controller in some easy way?
09:48 sri don't think so complicated
09:49 sri just make a render_however_i_want_it helper
09:55 nicomen hm, not sure I get what you mean, I have different structures in different controllers, I don't want to add a html => htmlify_json($some_json_structure) in every controller too. Thought maybe there is a wrap_render hook for the app itself, which could do it if asked from the request
10:00 sharifulin joined #mojo
10:12 sri nicomen: just put that logic into a helper $self->render_json_or_html({hello => 'world!'})
10:12 sri you can even reuse ->respond_to() inside the helper
10:12 nicomen hm, how would I call it from the controller?
10:13 sri "$self->render_json_or_html({hello => 'world!'})"
10:13 nicomen ah, get it, haha'
10:13 nicomen thanks for the obvious answer ;)
10:29 batman when running morbo, i'm getting  "Mojo::IOLoop already running" when trying to do $delay->wait; is there a way to go around that? i'm creating the delay object using $delay = Mojo::IOLoop->delay
10:29 batman i also tried to do $delay = $self->ua->ioloop->delay; but then $delay does not behave as expected
10:30 batman not as expected: $delay->wait; returns before $delay->end is called
10:30 sri you can't use ->wait
10:30 sri just look at the examples
10:31 batman which examples?
10:31 purl which examples are you trying out?
10:31 rem_lex|pivo joined #mojo
10:31 batman $delay->wait unless Mojo::IOLoop->is_running; ?
10:31 purl hmmm... $delay->wait unless Mojo::IOLoop->is_running; is a smaller one
10:32 * sri nods
10:32 batman ok
10:32 batman so i need to use render_later also then?
10:32 sri http://mojolicio.us/perldoc/Mojoliciou​s/Guides/Cookbook#Backend_web_services
10:33 sri http://mojolicio.us/perldoc​/Mojolicious/Controller#ua
10:34 sri i'm a little reluctant about explaining this stuff, it's about as advanced as it gets in mojolicious and should propably not be used if you can't figure it out yourself ;p
10:34 batman yeah, you have told me that before :)
10:35 batman so i try not to ask, hehe
10:35 sri -.-
10:41 d4rkie joined #mojo
11:26 stephan48
11:52 sri hmm, attributes in ruby suck, no idea why everybody considers those pretty
11:58 spleenjack joined #mojo
12:29 Foxcool joined #mojo
12:35 spleenjack joined #mojo
12:50 andrefs joined #mojo
12:53 jnap joined #mojo
13:07 Psyche^ joined #mojo
13:11 GitHub38 joined #mojo
13:11 GitHub38 [mojo] kraih pushed 1 new commit to master: http://git.io/frokJw
13:11 GitHub38 [mojo/master] small test tweaks - Sebastian Riedel
13:11 GitHub38 left #mojo
13:14 nic joined #mojo
13:33 GabrielVieira joined #mojo
13:47 gizzlon joined #mojo
13:49 ysyrota joined #mojo
13:55 mire joined #mojo
13:58 asarch joined #mojo
14:22 Leandr joined #mojo
14:22 ovnimancer left #mojo
14:44 inokenty joined #mojo
15:02 GitHub188 joined #mojo
15:02 GitHub188 [mojo] kraih pushed 1 new commit to master: http://git.io/Boy3zA
15:02 GitHub188 [mojo/master] removed trailing whitespace - Sebastian Riedel
15:02 GitHub188 left #mojo
15:10 ryozi joined #mojo
15:17 xaka1 joined #mojo
15:40 GabrielVieira joined #mojo
15:50 xaka1 joined #mojo
16:27 sri lol, opera and facebook?
16:34 black joined #mojo
16:43 Foxcool joined #mojo
16:48 marty Oh kewl.  I thought 'session' was a reserved stash value but it's not.   So now I can load a record from my mongodb 'customers' collection and save it in the $self->stash('session');  excellent.
16:49 sri http://www.kotusozluk.com/img​/2011/03/excellent_14831.jpg
16:50 marty :)
17:54 rem_lex| joined #mojo
18:12 lammel2 joined #mojo
18:39 tempire hrm
18:40 tempire sri: do you see anything wrong with this -> https://gist.github.com/2789727
18:42 sri tempire: Test::Mojo->new doesn't take attribute values
18:44 tempire doh
18:45 tempire that's strange.  it should at least take ua
18:46 tempire given that it's an attribute
18:46 sri custom ->new
18:46 * sri bonks tempire on the noggin
18:47 * tempire can't be bothered to 8 lines down in the file
18:48 sri it's always in the POD if a class has a custom ->new method
18:48 sri we have a few of those, Mojo::URL for example
18:55 tempire do you know what version prepare_ioloop was removed?
18:55 tempire I'm thinking 2.94, 2012-05-09, 3 months after it was deprecated.
18:55 sri no idea
18:55 tempire oh, nevermind, I can look that up
18:57 sri the p5-mop discussions are really interesting
18:57 sri i hope they end in something useful
19:03 tempire 2.81, looks like
19:12 lammel2 left #mojo
19:16 hide joined #mojo
20:04 lammel2 joined #mojo
20:09 tempire http://lecturefox.com/computerscience/
20:09 * tempire downloads into brain
20:14 * sri replaces lecturefox with reddit
20:21 fibo joined #mojo
20:24 fibo is it planned a porting of Mojo framework on Perl6 ?
20:26 sri once there's a production ready perl6 release... hahahahaha
20:26 fibo sbam
20:27 fibo but can I install Perl6 from CPAN ?
20:27 sri *hint* such a release is at least 10 years away
20:28 sri the perl6 of today is nothing but a toy
20:30 fibo ok so perl5 and JS
20:45 Akron joined #mojo
20:45 espent joined #mojo
21:30 tempire oh my goodness
21:31 * tempire just watched the video game community episode
21:46 mikegrb i no rite
21:46 mikegrb abed pwning the universe
22:02 d4rkie joined #mojo
22:05 rem_lex|pivo joined #mojo
22:17 batman joined #mojo
22:32 fibo_ joined #mojo
23:03 Leandr joined #mojo

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