Camelia, the Perl 6 bug

IRC log for #mojo, 2010-07-10

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

All times shown according to UTC.

Time Nick Message
00:16 ispeak joined #mojo
00:17 ask joined #mojo
00:20 ispeak left #mojo
00:59 ask joined #mojo
02:34 Alias joined #mojo
02:36 janus joined #mojo
02:54 diegok joined #mojo
03:44 yko joined #mojo
04:03 tl joined #mojo
04:22 ask joined #mojo
04:23 yko joined #mojo
05:31 ashleydev joined #mojo
05:59 alex_ joined #mojo
06:04 sri "mst: [02:44:26] you need to get an app written with this name: http://www.telegraph.co.uk/science/d​inosaurs/7881640/Mojoceratops-the-fr​illy-dinosaur-named-over-beers.html"
06:04 garfield http://xrl.us/bhrfkm
06:06 Topic for #mojois now Join the revolution! | http://mojolicio.us/ | http://irclog.perlgeek.de/mojo/today
06:07 sri think i'll just choose a web service for my blog
06:07 sri hmm
06:07 sri posterous looks good
06:08 sri looks sleek, has a bad reputation, seems like a peefect match :D
06:08 sri *perfect
06:10 sri oh wow, they do gist urls
06:22 dotan2 joined #mojo
06:36 cognominal joined #mojo
08:23 Alias sri: You seen Template::Benchmark
08:23 Alias sri: I'm running on my Vista box at home, and the Mojo::Template benchmark is fialing
08:23 Alias MISMATCHED TEMPLATE OUTPUT
08:24 Alias Can you take a look if you get a chance? I suspect it might just be newline differences
08:24 sri Alias: almost certainly newline mismatch
08:26 sri why would someone invest that much work just to benchmark tempate engines? Oo
08:26 sri *+l
08:28 Alias Because it's his personal interest
08:29 Alias I wouldn't mind some improved benchmarking technologies myself
08:30 Alias I've already written an improved Benchmark::Statistics
08:36 sri benchmarks are boring
08:38 sri most even annoying
08:39 * sri can't believe that there are still people taking hello world web server benchmarks serious
08:42 Alias His benchmarks did throw up some interesting stuff for me
08:42 Alias Turns out the way I'm doing the preparsing in Template::Tiny is really slow
08:42 sri like?
08:42 Alias Because I had to use a method that was supported in Perl 5.005
08:42 Alias I couldn't use any of the newer recursion tricks in the regex engine
08:43 Alias And recursively parsing without access to a regex engine is tricky
08:43 Alias s/regex/recursive regex/
08:43 Alias One of my more inspired moments ;)
09:00 sri rather boring ;p
09:10 spleenjack joined #mojo
09:16 diegok joined #mojo
09:36 sri i love couchdb
09:46 Alias boring, but still inspired
09:56 diegok joined #mojo
11:23 ask joined #mojo
11:54 xantus_ joined #mojo
14:36 dotan2 http://www.sukria.net/fr/archives/2010/07/09/​dancer-global-thoughts-about-our-philosophy/
14:36 garfield [ Dancer, global thoughts about our philosophySukria.net | Sukria.net ]
14:36 garfield http://xrl.us/bhrgh6
14:36 dotan2 So, is Miyagawa Sauron?
14:43 yko joined #mojo
15:28 ashleydev joined #mojo
15:41 Alias He's too short and quiet
15:52 fifo joined #mojo
16:54 su-bzero joined #mojo
17:20 ashleydev joined #mojo
17:47 sri that sounds more like Gollum :o
17:49 dotan2 Sauron is just a burning eye, and he lets the code, I mean the Ring, do the talking for him. I was referring to Sukaria's poem.
17:50 dotan2 Paraphrasing Tolkien is the Perl equivalent of singing Kumbaya, I think. It's like Americans invoking God, or Europeans invoking Football ;P
17:56 sri Oo
19:35 yko joined #mojo
20:13 ask joined #mojo
20:32 ashleydev joined #mojo
20:32 alex_ joined #mojo
20:43 sri ok, i have a blog again :)
20:43 sri http://blog.kraih.com # trying posterous
20:43 garfield [ Sebastian Riedel about Perl and the Web - Home ]
20:54 fifo http://www.youtube.com/watch?v=ZUAKm6pT_pg
20:54 garfield [ YouTube - Dylin Prestly Microsoft .NET vs Java Trailer ]
21:02 sri old ;p
21:22 fifo sri: already heard that, but maybe someone doesn't know
21:38 sri my latest blog post could be a little over the top :D
21:38 sri http://blog.kraih.com/
21:38 garfield [ Sebastian Riedel about Perl and the Web - Home ]
21:45 Grauwolf sri: maybe a little bit :P
21:45 sri but i think it makes people feel good
21:50 Grauwolf *g*
22:02 ask joined #mojo
22:19 sri hmm, my planet perl feed needs to be updated
22:21 * sri tries to bribe ask into updating his planet perl feed with a cold german beer
22:26 fifo Hmm.. IMO mojo lacks an 'ajax' method, like dancer has. (http://search.cpan.org/~sukria/​Dancer-1.1805/lib/Dancer.pm#any). Would look more clean, especially in small apps
22:26 garfield http://xrl.us/bhrhvq
22:27 fifo oops, should be ajax. One above it *g*
22:27 sri fifo: whats the point?
22:29 fifo Getting rid of "if ($header && $header eq 'XMLHttpRequest')"
22:29 sri fifo: please give me a use case
22:31 sri we never add something just because we can, but because there is a need :)
22:32 fifo accessing the same data with a REST client and an ajax interface
22:32 fifo as json and as xml
22:32 fifo or html or whatever...
22:34 sri how often do you actually do that instead of just using a format ending? /foo.xml /foo.json /foo.html?
22:34 sri REST is REST
22:35 sri no matter if you use it via ajax
22:35 fifo also if you do only ajax. You'd get rid of that if
22:36 sri i don't see it
22:38 sri in a normal rest api, i would have resources like /foo.json that simply serve json, why would it care if the request comes in via ajax or not?
22:38 sri *serves
22:45 fifo Okay, forget that REST. In my webapp I want to have transparency and therefore I want to return a minimal page/json-file to an xml request and a for-humans-page using the same path.
22:46 fifo So I can have get/post, ajax-get, ajax-post and no stupid ifs *g*
22:47 fifo So it's mainly a cosmetical thing
22:49 fifo Espeically helpful if you want to also support users who disabled javascript
22:50 sri how would that be helpful there?
22:51 sri let me commit something :)
22:53 alex_ joined #mojo
22:53 tempire fifo: I do that, in the spirit of progressive enhancement.
22:53 tempire For nearly every page request there's a potentially different response depending on whether it's ajax or not
22:54 tempire sri: use case would be to respond with a block of html with an ajax request, or the entire page (headers & footers) with a normal request
22:54 sri you mean disable layout?
22:54 fifo If the user doesn't use support javascript? In that case there is a path to user/stuff/they/want/to/do instead of one big page where where you have all settings.
22:55 fifo So for activated javascipt you have a big site with ajax-gadgets (or what you want to call it) and in the other case you have lots of small sites.
22:55 fifo pages*
22:57 sri disabling layout is a use case, but i disagree with the proposed solution
22:57 sri let me try something else
22:59 dotan2 joined #mojo
23:00 GitHub107 joined #mojo
23:00 GitHub107 mojo: master Sebastian Riedel * 2d2a48a (3 files in 3 dirs): added is_xhr method to Mojo::Message::Request - http://bit.ly/d7dy6F
23:00 GitHub107 left #mojo
23:00 tempire That's effectively what I do anyway, so is_xhr++
23:00 sri :)
23:01 tempire saves me from having to type $self->flash->{is_xhr};
23:01 sri i don't see a case yet where an ajax lite function would result in better code
23:01 sri since the goal should be to share as much code as possible
23:02 sri lite functions discourage that
23:03 sri (this is the rails solution copied directly)
23:07 fifo oh and a totally different question. Why is 'under' called like that. don't really get it *g*
23:07 sri what would you call it instead? :)
23:07 sri one use of it is "under '/foo';"
23:08 sri it affects all routes *under* it
23:08 sri under '/foo'; get '/bar'; get '/baz';
23:08 sri /foo/bar /foo/baz
23:12 fifo I know, I know. But... it's the only thing I have to look for in the manual all the time. But Ithink of it as doing something 'before' or I 'prepend' something. Well, I guess changing it wouldn't make alot of sense anyway.
23:13 fifo or doinside. Well, I don't know *g*
23:14 sri i think in the route context under makes a lot of sense
23:15 sri under /foo get /bar
23:15 sri thats almost a sentence
23:16 fifo I am always looking for 'inside'. Of course it makes sense! Just doesn't stay in my head.
23:16 sri :)
23:21 tempire Regarding the xhr issue, it would be nice to have a way to have if/else dispatching, based on xmlhttprequest.
23:21 sri example?
23:24 tempire irc client died.  This may be the first response, or the 3rd
23:24 tempire /foo/bar calls foo#bar, then follows up with foo#bar_is_xhr or foo#bar_not_xhr
23:24 sri see topic for log ;)
23:25 tempire excellent
23:25 sri i'm not sure that would be the right thing to do
23:25 sri that discourages code sharing again
23:25 sri ideally you just disable a layout
23:27 sri and so far i've not seen many use cases at all
23:28 tempire http://pastie.org/1039255
23:28 garfield [ #1039255 - Pastie ]
23:28 tempire In every controller action, I'm doing checks for xhr to set a code and redirect or not
23:29 tempire I think this encourages code reuse, by keeping the main stuff in foo#bar, while keeping the xhr/not xhr stuff separate
23:30 sri you could write a condition plugin plugin for that
23:32 sri ->bridge('/foo/bar')->to('​foo#bar')->route->over(xhr => 'foo#bar') or so
23:32 sri and possibly wrap it in a route generator
23:33 sri but i still don't like it at all
23:34 sri in fact, your example would look just fine with $self->stash->{status} = $self->req->is_xhr ? 302 : $real_status;
23:34 sri way less typing
23:35 sri or a plain old return $self->redirect_to if $self->req->is_xhr
23:35 sri s/if/unless/
23:36 sri and xhr logic after that
23:37 sri making routes complicated seems like a bad solution
23:37 tempire I...think you're right.
23:37 sri :o
23:41 dotan2 left #mojo
23:46 ask joined #mojo
23:54 diegok joined #mojo

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