Camelia, the Perl 6 bug

IRC log for #mojo, 2011-09-21

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

All times shown according to UTC.

Time Nick Message
00:10 pancakesftw tempire: generally there should never be a need to use a bridge instead of an under
00:10 pancakesftw you can reset them with a "under;" or use empty ones like "under sub {…};"
00:12 tempire didn't know you could reset them.
00:12 tempire that would have been useful for the mojocast.
00:12 tempire oh wellz
00:12 pancakesftw well, you don't really reset them, you just make a new empty one that does nothing :)
00:21 tty234 joined #mojo
00:23 tempire I vote for a command that undoes an under
00:23 tempire above;
00:24 tempire patches welcome
00:24 purl well, patches welcome is always true or unless for search.cpan.org or swahili for "Put up or shut up."
00:25 perlrocks Twitter: "sudo sh -c "curl -L cpanmin.us  perl - Mojolicious". Install Mojolicious on your CI Server and Webserver, too. After installing creat..." --Latoriafrzxf http://twitter.com/Latoriafrz​xf/status/116307098454863873
00:26 tempire completely forgot about ladder
00:48 perlrocks Twitter: "mojolicious - first app http://t.co/icEiMMlf" --rbucker http://twitter.com/rbucker​/status/116312758387089408
00:51 jkitazawa joined #mojo
01:04 pancakesftw hmm, i guess we could optimize "under;"
01:04 pancakesftw to really reset the bridge
01:20 j-v-e joined #mojo
01:21 GitHub71 joined #mojo
01:21 GitHub71 [mojo] kraih pushed 1 new commit to master: http://git.io/wBoSPw
01:21 GitHub71 [mojo/master] added experimental support for resetting under to Mojolicious::Lite - Sebastian Riedel
01:21 GitHub71 left #mojo
01:22 pancakesftw tempire: that should do the trick
01:23 j-v-e joined #mojo
01:44 GitHub120 joined #mojo
01:44 GitHub120 [mojo] kraih pushed 1 new commit to master: http://git.io/6Y7iIQ
01:44 GitHub120 [mojo/master] added a few more under tests - Sebastian Riedel
01:44 GitHub120 left #mojo
02:03 perlrocks Twitter: "mojolicious – first app (part 2) http://t.co/aWZagI0g" --rbucker http://twitter.com/rbucker​/status/116331715185754112
02:45 pancakesftw eeep
02:45 pancakesftw he uses "get '/*' => …"
02:46 pancakesftw very dangerous
02:50 Coke joined #mojo
02:53 crab pancakesftw: are you really going to keep to this new nick?
02:53 pancakesftw you don't like it? :(
02:53 Coke Any guides using Mojo::Upload? I am failing to find one.
02:54 pancakesftw Coke: http://mojolicio.us/perldoc/M​ojolicious/Lite#File_Uploads
02:55 Coke ah. I would not expect to look in ::Lite for docs if I'm use the non-diet version. Thanks.
02:55 pancakesftw it's 99% the same code, so documentation overlaps quite a bit
03:02 tempire he's still using daemon, too.
03:03 tempire I *really* wanted to tell him otherwise, but he's more interested in his own opinion than understanding.
03:03 tempire which is fine.  he's free do do whatever.
03:04 tempire it's a bit mind-boggling, though, that after that whole debacle, he still doesn't get that he's supposed to be using morbo.
03:04 crab who is this he?
03:04 tempire the dude who tweeted earlier.
03:28 Alias_ joined #mojo
03:50 mohan joined #mojo
04:05 jmmills Can anyone illuminate to me as to why in this lite app https://gist.github.com/1231220 when I access /user/<username> that the <username> placeholder portion is not available in the stash to my under '/user' section?
04:08 pancakesftw tempire: what do you think is better, "under;" or "under '/';" for resetting?
04:09 tempire honestly, I think another keyword is best.
04:09 jmmills the docs suggest 'under;'
04:09 pancakesftw only for 2 hours :)
04:10 tempire I would be looking for a way to undo my under
04:10 pancakesftw tempire: like?
04:10 tempire above;
04:10 pancakesftw :S
04:10 crab no!
04:11 pancakesftw atm i actually tend towards "under '/';"
04:11 jmmills it doesn't appear that under plays well with placeholders...
04:11 crab what is someone supposed to think when they see "above;" in the code? "hey, what a clever little pun, how enchanting" or "wtf?!?"
04:11 pancakesftw i'm with crab on this
04:12 tempire under only makes sense within context.  so would above.
04:12 tempire I'm not all that concerned about it, though.
04:12 crab tempire: except that the meaning of the plain-old-word "above" conflicts with the way you're proposing to use it. you're declaring that what comes below is above what came above.
04:13 crab even "under" can be hard to understand, but it at least has a solid referent: the sub that you're passing to it.
04:13 tempire that's not the way I would read it.  I would think, "I'm currently underneath my under, so I want to go above the under"
04:14 tempire it's spatial thinking, though.  not everyone is going to think that way.
04:14 crab tempire: now think about the 1e6 russian and japanese users of mojolicious
04:14 tempire true enough
04:15 tempire foreigners ruin all the clever puns :)
04:15 pancakesftw shagadelic
04:15 crab i understand that you're thinking of under/above as an if/endif pair. i just think it will confuse more people more often than the entertainment value justifies.
04:16 tempire it's tough.  if you *really* need to reset under, it might be a clue you need a full mojolicious app.
04:17 crab tempire: that's a good point
04:17 crab but even under '/' wouldn't be bad. "it was under THAT, now it's under something else"
04:17 tempire that's hard to force on people, though.  going from one file to a directory structure, when they "just need to reset this darn under command"
04:18 * crab looks at jmmills's paste
04:18 tempire I don't think under '/' makes sense at all.
04:18 pancakesftw in fact "under '/';" alwasy worked
04:19 crab jmmills: you have to declare the placeholder somewhere above where you try to use it in the callback
04:19 Alias_ left #mojo
04:20 crab jmmills: you can say under '/x' => sub { ... } and get '/:y' => sub { ... } and expect to get stash('y') in the _first_ sub.
04:20 crab er, can't
04:21 tempire that sounds like an important life lesson.
04:21 tempire "don't expect to get stashy in the first sub"
04:21 tempire you've got to take your time
04:21 tempire treat her like a lady
04:23 crab heh
04:26 pancakesftw lol
04:26 crab i keep reading "pancake sfw"
04:26 crab and that makes me wonder about nsfw pancakes
04:27 pancakesftw :o
04:27 tempire that's why it's FTW!!
04:27 crab sromanov: hey, you should've told me about Mojolicious::Plugin::Mail too!
04:27 GitHub36 joined #mojo
04:27 GitHub36 [mojo] kraih pushed 1 new commit to master: http://git.io/w0dXig
04:27 GitHub36 [mojo/master] changed under resetting slightly - Sebastian Riedel
04:27 GitHub36 left #mojo
04:28 pancakesftw pretty much like it was before, but now with better examples and tests
04:35 jmmills crap, okay well that makes a bit sense although it doesn't lend it self to usefulness
04:35 jmmills crab ^ sorry typo
04:35 jmmills The idea being that I want something to execute for a set of patterns to do authorization of content
04:36 jmmills with out having a helper be executed in every handler
04:36 jmmills maybe there is a way to do chaining that I'm yet unaware of
04:37 jmmills trust me I tried doing under '/user/:username' => sub {...} and it just ignores it
04:37 jmmills I suppose I could do get sub {...} to follow and it might do the right thing
04:39 jmmills ah!
04:39 jmmills eureka
04:41 pancakesftw just don't start running naked through the channel :)
04:42 Eugene joined #mojo
04:45 jmmills https://gist.github.com/1231271
04:45 jmmills ^ does what I intended
04:48 crab you don't need to call $self->rendered after calling $self->render
04:53 osprey joined #mojo
05:08 perlrocks Twitter: "#mojohelp Mojo Helpdesk API supports all languages such as PHP, Java, .net, Ruby, Perl, C# and more but not  Lebanese." --sodahoney http://twitter.com/sodahone​y/status/116378348648808448
05:23 Eugene joined #mojo
05:47 koban joined #mojo
06:07 sromanov joined #mojo
06:20 driller_work joined #mojo
06:22 jmmills crab, yeah, thanks. I was looking at code in this other app I'm working on while I was writing that route test
06:23 jmmills although, it seems like a more user friendly way to chain code in lite apps would be nice
06:23 jmmills something that doesn't require linear placement
06:23 jmmills like: for <route> => sub {... executes anytime <route> matches ...};
06:24 jmmills I'm not familiar enough with the non-lite stuff to give a route example that would match that syntactical sugar
06:28 tempire jmmills: linear placement is pretty much what makes a lite app a lite app.
06:29 tempire if you read through the growing guide, you'll discover that you likely already know everything you need to know to convert to full mojolicious apps
06:29 tempire it's just a matter of mapping the syntax in ur brainz
06:29 jmmills true, but what do you want do when you want under; blocks to chain?
06:30 tempire bridge
06:31 jmmills like under sub { # authentication }; get '/' sub {...}; under '/user/:username' => sub {...}; get sub { #handle user crud };
06:31 jmmills ^ in the above cause the first under block doesn't get executed for '/user/:username' matches
06:31 jmmills err routes
06:31 jmmills which means I have to call the auth helper again
06:31 tempire that usage of under confuses me, I have no idea.
06:32 jmmills here lemme mock up an example
06:40 jmmills tempire, example: http://gist.github.com/1231412
06:41 jmmills now, how would I write that in a way that would make the "foo" stash available to the '/u' route
06:46 driller_work just a quick Q, do you lot usually write the templates with the code and then use the inflating-option?
06:47 driller_work didn't try that yet but looks like a really neat feature, wanted to see if it's commonly used or not :)
06:47 crab i've never done it
06:47 crab jmmills: if you can't chain under that way, write real routes using bridges
06:47 driller_work I'm gonna give it a try then
06:48 driller_work thanks crab
06:48 jmmills I like having my templates in separate files :)
06:49 driller_work yeah jmmills, me too - but it seems that the "inflating"-option (if I didd't get it wrong) automatically seperates the templates for you if yo have the __DATA__ section within your code
06:49 driller_work so, once you inflate your app it will automatically structure the template code in seperate files in /templates/...
06:49 jmmills crab, I guess that's what I'm struggling with - the documentation on the concept of bridges is a bit vauge
06:49 driller_work I might be dead wrong but it sure looks like that is what it does, which is super neat
06:49 crab a bridge is something you cross to get to the other side
06:49 crab driller: yes, that's what it does
06:50 jmmills I understand now that from a lite app I can build traditional routes via app->routes->bridge et cetera, but I'm at loss as to what the route would actually look like to accomplish what I want
06:50 crab think of the bridge as a sub standing in your way when you have to access some route
06:51 jmmills crab, so something like app->routes->bridge('/')->to( cb => sub { ... #execute for every request under / ... } );
06:51 crab $r = $app->routes; $first = $r->bridge->to(cb => sub {...}); $second = $first->bridge->to(cb => sub {...}); $second->get('/blah')->to(...)
06:51 crab now to get to /blah, you have to cross $first and $second
06:52 crab jmmills: sure
06:52 * jmmills tries that
06:53 jmmills crab, negative, https://gist.github.com/1231426
06:54 jmmills I tried it with a route pattern of '/' and no route at all
06:54 jmmills doesn't even execute
06:54 jmmills or at least the bridge callback
06:57 crab because you're not putting anything on the other side of the bridge
06:57 crab you create a bridge, then ignore it and create some other routes
07:00 jmmills errg, okay it's starting to make sense... seems like some sugar for bridge would be in order :)
07:00 crab if you need nested bridges and stuff, it's a sign that your app doesn't fit in ::lite
07:01 crab you can hack it in anyway, but you should think about moving up a grade
07:01 jmmills well that's the thing, what I'm using this for seems like something pretty trivial - I just want to authenticate and authorize for some restful endpoints
07:02 jmmills saying "execute this code for every endpoint" or "execute this code in addition for just these endpoints" doesn't seem like that heavy duty of stuff
07:03 jmmills i.e. get, post, del routes for actually handling the object but code that executes above them for authorization after code execute to authenticate the user
07:03 jmmills similar use would be for some basic session handling stuff
07:04 crab well, now you know how to do it.
07:04 jmmills in my case I can just use helpers in each under sub {} with out expanding my app... I guess it would be a feature request at this point
07:05 jmmills I've played with non-lite and it does give one a lot more finite control of how routes happen
07:05 D4RK-PH0ENiX joined #mojo
07:05 jmmills figures I would start playing with a new web framework and already find a feature limitation inside of a week :) I have a habit of wanting to do goofy things
07:06 pancakesftw it's not really a limitation if you can implement it as an extention/plugin yourself
07:07 jmmills true, in this case the app only has a couple handlers so it seems to be overkill to implement the simple auth section in a plugin
07:07 jmmills all it's really doing is verifying that userinfo exists and matching it to a database object
07:08 jmmills since the actual 401 stuff is handled by an upstream proxy
07:08 jmmills err, I should say server. Deployment has been decided now
07:09 pancakesftw https://github.com/kraih/mojo/blob/​master/lib/Mojolicious/Lite.pm#L48
07:09 jmmills funny that you link to that since I was actually looking at it
07:09 pancakesftw those two lines are entirely responsible for under semantics
07:10 tempire you can also see how light of a wrapper ::lite really is
07:10 tempire like fluffy pancakes
07:10 jmmills If I figure out a nice slick easy to read way to do what I want in lite I'll be sure to gist/blog about it and link so it could possibly be included in the snippets
07:11 jmmills because this really seems like something that would be a common task
07:11 pancakesftw i've considered nested under statements quite a few times, but they always seem out of place in small apps
07:12 pancakesftw *{"${caller}::under_under"}   = sub { $routes = $routes->under(@_) };
07:12 pancakesftw those for example could be nested infinitely
07:12 jmmills pancakesftw, well currently if you want to do it you have to build all the routes in a lite app via the app->routes object which sort of defeats the point ::lite's syntactical sugar, no?
07:13 pancakesftw jmmills: yes, i think once you reach that point you're better off with a normal app
07:13 jmmills wouldn't you just want to keep a stack of the nested routes? like under sub {}; get sub {}; chain '/u' sub {}; get sub {};
07:14 jmmills and the '/u' would be nested to the first under
07:14 pancakesftw that's what my under_under exampel above would do
07:15 pancakesftw it's really trivial to implement
07:15 jmmills hmm under does return the redefined routes object...
07:15 * jmmills plots evilness ;)
07:16 pancakesftw i think i would consider nested under (with a sleek name) if someone came up with a really really good example
07:16 tempire moarunder;
07:16 pancakesftw -.-
07:17 jmmills pancakesftw, does my example of global authentication but then per url authorization not fit the bill?
07:17 jmmills i.e. not wanting to clobber the authentication bit but wanting access control over sets of routes
07:18 tempire http://images.memegenerator.ne​t/instances/400x/10142662.jpg
07:18 pancakesftw :D
07:18 jmmills heh
07:18 pancakesftw jmmills: kinda, do you have a gist example?
07:18 pancakesftw (pseudo code is fine)
07:19 jmmills I'll type something up really quick that gives a firm example: I'll use 'chain' as the nested keyword
07:19 pancakesftw second problem is explaining it in the documentation
07:19 osprey left #mojo
07:20 pancakesftw is it possible to explain it to new users
07:20 pancakesftw especially the relation to under
07:20 pancakesftw third problem, of course a good name
07:21 pancakesftw and more problems
07:22 arthas joined #mojo
07:22 pancakesftw your usecase kinda implies "under; get; chain; get; post; chain; get; post;"
07:22 pancakesftw however the only way to walk up the stack again is under, which goes all the way to the root
07:23 jmmills unchain; ?
07:24 pancakesftw and there we enter ugly territory
07:31 pancakesftw i'm not opposed to the idea, but to make it a core feature all those problems need to be solved
07:32 jmmills pancakesftw, okay here is a simple example that should be implementing global authentication with a 'private' area only a certain user has access to: https://gist.github.com/1231471
07:33 jmmills tried to follow the idea of how other things represent authentication vs. authorization
07:35 pancakesftw well, i would solve that with a smater helper i guess
07:35 jmmills slightly less verbose version: http://gist.github.com/1231478
07:35 jmmills I was just trying to keep the other code out of the example bits
07:35 jmmills I mean there's a basic auth plugin
07:36 jmmills but this would be applicable to session auth or ip acl et cetera
07:36 cosmincx joined #mojo
07:36 pancakesftw have you played with hooks?
07:36 jmmills not really, I'm recently traded in catalyst for mojo
07:36 pancakesftw they are outside the whole routes system, but solve the global auth problem
07:36 jmmills err, s/I'm/I've/
07:37 pancakesftw a before_dispatch hook that renders a response will disable routes
07:37 jmmills but would still allow for access to stash/parameter data...
07:37 jmmills That was actually the next thing I was going to look at
07:37 jmmills Since I've seen some hooks being played with from plugins
07:38 jmmills Hmm, I'm trying to think of an instance when you would want something to happen not-globally that wouldn't get clobbered by an under
07:40 pancakesftw http://pastie.org/2567146 # here's another idea
07:41 pancakesftw change under semantics based on context
07:41 purl pancakesftw: that doesn't look right
07:41 pancakesftw purl: yes it does!
07:41 purl if you say so...
07:41 pancakesftw Oo
07:42 perlrocks Twitter: "Mojolicious Mojocast # 3: Authentication, Helpers, and Plugins http://t.co/zcXLKqAm" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/116416888355037184
07:43 pancakesftw the group block would reset the route again after exiting
07:43 sugar joined #mojo
07:43 pancakesftw and allow under to get nested
07:43 jmmills ooo
07:43 jmmills that seems like a nice way to handle it
07:43 jmmills I think your right about my use case though, it could probably be handled easily via a hook
07:43 jmmills I'll play with those
07:44 pancakesftw just an idea at this point
07:44 jmmills but the group block would lend it self to natural nesting
07:44 jmmills i.e. tabset
07:44 jmmills you could always just all the block nest {}
07:45 pancakesftw implementation is also easy, but problems two and three are the same
07:45 purl okay, pancakesftw.
07:45 pancakesftw name and explanation
07:46 jmmills https://gist.github.com/1231491
07:46 jmmills ^ would be deeper nesting
07:46 pancakesftw yes, that would work
07:47 jmmills it's also more perlish imo since it starts looking like conditional blocks
07:47 jmmills maybe even nest <route> { get {...} }
07:47 jmmills where the under is implied
07:48 pancakesftw then it would have to be "nest '/whatever' => sub {…};"
07:48 jmmills eck, ugly
07:48 jmmills the grouping block I guess would be more flexible
07:49 jmmills since it just gives you a context to your routes rather than forcing you to an under;
07:49 jmmills anyways, I'm going to switch gears and drink beer and get some $work done
07:50 jmmills ping me if you want help with any sort of implementation stuff, I'm new to mojo but I seems to have become my web framework of choice
07:51 pancakesftw it's more of a design problem
07:51 pancakesftw i'm not entirely convinced yet, the blocks still don't look right
07:51 pancakesftw i think the blocks need to be closer related to under
07:52 pancakesftw like "above { under sub {}; };"
07:52 pancakesftw :)
07:52 pancakesftw not exaclty, but you get the idea ;p
07:54 * pancakesftw wonders what crab and tempire think
07:56 * pancakesftw kinda wants fun {…} blocks :)
07:58 Vandal joined #mojo
08:03 noganex_ joined #mojo
08:09 crab the group seems okish, but i worry about introducing something that goes in a different direction than bridges
08:09 crab i mean, you can explain under by saying "oh, it's just a bridge that doesn't nest". but group is an altogether different way to build up the route tree.
08:10 crab that's not to say it isn't needed, just something that reinforces the need to find a good explanation and clear compelling examples
08:11 crab but notation-wise it does seem like a neat solution to the bridge-nesting problem in lite apps
08:12 * pancakesftw nods
08:15 crab i like how jmmills implies that he's going to get $work done /after/ drinking beer
08:17 crab under '/influence' => sub { doesn't->work() }
08:34 pancakesftw crab: those blocks kind of relate to nested routes i guess
08:48 jmmills crab, Drinking a beer while refactoring is acceptable especially when it's being done after 1am ;)
09:14 gshank joined #mojo
09:18 ajgb joined #mojo
09:35 spleenjack joined #mojo
09:39 gshank joined #mojo
09:44 Eugene joined #mojo
10:02 pancakesftw hmm, i'm starting to like group {} blocks
10:06 pancakesftw http://pastie.org/2567589 # whole implementation btw.
10:06 pancakesftw in case someone wants to try it
10:16 pancakesftw oh
10:17 pancakesftw http://pastie.org/2567614
10:17 pancakesftw how about that?
10:17 purl somebody said that was what I'm trying to figure out.  The session that is listening on the port.
10:18 pancakesftw to highlight that it's about nested routes
10:20 perlrocks Twitter: "How much of a stash of mistaken Did Mojolicious ...." (ja) --hisaichi5518 http://twitter.com/hisaichi55​18/status/116456756636422145
10:23 * pancakesftw pokes crab and tempire
10:31 marcus POKE HER FACE
10:36 pancakesftw http://pastie.org/2567673 # here's a real example i would use to explain it
10:42 pancakesftw doesn't look like there's much interest, guess i'll drop it then
11:17 perlrocks Twitter: "Been thinking about allowing #mojolicious lite apps to get a little more complex. http://t.co/4r1l1SJL #perl" --kraih http://twitter.com/kraih/status/116471001633665024
11:19 crab i like routes {}
11:19 pancakesftw there is another fun use case btw.
11:20 pancakesftw routes { require 'whatever.pl' };
11:20 pancakesftw whatever.pl being another lite app
11:20 crab *nod*
11:44 spleenjack joined #mojo
11:56 perlrocks Twitter: "# 11: best way to integrate validator into mojolicious (discussion) - Issues - vti / mojox-validator - GitHub http://t.co/EWgtJzjI" (ja) --wPerlnews http://twitter.com/wPerlnew​s/status/116480808960798720
12:27 GitHub70 joined #mojo
12:27 GitHub70 [mojo] kraih pushed 1 new commit to master: http://git.io/CNTLqQ
12:27 GitHub70 [mojo/master] added experimental routes function to Mojolicious::Lite - Sebastian Riedel
12:27 GitHub70 left #mojo
12:27 pancakesftw whatever… lets try it :)
12:37 pancakesftw but i would really like some feedback on it, otherwise it could be gone again very quickly
13:06 Akron joined #mojo
13:06 Akron As I am no lite-user, I just can judge the style - and the routes-groups look really pretty.
13:17 pancakesftw :)
13:29 perlrocks Twitter: "1.98 Mojolicious http://t.co/N8vgzz3F" (sw) --campuscodi http://twitter.com/campuscod​i/status/116504440508383233
13:31 marcus pancakesftw: I suddenly realized who you are...
13:33 pancakesftw oh noes
13:33 * pancakesftw needs a new disguise
13:58 crab sri: i like them, don't kill them
13:58 cosmincx joined #mojo
13:59 pancakesftw that's 4 in favor of route blocks so far, 0 against
14:05 * marty yawns
14:05 pancakessuck i hate route blocks
14:05 andrefs joined #mojo
14:05 pancakesftw :O
14:05 * marty votes ye on route blocks
14:10 GitHub135 joined #mojo
14:10 GitHub135 [mojo] kraih pushed 1 new commit to master: http://git.io/QZ1dxA
14:10 GitHub135 [mojo/master] fixed a few small route bugs - Sebastian Riedel
14:10 GitHub135 left #mojo
14:15 KayT3 joined #mojo
14:18 pancakesftw allright, lets give routes {} a chance :)
14:20 perlrocks Twitter: "Mojolicious hack of the day: Testing WebSockets - Sebastian Riedel about Perl and the Web http://t.co/t5BAIlg6 #perl" --perl_m8y http://twitter.com/perl_m8y​/status/116517076549632001
14:23 marcus let's give peas a chance
14:28 kaare joined #mojo
14:28 elb0w I imagine this is pretty much how mojo development goes down http://www.crankberryblog.com​/images/comic/i-am-paddy.jpg
14:29 * pancakesftw nods
14:35 grim_fandango joined #mojo
14:48 fmerges joined #mojo
14:49 sicp-metaperl joined #mojo
15:06 GitHub147 joined #mojo
15:06 GitHub147 [mojo] kraih pushed 1 new commit to master: http://git.io/MwYHTw
15:06 GitHub147 [mojo/master] fixed CSS of built-in exception template - Sebastian Riedel
15:06 GitHub147 left #mojo
15:13 driller joined #mojo
15:16 judofyr joined #mojo
15:22 sicp-metaperl joined #mojo
15:37 abra joined #mojo
15:40 andrefs joined #mojo
16:04 hu-metaperl joined #mojo
16:08 marcus pancakesftw: select_field - any way to set disabled on an option?
16:09 sromanov joined #mojo
16:25 elb0w Anyone else us the Mojo::Plugin::Database?
16:26 Foxcool joined #mojo
16:29 elb0w ah
16:29 elb0w Does this create the connection once
16:29 elb0w must be d/c
16:30 elb0w ok guess im releasing a DBIx::Connector + Mojo plugin db
16:31 elb0w yeah
16:53 pancakesftw marcus: i bet there is
17:16 DaTa "A DBA walks into a NOSQL bar, but turns and leaves because he couldn't find a table"
17:20 stephan48 elb0w: cool :)
17:20 elb0w as is its pretty worthless
17:21 elb0w Well as it is every instance just gets its own db connection?
17:21 elb0w Im confused now
17:21 elb0w so 4 db connections for entire workload?
17:22 elb0w userload *
17:30 GitHub108 joined #mojo
17:30 GitHub108 [mojo] kraih pushed 2 new commits to master: http://git.io/AbabKw
17:30 GitHub108 [mojo/master] Added realm= to documentation for www_authenticate header - Brian Duggan
17:30 GitHub108 [mojo/master] Merge pull request #220 from bduggan/patch-1 - Sebastian Riedel
17:30 GitHub108 left #mojo
17:32 marcus pancakesftw: read the source code and figured it out
17:33 marcus guess it should have been obvious from the class => example
17:38 pancakesftw well, it's the most complicated helper we have
17:41 marcus pancakesftw: I generated the options from a dbic RS like this - http://nopaste.me/paste/1068798774e7a21af53f60
17:42 pancakesftw tempire: http://wallbase.cc/wallpaper/1171856 # :)
17:42 marcus omg
17:44 pancakesftw marcus: that doesn't even look too complicated
17:45 marcus it's not very
17:46 marcus I hired mst to do the data model for this project. it's neat. using DBIx::Class::Candy and DeploymentHandler
17:50 marcus pancakesftw: apropos data backends, MongoDB? :)
17:50 * pancakesftw hides under desk
17:52 * marcus dances on top of the desk
18:22 sromanov joined #mojo
18:48 trone_ joined #mojo
19:27 * tempire is the desk
19:28 tempire routes seems like a weird keyword, in comparison to group
19:28 tempire since everything's a route
19:28 tempire but I support the functionality.
19:28 tempire not sure why I didn't think of that earlier.
19:29 tempire I like the word route better than group, though, for no particular reason.
19:30 * tempire has embraced the tacocat
19:30 tempire http://www.youtube.com/watch?v=​T1QyDhLj5hU&amp;feature=related
19:31 tempire marcus: how do you feel about DBIx::Class::Candy?
19:31 marcus tempire: I like it
19:31 tempire It seems careless to me to use something without a schema loader.
19:32 marcus I hate schema loaders
19:32 marcus never use them for anything real
19:32 marcus just for dirty quick fixes
19:32 tempire really?  I loooOOOOvvvee them.
19:32 marcus tempire: when I use it with deploymenthandler, the perl classes are the masater
19:32 marcus master
19:32 marcus I update them, then it creates sql diffs for me
19:33 tempire I suppose so.  My workflow is to change my test database and then have everything spread out from there.
19:33 marcus then you can't have versions
19:34 tempire true enough.  but that first time creating a schema...ugh.
19:34 tempire And I thought you didn't like DBIC anyway
19:35 marcus tempire: I've been moving away from it, but the customer wanted it for this project
19:35 marcus and I've used more than most :)
19:35 tempire I used to love it, but I'm falling out of love.  I'm starting to agree more and more with this.  http://seldo.com/weblog/2011​/06/15/orm_is_an_antipattern
19:36 marcus yea
19:36 tempire clsql has left a lasting impression on me…the syntax is essentially what LINQ is.
19:36 tempire which…I'm waiting on mst's thing based on it…didn't you imply something about that?
19:37 marcus yeah, dunno what happened with that
19:37 marcus mst had a talk about it.
19:37 marcus which I missed
19:38 sugar joined #mojo
19:43 marcus tempire: http://nopaste.me/paste/13827790854e7a3e3bb31a1
19:48 elb0w I hate doing joins with orms
19:50 tempire pre-defined joins are pretty easy in dbic.  once you wrap your head around the syntax
19:50 tempire I'd like to take a class on magic with B.
19:51 tempire or read a book on everything that's possible.
19:51 elb0w I think im leaning more towards redis nowadays
19:52 elb0w Only thing I really like about sql is the manipulations you can do to pull data in
19:52 tempire riak is going to take over the world.
19:52 tempire muah!
19:52 marcus we'll all be mongos soon!
19:52 marcus oh wait
19:52 marcus i like riak too
19:53 elb0w what is riak
19:53 purl i guess riak is erlang based.
19:53 tempire elb0w: http://www.basho.com/
19:53 elb0w reading it
19:53 purl reading it is ONLY SLIGHTLY LESS HARD
19:53 elb0w any context?
19:53 elb0w Riak allows for quick prototyping and developmen
19:53 elb0w is this like a aws?
19:53 tempire nosql-type thing.
19:53 elb0w o
19:54 tempire but it's designed for distributed/concurrency from the ground up
19:54 tempire you can deal with CAP decisions on an object level
19:54 tempire and basho keeps creating cool stuff with it
19:55 tempire and if you're a startup, basho will let you use the enterprise product for free.
19:55 elb0w riak is free?
19:56 tempire the community version is, just like every other database
19:56 andrefs joined #mojo
20:27 elb0w So if I am creating a DBI connection in a helper method it only is created once per instance? Or would it be created everytime someone hits the server?
20:54 kamu joined #mojo
21:04 tempire where's the hip place to host non-cloud-service mojolicious apps at?  linode? 1&1?
21:23 tempire shnikies, linode is neat.
23:00 metaperl joined #mojo
23:31 * BlueT_ is building his application with Redis, too

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