The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2014-05-27

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

All times shown according to UTC.

Time Nick Message
00:18 good_news_everyon joined #mojo
00:18 good_news_everyon [mojo] kraih deleted no_more_wantarray at f15ae3a: http://git.io/eK3CMw
00:18 good_news_everyon left #mojo
00:38 riche joined #mojo
00:39 shmuel joined #mojo
00:39 laouji joined #mojo
00:44 rem_lex|pivo joined #mojo
01:58 klapperl_ joined #mojo
02:02 asarch joined #mojo
02:20 tianon joined #mojo
02:21 tianon joined #mojo
04:48 laouji joined #mojo
05:02 * tempire is home
05:30 sh4 joined #mojo
05:48 jwang joined #mojo
05:56 sujithm joined #mojo
05:57 denis_boyun joined #mojo
05:57 Lee joined #mojo
06:43 basiliscos joined #mojo
06:51 sujithm joined #mojo
06:55 prk joined #mojo
06:56 dexteruk joined #mojo
06:58 Dandre Hello
06:58 purl salut, Dandre.
07:00 Dandre I am using bridged routes to handle authenticated routes. Everything works fine but I wonder to redirect the user to this requested route after euthentification. I am user a form page to request username and password
07:05 prk joined #mojo
07:10 eseyman joined #mojo
07:16 moritz Dandre: you don't redirect to a route, but to an URL
07:17 fhelmber_ joined #mojo
07:17 laouji joined #mojo
07:21 crab euthentificiation: type the correct password, or die
07:24 trone joined #mojo
07:25 Dandre ok but how can I redirect to the requested url after authentification??
07:25 moritz with $self->redirect_to
07:26 Dandre ok but how can I get this url in my bridge handler?
07:27 moritz $self->req->url contains the current URL
07:27 crab you can also construct a url based on a route name
07:28 crab with url_for (though you can pass the same arguments to redirect_to directly, iirc)
07:28 batman sri: what about not breaking wait() and then add start() instead which does what wait() does now..?
07:29 batman tempire: glad you made it back in one piece :)
07:29 Vandal joined #mojo
07:44 laouji joined #mojo
07:46 laouji_ joined #mojo
08:02 laouji joined #mojo
08:09 bowtie joined #mojo
08:15 batman wonder if it would be a good idea to make Mojo::IOLoop::Nginx using https://metacpan.org/pod/Nginx ...
08:16 batman oops! i meant Mojo::Reactor::Nginx
08:18 crab oh?
08:21 riche ERC> http://www.nntp.perl.org/group/perl.perl5.porters/2014/05/msg215815.html
08:26 edestler joined #mojo
08:28 ver joined #mojo
08:28 laouji joined #mojo
08:28 nic Dandre: Sounds like you want to redirect the user to the url they originally requested
08:29 Dandre nic yes exactly
08:29 nic At the point where you identify they need authentication, put the requested url in a (hidden) param (eg destination)
08:29 rawler joined #mojo
08:30 Dandre ok
08:30 nic Once they pass authentication, redirect to destination, with a fall-back to your default url
08:31 janliesendahl joined #mojo
08:31 nic When I did it, I just put dest as a url param
08:31 nic I can't remember why I didn't do it via a post param
08:32 nic A mistake I made, if they fail authentication, you still need to pass around 'destination'
08:32 laouji joined #mojo
08:33 nic A week or so back I think someone suggested using flash
08:34 nic But way back when I was coding this, I was having trouble with flash+redirect
08:42 babl_ joined #mojo
08:42 moritz ok, stupid quesiton by me, but why does authentication need to involve redirects at all?
08:43 moritz add a bridge that checks if you are authenticated, if not, checks if the password was submitted; if yes, you are now authenticated; if not, show the login page (all on the same URL)
08:43 nicomen totally possible
08:44 woz joined #mojo
08:45 riche joined #mojo
08:46 oetiker joined #mojo
08:47 janliesendahl Hey, I have a problem with saving of a class as a document in a MongoDB (with mango). Would be nice if someone bangs on my fingers! :) Sample code with error msg: https://gist.github.com/jalie/c8e71484de8bc2e2496f
08:50 marcus "And once upon a time there were many Perl jobs — I hear they’re not doing that well nowadays.” - https://medium.com/@opinionbreaker/2a7af4788b10
08:50 marcus Why do python people hate us so much?
08:50 laouji joined #mojo
08:51 moritz marcus: for the same reason that Germans hate Austrians, and vice versa: too close to ignore, too distinct to embrace
08:52 moritz (also, going to YAPC::EU I got the impression that there were lots of Perl jobs; YMMV :-)
08:52 marcus moritz: Yeah, I don’t think it’s true, but it’s a kind of self-fullfilling prophecy if it gets repeated too much.
08:53 * moritz wanted to write perljobs.de / meatpan.org as a perl job board, but didn't get a round tuit
08:53 ente TIL germans hate austrians and vice versa?
08:53 moritz ente: well, not really hate, just have some small animosities
08:53 ente but perhaps that mostly affects the bundesländer which are closer to the border
08:54 moritz aye
08:54 ente I live in austria now
08:54 marcus moritz: we had a lot of round tuits at Mojoconf this weekend.
08:54 ente where I come from (saarland) we mostly hate on our nearest neighbour rheinland-pfalz
08:55 moritz like, back in the days when Germany played against Brazil in the soccer world championship final, I happened to watch it in Austria; they were al Brazil fans, all of a sudden
08:55 moritz ente: yeah, I think it's mostly Bavaria vs. Austria
08:56 Dandre Ok I'll try that, thanks
09:00 ente *sigh* my laptop reached boiling temperature and shut itself down. that's new...
09:01 ente an austrian friend of mine said that austrians would probably only go drive around and honk after a football match if they would win against germany
09:03 ente I appreciate that, I like it quiet :P
09:05 laouji joined #mojo
09:08 crab ente: your laptop hates being in austra
09:09 crab s/ra/ria/
09:09 ente my laptop hates linux
09:09 ente it overheats without the official ati driver but until now I could undervolt the GPU and run the fan constantly at max-speed to prevent that
09:12 * moritz recommends intel graphic chips for laptops
09:12 ente yeah it's a bit too late for that now
09:12 ente they sent me this as a replacement after the previous laptop's motherboard broke
09:13 laouji joined #mojo
09:13 ente and lenovo's machines with intel graphics typically have a lower screen resolution
09:13 ente like 1024x786
09:13 ente this is a genuinely nice machine with 1600x1200 display but, sadly, ati graphics
09:13 crab <- has a lenovo laptop with intel graphics and 1600x900
09:14 ente then that's probably a newer lenovo laptop, which I can't afford :)
09:14 ente but it's definitely faulty, even if you don't consider linux; I mean it overheats in any situation without a driver
09:15 ente you could probably kill it by opening the BIOS setup menu and just leaving it on for too long
09:16 crab that sucks.
09:16 purl The rock is now off.
09:16 ente hmpf
09:16 ente http://www.lapstore.de//a.php/shop/lapstore/lang/x/a/13589/kw/Lenovo_Thinkpad_R60_-_9459-AZ1
09:16 ente 14" screen, 1024x786 resolution
09:17 ente (I have a t60p)
09:18 ente wow, they go up to 15" at that resolution
09:18 ente that's insane
09:28 laouji joined #mojo
09:31 meshl joined #mojo
09:44 denis_boyun joined #mojo
09:46 laouji joined #mojo
09:50 dod joined #mojo
09:52 stephan48 ente: i had a notebook like that for repair once
09:53 stephan48 it did driver control purely in the windows driver
09:53 stephan48 i did a backup of it with acronis and it felt like it nearly burned
09:59 laouji joined #mojo
10:04 sri batman: point of breaking ->wait is to discourage bad design
10:04 sri ->wait with return values has simply caused too much trouble
10:04 Jonis could probably change the topic about the livestream now? :)
10:06 batman sri: then i think it's a really, really, really good change :)
10:08 Topic for #mojo is now 🐯 | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
10:14 nicomen batman: you just reminded me of the old guys in the balcony in the muppet show ;-D
10:14 babl joined #mojo
10:17 babl__ joined #mojo
10:19 nicomen batman: http://www.youtube.com/watch?v=NpYEJx7PkWE
10:26 nikita joined #mojo
10:28 Ralesk if only I had a font that included that first character
10:28 nikita hello
10:28 alnewkirk joined #mojo
10:28 Ralesk (or Qt knew how to fall back better -- dunno)
10:29 nikita Mojo::IOLoop::Delay: Can't call method "req" on an undefined value at - a weird error i've got
10:29 nikita can someone help me with debugging it?
10:30 Topic for #mojo is now 🐯 hear me roar | http://mojolicio.us | http://irclog.perlgeek.de/mojo/today
10:30 dotan joined #mojo
10:31 Jonis Winter is coming.
10:31 nicomen nikita: do you have a gist? can you minimize the code and still reproduce?
10:32 nikita moment
10:33 sri no GoT this week :(
10:34 Jonis sri: stupid memorial weekend :( have you read the books?
10:34 sri not yet
10:34 nikita https://gist.github.com/nikita-d/f44cf89bede662a412b7
10:34 nikita controller code
10:34 purl controller code is extremely cool :)
10:34 woz sri: I know. Once MojoConf was over it was the only thing I had to look forward to. My life is empty for another week :(
10:35 nikita https://gist.github.com/nikita-d/831ca086a19e5fa538f6
10:35 nikita helpers
10:35 sri https://www.youtube.com/watch?v=ECewrAld3zw # for those that don't get the topic (it's the lannister motto)
10:36 ente stephan48: yup
10:36 ente stephan48: oh! you're no longer on xinutec :D
10:37 ente hi! *waves*
10:43 stephan48 ente: i should
10:55 marcus sri: would it break much if get ‘/‘ => sub { … } would default template name to ‘index’ ?
10:56 shmuel joined #mojo
10:57 * jberger catches up
10:57 jberger marcus: I have a mostly written connection pool for mojo pg
10:57 jberger I should have it out this week
10:58 * jberger misses mojoconf
10:58 marcus jberger: you're awesome. I'm mention it in my blog post about RenderSteps, so people will have something to look forward to :)
10:58 marcus s/I'm/I'll
10:58 jberger yeah!
10:58 jberger I'll have a blog post about mojoconf soon too
10:59 * sjn urges everyone to write about Mojocong o/
10:59 sjn mojoconf*
10:59 * jberger needs his body to figure out where the sun should be
10:59 sjn Also, please mention the €2000 donation :D
11:07 d4rkie joined #mojo
11:08 riche jberger: you know your time is off when thinking of beer at 7am (or something else is seriously wrong)
11:11 jberger hahaha
11:11 jberger oh I need to reset cpan_mojo
11:13 cpan_mojo joined #mojo
11:17 mire joined #mojo
11:17 batman https://metacpan.org/pod/Pg::PQ # guess someone could make async Mojo::Postgres using that library?
11:21 d4rkie joined #mojo
11:21 Ralesk what exactly is wrong with DBD::Pg's async mode though? https://metacpan.org/pod/DBD::Pg#Asynchronous-Constants
11:21 * Ralesk really has no idea
11:25 nikita @marcus: have you found out the origin of this error: Mojo::IOLoop::Delay: Can't call method "req" on an undefined value at?
11:25 nikita https://gist.github.com/marcusramberg/9032876
11:26 marcus nikita: I think it’s a memory overrelease issue, right batman?
11:27 nikita @marcus: i'm having the same right now, and i'm desperate
11:27 marcus nikita: does it actually stop it from working?
11:27 jberger Ralesk, batman: currently Mojo::Pg is using DBD::Pg
11:27 nikita no, it looks like it works
11:28 jberger I hadn't seen the other before, I'll take a look
11:28 Ralesk jberger: ah, ok :)
11:28 nikita i took convos application from your repo as an expample
11:28 nikita *example
11:29 Ralesk https://metacpan.org/pod/Protocol::PostgreSQL heh, interesting
11:29 marcus Ralesk: I worry about having to maintain that.
11:29 Ralesk yeah, probably wouldn't touch it with a ten-foot pole, but it's interesting that it exists :D
11:30 jberger marcus, you have to keep a reference to the tx object (and the ua too)
11:30 marcus Pg::PQ seems a bit too young to depend on, batman.
11:31 Ralesk and I suppose you know about the https://metacpan.org/pod/Mojolicious::Plugin::PgAsync plugin
11:31 crab i should really finish my postgres client
11:34 Akron joined #mojo
11:36 sri marcus: i think it could break a lot
11:36 sri or rather, not work very well
11:36 crab what could?
11:37 sri my $foo = $r->route('/foo'); $foo->get(sub {...}); $foo->post(sub {...});
11:37 sri both would get the name index
11:39 marcus sri: No, I just meant for actions anchored to ‘/‘.
11:39 marcus sri: I guess $r->get(‘/‘,.. ) and $r->post(‘/‘,..) would get the same, but I think that’s a feature
11:40 sri the '/' is implicit
11:40 sri it doesn't actually have a meaning
11:40 sri you can just leave it out
11:41 marcus yeah, but in your example over the action is anchored to (‘/foo’), no?
11:41 sri nope, every step in the route for itself
11:42 batman marcus: it might be timeout issues (method "req" on an undefined value)
11:42 batman jberger: yes. i don't want DBD things.
11:42 sri i actually wanted to change that, and generate the route name based on parents too... but breakage
11:43 sri how quickly the tone on hackernews can change regarding perl releases :) "Perl gives me the impression of being one of the few language that's still evolving significantly on a syntax level despite being so old."
11:43 batman marcus: should i really worry about "too young"..? Mojo::IRC is also quite young, i'm not worried about people using that...
11:44 marcus batman: I meant the warning in the pod
11:45 batman ah ;)
11:45 batman i though DBD::Pg wasn't really non-blocking...
11:45 batman like connect and other sending commands
11:45 batman s/other//
11:46 sri only downside of DBD::Pg async stuff is that connects are blocking
11:46 sri but that's still much better than experimental implementation of the protocol... which is fricking huge
11:49 batman marcus, jberger: could you please not have username, pass, ... as attributes and rather use Mojo::URL to store connection information?
11:49 batman $self->url("pg://username:password@localhost/database?option1=too_cool");
11:50 jberger batman: that makes sense in any non dbd wrapper
11:51 batman why doesn't it make sense here?
11:51 jberger so maybe the name needs to be more clear that this would be dbd based
11:51 batman it sucks having 10 attributes for all the weird connection options.
11:51 jberger because I'm just glomming onto the usually dbd connect
11:51 jberger no it will just be for the four connection args
11:51 sri batman: maybe $uri->query->to_hash and pass that along?
11:52 sri in case those options don't have too complicated values
11:52 batman exactly
11:52 jberger and no I hadn't seen that pgasync plugin
11:52 * jberger well take a look
11:52 * batman <3 url attribute for connection information
11:53 batman it also makes it easier to use environment variables on heroku and other platforms
11:53 batman i also think it's a bad idea to do $self->sth(...) in Mojo::Pg. It should support queuing of commands https://github.com/marcusramberg/mojo-pg/blob/master/lib/Mojo/Pg.pm
11:54 * batman thinks github is not feeling well
11:54 jberger hmmm that plugin might already be what we want actually
11:54 jberger will look more in depth soon
11:55 * jberger gets ready for $work
11:55 Ralesk re url and dbi: gosh I hate DSN :| can't ever remember its structure
11:56 batman that plugin also doesn't have queuing :(
11:56 sri and it's a plugin
11:56 batman yes. and that ;)
11:57 sri seems to do most things right internally though, not bad
11:59 crab hmm.
12:00 sri crab: there was a lot of Pg hacking during the hackathon
12:00 crab cool.
12:00 nicomen I noticed Mojo::URL->to_rel is gone, but how do I get this "/bar#baz" from "http://foo.com/bar/#baz" ( ->query_path does not contain fragment )
12:01 crab is there any good example for a Mojo-based protocol implementation with non-blocking connects and such?
12:01 sri mango maybe
12:01 batman crab: not sure if i would say "good", but you could look at Mojo::Redis
12:01 jberger I heard two main things at mojoconf: I want Nonblocking but for SQL and how do I know what things are good on cpan
12:02 marcus http://marcus.nordaaker.com/mojolicious::plugin::rendersteps/
12:03 nicomen Ralesk: [DSN] what structure? :-P
12:03 Ralesk nicomen: exactly.
12:03 nicomen I though DSN parsing was NP complete
12:03 Ralesk :D
12:04 batman marcus: i don't mind calling $self->render instead of $self->stash() in the last callback
12:04 nicomen heh http://dev.kohanaframework.org/issues/1854
12:04 batman i have no idea how you can decide when to render from inside render_steps()
12:04 batman do you have the code online somewhere?
12:04 mishantil jberger: Especially that last one is popping up a lot. (good on cpan)
12:04 marcus batman: it will just trigger auto rendering if you don’t render anything in your steps.
12:05 batman but what if i call render_steps() from inside a step inside the render_steps()?
12:05 marcus batman: https://github.com/marcusramberg/Mojolicious-Plugin-RenderSteps
12:06 batman github.com is not responding here :(
12:06 marcus batman: then I will get dizzy
12:06 * sri likes render in the last step as well
12:06 batman i would like to be able to call render_steps as many times as i want
12:06 batman not limited to one.
12:07 batman i guess you could skip render if $c->stash->{'render.steps'}-- or something...
12:07 sri can't you nest them>
12:07 sri ?
12:08 marcus well, that will call render_later multiple times, but I guess that doesn’t matter, and it will render exception on the innermost step that crashes
12:09 batman sri: you can't nest them the way the code is now.
12:09 sri render_maybe or render_not_found might be a problem
12:09 batman https://github.com/marcusramberg/Mojolicious-Plugin-RenderSteps/blob/master/lib/Mojolicious/Plugin/RenderSteps.pm
12:09 sri without the render_not_found it's better
12:10 batman i think i would pull auto render out of the plugin and call it $c->delayed_actions(sub {}, ...) or something
12:10 batman it's better, but still not good.
12:10 batman if you have a template that match the ctrl+action then it will get rendered
12:10 sri very good point though
12:10 * sri did not think about nesting
12:11 batman without nesting support, there will be annoying bugs.
12:11 marcus batman: autorendering already happens in normal controllers, so this makes it work the same, if we just dsable it for nesting
12:11 marcus disable
12:12 marcus You could also just use a delay inside your renderstep tho
12:12 batman right. you could do that with $c->stash->{'render.steps'}++ and --
12:12 sri maybe tie the render_not_found to the outermost render_steps
12:12 batman but i don't want that
12:12 sri then you should be fine
12:12 marcus batman: and if you render something, you will avoid it
12:12 batman $self->render_maybe or $self->render_not_found unless $self->stash->{'render.steps'}--;
12:13 marcus I just really hate when you get a empty response because nothing has been rendered
12:13 marcus it’s never what you want.
12:13 batman and then $self->stash->{'render.steps'}++; between line 11 and 12
12:13 sri batman: yea, like that
12:13 batman \o/
12:13 batman marcus: go, go, go! :)
12:14 batman uhm... i meant unless --$self->stash->{'render.steps'};
12:14 jberger namespace police here, don't use render.steps rather use rendersteps.whatever
12:15 batman jberger: i agree. i just couldn't come up with what "whatever" was supposed to be :)
12:15 jberger depth
12:15 batman rendersteps.depth
12:15 batman :D
12:15 sri depth, level, guard
12:15 jberger batcave ftw
12:16 batman haha
12:16 marcus [master ee700ed] Please the namespace police
12:16 batman ;)
12:16 batman marcus: -- is on the wrong side
12:16 marcus batman: oh, copy-pasted you :)
12:17 batman yeah... i tried to correct myself. should have put "marcus:" infront.
12:17 marcus should probably add a nesting testing too
12:17 batman indeed :)
12:17 batman and shouldn't it be $self->render_exception($_[1]); ?
12:18 sri http://memecrunch.com/image/517e6d98afa96f06cc000060.jpg?w=400
12:18 * batman will use that helper as soon as it's available
12:20 batman i wish "i copy-pasted batman" just made things right ;)
12:20 batman that would be an awesome super power.
12:23 marcus I really hate trying to parse the 500 error message in test outputs
12:23 marcus Would be so much better if we could just show the error simply in the test output
12:24 d4rkie_ joined #mojo
12:24 neilhwatson joined #mojo
12:25 d4rkie joined #mojo
12:27 batman marcus++ # i agree
12:27 batman or at least change the output using an environment variable
12:27 marcus batman: I guess you can provide an exception.test.html.ep file?
12:29 batman yeah, but maybe using variants would be better, since "test" is mode dependent...
12:29 batman not sure what is right to do for that
12:32 sri i just learned we cant activate signatures with Mojo::Base, because we use prototypes a few times
12:33 sri and :prototype is too new for us to use
12:34 marcus KHAAN
12:44 dod joined #mojo
12:48 mishantil marcus: Here we have created a dead simple 'testing' template and set MOJO_MODE=testing when running prove. Works almost always.
12:48 marcus mishantil: yeah, I’ve done that before as well. Was wondering if we should just ship with such a default template
12:48 jberger__ joined #mojo
12:49 mishantil There are still some crashes we encounter where somehow the rendering is not able to get to producing nice 500 output, but they are thankfully few
12:49 dotan joined #mojo
12:49 mishantil marcus: Such a default helper would be appreciated by many I think.
12:49 mishantil s/helper/template
12:49 jberger__ There is an id for the 500 error message
12:50 jberger__ batman can you boot me from your convos instance?
12:50 jberger__ Maybe I can actually :-)
12:52 dotan jberger__: where's that gist you mentioned after my talk? the url-processing queue?
12:56 jberger_ dotan: https://gist.github.com/jberger/5153008
12:57 jberger_ Oh but it's too old!
12:57 jberger_ Uses end method!
12:58 jberger_ And it attaches a finish handler the wrong way for now too
13:00 jberger_ Yeah I need to rework that :-/
13:00 shmuel joined #mojo
13:03 jberger_ marcus: reminder can you add your blog to ironman?
13:04 asarch joined #mojo
13:04 marcus I AM IRONMAN
13:07 jberger_ Also: http://perltricks.com/article/92/2014/5/27/Perl-v5-20-what-you-need-to-know
13:07 Adurah_ threads bad, what good?
13:08 jberger_ I saw that too
13:08 Adurah_ Guess Coro guy was right.
13:08 priodev joined #mojo
13:09 jnbek^dt joined #mojo
13:14 DaniBunny joined #mojo
13:14 marcus jberger_: It seems I can’t recover my password to update the url of my feed
13:15 jberger_ Maybe mst can help
13:16 sivoais joined #mojo
13:27 zivester joined #mojo
13:32 jberger__ joined #mojo
13:34 jberger_ joined #mojo
13:39 dod joined #mojo
13:41 fhelmber_ joined #mojo
13:41 sri marcus: yea, i can't come up with a good solution for the test error problem
13:42 sri test mode templates are not so good because most people test in dev mode
13:42 fhelmber_ joined #mojo
13:43 good_news_everyon joined #mojo
13:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/TSlRWA
13:43 good_news_everyon mojo/master 0c24ec2 Sebastian Riedel: a little more code reuse
13:43 good_news_everyon left #mojo
13:44 sri one more thing, i still would kinda like to rename the include helper to partial
13:44 sri or at least have an alias or so
13:44 sri i mean, helpers are dirt cheap
13:46 sri because my $pdf = $self->include(format => 'pdf') looks kinda awkward
13:46 fhelmber_ joined #mojo
13:47 sri while my $pdf = $self->partial(format => 'pdf') is fine
13:48 sri (it's about rendering partials with localized arguments, that should not end up in the stash)
13:54 gryphon joined #mojo
13:54 btyler joined #mojo
13:57 fhelmber_ joined #mojo
14:00 cpan_mojo Net-Easypost 0.13 by MCMILLHJ - http://metacpan.org/release/MCMILLHJ/Net-Easypost-0.13 (depends on Mojolicious)
14:02 d4rkie joined #mojo
14:10 shmuel joined #mojo
14:12 dotandimet joined #mojo
14:20 nicomen bleh, 32 chars off a tweet: curl -L http://install.perlbrew.pl|bash|grep " source">>~/.bashrc;. ~/.bashrc;perlbrew install -j5 --switch 5.20.0;perl -Mfeature=:all -E'h("world");sub h($n){say"Hello, $n";}
14:24 bluescreen joined #mojo
14:25 bjoernfan Nice try.
14:25 * purl indulges in a bit of evil laughter.
14:26 nicomen I can skip the bashrc initiation though
14:27 Ralesk messagegolfing, eh? :)
14:28 nicomen more like viral installation of perl
14:28 nicomen but I guess it makes more sense to register 520.pl or something
14:28 nicomen and have everything there
14:31 Jonis taken :/
14:56 sri oh well, guess we stick with include
14:56 meshl joined #mojo
15:02 nic Is Mojolicious on Android going to be a possibility?  Has anyone tried it?
15:12 al joined #mojo
15:22 cfedde if perl is there then mojo could be too.
15:22 sri is there a real perl on android?
15:24 beyondcreed joined #mojo
15:31 btyler sri: http://search.cpan.org/~rjbs/perl/pod/perldelta.pod#New_Platforms sure looks like it
15:57 bd so if I want to ua->get() an action from a different controller but of the same app, how do i construct the url?
16:01 dotan bd: The url_for helper?
16:05 bd i tried that, but let me read again
16:07 shadowboxer joined #mojo
16:18 sh4 joined #mojo
16:19 fhelmber_ joined #mojo
16:23 denis_boyun joined #mojo
16:30 Jonis Whats the best beginner guide to mongodb? the mongodb manual looks pretty good, but is there anything else in addition?
16:31 neilhwatson oreilly's book is good.
16:31 bd dotan: i am just getting "Your Mojo is working!" back
16:31 neilhwatson Jonis: http://shop.oreilly.com/product/0636920028031.do
16:33 Jonis neilhwatson: thanks for the tip :)
16:33 sri for an intro the open book might be pretty good http://openmymind.net/mongodb.pdf
16:35 Jonis sri: brilliant, thanks!
16:35 sri definitive guide is the one you use to look up stuff (in addition to the official manual)
16:36 sri and this one answers the "how do i model this kind of data for a document database" questions http://www.amazon.com/MongoDB-Applied-Design-Patterns-Copeland/dp/1449340040/
16:46 bd dotan: bit more complicated, i needed $self->render_later and $self->ua->get( .. => sub {} );
16:59 davido_ joined #mojo
17:03 sri marcus: did you figure out how to mute those annoying tweets when searching?
17:12 marty joined #mojo
17:18 * tempire waits for batman to post videos
17:22 mishantil Every single time I sit down to write tests I think "Oooh. Sexy tests."
17:23 mishantil In mojo they are wonderful to use
17:23 mishantil Unlike some other libraries for testing I've used (c++,java,php,etc)
17:24 mishantil So minimal, much awesome
17:24 Jonis :)
17:24 preaction wow
17:24 Jonis dinnertime, then mongomangocrashandburn
17:40 mire joined #mojo
17:40 dod joined #mojo
17:58 sri guess we are pretty much ready for 5.0
17:58 sri marcus, tempire, jberger, crab: poke me if i forgot something
17:58 * crab reads changelog
17:59 marcus sri: no.
17:59 tempire Is the mixing of non-blocking and blocking useragent requests happening?
17:59 tempire I don't remember the end result of that conversation
17:59 sri already happened
17:59 crab tempire: it did
18:00 sri Mojo::UserAgent as well as Mango can mix blocking and non-blocking for two weeks now :)
18:02 crab does anyone mind if i merge the "removed format method" and "added format attribute" for mojo::log into a "replace a with b" entry?
18:02 marcus crab: +1 from me.
18:02 sri +1
18:02 purl 1
18:03 crab also, if our copy of jquery is still meant only for internal use, the upgrade probably shouldn't be announced... or is that one of the things that people will use no matter what we say anyway?
18:05 good_news_everyon joined #mojo
18:05 good_news_everyon [mojo] amenonsen pushed 1 new commit to master: http://git.io/S8KeyQ
18:05 good_news_everyon mojo/master 77f46b9 Abhijit Menon-Sen: Merge 'add x' and 'remove y' into 'replace y with x'
18:05 good_news_everyon left #mojo
18:07 * sri shrugs
18:07 denis_boyun joined #mojo
18:09 sri would have been nice if we found a way to get rid of wantarray, but maybe we'll have more luck in 6.0
18:09 crab what's with wantarray?
18:09 sri the injection attack on $c->param('foo')
18:10 crab ah.
18:10 sri would be nice if we could get rid of wantarray use in param, so the simple case is secure
18:11 sri problem has a pretty wide scope, since there's 3 other param methods that behave the same
18:11 sri and then there's cookie, signed_cookie and upload...
18:12 sri someone (jberger?) came up with the idea to use collections to represent multiple values, but it didn't work out https://github.com/kraih/mojo/commit/f15ae3a
18:42 kmx joined #mojo
19:03 punter joined #mojo
19:31 sri tempire: dunno if you're still into task results for minion... but i just remembered exactly why i removed it again... was about it getting used wrong
19:32 sri tasks are generally slow, and workers won't be picking up jobs immediately, so there's quite a bit of latency
19:33 sri now, if you wait for a result in your app, like you were talking about, things would look and feel pretty slow
19:34 jberger_ sri did we want to make empty bytestreams falsey too?
19:34 sri so my reasoning was that jobs would get used wrong
19:34 sri jberger: nope
19:34 sri oh, you wrote "want"
19:34 jberger_ '' is false
19:35 sri i dunno
19:35 sri you guys dropped the topic so i figured it was off the table ;p
19:35 jberger_ It got mentioned briefly as we were talking about collections
19:35 jberger_ Then I forgot
19:36 sri reminds me of a fun finding when i was testing collections for ->param
19:36 sri ?foo=0
19:36 sri ... if $self->param('foo');
19:36 sri with collections that became true
19:36 sri actually broke a test
19:37 jberger_ Hmmm yeah that's bad
19:39 jberger_ But hey, now if anyone complains about breaking changes in 5.0 we can point them to changes we almost made :-P
19:39 jberger_ "removed delays in favor of promises"
19:40 jberger_ "params now returns a collection"
19:40 jberger_ hehe
19:47 sri lol
19:54 mire joined #mojo
20:01 Akron joined #mojo
20:03 riche if someone has time I just would like to know scope of operation of 'minion' ... is it mojo-ish threads/Thread::Queue or?
20:08 marcus jberger/sri: I suggest we change bytestreams too
20:08 sri +1
20:08 purl 1
20:10 good_news_everyon joined #mojo
20:10 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/SL38UA
20:10 good_news_everyon mojo/master 506b8ba Sebastian Riedel: updated Changes file
20:10 good_news_everyon left #mojo
20:16 Akron What's the reason not to change "include" to "partial"?
20:16 sri breakage
20:16 purl somebody said breakage was fun!  it means more things to do!
20:17 Akron Even as an alias?
20:17 marcus riche: minion is a job queue. Currently it’s backed by mango.
20:18 sri as an alias it would be fine i guess
20:18 sri interest seems rather low though, so i figured i might not be worth it
20:19 Akron It sounds consistent with render partial (which is something I never liked though). But yeah - not very important.
20:19 sri Akron: what would you call it instead of partial?
20:20 Akron I don't like render(partial => 1) as it has a complete different semantic to render(xy).
20:20 sri ah
20:21 sri that's true
20:21 sh4|2 joined #mojo
20:23 sri actually a real render_partial method would be more in line now
20:23 sri with render_maybe
20:23 sri partial wouldn't actually have to be a reserved stash value
20:23 sri ohoh! something to remove :o
20:24 sri one less reserved stash value is always good... but of course breakage worries me a bit
20:24 Akron A reintroduction of render_partial? That's so 3.0! ;)
20:25 sri it could even localize its arguments to solve that problem once and for all
20:25 sri damn, i like this
20:25 Akron Why not call the method partial instead? What would it do different than the helper?
20:26 sri it would be called render_partial to be in line with the rest of the methods
20:26 sri it would not do anything different
20:26 sri include would just wrap render_partial for templates
20:26 sri so you still get the pretty %= include ...
20:26 stephan48 sounds good
20:26 Akron Naaa - then I prefer the partial helper at least as an alias!
20:27 Akron It is a clear resemblance.
20:27 sri no i don't think it fits into the new design anymore
20:27 sri there is no need
20:27 Akron But no more render(partial => 1) would be great.
20:27 sri when would you use the partial helper?
20:28 Akron Instead of include. I would know it's like calling render_partial. Coherence.
20:28 sri i can only think of two scenarios.... my $pdf = $self->render_partial('foo', format => 'pdf'); and %= include 'foo'
20:28 stephan48 Akron: fix for this: app->helper(partial => { shift->include(@_); } );
20:28 * sri pokes marcus, jberger, tempire and crab again :)
20:29 Akron stephan48: If you would've been in Oslo, you wouldn't talk as an election influenced politician today! :-P
20:29 stephan48 please what?
20:29 purl JERK IT stephan48!
20:29 marcus purl: jerk it!
20:29 purl marcus: pants: WE THE PEOPLE pants: IN ORDER TO FORM A MORE PERFECT UNION pants: ESTABLISH JUSTICE AND A BUNCH OF OTHER STUFF pants: HI I'M PANTS PERHAPS YOU'VE SEEN MY WORK HERE IN JERKCITY pants: OR UNDER THE OVERPASS SUCKING COCK LIKE A MAN ON A MISSION FROM GOD pants: WHAT pants: YES, THAT'S ALL I'VE GOT pants: MAYBE YOU COULD JUST DRAW A BIG BONG IN THE MIDDLE OF THE WHOLE THING OR SOMETHING
20:30 stephan48 oops
20:30 Akron stephan48: All these compromises and agreements. ;)
20:31 marcus I think we were worried the partial method in routes could be confusing with the partial helper
20:31 sri right, that too
20:31 sri render_partial helps with that
20:32 marcus Yeah, I like render_partial better
20:32 sri and one less reserved stash value \o/
20:32 marcus it returns the template instead of pushing it to the response, right?
20:33 sri there is some breakage even with just moving from the stash value to a method... http://grep.cpan.me/?q=partial%5C+%2B%5C%3D%5C%3E%5C+%2B1
20:33 sri marcus: exactly
20:34 sri look at that, even in convis
20:34 sri marcus: OH! i think it would also localize its arguments
20:34 sri so the next render call is unaffected
20:35 sri basically, behave like $self->include() does now
20:35 Akron Oh - that's pretty nice.
20:36 sri $self->include() gets overlooked so often, and data leaks, it's a shame
20:38 sri yea, there's real value here, i think i want it now
20:38 sri lots of ambiguity gone
20:39 * Akron is silent ... he has learned that he can "overconvince" sri to finally not liking suggestions anymore ...
20:39 sri you're good at that ;p
20:41 * Akron doesn't say a word. *hummm*
20:45 meshl joined #mojo
20:45 onur joined #mojo
21:02 sri works really really well
21:03 good_news_everyon joined #mojo
21:03 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/l8nXiw
21:03 good_news_everyon mojo/master e3941a2 Sebastian Riedel: replaced reserved stash value partial with render_partial method
21:03 good_news_everyon left #mojo
21:04 sri marcus: oh, looks like Mojo::ByteStream doesn't actually overload bool...so it stringifies and uses that value for boolean comparison
21:05 sri so it already handles it correctly
21:05 marcus sri: Cool beans
21:07 cpan_mojo Mojolicious-Plugin-DOCRenderer 4.00 by Viliam Pucik - http://metacpan.org/release/EXC/Mojolicious-Plugin-DOCRenderer-4.00
21:09 good_news_everyon joined #mojo
21:09 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/_YYqHw
21:09 good_news_everyon mojo/master 79fe055 Sebastian Riedel: test Mojo::ByteStream in boolean context
21:09 good_news_everyon left #mojo
21:15 Akron That's a change I relly like.
21:15 Akron really.
21:17 good_news_everyon joined #mojo
21:17 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/ZElfow
21:17 good_news_everyon mojo/master 27348b1 Sebastian Riedel: fixed indentation of example
21:17 good_news_everyon left #mojo
21:18 dotandimet joined #mojo
21:24 riche hm, is there any way to get a controller's package name from a route? or __FILE__?
21:26 Akron riche: From a route? When do you want it?
21:28 riche ok nevermind I got it figured
21:39 woz joined #mojo
21:50 woz joined #mojo
21:55 per joined #mojo
22:04 prk joined #mojo
22:12 per joined #mojo
22:18 woz joined #mojo
22:18 prk joined #mojo
22:27 per joined #mojo
22:28 prk joined #mojo
22:29 per joined #mojo
22:31 prk joined #mojo
22:33 per joined #mojo
22:35 d4rkie joined #mojo
22:35 prk joined #mojo
22:37 per joined #mojo
22:38 good_news_everyon joined #mojo
22:38 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/LBH-3w
22:38 good_news_everyon mojo/master 4d16029 Sebastian Riedel: removed incomplete line from Changes file
22:38 good_news_everyon left #mojo
22:39 prk joined #mojo
22:41 dinkypumpkin joined #mojo
22:42 per joined #mojo
22:42 dinkypumpkin left #mojo
22:46 prk joined #mojo
22:47 per joined #mojo
22:48 prk joined #mojo
22:49 jberger_ Cool about bytestream
22:49 prk joined #mojo
22:50 per joined #mojo
22:51 prk joined #mojo
22:52 per joined #mojo
22:53 prk joined #mojo
22:54 per joined #mojo
22:54 riche left #mojo
22:54 riche joined #mojo
22:55 prk joined #mojo
22:57 per joined #mojo
22:58 prk joined #mojo
23:00 per joined #mojo
23:01 prk joined #mojo
23:02 per joined #mojo
23:04 prk joined #mojo
23:06 per joined #mojo
23:07 prk joined #mojo
23:09 Akron joined #mojo
23:10 per joined #mojo
23:11 prk joined #mojo
23:12 per joined #mojo
23:13 Akron Would be great to hear some ideas from tempire regarding the promotion of 5.0. I guess he's got a pretty good idea with framing Mojolicious as the "rails" for perl.
23:14 prk joined #mojo
23:14 sjn s/rails/node/
23:15 per joined #mojo
23:16 sri s/node/angular/
23:16 Akron sjn: In his lightning talk he uses the ruby example. And I think JavaScript became cool even before node.
23:17 prk joined #mojo
23:17 * sri wonders how to get on this list https://github.com/showcases/web-application-frameworks
23:18 per joined #mojo
23:19 bodgix joined #mojo
23:19 prk joined #mojo
23:53 gryphon joined #mojo

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