Camelia, the Perl 6 bug

IRC log for #mojo, 2011-01-10

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

All times shown according to UTC.

Time Nick Message
00:02 ashleydev joined #mojo
00:09 alnewkirk joined #mojo
00:10 diegok sri: I'm reading the log, I think I like 'cb' more than 'do' for a route to a 'cb' :p
00:11 diegok sri: 'to(on =>' reads toon, what about 'to(do =>' ?
00:18 ashleydev left #mojo
00:29 kvorg joined #mojo
01:21 ashleydev joined #mojo
01:38 MojoGuest551 joined #mojo
01:38 MojoGuest551 From: http://news.ycombinator.com/item?id=1277067 (145 hits)
01:38 MojoGuest551 is now known as Zalas
01:38 Zalas left #mojo
01:55 ashleydev left #mojo
03:36 avkhozov joined #mojo
04:04 tl joined #mojo
04:06 tholen42 left #mojo
04:12 alnewkirk wow, mojolicious is looking awesome these days, just created a new app
04:12 alnewkirk woot
05:11 y0j joined #mojo
05:20 alnewkirk wow'd again
05:20 alnewkirk documentation is pretty fly
05:54 daviddelikat left #mojo
05:56 Cyrus left #mojo
05:56 kaare joined #mojo
06:03 ashleydev joined #mojo
06:29 ashleydev left #mojo
07:26 avkhozov left #mojo
07:28 ysyrota joined #mojo
07:34 marcus diegok: yes
07:34 marcus diegok: in fact I did it
07:35 marcus alnewkirk: Yeah, it's looking pretty cool :)
07:35 marcus (perl foundation)++ # documentation grant
07:35 marcus sri++ # Actually completing his grant.
07:40 alnewkirk im sold
07:40 alnewkirk :)
07:40 Christian joined #mojo
07:40 alnewkirk ready to build shit
07:40 Christian morning
07:51 sri moin
07:51 marcus sri: MONGO DB
07:51 marcus :)
07:52 sri WEB SCALE!
07:52 purl web scale is how dhoss's systems function
07:52 sri purl: forget web scale
07:52 purl sri: I forgot web scale
07:53 sri purl: web scale is mongodb and at http://www.xtranormal.com/watch/6995033/
07:53 purl OK, sri.
07:55 koban joined #mojo
07:56 mxey http://www.xtranormal.com/watch/7091415/
08:16 sri hmm, what does $^O say under cygwin?
08:18 sri it seems to not be MSWin32
08:18 sri which results in borked tests :/
08:23 DaTa sri: it's "cygwin"
08:23 sri thanks
08:23 DaTa oh, at least it begins with cygwin http://cygwin.com/ml/cygwin/1999-03/msg00134.html
08:25 sri ok, regex check it is then
08:32 avkhozov joined #mojo
08:33 GitHub70 joined #mojo
08:33 GitHub70 mojo: master Sebastian Riedel * edb3886 (8 files in 5 dirs): fixed tests that can't run on Windows - http://bit.ly/gP11td
08:33 GitHub70 left #mojo
08:36 GitHub2 joined #mojo
08:36 GitHub2 mojo: master Sebastian Riedel * 2e6e74a (2 files in 2 dirs): cleanup - http://bit.ly/eMWsW2
08:36 GitHub2 left #mojo
08:42 otaviof left #mojo
09:01 MojoGuest370 joined #mojo
09:01 MojoGuest370 From: http://news.ycombinator.com/item?id=1277067 (146 hits)
09:02 MojoGuest370 left #mojo
09:03 MojoGuest930 joined #mojo
09:03 MojoGuest930 From: http://news.ycombinator.com/item?id=1277067 (147 hits)
09:04 MojoGuest930 left #mojo
09:09 jamesw left #mojo
09:11 fhelmberger joined #mojo
09:16 MojoGuest286 joined #mojo
09:16 MojoGuest286 From: http://news.ycombinator.com/item?id=1277067 (148 hits)
09:16 MojoGuest286 left #mojo
09:19 fhelmberger left #mojo
09:24 tl left #mojo
09:49 otaviof joined #mojo
10:07 mxey How would a application using Mojo and a handler (not Mojolicous) have to look so I can run it with hypnotoad?
10:07 mxey and how can I run Mojo::HelloWorld?
10:08 sri just like a normal mojolicious app, only using use base 'Mojo';
10:09 sri helloworld is the default if you don't give it something to run
10:10 sri as in just typing "hypnotoad"
10:10 mxey Then I get a usage message.
10:10 mxey arbiter:def 10950  ~ % hypnotoad
10:10 mxey usage: /home/mxey/perl5/bin/hypnotoad [OPTIONS] [APPLICATION]
10:10 sri oh right
10:10 sri as in "hypnotoad /usr/local/bin/mojo" or so then :)
10:11 mxey That looks better, thanks
10:14 verrens joined #mojo
10:32 perlrocks Twitter: "jQuery is / js / jquery.js 取Remasu on. (Cf. Mojolicious:: Static) / Mojolicious:: Lite and Data:: Model with AJAX and jQuery I made a chat - Sunday program ... http://htn.to/uiZY2b" (ja) --kits_ http://twitter.com/kits_/status/24413330114355200
10:33 fhelmberger_ left #mojo
10:39 Akron joined #mojo
10:53 Akron Hi - I'm wondering if this is the desired behaviour: In https://gist.github.com/772635 when I request '/foobar' the nested route for '/foo/bar' is triggered.
10:54 Akron I think this wasn't the behaviour some weeks ago ... broke one of my routes unfortunately.
10:56 mxey OK, I created this Mojo app: http://sprunge.us/FjVO but when trying to run it with Hypnotoad, I get this error: http://sprunge.us/jeiH
10:59 sri Akron: could be a bug
10:59 purl No, it's a feature.
11:00 Akron sri: Maybe something regarding the Mojo::URL rel/abs-thing?
11:00 sri Akron: likely
11:02 sri mxey: thats non standard stuff, i'm afraid you're on your own there
11:02 Akron Hm. I for now introduced an additionally nested route for this case, but ... maybe this broke some serious things ... hmm ...
11:02 mxey sri: Using Mojo standalone is non-standard stuff?
11:03 Akron mxey: Same behaviour with "base" instead of "parent"?
11:03 sri mxey: turning it into a single file script
11:03 mxey Akron: Yes.
11:04 mxey sri: That is not necessary. I am just lacking a good example on how to write an application that just is a handler method and run that with Hypnotoad.
11:04 sri mojo generate app
11:04 sri s/Mojolicious/Mojo/
11:04 sri voila
11:05 sri but actually, i think using plain Mojo has become non standard stuff
11:05 sri doubt anyone here has experience with it
11:06 mxey You? :P
11:06 mxey sri: Thanks, your suggestion works :)
11:07 sri not me either
11:07 mxey If I get this to work, I invite you to promote my work as an example :P
11:07 Akron sri: Someday someone will create a cgi-optimized Minilicious I guess! ;)
11:07 sri not sure i want to :)
11:09 sri Akron: thats what i made the layer for, but now i doubt it will happen
11:09 sri people are lazy and get used to the luxury of the mojolicious layer
11:10 yko sri: layer?
11:10 purl layer is, like, used to format stuff on an html page... or <reply> mmmm, polypeptide layer cake, with mint frosting
11:10 sri and with a little effort mojolicious itself can easily be made a few 100% faster
11:10 sri yko: the Mojo.pm layer
11:10 yko ooh....
11:10 Akron sri: people sometimes have too much time! :)
11:10 sri yko: i'm sure you still remember when the Mojo.pm layer had generator commands too :)
11:11 yko yes :)
11:11 yko i even thought about CGI optimization, maybe you even remember that
11:11 sri people with too much time please use NYTProf on Mojoliicous before writing your own micro framework! :)
11:12 Akron sri: Haha! Good point! :)
11:12 yko i even cloned Mojolicious and named it Mojo::Lighter or somehow like that
11:12 sri routes for example have never seen any optimization
11:12 sri yko: haha, i think i remember
11:12 yko and made it laucnch 45% faster in cgi mode
11:13 jwang joined #mojo
11:13 yko i mean with real page rendering but w/o database
11:13 yko but than i get few interesting ideas, got one or few vps and damn, i forget about cgi (perhaps forever)
11:14 perlrocks Twitter: "Mojolicious:: Lite and Data:: Model with AJAX and jQuery I made a chat - it filtered its programmers Isuzu http://bit.ly/dXYMfr Sunday" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/24423722643365889
11:14 Akron sri: Is the gist good enough for bug fixing or do I have to make a test ... ? ;)
11:15 sri cgi is fading away, finally
11:15 sri Akron: should be enough, already got an idea what could cause it
11:16 Akron sri: Great! Thanks!
11:34 baton8 left #mojo
11:40 koban left #mojo
11:41 koban joined #mojo
11:41 avkhozov left #mojo
12:17 GitHub77 joined #mojo
12:17 GitHub77 mojo: master Sebastian Riedel * fb38f23 (3 files in 3 dirs): fixed nested route bug - http://bit.ly/fK43xE
12:17 GitHub77 left #mojo
12:17 sri Akron: fixed
12:19 sri was just some code i forgot to remove after the big relative path fix
12:23 crab what was the nifty new way to write a not-found route for a specific path?
12:24 crab $r->route('/')->to(cb => sub { shift->render_not_found }) is what i had, but istr there was some newer way that's in 1.0
12:25 * sri scratches head
12:26 sri are you refering to $r->any('/' => sub { shift->render_not_found }); ?
12:27 crab yeah, maybe. would ->any(sub { ... }) also work and catch every path?
12:27 sri no
12:27 sri $r->any('/(*everything)' => sub { shift->render_not_found });
12:28 breaker313 joined #mojo
12:29 sri actually i think ->any(sub { ... }) is equal to ->any('/' => sub { ... })
12:31 crab it does with not an array reference at routes.pm:350
12:31 crab dies
12:34 perlrocks Twitter: "#perl Mojolicious url_for: absolute path http://goo.gl/DolYk" --perloop http://twitter.com/perloop​/status/24443939440295936
12:39 GitHub108 joined #mojo
12:39 GitHub108 mojo: master Sebastian Riedel * 844be08 (3 files in 3 dirs): fixed small any route bug - http://bit.ly/gYSYcU
12:39 GitHub108 left #mojo
12:39 sri crab: fixed :)
12:42 josh left #mojo
12:47 crab :)
12:59 yko oh... i told people would be confused with relative urls paths ... -_-
13:01 sri yko: since 1.01 it should mostly work like before
13:02 sri yko: but what are you refering to?
13:02 sri (who is confused?)
13:04 sri http://www.turnkeylinux.org​/blog/beautiful-python-code # lol, kind of ironic how ugly that one example in the article is
13:05 sri __new__
13:07 yko those guy from twitter post above
13:08 yko i believe this question will appear from time to time
13:08 yko maybe it worth a note in documentation for url_for or something like that
13:08 sri http://stackoverflow.com/questions/464​6689/mojolicious-url-for-absolute-path
13:08 sri ?
13:08 daviddelikat joined #mojo
13:08 sri he assumed catalyst uri_for semantics, of course he is confused
13:09 sri yko: feel free :)
13:10 sri a recipe explaining more aspects of url_for surely wouldn't hurt
13:11 daviddelikat1 joined #mojo
13:12 ispy_ left #mojo
13:14 daviddelikat left #mojo
13:15 * yko is feeling realy free now!
13:17 Akron sri: Thanks for the fix!
13:18 * sri chains yko to the channel
13:18 yko -_-
13:20 tholen joined #mojo
13:22 arthas joined #mojo
13:24 koban left #mojo
13:25 Drossel joined #mojo
13:25 Kulag left #mojo
13:26 tholen left #mojo
13:44 breaker313 left #mojo
13:47 crab isn't shift->render_text("Foo") supposed to return text/plain?
13:48 marcus sri: kinky
13:52 crab it seems it is supposed to. but it doesn't.
13:52 marcus FEATURE!
13:52 purl feature is see bug
13:54 sri we default to html like forever
13:55 moritz can't be that long
13:56 moritz because I still remember text/plain, and I haven't been doing mojolicious for quite that long :-)
13:57 crab the documentation still says text => ... should result in text/plain, and anyway what default is this?
14:02 sri crab: where?
14:03 sri "Render the given content as plain text, note that text will be encoded."
14:03 sri thats what i have
14:03 MojoGuest288 joined #mojo
14:03 MojoGuest288 From: http://news.ycombinator.com/item?id=1277067 (149 hits)
14:03 crab Mojolicious::Controller's entry for render_text says "Render the given content as plain text", and ::Guides::Rendering shows {text=>'Hello!'} -> 200 OK, text/plain, 'Hello!'
14:05 sri hmm, wonder where that is coming from
14:05 sri i highly doubt it changed
14:05 marcus humm
14:05 marcus https://github.com/kraih/mojo/issues#issue/56
14:05 marcus anyone understand how that relates to my plugin?
14:05 MojoGuest288 left #mojo
14:06 crab like moritz, i seem to remember actually getting text/plain output from mojo in the past, but i can't be absolutely sure
14:07 crab but well, how can i get it to serve text/plain now?
14:08 marcus oh, it's *not* a issue on my plugin
14:08 * marcus is blind
14:08 sri crab: format => 'txt'
14:09 sri crab: i don't remember making any changes to content types in a very long time (besides the UTF-8 fix)
14:10 kvorg left #mojo
14:11 crab well, do you think ->render_text() should return html?
14:11 crab if so at least the very first examples in the rendering guide need to be changed
14:12 sri thats right
14:13 alnewkirk left #mojo
14:14 sri gonna make the render_text description also a little less misleading
14:14 crab i think all the ->render_text('hello world!') examples are also misleading, simply because the content being served is not html
14:15 crab fixing those is going to be ugly
14:15 sri i disagree
14:15 sri serving broken html in examples is fine
14:15 crab it's not that it's not syntactically valid html. i don't care about that.
14:16 crab it's because the "render_text" says "text" and the argument (showing no signs to the contrary) also reinforces that.
14:16 sri you're interpreting too much meaning into it
14:17 sri render_text is the opposite of render_data
14:17 sri we need both because Perl sucks
14:17 crab oh?
14:17 sri render_text could have been called render_chars too
14:17 moritz so it's characters vs. binary?
14:17 sri yea
14:18 sri it had never any relation to a content type
14:18 sri just the perl data
14:19 Drossel left #mojo
14:19 Kulag joined #mojo
14:20 crab sri: ok, i can live with that behaviour easily, but there should be some specific mention in the documentation of this
14:20 crab e.g. what you just told me
14:20 sri "15:14] sri: gonna make the render_text description also a little less misleading"
14:20 sri :)
14:21 chansen perhaps render_data is better named as render_(bytes|octets) ?
14:21 crab s/a little/a lot/ please. do you want me to propose wording?
14:22 sri chansen: yea, doesn't look as nice though :(
14:22 crab chansen: well, render_data is hardly the problem, so renaming it wouldn't help :-)
14:22 chansen sri: I agree, looks ugly
14:23 kaare left #mojo
14:23 sri the only problem with render_text is that it can be misleading regarding the default content-type
14:24 crab yes
14:29 ashleydev joined #mojo
14:32 GitHub58 joined #mojo
14:32 GitHub58 mojo: master Sebastian Riedel * f823d2b (2 files in 2 dirs): pod cleanup - http://bit.ly/fdKco6
14:32 GitHub58 left #mojo
14:33 sri crab: that should be better
14:47 pyr left #mojo
14:50 crab sri: as a concession to people who may have been misled earlier, i'd suggest explicitly saying "This does not have anything to do with the content-type, which defaults to text/html. To serve text/plain, specify format => txt explicitly"
14:52 kaare joined #mojo
14:56 Akron sri: I would explicitly refer to the binary character of render_data in render_text by describing it as: "See C<render_data> for rendering binary code."
14:57 sri crab: maybe
14:57 Akron s/code/data/.
14:57 sri Akron: i think people should know how perl works
14:58 sri encoding or not encoding is the real decision they need to make
14:58 crab $app->plugin('x') looks for Mojolicious::Plugin::X and 'Foo::Bar' looks for just plain Foo::Bar?
14:58 Akron sri: Technically it works like the "binary" operator - that's what I wanted to say.
14:59 crab binary operator?
14:59 Akron binmode.
14:59 purl binmode is prepare binary files on old systems or cramming my noggin full of disinfotainment or significant on OS/2. or significant on DOS (i.e., Windows) and on MacOS (pre-X)
15:01 chansen In Perl it's not possible to tell the difference between a upgraded string from a decoded one (assuming code-points is within Latin-1)
15:04 Akron Yeah ... well ... okay. Forget what I said.
15:07 chansen to give a example: 'utf8::upgrade(my $x = "\xFC"); utf8::decode(my $y = "\xC3\xBC"); print $x eq $y;'
15:09 a|newkirk[assoc] joined #mojo
15:11 perlrocks Twitter: "Mojolicious convo with @Creativesacred... let's rock the week! Now its @DJNoreenKhan time, let's crank BBC Asian Network" --DecadenceDesign http://twitter.com/DecadenceDe​sign/status/24483375632879616
15:11 crab is what i said about plugins above correct?
15:11 crab heh, BBC Asian Network.
15:16 a|newkirk[assoc] is now known as alnewkirk
15:23 jfuller joined #mojo
15:25 Akron chansen: You are right. It's not the correct translation of binmode.
15:33 ashleydev left #mojo
15:37 Christian cu all
15:38 Christian left #mojo
15:42 ashleydev joined #mojo
15:44 alnewkirk can someone help me understand bridges and waypoints?
15:44 alnewkirk we need more documentation of those
15:44 marty https://github.com/kraih/moj​o/wiki/Helpful-Code-Snippets
15:48 ashleydev left #mojo
15:52 alnewkirk marty, after reading, i still dont see the diff (if im reading the original POD correctly
15:53 alnewkirk i understand what they do, i guess i dont understand the difference between them
15:53 alnewkirk that not really explained
15:53 alnewkirk thats*
15:56 alnewkirk from what i've read, i can use ....
15:56 alnewkirk my $foo = $r->bridge('/foo')->to(...); $foo->route(...);
15:56 alnewkirk my $foo = $r->route('/foo')->to(...); $foo->route(...);
15:57 alnewkirk to get the same result
15:59 otaviof left #mojo
15:59 crab what? no
16:00 crab a bridge is like an on/off switch to some route
16:01 crab if the route you want is on the other side of a bridge, you have to pay the troll to get to it
16:05 alnewkirk ummmmm, still doesnt help me understand the difference
16:10 yko alnewkirk: have you red Routing Guide? especially Waypoints and Bridges sections?
16:11 crab is red routing what the russians do?
16:11 alnewkirk yko, yes, it doesn't go into much detail, do you have a link
16:11 kaare left #mojo
16:14 alnewkirk how is it that Mojoliciousness escaped me all this time? (me likey)
16:14 marcus alnewkirk: We're wondering too. :)
16:15 marcus sri: I was thinking, since helpers now work everywhere, it is a bit weird that they are added in the renderer
16:15 marcus maybe make a shortcut in the app to add_helper?
16:15 sri marcus: umm, we've had that for ages ;p
16:15 marcus oh.
16:15 yko http://mojolicio.us/perldoc?Mojolicious#helper
16:15 yko marcus: ^^
16:15 sri documentation uses it exclusively
16:15 kaare joined #mojo
16:15 marcus super
16:15 sri :)
16:16 marcus guess I cargo culted renderer->add_helper
16:16 sri yea, you surely won't see it anywhere in 1.0
16:17 sri even hooks have a shortcut now
16:17 sri app->hook()
16:17 yko i found that pointing newbies to a docs with a link makes me read that docs from time to time
16:17 yko and you know what: i found many useful things there!
16:18 sri \o/
16:18 yko ye!
16:18 yko sri++
16:18 sri maybe if i linked more i would forget less!
16:19 marcus sri: btw, what about a quick note about MOJO_LOG_LEVEL in Mojo::Log pod?
16:19 marcus it's probably something people wonder about when they look at the logging docs
16:20 sri dunno
16:20 sri http://mojolicio.us/perldoc?Mojolici​ous/Guides/Cheatsheet#MOJO_LOG_LEVEL
16:20 marcus Yeah, I know exists there
16:21 chansen yko: I guess the question is: should it or not be expected of a newbie to be familiar with perl's oddities as it latin-1 character handling
16:21 sri wouldn't hurt i guess
16:22 chansen I don't mind the expectation since I know how it works =)
16:22 sri the oddities might be a bit much, but chars vs bytes has to be expected these days i think
16:22 chansen where do you draw the line.. ?
16:24 alnewkirk back
16:25 alnewkirk reading backlog
16:25 sri would be nice to have a tutorial for the topic somewhere to point people to
16:25 crab which topic?
16:25 sri chars vs bytes
16:26 sri i keep linking to slideshare when someone asks
16:26 alnewkirk sri, whats the difference between bridges and waypoints as they relate to routes?
16:26 yko chansen: what that related to? anyway, if you are not en-en, you are familar with that thing (or going go)
16:26 sri http://www.slideshare.net/Penfold/perl-and-unicode
16:27 sri alnewkirk: bridges run always, waypoints on partial match
16:27 alnewkirk oh oh oh :)
16:28 alnewkirk so bridges are like the hideous catalyst chained() method
16:28 sri waypoints are basically optional route endpoints, and get skipped if a more specific route matches
16:28 ispy_ joined #mojo
16:28 alnewkirk ah
16:28 sri not really
16:29 sri i think it was begin and auto in catalyst
16:29 * sri barely remembers
16:29 yko oh. that is what i need to check for better know this point
16:29 sri it's mostly used for authentication or to prepare something
16:29 kaare left #mojo
16:30 sri alnewkirk: "under" in Mojolicious::Lite is actually a bridge
16:30 crab i can't think of a good use-case for waypoints, can anyone help?
16:30 sri crab: they are rarely used
16:30 kaare joined #mojo
16:30 yko sri: not so, as you can think :p
16:31 sri alnewkirk: http://mojolicio.us/perldoc?Mojolicious/Lite#Under
16:31 sri bridge are the swiss army knife of routes :)
16:31 sri *+s
16:32 yko btw, Lite doesn't have waypoints, ye?
16:32 sri right
16:32 marty *loves bridges.  :)
16:32 alnewkirk cool, i understand
16:32 sri waypoints are quite abstract, most people can just ignore them
16:33 alnewkirk sri, is under effectively $r->bridge('/')->to(cb => sub{});
16:34 sri alnewkirk: almost exaclty
16:34 alnewkirk i see now, bridges kick ass ... also, way-back-when ... bridges scared me from using Mojolicious :/
16:35 sri a more beginner friendly introduction would be more than welcome *hint hint*
16:35 alnewkirk :)
16:36 alnewkirk http://mojolicio.us look and feel along with the framework makes me proud of Perl again, we need more ...
16:36 sri hmm, waypoints should maybe have a warning, to let people know they are not so important unless you're into very abstract stuff
16:36 sri \o/
16:37 marcus isn't waypoints more like catalyst chained?
16:37 marcus abstract and complex, I mean :)
16:37 josh joined #mojo
16:37 sri actually even semantically
16:38 sri who knows, maybe there's a cool higher level use for waypoints that still wants to be discovered
16:40 alnewkirk in the routing table, does waypoint() and bridge() always create a starting point?
16:40 * yko giggles
16:40 alnewkirk e.g. could one do, route() ... waypoint() ... routes()
16:40 sri alnewkirk: nope, they can be anywhere in a route tree
16:41 alnewkirk cooler
16:41 sri the start point thing is under specific
16:41 alnewkirk i see
16:41 sri to limit complexity in lite apps
16:42 alnewkirk mojolicio.us, we need search capabilites (even custom google search would suffice)
16:43 ysyrota left #mojo
16:45 alnewkirk where would one find redirect(), Mojo::Message::Request?
16:45 crab Mojolicious::Controller
16:45 chansen yko: I'm familiar with perl's internal representation of wide characters, but the question whether or not to expect it from newbies (perl's model of wide characters differs alot from other languages)
16:45 sri redirect_to?
16:45 purl redirect_to is, like, trying to redirect to ""  i'm not getting a uri out of uri_for
16:45 crab well, it's redirect_to
16:46 alnewkirk chansen++
16:47 yko sri: https://gist.github.com/773023
16:48 chansen sri: perhaps we should do a joint effort in explaining unicode from a perl perspective (I can do the draft but you know my english skills lacks a certain foo ;)
16:49 marcus is $c->param case sensitive?
16:51 yko marcus: yes: perl -MMojo::Parameters -e 'print Mojo::Parameters->new(foo => "bar")->param("Foo");'
16:53 * marcus sues
16:53 crab whom are you suing?
16:53 su-bzero[A] is now known as su-bzero
16:54 marcus crab: The alphabet
16:54 purl hmmm... the alphabet is overrated anway or http://www.underconsideration.c​om/speakup/archives/002383.html or http://www.splashhall.org/poetry​_forums/index.php?topic=14076.0
16:55 chansen heh
16:55 sri chansen: heh, you should know my english lacks a certain foo too :S
16:56 yko marcus: that example is wrong a bit, but param is case sensitive anyway
16:56 sri upper case should be illegal
16:57 yko oh. in Controller param() call return captures if it exists?
16:58 chansen I don't see how it could be otherwise, should foo=bar&Foo=baz equal foo=[bar, baz] ?
16:58 sri yko: you wanted to make /waypoint and /waypoint/ lead to two different endpoints?
16:59 yko actually what i want is to have clean routing tree.
17:00 sri yko: elaborate please
17:00 yko one moment, you know im so slow...
17:00 marcus yeah, better give him two minutes
17:00 * sri upgrades yko
17:02 avkhozov joined #mojo
17:02 yko actually what i whant to have it's something like my $w = waypoint('/foo'); $w->get->to(); $w->post->to(); $w->get('/bar')->to()
17:02 sri yko: waypoint makes no sense then
17:03 sri my $w = $r->any('/foo'); or my $w = $r->route('/foo');
17:04 yko 1. in waypoint  you can define stuff like controller 2. in can help keep route tree clean 3. i'm lazy to type '/foo' more than once
17:04 sri you're misunderstanding waypoint
17:04 yko but i don't argue that it's doubtfully point
17:05 sri my $w = $r->route('/foo');
17:05 yko oh, you see, i'm going to recover :)
17:05 sri that does exactly what you want
17:05 sri basic nested routes
17:05 yko umm... thanks ill try
17:06 sri even my $w = $r->route('/foo')->to(lalala => 'yada'); works
17:06 crab yko?: you can even do $w = $r->route('/foo')->to(controller=>"blah");and still $w->...
17:06 crab yeah, what he said
17:06 crab s/\?//
17:07 sri :)
17:09 mattastrophe left #mojo
17:12 sri yko: updated today?
17:12 sri yko: because i can't replicate your test case
17:12 yko not sure, moment
17:12 sri maybe the route fix earlier already took care of it
17:12 yko that would be perfect :)
17:13 yko btw, looks like route() was what i really need last year
17:13 yko sri++
17:13 yko i'm so slow... -_-
17:16 yko no, it's still there. mojo generate app Foo; place routes from gist to lib/Foo.pm; script/foo get /waypoint
17:16 yko i think ill write normal test for that later, just nevermind
17:21 sri yko: is it important that there are post and get endpoints?
17:22 yko no. single get('/') after waypoint is quite enough
17:24 baton8 joined #mojo
17:24 GitHub12 joined #mojo
17:24 GitHub12 mojo: master Sebastian Riedel * 73c43a0 (1 files in 1 dirs): added some waypoint tests - http://bit.ly/hpuB4U
17:24 GitHub12 left #mojo
17:33 kaare left #mojo
17:35 kaare joined #mojo
17:39 sri yko: oh, deep recursion happens for empty waypoints too
17:39 yko https://github.com/yko/mojo/commit/d66​15cdbc88806579534d8c94935ab92aaf3f38b
17:40 yko empty waypoint? oh...
17:40 yko damn, i should check that
17:42 * crab tries to suppress his sudden desire for controller plugins
17:44 kaare_ joined #mojo
17:45 kaare left #mojo
17:45 MojoGuest2 joined #mojo
17:45 MojoGuest2 From: http://www.google.de/search?hl=de&amp;so​urce=hp&amp;q=websocket+demo&amp;aq=f&am​p;aqi=g1&amp;aql=&amp;oq=&amp;gs_rfai= (1 hits)
17:47 sri crab: you can have full applications in plugins ;p
17:47 MojoGuest2 hey
17:47 * sri waves
17:47 MojoGuest2 is this native websocket ?
17:48 yko depends on your browser, i think
17:48 otaviof joined #mojo
17:48 MojoGuest2 fox4b8 still trying to connect
17:48 MojoGuest2 chrome9 works well :)
17:49 sri firefox has websockets disabled now
17:50 sri to prevent early adoption of the protocol
17:50 MojoGuest2 anyone running a websocket server?
17:50 MojoGuest2 and if... which prot?
17:51 crab sri: what, how?
17:51 yko crab: http://hacks.mozilla.org/2010/12/​websockets-disabled-in-firefox-4/
17:51 sri crab: http://mojolicio.us/perldoc?Mojolicious​/Guides/Routing#Embedding_Applications
17:51 yko oh. you mean that :)
17:52 sri it's very advanced stuff
17:53 sri detour is still experimental
17:53 yko an i think nobody tested it in real life yet :(
17:53 sri vry unlikely
17:54 sri *+e
17:54 sri it has rather good tests though
17:54 sri https://github.com/kraih/mojo/blob/mas​ter/t/mojolicious/embedded_lite_app.t
17:55 kaare joined #mojo
17:56 sri the original use case was to have lite apps in controllers
17:56 sri for fun
17:57 yko but one day i believe somebody will write full-featuread app with a plugin to load in in detour
17:57 yko or something like that
17:57 sri actually i could see that getting used for pluggable content management systems and the like
17:58 sri add a forum app with a plugin under /forum
17:58 kaare_ left #mojo
17:59 crab yum!
18:00 achromic left #mojo
18:00 crab that is _exactly_ what i need!
18:00 achromic joined #mojo
18:01 s0va omfg, sri, what's the problem between you and catalyst guys?
18:01 s0va i just mentioned mojolicious on #perl-help and olmost got kicked from the channel...
18:01 sri lol
18:02 * crab writes an embedded application plugin
18:03 sri s0va: actually i have no problem with any of the old catalyst people, except for mst
18:03 s0va oh, what a coincidence, it was mst
18:03 s0va :)
18:04 sri marcus and chansen here were two of the earliest committers
18:05 s0va left #mojo
18:05 s0va joined #mojo
18:06 sri especially with chansen i've had so many fights, but there's no bad blood, no idea what's the problems with mst
18:06 marcus yeah, I don't get it.
18:06 crab it's the three-letter nicks
18:06 marcus it's fine if he doesn't want to use mojo, but I don't understand why he fights against it.
18:06 marcus aha!
18:07 marcus yko and vti will be your new arch enemies!
18:07 sri :O
18:07 yko bwahaha
18:11 sri is now known as srilicious
18:12 srilicious three letter nicks are forbidden from now on!
18:12 s0va maybe stupid question...
18:12 kaare left #mojo
18:12 s0va is there any way to unload perl module in runtime and replace it with another?
18:13 srilicious no clean way
18:13 chansen bad blood (would that be green or blue? ;-), we have had our disagreement on technicality and subjectively syntaxilly issues, but the past disagreements hasn't kept us apart ;P
18:13 s0va only *{somehting}{CODE} stuff isn't it?
18:14 * srilicious hugs chansen
18:14 crab syntaxilly?
18:15 yko s0va++ # for AE porting and for discussion in #perl-help
18:15 crab AE porting? (AnyEvent?)
18:15 s0va crab: yes.
18:15 crab what about it? i mean, what did you port?
18:15 srilicious s0va: https://github.com/kraih/mojo/blo​b/master/lib/Mojo/Loader.pm#L138
18:16 yko crab: Mojo::IOLoop to AE
18:16 yko or contrary :)
18:16 s0va wtf is %DB::sub =?
18:16 crab url?
18:16 s0va yko: i'll post it to github
18:17 srilicious ugly ugly debugger hacks
18:17 chansen crab: subjective perl syntax code issues, same shit but different ;P
18:17 s0va rightnow it works if i add use AnyEvent::Mojolicious::IOLoop before use Mojolicious::Lite
18:17 crab so now i can use AnyEvent cleanly with the mojo ioloop?
18:17 perlrocks Twitter: "Mojolicious - Web framework for Perl http://www.findbestopensour​ce.com/product/mojolicious # opensource" (id) --bestopensource http://twitter.com/bestopenso​urce/status/24530264445161472
18:17 crab neat.
18:17 yko s0va: that would be great
18:18 s0va crab: chansen the whole ioloop api is implemented using anyevent.
18:18 s0va just a second, i'll create git repo.
18:18 avkhozov left #mojo
18:19 chansen s0va: I'm not sure I'm following you...
18:20 avkhozov joined #mojo
18:21 yko it was my dream, or sri really agreed to add something like $ENV{MOJO_IOLOOP_CLASS} variable?
18:21 srilicious i'm not sure it's that easy
18:21 srilicious unless you can instantiate as many anyevent mainloops as you want
18:22 srilicious we use multiple ioloops to emulate blocking
18:30 * chansen Pringles is totally underestimated of it's powers ;P
18:31 s0va https://github.com/bfg/anyevent-mojolicious
18:31 s0va here you go.
18:32 s0va yko: it was in your dreams :)
18:32 s0va and it should stay that way.
18:33 s0va please, don't laugh and please excuse my for my usage of \t as tab delimiter.
18:33 s0va and as i said => it fucking ALPHA!
18:34 seb_ left #mojo
18:35 srilicious ok, so you can't have multiple instances
18:36 srilicious that will turn out to be a problem
18:36 s0va srilicious: you can run multiple instances of ae mojo ioloop
18:37 s0va becouse run() shouldn't block.
18:37 s0va well start() shouldn't block
18:37 s0va on_tick() is not implemented yet.
18:38 srilicious but we depend on start blocking
18:38 s0va If you are familiar with some event loops you will know that all of them require you to run some blocking "loop", "run" or similar function that will actively watch for new events and call your callbacks.
18:38 s0va AnyEvent is slightly different: it expects somebody else to run the event loop and will only block when necessary (usually when told by the user).
18:38 srilicious for example my $tx = Mojo::Client->new->get('http://mojolicio.us');
18:39 srilicious in this case we currently use a secondary ioloop and emulate blocking
18:39 crab oh gh0d, don't say app->secret(rand())
18:40 s0va crab: calm down, it's just an example :)
18:40 srilicious is now known as sri
18:40 yko lol
18:41 yko it's a srip-tease
18:42 ashleydev joined #mojo
18:42 stephan48 should work crab, as long as you dont use signed cookiesss.....
18:42 sri hmm
18:42 yko or reload your app... ever
18:42 * sri needs Pringles
18:42 kaare joined #mojo
18:44 s0va btw: i hurt my legs badly on that saturday's night march in mountains, i was almost unable to walk.
18:44 s0va i'm getting old, i guess...
18:46 * yko havent walk to mountains for three years
18:46 yko Feeling bad about it
18:47 crab which mountains/
18:47 s0va eh, nothing special, just our local alps.
18:48 s0va however, that route is quite long... 25km with 3000m of height variance.
18:48 yko hehe, we have very old flat mountains in crimea and carpathians
18:48 yko i prefer first ones because of sea
18:49 s0va ours are also quite old; our highest mountain is only 2864m tall.
18:49 yko ye, something like that. but 1500m :)
18:50 crab it's been a year since i was up at any altitude. i'd better get back into shape for another go next winter or so.
18:50 crab fortunately i have some new high mountains :)
18:51 yko but that air, that grasses. i love to sleep on the top of mountain between old mountain pines, when wind rustles in long needles so much...
18:51 s0va your girlfriend's boobz?
18:51 crab if that's what you want to call the himalayas, sure
18:52 seb_ joined #mojo
18:52 crab yko: have you seen dovzhenko's "earth" with the wind and all that grass?
18:53 yko ohm, my shame :)
18:54 Akron left #mojo
18:54 yko not sure i really want to. it describes damn sad events in my country
18:56 s0va yko: georgia?
18:56 purl georgia is in the south. next to south carolina. dummies!
18:56 yko s0va: ukraine, kiev
18:57 s0va oh :) i almost said "close enough", but then i reminded myself that ukraine is a fucking vast country :)
18:58 yko haha :) ye
18:59 s0va almost 604 square kilometers?! omfg, that's 30 x our country.
19:00 yko s0va: ye, it's really big, but poor because of that
19:00 yko actually it's just a territory between europe and russia, a buffer zone
19:01 crab i think you mean 604 THOUSAND square kilometres
19:01 s0va yeah.
19:02 crab 604 sq. km. is smaller even than the city i live in :)
19:11 yko crab: reviewed some from "earch". i spent my childhood in similar lands
19:20 s0va sri: your _unload works for me.
19:20 s0va sri: where did you get documentation for that nasty %DB?
19:21 sri i'm not sure it is documented
19:21 s0va perlguts, nope.
19:22 yko http://mojolicio.us/perldoc?DB#Global_Variables ,
19:22 sri yko++
19:22 yko i love perldoc!
19:23 s0va everyone does...
19:23 s0va question about perldoc renderer?
19:24 s0va is it possible to place it somewhere else than /perldoc?
19:24 s0va not found answer in pod docs...
19:24 sri don't think so
19:25 ashleydev left #mojo
19:26 s0va foreach my $key (keys %DB::sub) { print $_, "\n" }
19:27 s0va prints nothing... however; however _unload works.
19:27 s0va this is really funny :)
19:27 yko s0va : check your code
19:28 yko my $key => $_
19:32 yko s0va: perl -e 'BEGIN {  $^P |= 0x10; };  sub x {}; print "$_\n" for keys(%DB::sub);' that is what you missed
19:32 s0va what is that $^P ?
19:32 s0va oh, i'll check perlvar
19:33 yko s0va: youll find nothing ;P
19:33 s0va bfg@k2:~> perl -e 'BEGIN {  $^P |= 0x10; }; foreach my $key (keys %DB::sub) { print $key, "\n" }'
19:33 s0va bfg@k2:~>
19:33 s0va nothing; again :)
19:34 yko s0va: do you have any subs defined?
19:35 yko in that code snipped i mean
19:35 yko try perl -MMojo .... you'd like it
19:35 s0va oh, now it prints something
19:37 GitHub57 joined #mojo
19:37 GitHub57 mojo: master Sebastian Riedel * eb2d5dd (4 files in 4 dirs): fixed small empty route bug - http://bit.ly/fbl5Lo
19:37 GitHub57 left #mojo
19:37 kaare left #mojo
19:37 kaare_ joined #mojo
19:41 yko (Interrupted, maybe a timeout?) is much better than infinite loop :)
19:48 kaare_ left #mojo
19:49 kaare_ joined #mojo
19:55 seb_ left #mojo
19:57 chilts left #mojo
20:04 ashleydev joined #mojo
20:07 s0va left #mojo
20:07 s0va joined #mojo
20:14 yko perl -Mojo -e 'b(g(shift)->build_headers =~ Mojolicious ? "Good page! Yum yum!" : "FFFFFUUUU!")->say' mojolicio.us
20:15 sri :)
20:16 yko pls, don't tell google guys ;)
20:19 * sri tells the google guys
20:19 yko oh... they will cry now :)
20:24 ashleydev left #mojo
20:25 ashleydev joined #mojo
20:32 kaare_ left #mojo
20:32 kaare__ joined #mojo
20:38 lee7 left #mojo
20:46 MojoGuest2 left #mojo
20:46 kaare joined #mojo
20:46 kaare__ left #mojo
20:47 kaare left #mojo
20:47 kaare joined #mojo
20:49 kaare left #mojo
20:50 kaare joined #mojo
20:54 sri oh cool, didn't know about ctrl+alt+command+8 in os x :D
20:57 perlite_ joined #mojo
21:00 perlite left #mojo
21:00 perlite_ is now known as perlite
21:02 avkhozov left #mojo
21:02 alnewkirk left #mojo
21:02 yko i remember now those days working in QuarkXPress, Ctrl+Alt+Shift+F - like hotkeys...
21:03 yko damn! friend send me a link and i want wireless audio system now...
21:04 ashleydev left #mojo
21:05 yko they make it with hdd and wifi...
21:05 yko one day they'll combine audio system with coffee-machine, sex robot and microwave
21:08 sri i'll take two
21:10 yko don't you afraid they'll mix robot with microwave too much? :)
21:13 sri hmm :S
21:17 verrens left #mojo
21:48 Kulag left #mojo
21:49 Kulag joined #mojo
22:03 kaare left #mojo
22:06 seb_ joined #mojo
22:06 seb_ left #mojo
23:10 xantus hey hey
23:10 purl hi, xantus.
23:10 xantus omg purl
23:10 * xantus hugs purl
23:10 * purl smiles
23:29 marcus hi xantus :)
23:37 marcus I got hachi to put her back in.
23:38 marcus http://showmetheco.de/articles/2011/1/mus​tache-like-template-engines-for-perl.html

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