Camelia, the Perl 6 bug

IRC log for #mojo, 2011-03-15

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

All times shown according to UTC.

Time Nick Message
00:00 sri and a lot of syntax sugar
00:00 s0va please don't tie i/o subsystem to ioloop
00:00 s0va please, please :)
00:00 sri afraid i will
00:01 sri i'm treating all special bson types as optimizations
00:01 sri you can import functions to generate more space efficient ones
00:02 sri doc(foo => 23, bar => int32(24))
00:02 sri doc() is for sorted hash
00:02 sri it's really fun
00:03 s0va current mongo client is quite nice... i just don't like the whole moose stuff...
00:03 s0va i just don't get moose at all.
00:03 s0va sorted hash?
00:03 s0va you've reimplemented tie::ixhash?
00:03 sri i kinda like the mongodb api, but the implementation is very ugly
00:04 sri ixhash is like 10 lines of code
00:04 s0va oh
00:04 mateu really?
00:04 sri at least the meaningful parts
00:05 sri all those camelcase methods are not necessary for the bson usecase
00:06 * sri doesn't like that order matters in bson
00:10 sri ruby 1.9 hashes are sorted by default :S
00:11 s0va ruby has mixins too ...
00:11 s0va perl doesn't :(
00:12 s0va at least not in a nice, use strict & warnings blessed way...
00:12 sri and coroutines
00:12 purl i heard coroutines was when you save the current context of my program... stack and lexical and dynamic scopes, so you can call them later
00:15 s0va i just fucking hate on_idle...
00:17 sri why?
00:17 sri anyevent has idle watchers too
00:17 s0va did you strace process with on_idle
00:17 s0va it explodes...
00:18 sri Oo
00:18 s0va with EV ofcourse.
00:20 s0va http://pastebin.com/Xd5aEmcv
00:20 s0va so i guess, that on_tick is processed first, on_idle second, is that right?
00:21 sri indeed
00:21 s0va argh.
00:22 s0va i guess i need to redesign my on_idle implementation.
00:22 s0va i used AE::on_idle
00:22 s0va independently from on_tick (which is just a repeating timer)...
00:22 sri i see
00:22 s0va well i guess, i'll need to create repeating timer with will invoke all on_tick cbs and then run on_idle cbs...
00:23 sri on_tick would not fire at all wit ae?
00:23 sri *+h
00:23 s0va nop.
00:24 sri well, i could make the test more relaxed i guess
00:24 s0va becouse on_idle is fired first.
00:24 s0va no no :)
00:24 s0va i will do it your way.
00:24 sri i don't think anything depends on the order
00:24 s0va this on_tick and on_idle stuff makes me angry since i started the quest to pass most of mojo relevant tests.
00:25 sri heh
00:25 sri well, i wouldn't mind relaxing the test
00:26 s0va i get this: http://pastebin.com/e7G9XMLE
00:26 s0va so on_idle is called first.
00:26 sri on_idle can just as well wait with stopping until $tick is defined
00:27 s0va i think is better just to emulate on_idle just as i emulate on_tick.
00:28 s0va believe me on_idle is called zillion times per second using EV.
00:28 sri your decision ;)
00:29 * sri needs to sleep
00:29 sri nn
00:31 s0va night!
00:34 xris left #mojo
00:58 alnewkirk yizo
01:45 ZadYree Back for another question: In Mojolicious::Lite, how to end under 'foo' statement?
02:09 tempire ZadYree: not sure what you mean
02:15 ZadYree well, admiting I use  under sub { ... } which will be appliable for the following instructions, how can I stop the last ones from using instructions which are in under statement.
02:17 alnewkirk left #mojo
02:17 ZadYree for example, if we have  under '/foo'; get '/bar'; get '/baz';    my aim is to have pages for /foo, /foo/bar and /baz
02:19 tempire I don't think you can
02:19 crab get '/bar'; under '/foo'; get '/baz';
02:19 crab there is no "over".
02:19 ZadYree ah, I see
02:19 ZadYree so what if we put another under after the first one?
02:20 ZadYree under '/foo'; get '/bar'; under '/baz'; get "/fubar"
02:21 crab try it and see
02:21 purl rumour has it try it and see is fine if the person is junior... or needs mentoring... needs to learn how to figure it out for him or herself
02:22 crab (write the statements and run ./app routes)
02:25 ZadYree hehe indeed it's better. tho I can't try it as I cannot launch the daemon atm
02:27 crab you don't need to launch the daemon
02:38 ZadYree right, but tbh the debugger scaries me
02:38 ZadYree scares
02:41 crab uh
02:41 crab did you see what i wrote above?
02:41 crab ./app routes will show you your routes in a nice tree
02:41 crab no daemon involved
02:45 ZadYree aha lemme test :D
02:49 ZadYree nice
03:00 alnewkirk joined #mojo
03:14 alnewkirk-away joined #mojo
03:18 alnewkirk left #mojo
03:18 alnewkirk-away is now known as alnewkirk
03:25 alnewkirk left #mojo
04:18 espent_ left #mojo
04:22 espent joined #mojo
04:45 minimalist left #mojo
05:08 alnewkirk joined #mojo
05:23 alnewkirk do we have a role-based access control plugin yet?
05:24 alnewkirk ... or any other acl type plugin
05:51 Foxcool joined #mojo
05:56 kaare joined #mojo
06:10 alnewkirk is there a way to create a before action (before route match)? or similar
06:10 alnewkirk i want to run some code before each request is matched
06:19 perlrocks Twitter: "Mojolicious:: Lite is suspicious?" (ja) --reanisz http://twitter.com/reanisz​/status/47542437689827329
06:19 ysyrota joined #mojo
06:20 moritz alnewkirk: iiuc a bridge does that
06:22 perlrocks Twitter: "Well, Mojolicious:: Lite is WebSocket server? Again => sub {}; because he is used, how I'm supposed to write never seen this guy because he probably used?" (ja) --reanisz http://twitter.com/reanisz​/status/47543203183857664
06:25 alnewkirk moritz, i got it now
06:25 alnewkirk by-the-by, http://search.cpan.org/~kraih/Mojolic​ious-1.13/lib/Mojolicious.pm#sessions
06:25 alnewkirk Simple "singed" cookie based sessions ... singing cookies ... meh
06:27 daviddelikat joined #mojo
06:32 daviddelikat1 left #mojo
06:33 fhelmber_ joined #mojo
06:43 snearch joined #mojo
07:12 Foxcool left #mojo
07:23 Foxcool joined #mojo
07:40 koban joined #mojo
07:41 Foxcool left #mojo
07:46 koban left #mojo
07:47 koban joined #mojo
07:48 Christian joined #mojo
07:48 Christian morning
07:51 Foxcool joined #mojo
07:53 esskar joined #mojo
07:59 koban left #mojo
08:07 breaker313 joined #mojo
08:12 alnewkirk left #mojo
08:20 Foxcool left #mojo
08:31 Foxcool joined #mojo
08:41 ver joined #mojo
08:44 Foxcool left #mojo
08:55 Foxcool joined #mojo
08:57 cosmincx joined #mojo
09:08 sri wow, textmate update with new drawer icons :o
09:11 sri looks really good now with missingdrawer
09:16 Foxcool left #mojo
09:26 Foxcool joined #mojo
09:29 GitHub121 joined #mojo
09:29 GitHub121 mojo: master Sebastian Riedel * 3e0013f (2 files in 2 dirs): pod improvements - http://bit.ly/hDugtw
09:29 GitHub121 left #mojo
09:53 koban joined #mojo
09:54 su-bzero_ With https:// and $self->redirect_to('route-name') it redirects to http://. With nginx + fcgi. "fastcgi_param  HTTPS 1" helps. ;) Anything about it in wiki?
09:59 marcus su-bzero_: I believe crab was working on this earlier.
10:11 sri su-bzero_: take a look and if not add it ;)
10:12 koban left #mojo
10:13 koban` joined #mojo
10:35 spleenjack joined #mojo
10:37 spleenjack left #mojo
10:37 spleenjack joined #mojo
10:53 Christian what means: Host or IP required!
10:53 Christian error Mojolicious::Controller:348
11:02 sri https://github.com/kraih/mojo/blob/mas​ter/lib/Mojolicious/Controller.pm#L348
11:03 koban` left #mojo
11:03 sri looks liek you're using some unsupported version
11:12 koban` joined #mojo
11:32 marcus sri: suggested approach for making a ajax/normal version of the same resource?
11:32 sri if $self->req->is_xhr?
11:32 marcus sri: say I have a /movie/view/<id> action, and I want to show it either as just the movie information with html5 pushstate or the whole page if you don't support pushstate.
11:33 snearch left #mojo
11:33 marcus sri: (if$self->req->is_xhr) { $self->render('foo') } else { render('bar') } ?
11:33 sri i'd go with return $self->render('foo') if $self->req->is_xhr; but yea
11:35 sri you could also go crazy and make a xhr route condition, putting shared code into a bridge leading to two different endpoints
11:36 dotan joined #mojo
11:38 sri there are a lot of ways, but mostly i'd go with the first options
11:38 sri *-s
11:40 marcus yeah, reefer('foo') if ->is_xhr; makes sense.
11:40 marcus otherwise fall back to default rendering
11:41 stephan48 f.e. i have a page which outputs a table but when you get js you get a pretty table with ajax, howto do it then? so not loading the whole table at begin?
11:42 fmerges joined #mojo
11:43 fmerges left #mojo
11:44 fmerges joined #mojo
12:02 alnewkirk joined #mojo
12:06 ok22 joined #mojo
12:08 ZadYree left #mojo
12:23 ZadYree joined #mojo
12:31 alnewkirk left #mojo
12:32 koban` left #mojo
12:40 sri http://loads.in # this is cool
12:45 stephan48 cool
12:48 koban` joined #mojo
12:52 koban` left #mojo
12:52 koban` joined #mojo
12:59 arthas joined #mojo
14:21 crab subzero: http://toroid.org/ams/etc/mixing-http-and-https
14:23 perlrocks Twitter: "@ Antonfin Cool, should be interesting. It is a pity that Mojolicious still young, but in the following forum may change everything:)" (ru) --koorchik http://twitter.com/koorchi​k/status/47664198758572032
14:26 crab it's a pity that mojolicious is still young?
14:26 * crab ponders an old and wrinkled mojolicious
14:34 dotan crab: mojolicious is too young to buy its own beer, putting it at a disadvantage in the perl community.
14:35 sri catalyst is too young to buy its own beer too
14:35 sigue left #mojo
14:36 sri and it already has wrinkles ;p
14:37 crab botox!
14:38 marty joined #mojo
14:44 josh joined #mojo
14:45 ysyrota left #mojo
14:46 ysyrota joined #mojo
14:46 dotan CGI.pm is only 15...
14:47 josh is there any way to check the destination route from within a bridge?
14:47 sri be more specific
14:48 josh eg, $auth = $r->bridge('/auth')->to(cb => sub { $c = shift; return $c->user->has_access_to($c->get_de​st_controller_and_action_somehow) })
14:49 sri $c->match has a lot of information, but it's not foolproof
14:50 josh is there a better way to do what im trying to do?
14:50 sri and i don't think access control should be done that way
14:51 * marcus implements pushUrl and popState event
14:51 crab what are the pushUrl and popState events for?
14:51 josh how should access control be done? the docs recommend bridge
14:52 sri for naive access control
14:52 DaTa $self->match->endpoint->name
14:52 sri what you want is much more complicated
14:52 crab josh: don't do it based on controller/action, do it based on objects
14:52 josh which objects?
14:53 josh i have a user object...
14:53 crab josh: e.g. if you have /widgets/32/<various methods>, you can have /widgets/:widget_id pass through a bridge and return 0 if the current (i.e. logged-in) user has the right to operate on widget 32.
14:54 josh crab, yeah thats basically what i want to do... but the bridge would have to be different for /widget and /hoozit
14:54 crab that way also gives you a convenient place to load widget 32 into your stash so that your actions can take it for granted
14:54 crab josh: yep.
14:55 josh specifically designed for that location
14:55 josh when the only difference is the actual location
14:55 crab they have to be different _bridges_, but they can be the same callback.
14:55 josh can they? hows that?
14:55 josh maybe close over the endpoint name somehow
14:56 crab josh: $widgets = $r->bridge->to('auth#check_roles'); ...; $hoozits = $r->bridge->to('auth#check_roles'); ...
14:56 crab or ->to(cb => sub { ... })
14:56 crab or whatever.
14:56 josh yeah
14:56 marcus crab: javascript history manipulation
14:57 josh but how is auth#check_roles going to know the endpoint
14:57 crab marcus: are you inspired by that game to kill the a's in the url with the o?
14:57 josh it has to check that the user has access to that thing
14:58 crab josh: so $r->bridge('/widgets/:widget_​id')->to('auth#check_roles', controller => 'widgets') and check stash 'controller'?
14:58 josh wouldnt that get overridden? controller is a special stash value
14:58 josh it still seems very repetitive
14:58 crab i've been able to mostly avoid caring about the action with some organisation
14:59 josh if the final destination was available someplace inside the bridge i wouldnt have to hack that same info into the stash beforehand
14:59 crab well, if your checks are REALLY always the same you can bridge from /:type/:id
14:59 sigue joined #mojo
14:59 crab hack the same info into the stash? wtf?
15:00 * sri doesn't get the hack part either
15:00 sri you're prolly misunderstanding something
15:00 crab the stash contains what you put into it. whether you put things in by saying /:thingtocapture or valuetoset => 'foo', it's the same.
15:00 josh i mean, setting a special stash value so i know which controller im accessing
15:01 josh where you said "$r->bridge('/widgets/:widget​_id')->to('auth#check_roles', controller => 'widgets')"
15:01 perlrocks Twitter: "@ Fuksito There's a great new toy - Mojolicious, recommend to watch:). For a lot of documentation and a list of plugins is updated." (ru) --koorchik http://twitter.com/koorchi​k/status/47673671682232321
15:01 sri josh: you might want to reread the routing guide, specifically the first few sections
15:01 crab you understand that these are examples, right? you can do $r->bridge('/:controller/:otherthing') if you want
15:02 crab i don't know what your URLs look like. i'm just describing what i do myself.
15:02 josh feh ok
15:04 josh so you're saying i want to do: $r->bridge($x)->to("auth#check_role", destination => "some_controller"), and then inside auth#check_role something like: sub check_role { return $user->has_access_to_controller( $c->stash('destination') ) }
15:06 crab no. i'm saying that if you organise your routes and application in such a way that you can determine access based on a prefix of the request uri, then you can write a bridge that allows access based on that prefix.
15:06 josh i see
15:07 crab whether you call it "controller", whether you set that value in the stash using /:foo or foo=>'bar', whether you write one bridge or many, all of that is just details.
15:07 josh gotcha
15:08 crab (but yes, read the routing guide. "controller" is not as magical as you (appear to) think.)
15:08 josh well saying to('x#y', controller => 'z') seems to be a conflict. im reviewing it now and it seems to say that the first form and the second are equivalent
15:10 stephan48 x#y => controller =>  x, action = y
15:10 crab now /that/ is true. i didn't think about that while typing. i guess you'd want to use the callback form there.
15:10 josh using them both at the same time is undefined in the guide
15:11 josh yeah
15:11 crab though i suspect that ->to('x#y', controller => 'z') might do the right thing
15:11 sri it doesn't
15:11 crab but it seems... somewhat unwise to rely on it
15:11 crab well, fine then.
15:12 josh lol
15:12 sri 'x#y' is just a shortcut for controller => 'x', action => 'y'
15:12 sri both mean the exact same
15:13 sri what i find rather strange is that you would tie your access control to routes
15:13 sri rather than the model layer
15:13 sri role based access control traditionally is a model thing
15:14 crab josh: maybe: $blah = $r->route('/:controller'); $protected = $r->bridge('/:id')->to(cb => ...); $protected->route('/blah')->to(...) etc.
15:14 sri $secrets->is_user_allowed_t​o_access($session->{user})
15:14 josh sri, there are a few parts of my (web) app that i dont want some users to see at all, they arent tied to models at all
15:15 josh well... not the 'main' models... i suppose i could force MVC on it *somehow*
15:15 sri don't you store your roles in a database?
15:15 josh yes the roles are in the db
15:15 sri see
15:15 sri model based
15:16 ver left #mojo
15:16 josh but eg, starting and stopping processes within the app
15:16 crab sri: the reason _i_ do it this way is because i didn't want to have to remember/audit permission checks in multiple places (in my case, in each action). if i were using a different model, then yeah, i could move the checks to a different place.
15:16 josh is not modeled in the db, but in the file system (pidfiles)
15:16 sri just saying, what you have there are ugly hacks no matter what
15:17 sri clean role based access control comes from the model layer
15:18 sri that's what roles are for
15:18 crab hum. i'm not convinced. maybe someday when i have a bit of free time i'll try to move the checks elsewhere and see if i like the resulting code.
15:19 josh im curious then, who wrote "The actual bridge code needs to return a true value or the dispatch chain will be broken, this makes bridges a very powerful tool for authentication." ?
15:19 crab i do have list/create/update/delete methods where i could... oh, hmm, those methods currently don't have any concept of the logged-in user.
15:20 crab josh: authentication, as opposed to authorization (which is what you and i are discussing now)
15:20 josh sure, authn != authz but whatever
15:20 josh right but now i need to put my authz someplace else? they could easily be in the exact same place
15:20 crab well, authen != authz is kinda the point. whoever wrote that sentence (and i'm sure he's a three-letter-nick!) had one in mind and not the other.
15:21 josh meh
15:21 crab josh: you don't _need_ to. sri isn't going to come and beat you with a stick if you put it in the same place.
15:21 sri hack it together however you like ;p
15:21 josh aw and i was hoping for that personal touch ;)
15:21 sri feel free to use $c->match
15:22 crab $c->match => playing with fire
15:22 josh thank you i will see how that works right now then ;)
15:22 sri maybe you can prove us all wrong and find a cool new way to do this stuff
15:22 josh sri, i dont want to prove anything, i just want it to work easily
15:22 Foxcool left #mojo
15:22 sri there are no real best practices yet, so everything is possible i guess
15:23 josh re-writing all of my routes doesn't really solve anything for me, and sticking two more lines of code to check the final destination seems like it might... so that was my first guess
15:24 * josh puts on his cowboy hat
15:24 * sri decides to stay out of auth discussions from now on
15:24 josh aw i didnt mean to start a holy war :(
15:24 sri it's in the nature of the topic
15:25 sri there are a gazillion ways to do it, and all are wrong!
15:25 josh im just a pragmatist. i try to use best practices, but i try harder not to try too hard
15:26 crab somehow i can't imagine where in my model code i could put these checks
15:27 josh hey you guys are all europeans right? how do i say 'i need some cough medicine with codeine' in german? :x
15:27 crab but then i have a limited imagination. i suppose an ->will_permit_user($u) method that could be called by create/update/delete would work.
15:27 crab josh: 'woh ist biergarten?'
15:27 josh HAHA
15:27 sri lol
15:27 josh thats about the only thing i *can* say in german
15:28 sri josh: "ich brauche Hustensaft mit Codein"
15:28 josh danke!
15:29 josh i shouldnt have had those galoises ... they arent made for nonsmokers.
15:30 * josh buys sri a beck's
15:30 josh that $c->match business worked perfectly.
15:30 sri \o/
15:31 josh actually... if you're near freiburg i'll buy you a beer for real
15:31 koban` left #mojo
15:31 josh or maybe if youre in western france later in the week ;)
15:32 * sri is near hamburg atm
15:32 crab i was in hamburg once, years ago
15:33 Foxcool joined #mojo
15:34 crab and i gave some girl at the railway station money "for a ticket home", even knowing she was probably scamming me
15:34 sri she was
15:35 josh you should have asked to stay at her house
15:35 josh at least you might get something out of it ;)
15:35 crab i felt bad for her at the time. later that evening when i couldn't afford to buy a croissant, i stopped feeling bad.
15:36 crab josh: heh, i was just waiting for a train
15:36 sri it's a common scam, they usually go away when you offer to actually buy them the ticket
15:37 josh you know, i've ridden the trains here a few times already and no one has ever asked me for my ticket. if i really needed a ride home, i'd just hop on the train and hope they don't ask for a ticket
15:40 stephan48 ye
15:40 stephan48 maybe they throw you out on next station ... take the next train then...
15:41 josh yeah i've been stuck places for real. the minimal risk of getting thrown off the train pales in comparison to the real risk of sleeping on the street in the winter
15:48 sri hmm, $c->match has historically been a little fragile, looking over the related code it might be ok to use now
16:02 Foxcool left #mojo
16:03 esskar left #mojo
16:06 Christian nice evening to you all
16:07 josh apparently i need a prescription for codeine. germans do seem to love bio-everything, though. this cough syrup tastes like plants
16:08 Christian left #mojo
16:09 josh kind of like drinking christmas and farmland
16:12 sri right, you need a prescription for pretty much everything here
16:12 cosmincx left #mojo
16:14 josh well if i had access to first-world health care through my government, i'd understand... and then i'd just show up at a doctors office and get what i needed
16:14 * josh scowls at his passport
16:14 fmerges left #mojo
16:14 sri heh
16:15 sigue left #mojo
16:22 marcus crab: actually I'm just trying to implement ajax navigation right.
16:23 marcus crab: so that urls work the same in the browser and with curl, and that the back button works the way you expect.
16:23 marcus I hate those new /#/foo/bar
16:23 marcus urls
16:24 minimalist joined #mojo
16:25 sri you mean #!
16:25 sri # is not hip enough anymore
16:28 minimalist Good morning guys. Question: What would be a hypothetical situation where one would want to change $app->controller_class ?
16:29 xris joined #mojo
16:31 marcus sri: yeah. Still sucks.
16:31 marcus actually, I think #!/foo sucks even more, because it pretends to be ok
16:32 sri minimalist: to overload stuff everywhere the default controller is used
16:33 sri it has become rather uncommon though now with helpers
16:33 elb0w Any of you guys even used memcached?
16:33 sri most people use memcached
16:34 elb0w which perl module do you like to interface with?
16:35 sri i think Cache::Memcached::Fast is rather popular now
16:35 elb0w ok thanks
16:35 elb0w was looking at that
16:40 elb0w sri, what is the weight in the connection?
16:40 elb0w I do not get that
16:48 minimalist sri, I suppose that $app->controller_class is used if you want to *completely* replace the default controller. I am currently successfully using my own base controller which inherits Mojolicious::Controller without having to change $app->controller_class.
16:49 jfuller How should I go about reading an xml post? The equivalent XForms::Model param set by CGI
16:52 ZadYree left #mojo
16:53 sigue joined #mojo
16:58 dotan left #mojo
17:08 minimalist elb0w, you may want to look at CHI.pm. It provides unified interface to most popular data caching methods.
17:08 minimalist BerkeleyDB is much faster than Memcached::Fast btw.
17:11 breaker313 left #mojo
17:12 arthas left #mojo
17:15 elb0w minimalist, weve gotten away from bdb here
17:15 minimalist who's "we" and where is "here"?
17:15 sri you can't compare those two
17:16 sri one is distributed the other local
17:16 sri of course you're affected by network latency
17:18 Foxcool joined #mojo
17:30 fhelmber_ left #mojo
17:34 crab Cache::Memcached::Fast is good? I've been using Cache::Memcached::libmemcached
17:40 elb0w minimalist, weve been trying to get away from rdbms for anything that we need quickly. Thats why I was looking at memcached. We is my group, here is my work
17:42 ysyrota left #mojo
17:46 elb0w man if I would of gotten hired at this last job I would probably have a pretty insane hypnotoad setup going
17:52 baton8 joined #mojo
17:53 crab i wonder if i care enough to benchmark using a local bdb as my cache instead of a local memcached
17:57 sri you shouldn't
17:57 crab shouldn't care, or shouldn't benchmark? :-)
17:59 crab either way: i'm not doing it.
18:00 sri memcached is a much better cache
18:01 sri if you switching to bdb you're doing it all wrong, because you're trading scalability for a short term performance improvement
18:01 sri *+'re
18:04 sri of course i'm generalising, but the chances that you have a valid use case for micro optimization are rather slim :)
18:08 alnewkirk joined #mojo
18:20 crab yep.
18:20 crab with some tuning i barely even need memcached
18:26 marcio_ferreira joined #mojo
18:26 spleenjack left #mojo
18:36 ok22 left #mojo
18:36 stephan48 mh... i seem to have a strange bug...
18:37 stephan48 i have a action, which runs correctly but as soon as i render i get only the layout but no the actual template
18:38 stephan48 how could i debug that?
18:40 sri don't render the layout?
18:41 stephan48 mh?
18:41 purl mh is a unix commandline-based mail user agent or at http://www.ics.uci.edu/~mh/ or Men's Health magazine or a "women's magazine" for men or Getty's way of saying hm or your way of saying hm
18:41 stephan48 http://schiffe.elbblick-stadersand.de/ship/182 <- basically this, normall i should get ship info in the middle
18:41 stephan48 but render is called
18:41 stephan48 oh no....
18:42 stephan48 %= vs %
18:42 stephan48 grr....
18:42 stephan48 i hate such simple bugs
18:43 stephan48 i called include but had forgotten to tell mojo i want to actually use the output of include
18:44 moritz stephan48: you prefer much harder heisenbugs and design bugs?
18:44 stephan48 mh?
18:44 purl mh is a unix commandline-based mail user agent or at http://www.ics.uci.edu/~mh/ or Men's Health magazine or a "women's magazine" for men or Getty's way of saying hm or your way of saying hm
18:44 stephan48 how you mean?
18:44 moritz 19:42 < stephan48> i hate such simple bugs
18:45 stephan48 i mean its simple to avoid... but the mistake is make often
19:05 GitHub4 joined #mojo
19:05 GitHub4 mojo: master Sebastian Riedel * e96c26e (4 files in 3 dirs): added config helper to Mojolicious::Plugin::Config - http://bit.ly/hfcq6R
19:05 GitHub4 left #mojo
19:07 Foxcool left #mojo
19:07 perlrocks Twitter: "This change should make config files in #mojolicious more fun. :) http://t.co/RzAGPJ6 #perl" --kraih http://twitter.com/kraih/status/47735591944716288
19:14 alnewkirk left #mojo
19:16 ZadYree joined #mojo
19:24 perlrocks Twitter: "@kraih  I use that config 1 year :) I'm glad that you added it in the Mojolicious kernel. Thanks. Only I use conf instead of config :)" --sharifulin http://twitter.com/shariful​in/status/47739964519223296
19:25 Akron joined #mojo
19:47 Foxcool joined #mojo
20:11 ZadYree Q: How to redirect_to $foo if $foo is an absolute adress (like http://google.fr) ?
20:14 sri ZadYree: just do it
20:16 Foxcool left #mojo
20:19 ZadYree well, if i write $self->redirect_to($foo), the url will be http://mymojoproject/http://google.com   ors so
20:20 yakudzo left #mojo
20:20 yakudzo joined #mojo
20:21 ZadYree basically I'd like to have /page:index  redirecting to /index
20:29 yakudzo left #mojo
20:31 yakudzo joined #mojo
20:31 sri umm, that would be a bug
20:32 sri tests tell me otherwise
20:33 sri ZadYree: did you even try it?
20:34 ZadYree yup I did. I'll test several things. I'll tell you if it's a bug if just my hands' fault
20:34 sri send me a test case please
20:35 sri https://github.com/kraih/mojo/blob/m​aster/t/mojolicious/lite_app.t#L456
20:35 sri that's the existing one
20:37 ZadYree ok
20:37 ZadYree trying it first, gotta change some things first
20:53 ispy_ joined #mojo
21:05 jfuller left #mojo
21:09 marcio_ferreira left #mojo
21:11 grim_fandango joined #mojo
21:27 Akron I think I've discovered a bug - maybe Windows specific and maybe no Mojo-bug ... http://pastebin.com/BGgBQr4M#
21:27 Akron Returns: " : No such file or directory at C:/strawberry/perl/site/lib/Mojo/Home.pm line 53"
21:28 Akron Changing this line to "[File::Spec->splitdir(abs_pa​th(File::Spec->catdir(@home) || '.'))];" makes it work again.
21:28 sri Akron: where did you see ->start being used like that?
21:30 Akron :) It's the way I do it to have a script with my test-demon flags and I only have to change the App for my server.
21:30 sri ok, but where did you get that from?
21:30 sri because that's not supposed to be done
21:30 Akron That was my own workaround. Why is it not supposed to be done?
21:31 sri because it screws up all kinds of detection hacks
21:31 Akron Hm ... I thought it should work as long as app detour works.
21:31 ispy__ joined #mojo
21:32 sri if it's not documented it should not work
21:32 sri i can't confirm a home detection bug due to the hack
21:32 sri can you try turning it into a t/mojo/home.t test case?
21:33 Akron Okay. I will try to.
21:34 ispy_ left #mojo
21:39 sri i know we still have problems with home detection on windows sometimes, so you might still be on to something
21:56 cxreg left #mojo
22:02 ispy__ left #mojo
22:20 ok22 joined #mojo
22:21 kaare left #mojo
22:40 Akron sri: Finally ... allthough you will hate the test-case it's de facto what goes wrong ... http://pastebin.com/HQEMaKZ2
22:41 Akron (Don't say: never do that to %INC ... in fact, everything that goes right with windows works because of the findbin fallback.)
22:41 sri oh my
22:41 Akron There was no class-detecting thing in home.t
22:42 sri and your fix earlier takes care of it?
22:42 Akron It just say: Don't care when it's undef. But it's not a good patch - now that I know what's wrong.
22:44 sri Akron: that test passes here actually
22:44 Akron MacOSX?
22:44 purl MacOSX is to operating systems as democracy is to Churchill or see "Mac OS X"
22:44 sri yea
22:45 Akron Nice. Windows specific.
22:45 Akron What does "print abs_path('');" says on MacOSX?
22:50 sri give me a full oneliner for tests
22:52 Akron perl -e "use Cwd 'abs_path'; print abs_path('');"
22:52 sri full path to current working directory
22:53 Akron :) So it's no Mojo-Bug. It's a different behavior for '' in Cwd. The fix should be fine than. "Fix where the error happens."
22:56 GitHub43 joined #mojo
22:56 GitHub43 mojo: master Sebastian Riedel * 6e0afb6 (3 files in 3 dirs): fixed Windows home directory detection bug - http://bit.ly/i6LVXl
22:56 GitHub43 left #mojo
22:56 sri Akron++
22:57 sri lets see how it goes
22:57 Akron sri++
22:58 marcio_ferreira joined #mojo
22:58 Akron Shouldn't do any harm - however ... :)
22:59 sri the famous last words
22:59 purl please hold while I connect you.
22:59 Akron Hehe.
23:03 Akron So - now I am allowed to use my wrapper script? ;)
23:23 josh left #mojo
23:23 sri i'm sure there are still cases where it will break, but if it works for you
23:23 sri just be aware that it is not a feature
23:35 Akron Yeah!
23:38 perlrocks Twitter: "We are mojolicious! How about you? RT @MomWithMojoSD: How is everyone's Mojo today?" --TheWellingtonSD http://twitter.com/TheWellingt​onSD/status/47803866099613699
23:46 ok22 left #mojo
23:57 ok22 joined #mojo

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