Camelia, the Perl 6 bug

IRC log for #mojo, 2011-01-28

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

All times shown according to UTC.

Time Nick Message
00:11 perlrocks Twitter: "#perl community is killing each other on #mojo and #plack? http://fwd4.me/ub3" --redicaps http://twitter.com/redicap​s/status/30780052580864000
00:32 tempire_ some folks have the need to provoke drama, I guess.
00:32 tempire_ makes me sad
00:39 MojoGuest279 joined #mojo
00:39 MojoGuest279 From: http://news.ycombinator.com/item?id=1277067 (177 hits)
00:39 MojoGuest279 /whoami
00:39 MojoGuest279 /help
00:41 Puddles Zed Shaw with hair?  I kid...
00:41 tempire_ You are mojoguest279
00:42 MojoGuest279 i know
00:42 MojoGuest279 too bad commands dont work
00:48 MojoGuest279 left #mojo
01:04 alnewkirk joined #mojo
01:07 tempire_ sri: is your mongodb thing going to be tightly coupled to mongodb, or potentially adaptable to other schema-less dbs?
01:08 stephen left #mojo
01:11 mateu it's only drama if you get caught in the act
01:31 Alias sri: That Mojo flame post was interesting
01:32 Alias sri: A bit of a mixed bag of both legitimate and (in my opinion invalid) complaints
01:36 MojoGuest214 joined #mojo
01:36 MojoGuest214 From: http://www.google.com/url?sa=t&source=w​eb&cd=3&ved=0CCsQFjAC&url=http%​3A%2F%2Fdev.xantus.org%2F&rct=j&q=h​tml5%20irc&ei=qx1CTaKuAY-4sQO9pfHXCg&am​p;usg=AFQjCNGw6nZv0wO42uzUnHhWcD0vcKNULg (1 hits)
01:37 MojoGuest214 left #mojo
01:37 MojoGuest214 joined #mojo
01:37 MojoGuest214 is now known as nagg
01:37 nagg lol nice topic
01:37 nagg join the revolution
01:37 nagg agreed
01:37 nagg irc.anonops.ru #OpEgypt
01:37 nagg to do so
01:57 nagg left #mojo
02:06 Kulag left #mojo
02:09 Kulag joined #mojo
02:38 ispy_ left #mojo
02:55 non left #mojo
03:12 * phillipadsmith is reading vti's and sri's posts ...
03:18 phillipadsmith crazy shit
03:34 ispy_ joined #mojo
03:43 jdixon left #mojo
03:55 sri good morning sunshines
03:55 sri tempire_: don't know yet, we'll see
03:57 sri it's a bit crazy how hard some people try to turn it into a plack vs mojo flame war
04:04 tl joined #mojo
04:06 tholen42 left #mojo
04:20 zoo-zed joined #mojo
04:21 zoo-zed left #mojo
04:39 perlrocks Twitter: "All #simpsons and #futurama quotes in #mojolicious have been reformatted, click to crash your browser. :) http://t.co/wsJP2L9 #perl" --kraih http://twitter.com/kraih/status/30847507131006976
04:42 janus` left #mojo
04:42 janus joined #mojo
04:48 perlrocks Twitter: "#Mojolicious is #changing the game http://bit.ly/fijw70" --perl_twitch http://twitter.com/perl_twit​ch/status/30849682318041088
05:09 tempire I'm undecided on whether ccan is a joke.
05:09 tempire I'm pretty sure it's not.
05:11 tempire sri: regarding the mongodb thing...I don't know your current goal specifically, but if you designed with the idea of having interchangeable storage layers for schemaless design...
05:12 tempire that sounds like a game changing foundation.
05:12 tempire though I'm just talking, without much forethought.
05:14 tempire but...considering the hipness of schemaless dbs...having a full stack for each one that's popular...
05:14 tempire that just sounds fantastic.
05:14 * tempire sits back down
05:44 MisterHatt schemaless db abstraction? do want
05:46 sri lol, ccan has to be a joke
05:49 crab servus!
05:49 * sri waves
05:52 kaare joined #mojo
06:19 ysyrota joined #mojo
06:32 Puddles left #mojo
07:05 GitHub55 joined #mojo
07:05 GitHub55 mojo: master Sebastian Riedel * 6ab4230 (1 files in 1 dirs): added cookbook recipe - http://bit.ly/eY8lgt
07:05 GitHub55 left #mojo
07:08 perlrocks Twitter: "The #mojolicious client recipe for today is about web scraping, enjoy. :) http://t.co/6edayXZ #perl" --kraih http://twitter.com/kraih/status/30884992460529666
07:28 koban joined #mojo
07:32 fhelmber_ joined #mojo
07:35 Christian joined #mojo
07:35 Christian good morning
07:35 purl Lies!
07:36 crab i'm going to do some scraping stuff with mojo soon.
07:36 sri it's really fun
07:38 * sri waves
07:44 esskar joined #mojo
07:44 fhelmber_ left #mojo
08:08 AmeliePoulain joined #mojo
08:27 sri http://thechangelog.com/post/2960631110​/toystore-orm-for-key-value-data-stores # interesting key/value orm
08:27 * sri pokes tempire
08:31 sri but what i want is more like http://mongomapper.com
08:32 sri or http://blog.learnboost.com/blog/mongoose/
08:39 sri so the first incarnation will be rather mongodb specific
08:40 crab hmm.
08:46 marcus moin
08:47 perlrocks Twitter: "@sudosushi some code please in #perl and use #mojolicious for your framework.....just sayin" --insurgentsoft http://twitter.com/insurgents​oft/status/30909919808983040
08:55 MojoGuest509 joined #mojo
08:55 MojoGuest509 From: http://www.google.fr/url?sa=t&source=web&​cd=4&ved=0CDgQFjAD&url=http%3A%2F%2Fdev.x​antus.org%2F&rct=j&q=websocket%20IRC&​ei=9YNCTaCZIsiu8QPw2K0s&usg=AFQjCNGw6nZv0wO42​uzUnHhWcD0vcKNULg&sig2=KOXsw_0hOczjU39riGJg5g (1 hits)
08:55 MojoGuest509 left #mojo
08:55 MojoGuest731 joined #mojo
08:55 MojoGuest731 From: http://www.google.fr/url?sa=t&source=web&​cd=4&ved=0CDgQFjAD&url=http%3A%2F%2Fdev.x​antus.org%2F&rct=j&q=websocket%20IRC&​ei=9YNCTaCZIsiu8QPw2K0s&usg=AFQjCNGw6nZv0wO42​uzUnHhWcD0vcKNULg&sig2=KOXsw_0hOczjU39riGJg5g (2 hits)
08:56 MojoGuest731 left #mojo
09:06 perlrocks Twitter: "@sudosushi our weblink is having some work done to it.  Converting it over to #dojo and #mojolicious...and don't hate on our "skull" ;)" --insurgentsoft http://twitter.com/insurgents​oft/status/30914571933851648
09:20 crab halp, insurgents!
09:27 marcus halp, dojo!
09:29 sri halp, mojolicious!
09:33 breaker313 joined #mojo
09:36 marcus halp, dojolicious
09:38 marcus sri: Did you see http://www.padrinorb.com/?
09:39 sri few months back
09:39 sri shares many ideas with us
09:39 marcus yea
09:39 sri the shameless reuse of sinatra artwork turned me off a bit though
09:40 marcus well, they shamelessly reuse sinatra as well
09:40 sri sure, but still
09:43 otaviof joined #mojo
09:59 non joined #mojo
10:00 arthas joined #mojo
10:02 sri interesting, perl 5.8 will become unsupported legacy in april
10:02 yko prooflink?
10:03 sri https://twitter.com/#!/timbu​nce/status/30916867753254913
10:03 yko thanks
10:03 yko interesting
10:04 yko does it mean that it would be possible to move Mojolicious on 5.10?
10:04 sri people will resist as usual
10:06 yko well, yes
10:07 sri i'd like to make some stuff faster and sleeker, but the fight it would take is so annoying
10:13 yko such situation makes me compare perl with internet explorer
10:13 sri hehe
10:14 yko there's 5.14 but we still should support 5.8 that was released... how many years ago?
10:14 yko oh, ~9
10:15 crab well, i am pleased to report that i no longer have any perl 5.8.x installations
10:16 jamesw 5.8.9 is newer than 5.10.0
10:17 crab that's not especially relevant. it's more about what features are in the branch, not how old the release itself is.
10:20 sri it also doesn't mean all bugfixes got backported
10:20 crab certainly not
10:22 crab is it sensible to do: my $bridged_r = $r->bridge(...something...), $app->plugin('foo', $bridged_r) and have MP::Foo::register add routes to $bridged_r?
10:22 crab or is there a better way to do it?
10:22 sri not sure
10:23 sri it's a greyzone
10:23 crab i would actually like to have the plugin register various routes under different (auth) bridges, e.g. everyone can read, only owners can write, only admins can delete.
10:23 sri i've been thinking about allowing plugins to register new route keywords
10:23 crab but i can think of no sane way to do that where just writing the routes directly by hand in lib/App.pm wouldn't be better
10:23 sri not sure how to do it though
10:24 sri the best example for that stuff is likely a resource plugin
10:25 sri rails-ish
10:25 crab i don't know about them. what should i look at?
10:25 sri you can't
10:25 sri nobody has invented the stuff you need yet
10:26 sri http://edgeguides.rubyonrails.org/routing.html
10:26 sri rails recently switched to resource routing
10:26 crab my routes look like this now: toroid.org/misc/routes.txt
10:27 * marcus ponders ressurecting Mojo-Server-FCGI
10:27 sri :O
10:27 marcus the fastcgi one is a bit simple
10:27 sri can't you just use psgi?
10:27 marcus no
10:28 marcus can I?
10:28 * sri shrugs
10:28 marcus server admins want to use fcgi-manager
10:28 marcus can I do that with plack?
10:28 * sri shrugs
10:29 marcus seems I can
10:29 sri \o/
10:29 su-bzero marcus: spawn-fcgi
10:29 purl somebody said spawn-fcgi was still not ideal since I have to execute it 3 times or however many processes I need
10:29 marcus http://search.cpan.org/~stevan/FCGI-Engine-0.​14/lib/FCGI/Engine/Manager/Server/Plackup.pm
10:29 marcus su-bzero: spawn-fcgi is evil
10:29 marcus :)
10:29 marcus hellspawn!
10:29 purl i think hellspawn is just ok.
10:29 crab this resource-ish routing stuff is pretty much exactly what i need
10:30 crab though i want different permissions to apply to things
10:31 crab no?
10:31 crab urk
10:32 sri maybe something like $r->add_keyword(resource => sub {...}); $r->bridge->to('la#lala')->resource('foo');
10:32 marcus server_class:    "FCGI::Engine::Manager::Server::Plackup"
10:32 marcus nice
10:32 marcus now let's see if we can get that to fly with mojolicious
10:32 josh left #mojo
10:32 sri there's a recipe
10:32 josh joined #mojo
10:32 marcus in the cookbook?
10:33 sri ye
10:33 crab ah, "scope" is neat
10:33 sri not for fcgi, but psgi
10:33 marcus mm
10:35 marcus Can't locate Plack/Handler/FCGI/Engine.pm in @INC (@INC contains: /usr/local/bin/../lib /usr/local/bin/lib /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/local/share/perl/5.10.0/Plack/Util.pm line 22. # ALMOST
10:35 marcus I am so close I can taste it :)
10:35 crab fcgi is so grotty
10:36 crab it's probably some grot you're tasting
10:36 sri well, it is quite old
10:37 moritz w 16
10:37 moritz sorry
10:44 snearch joined #mojo
10:57 baton8 left #mojo
10:57 hexa joined #mojo
11:25 GitHub71 joined #mojo
11:25 GitHub71 mojo: master Sebastian Riedel * 5a5ab33 (6 files in 6 dirs): added experimental support for additional route keywords - http://bit.ly/dOaLy3
11:25 GitHub71 left #mojo
11:25 sri this should be fun
11:28 perlrocks Twitter: "Added experimental support for additional route keywords to #mojolicious today, let me know what you think! :) http://t.co/gi7qNtH #perl" --kraih http://twitter.com/kraih/status/30950340970938368
11:29 sri ops
11:30 GitHub154 joined #mojo
11:30 GitHub154 mojo: master Sebastian Riedel * e8d31dd (1 files in 1 dirs): fixed typo - http://bit.ly/e7Wiy9
11:30 GitHub154 left #mojo
11:32 marcus almost put hypnotoad in production before I noticed the experimental tag
11:32 yko sri: noce
11:32 yko *nice :)
11:32 sri marcus: but someone has to test it!
11:32 marcus sri: it won't be startsiden
11:33 sri aww
11:33 marcus their sysadmins are conservative
11:33 sri not much experimental in 1.02 anymore
11:34 forwardever joined #mojo
11:34 perlrocks Twitter: "@sukria 's Dancer( http://perldancer.org/ ) vs @kraih 's Mojolicious( http://mojolicio.us/ ). Competition is a good thing." --aer0 http://twitter.com/aer0/status/30951763779526657
11:35 sri forwardever: you'll like my last commit
11:35 sri or actually the second last -.-
11:35 forwardever yea, resources :)
11:37 sri could get quite cool when you combine new conditions with keywords
11:37 sri $r->jsonrpc('/foo')->to('foo#');
11:41 forwardever regarding your current small "fight" with vti, i left a comment on vti's and your blog, my question is whether there is a chance that mojolicious compenents get less coupled and depend on each other in the future, e.g. routes, so that they can also be used outside of mojolicous projects, do you have any thoughts on that?
11:41 sri do you have an example?
11:42 sri on the Mojo layer everything is only very loosely coupled
11:42 spleenjack joined #mojo
11:42 forwardever e.g. controller object integrated tightly into router
11:43 sri ok, the Mojolicious layer is another story... it is still very much in development
11:43 sri so far nobody really asked for it
11:43 sri can't imagine there is much interest in so high level components
11:43 forwardever Text::Microtemplate, there seems to be some kind of demand
11:44 forwardever vti's routes module, another example, but much duplicated effort
11:44 sri that one was forked for different reasons years ago
11:44 sri vti was a core dev
11:44 sri he could have started decoupling
11:44 sri he had all options
11:45 forwardever so it would be something you wouldn't reject long term (i mean decoupling)
11:45 sri of course not
11:45 sri i'm very much interested in making mojolicious better
11:46 sri what matters for me is that it shouldn't harm usability
11:46 sri like the endless inheritance chain from the MojoX days
11:47 sri decoupling while keeping usability at the same level will be rather tricky i could imagine
11:47 marcus new dancer web page looks allright
11:47 marcus kinda like a beer brand =)
11:47 sri but i've intentionally made modules like Mojolicious::Routes::Pattern reusable
11:47 forwardever when it comes to routes, it's just about what you pass in and what comes out, when it comes to templates, it might be a lot more tricky
11:47 yko marcus++
11:48 sri lol
11:48 sri made me thirsty too
11:48 sri non css shadows make my designer heart bleed though
11:49 crab this resource thingy is nice, but it doesn't solve my problem yet. must think harder.
11:55 * sri wonders if keyword is the right name
11:56 crab i can't immediately think of anything better
11:56 crab so it's probably okay
11:58 forwardever sri: in Routes::Pattern, there is "if (my @captures..." line 126 or so,  "last unless @captures;" line 136, doesn't make much sense in this combination
11:59 sri why?
12:00 forwardever my fault, ignore it:)
12:00 sri ;p
12:02 diegok sri: Just readed your tuit & pod for keyword. Looks really useful.  I'm need to do some test to know how much I understand the potential of this, but why the name is keyword?
12:02 sri lol
12:02 sri i just asked the same
12:02 diegok :)
12:03 diegok well, but you really understand the thing ;)
12:03 sri "[12:55] • sri wonders if keyword is the right name"
12:03 diegok sri: ^ ok, I see :)
12:03 sri better suggestions are more than welcome :)
12:03 sri maybe something route-ish
12:04 sri "guides" would be confusing too i guess
12:04 diegok sri: I think I need to use the thing a bit... I was just wondering on the name...
12:04 crab routeword!
12:05 * sri throws his old tomtom after crab
12:06 diegok sri: I'll do some tests later and try to think on another name when understand the thing a little bit more :-p
12:07 diegok now i'm too biased on your resource example :-(
12:09 crab of course, i could use this and do the authentication at the controller/action level rather than at the route level
12:09 crab but i don't really like that thought
12:09 crab er, authorization. sorry.
12:09 sri no you can't
12:09 sri keywords run at startup once
12:10 crab ...and so?
12:10 sri ok, i thought you misunderstood it :)
12:10 yko crab why don't you just define bridge auth checking inside of add_keyword?
12:10 sri guess you're thinking of something else then
12:11 marcus sri: I really think you should change the trees on mojo banner to represent ips currently on the page :p
12:11 marcus then get it digged
12:11 crab what i mean is, instead of defining bridges and adding routes to them, i can say $r->resource('widgets'), and in widgets#delete do "if (!$self->stash('user')->is_admin) { die horribly }"
12:12 sri marcus: i would make them tiny clouds i think :D
12:12 crab (but i very much don't want to do that)
12:12 crab yko: i don't understand what you mean, explain?
12:12 marcus sri: need a simple algorithm to generate an unique cloud per ip
12:12 * yko goes paint some pictures :D
12:12 sri shouldn't be too hard with javascript and some css
12:12 marcus yeah, yko can just paint a cloud in real time every time someone visits
12:13 marcus >D
12:13 marcus agree, it should be doable
12:13 sri css clouds should be easy
12:16 yko crab: if i get you right you need something like this: https://gist.github.com/8160dba7492bd018fbcb
12:18 crab hmm, yes, similar. but more conditions. and the plugin (i.e. the thing that calls add_keyword) won't know beforehand what bridge to use.
12:18 crab yko: did you see http://toroid.org/misc/routes.txt ?
12:19 yko you can pass parameters to lpugin, do you remember?
12:19 yko ouch, it's not a picture :D
12:19 crab maybe i can do something like $self->plugin(bridges => { delete => sub { ... }, update => sub { ... } })
12:19 sri interesting problem
12:19 purl well, interesting problem is trying to not make it path-centric
12:19 crab but at that point i start to wonder if just writing out the routes by hand as i have done now is better
12:20 crab and of course the permissions for operations are also not constant across different kinds of resources.
12:22 yko well, there's no single answer except 42, you know
12:22 sri $r->resource(user => {delete => '#auth');
12:22 sri get creative :)
12:23 yko sri++
12:23 sri that could put a bridge in the middle
12:23 yko add_keyword should became powerful tool
12:24 sri it needs a good name though :S
12:26 sri "stage", "segment"
12:27 sri ooooh
12:27 sri "add_direction"
12:28 * sri likes it
12:29 crab what does it mean? directive would be ok, but direction sounds strange
12:30 sri a direction can lead to anything...another route, a bridge, maybe multiple routes :)
12:31 crab can't make it fit in my head
12:32 marcus add_indirection
12:32 marcus add_trapdoor
12:32 marcus :D
12:32 sri ;p
12:33 marcus what about path?
12:33 marcus a path can lead to a bridge
12:33 crab add_directive(resource => sub { ... }) seems good to me. gives code to add a routing directive.
12:33 crab marcus: "path" is too overloaded
12:33 marcus pathway
12:33 marcus ;)
12:33 marcus directive seems really wrong
12:34 * sri agrees
12:34 crab oh.
12:34 marcus it something the government issues
12:34 marcus it's
12:34 sri path would be acceptable i guess
12:34 marcus sri: it would violate the prime directive!
12:35 marcus sri: maybe pathway to distinguish it from url paths
12:35 sri trail
12:35 marcus trailblazers!
12:35 snearch left #mojo
12:35 marcus http://www.trailblazerschampionships.com/
12:36 marcus better than a pony!
12:36 sri -.-
12:36 Alias left #mojo
12:36 crab add_trail(resource => sub {...})
12:36 crab hum
12:36 Alias joined #mojo
12:37 crab i think add_keyword is better than all of these
12:38 crab it's simple and not overly clever
12:38 marcus add_shortcut
12:38 crab but it's not a shortcut.
12:38 sri perfect
12:38 marcus crab: sure it is.
12:39 crab maybe it is, at that.
12:40 marcus \o/
12:40 crab yeah. i can live with that.
12:43 HSlayer joined #mojo
12:44 GitHub135 joined #mojo
12:44 GitHub135 mojo: master Sebastian Riedel * e5d1c40 (4 files in 4 dirs): renamed keyword to shortcut - http://bit.ly/h8uGKc
12:44 GitHub135 left #mojo
12:45 crab now, how long do i need to wait before i should depend on the functionality :-)
12:45 sri it's experimental
12:45 sri depends on the feedback i get really
12:46 sri people have been yelling at me to make Mojo::DOM stable, so it became stable :)
12:47 crab well, then, i'll use it and squawk loudly if it stops working.
12:47 perlrocks Twitter: "#mojolicious route keywords have just been renamed to shortcuts, new perldoc link. http://t.co/6cPxjDW #perl" --kraih http://twitter.com/kraih/status/30970263512293376
12:48 sri someone has to test it
12:48 HSlayer|2 left #mojo
12:48 sri otherwise it can never get stable
12:49 marcus let's just hope your shortcut doesn't lead to a swamp!
12:49 marcus :D
12:49 marcus or quicksand
12:52 GitHub180 joined #mojo
12:52 GitHub180 mojo: master Sebastian Riedel * 1f5f028 (1 files in 1 dirs): added quicksand warning - http://bit.ly/f43D2d
12:52 GitHub180 left #mojo
12:53 sri ;p
12:53 sri marcus needs to release Mojolicious::Plugin::Quicksand now
12:54 sri it eats all requests
12:54 marcus Maybe Acme
12:54 marcus and make it eat 80% of all requests
12:54 sri haha
13:20 fhelmber_ joined #mojo
13:32 Akron joined #mojo
13:36 kaare left #mojo
13:37 marcus http://i.imgur.com/ZNtKw.jpg bwahahah
13:37 sri xD
13:39 alnewkirk left #mojo
13:45 forwardever sri: Routes.pm line 177 unless($res->code) {, line 180 if !$res->code, doesnt make sense ?
13:48 sri forwardever: well spotted, looks like a refactoring leftover
13:49 GitHub191 joined #mojo
13:49 GitHub191 mojo: master Sebastian Riedel * 289c79b (1 files in 1 dirs): cleanup - http://bit.ly/fWHt6h
13:49 GitHub191 left #mojo
13:52 Akron Hi!
13:53 Akron How can I embed templates in the <data> section of Plugins?
13:53 Akron (Shortcuts seems to be really nice btw!)
13:54 sri render(template_class => __PACKAGE__, ...) or so
13:57 Akron sri: Yeah! Wonderful - thanks!
14:01 forwardever sri: "unless ($res->code) {" line 176, $res->code is always undef because of "return if $res->code;" line 161
14:03 sri match can include conditions that change response code
14:03 forwardever okay
14:04 forwardever ... but there are no tests for this case :)
14:04 sri hmm, but i'm unsure about the position of that code
14:05 bellaire joined #mojo
14:05 forwardever also auto_render might belong in controller class...
14:06 sri that one's arguable
14:06 sri not that i disagree
14:06 forwardever autorender not even touches the routes object
14:07 * sri wonders if anyone would notice the move
14:09 sri it would fit really well into the controller
14:12 sri behavior would have to change though
14:12 sri right now it's called on the default controller instance
14:13 GitHub17 joined #mojo
14:13 GitHub17 mojo: master Sebastian Riedel * d2ad8b9 (1 files in 1 dirs): more cleanup - http://bit.ly/gRoqHh
14:13 GitHub17 left #mojo
14:14 sri auto rendering would have to be moved to the dispatch code, and the dispatch code would have to know if it is the endpoint
14:15 sri wouldn't mind a patch i guess
14:17 forwardever will have to better understand all the couplings :), will take some time, might provide a fix then
14:17 sri :)
14:18 sri the only tricky part i think is letting the dispatcher code know it is not a bridge
14:19 sri it would actually make auto rendering more predictable, since it would always use the most specific controller instance
14:22 sri i think you'll find the whole stash merging code most confusing
14:22 sri it has grown over time
14:23 sri whenever someone found another case that wasn't DWIM it changed a little :)
14:23 PerlNinja joined #mojo
14:23 PerlNinja evening mojoistas
14:23 sri wouldn't mind a cleanup there either
14:24 * sri waves
14:24 PerlNinja sri! shortcuts = awesomesauce
14:24 sri \o/
14:24 PerlNinja just chopped my route definitions down by half :D
14:25 sri make sure to turn your shortcuts into plugins if they're good
14:25 PerlNinja hmm hadn't thought of that yet
14:25 PerlNinja *puts it on the list of stuff to do*
14:26 sri hmmmm
14:26 PerlNinja wha?
14:26 sri actually havn't thought about people using shortcuts in normal code :S
14:27 PerlNinja define normal code :P
14:27 sri it was more of a plugin thing
14:27 PerlNinja mmm it actually worked out for some crud like stuff
14:27 * PerlNinja likes abusing things that way :P
14:27 sri otherwise i might have called it $r->shortcut() instead of $r->add_shortcut()
14:27 sri now i'm unsure :/
14:28 yko sri: people will use it in normal code. at least people who hungs here
14:28 sri add_shortcut fits in better though
14:28 PerlNinja Well, it works for plugins, also works for normal code. Then again, a lot of the code I've got so far in controllers and stuff *should* theoretically go into a plugin
14:29 PerlNinja although it's pretty specific to the app in question but yeah
14:29 sri grr
14:30 crab i think add_shortcut is ok
14:30 sri $self->helper(foo => sub {...}) vs $r->add_shortcut(bar => sub {...});
14:30 sri somehow doesn't feel consistent
14:31 crab does saying render(template_class => __PACKAGE__ ...) still mean that an actual file will override the data template in that plugin .pm file?
14:31 sri then again $self->helper is a shortcut to $self->renderer->add_helper
14:31 sri crab: yes
14:31 PerlNinja sri: mmm, why not do the same for add_shortcut then
14:31 PerlNinja wrap it in a shortcut shortcut.. heh.. *pun*
14:32 crab that's not a pun, it's merely a repetition
14:32 sri it would be a shortcut in the same namespace
14:32 PerlNinja ah
14:32 PerlNinja hm
14:32 sri app->shortcut() doesn't make much sense i guess
14:32 sri does it?
14:32 PerlNinja hmm
14:32 PerlNinja we talking code or semantically? :P
14:33 sri semantically
14:33 PerlNinja then for me it makes sense
14:33 sri style
14:33 sri aestethics
14:33 sri damn, i need to look that word up
14:33 PerlNinja if it's purely style and aesthetics, i'd say shortcut > add_shortcut
14:33 PerlNinja given that all other methods that do things like it don't come with an add_ dangling in front
14:34 sri actually they do
14:34 sri add_condition add_shortcut add_helper add_handler
14:34 PerlNinja okay okay - they do, but you wrapped em up in shortcuts, which is the ones I see in my code :)
14:34 sri Mojolicious.pm has a shortcut for helper
14:35 PerlNinja and personally I prefer seeing things like $blah->helper(...) v.s. $blah->add_helper
14:35 PerlNinja heh hm now i'm in doubt because I *know* that ->helper will add a helper
14:35 sri app->shortcut() would be consistent
14:35 PerlNinja but someone who doesn't know that might get confused
14:35 sri app->shortcut -> app->routes->add_shortcut
14:36 * PerlNinja likes consistency so .. I'd vote yes on that one :d
14:36 sri eww...bad use of ->
14:36 PerlNinja I mean if really in doubt, I'll ask my cat to pick one of two cans of food and decision can be made that way :P
14:36 sri haha
14:36 PerlNinja beats flipping a coin :D
14:37 Akron left #mojo
14:37 AmeliePoulain left #mojo
14:37 sri well, the decision doesn't have to be made now
14:37 PerlNinja true
14:37 sri lets see how the feedback is
14:38 PerlNinja shortcuts = awesomesauce. style wise, i favor shortcut over add_shortcut, but both work for me, so .. i'll be happily neutral here :D
14:39 PerlNinja ok other random question, favorite way to trigger some sort of event; i've got an app that tends to display a lot of data to people, and it doesn't need updated unless something changes; now i'm getting a bit tired of having to beat on rabbitmq until it works, so any other options available for semi-job-queue processing that *isn't* theschwartz? :P
14:39 sri redis is very popular as a message queue
14:40 PerlNinja mmm could do that
14:40 PerlNinja was thinking abusing mongodb capped collections or something
14:40 yko redis++
14:41 sri mongodb should work too
14:42 PerlNinja myeah it's more that i want to avoid having some cronjob running, I need granularity better than a minute, and sitting there polling a coll...e... wait never mind i'm a fucking idiot
14:42 PerlNinja tailable cursors!
14:42 PerlNinja there's my answer
14:54 a|newkirk[assoc] joined #mojo
14:54 HSlayer left #mojo
15:03 forwardever sri: how about moving these lines: https://github.com/forwardever/mojo/commit​/72dbebc05756d0409e0db0e3c1e1d4b56b9ec44c (had some trouble with utf8 bom at router file, probably problem with my editor?)
15:06 sri forwardever: looks good
15:06 forwardever saving $c->res->code in $res might be better, as it is called several times
15:07 forwardever i mean $c->res
15:07 * sri nods
15:11 forwardever done, another question, why first $res->code(undef) if $c->tx->is_websocket; later: $res->code(101) if $c->tx->is_websocket; is there anything happaning in the meantime with websocket response code ?
15:12 sri it comes in with a 101 response code
15:13 sri because it is an already prepared handshake response
15:13 sri actions can modify the handshake response
15:14 sri websockets are a little complicated
15:15 sri hmm, github bot not working again :S
15:15 sri patch applied though
15:19 forwardever okay, won't understand web sockets, so question is just: can line 179 be removed if line 201 is moved a bit higher
15:19 kaare joined #mojo
15:19 sri nope
15:19 forwardever okay
15:20 sri we intentionally clear it so the dispatcher gets a try
15:20 sri if it doesn't pick it up fine, we reset the response code again
15:28 vel joined #mojo
15:46 vel left #mojo
15:49 breaker313 left #mojo
15:53 Christian nice weekend to you all
15:57 Christian left #mojo
15:58 MojoGuest555 joined #mojo
15:58 MojoGuest555 From: http://news.ycombinator.com/item?id=1277067 (179 hits)
15:59 koban left #mojo
16:02 vel joined #mojo
16:05 otaviof left #mojo
16:05 MojoGuest555 left #mojo
16:06 PerlNinja how's one deal with file uploads in mojolicious? can't seem to find anything related to it :/
16:08 PerlNinja or can you just do a Mojo::Upload->new somewhere in an action and that solves it?
16:10 sri uploads pretty much just work
16:10 sri but yea, they are underdocumented
16:11 sri https://github.com/kraih/mojo/blob/ma​ster/t/mojolicious/upload_lite_app.t
16:11 MojoGuest293 joined #mojo
16:11 MojoGuest293 From: http://news.ycombinator.com/item?id=1277067 (180 hits)
16:13 PerlNinja mm lemme get it working and i'll plop something on the wiki
16:15 PerlNinja req->upload works? cos that's not in the mojo::message::request pod
16:16 sri base class
16:16 purl i heard base class was demoted.
16:16 PerlNinja yoink... you're right, didn't think of looking there
16:27 MojoGuest293 left #mojo
16:51 stephan48 what would you recommend for job queues? or should i just use a simple MongoDB collection as queue? i need to process files after a user entered some stuff about them(f.e. uploaded or selected a file in filesystem for processing)?
16:56 PerlNinja funny, i asked the same question earlier :P
16:56 PerlNinja mongodb capped collection with tailable cursor on the worker end
17:04 snearch joined #mojo
17:06 yko ...or redis
17:06 yko :D
17:13 a|newkirk[assoc] is now known as alnewkirk
17:18 su-bzero ro sider.
17:30 ysyrota left #mojo
17:30 purl left #mojo
17:30 snearch left #mojo
17:30 kaare left #mojo
17:30 Alias left #mojo
17:30 josh left #mojo
17:30 daviddelikat left #mojo
17:30 mateus left #mojo
17:30 tempire left #mojo
17:30 perlite left #mojo
17:30 al left #mojo
17:30 ryanc left #mojo
17:30 achromic left #mojo
17:30 gabiruh left #mojo
17:30 zakame left #mojo
17:30 sherr left #mojo
17:30 yko left #mojo
17:30 zipkid left #mojo
17:30 tardisx left #mojo
17:30 bc5042 left #mojo
17:33 snearch joined #mojo
17:33 kaare joined #mojo
17:33 Alias joined #mojo
17:33 josh joined #mojo
17:33 daviddelikat joined #mojo
17:33 mateus joined #mojo
17:33 tempire joined #mojo
17:33 perlite joined #mojo
17:33 al joined #mojo
17:33 ryanc joined #mojo
17:33 achromic joined #mojo
17:33 gabiruh joined #mojo
17:33 zakame joined #mojo
17:33 sherr joined #mojo
17:33 yko joined #mojo
17:33 zipkid joined #mojo
17:33 purl joined #mojo
17:33 tardisx joined #mojo
17:33 bc5042 joined #mojo
17:55 esskar left #mojo
18:03 otaviof joined #mojo
18:03 otaviof left #mojo
18:07 tempire_ stephan48: check out gearman.  it's lightweight, & works well on one machine or 50
18:13 stephan48 okey
18:21 non left #mojo
19:00 ispy_ left #mojo
19:16 stephen joined #mojo
19:24 ispy_ joined #mojo
19:41 spleenjack left #mojo
20:26 perlite_ joined #mojo
20:30 perlite left #mojo
20:30 perlite_ is now known as perlite
21:04 tempire_ I keep reading about nosql orm's
21:04 tempire_ "orm" doesn't really fit.
21:04 tempire_ oom
21:04 tempire_ or ovm
21:04 tempire_ object->object->mapper
21:04 tempire_ object -> value -> mapper
21:05 alnewkirk left #mojo
21:05 tempire_ object -> keyvalue -> mapper
21:05 trcjr joined #mojo
21:05 tempire_ OKM
21:09 ryanc left #mojo
21:14 PerlNinja left #mojo
21:16 ryanc joined #mojo
21:23 ryanc left #mojo
21:29 snearch left #mojo
21:30 ryanc joined #mojo
21:48 bellaire left #mojo
21:50 josh left #mojo
21:56 forwardever left #mojo
22:15 dekimsey left #mojo
22:33 vel left #mojo
23:04 kaare left #mojo
23:20 forwardever joined #mojo
23:35 forwardever sri: tried to decouple Routes::Matches a bit, maybe you can review the commit, basically, path and method have to be passed now, method condition becomes a Routes::Matches method to be controller independent, not sure about decode and url_unescape for urls retrieved from stash
23:36 crab Object ValUe Mapper, ovum?

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