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

IRC log for #mojo, 2015-09-02

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

All times shown according to UTC.

Time Nick Message
02:04 PryMar56 joined #mojo
02:10 noganex_ joined #mojo
02:32 cfedde_ joined #mojo
02:48 Adurah joined #mojo
02:51 kaare joined #mojo
02:52 oalders joined #mojo
02:53 iloveyou joined #mojo
03:00 oalders joined #mojo
03:29 davido_ joined #mojo
03:44 melo joined #mojo
03:44 davido_ joined #mojo
03:49 iloveyou joined #mojo
03:51 Phil21 joined #mojo
03:58 srini joined #mojo
03:59 jb360 joined #mojo
04:12 iloveyou joined #mojo
04:12 oalders joined #mojo
04:23 dexteruk joined #mojo
04:26 oalders joined #mojo
04:36 oalders joined #mojo
04:42 inokenty-w joined #mojo
04:43 iloveyou joined #mojo
04:43 srini joined #mojo
04:49 Phil21 joined #mojo
04:49 KindOne joined #mojo
04:54 iloveyou joined #mojo
05:35 iloveyou joined #mojo
05:49 iloveyou joined #mojo
05:58 Grinnz batman, i added a last_insert_id method, the hook is a little messy but seems to work https://github.com/Grinnz/Mojo-SQLite/commit/1839c437b54177f2f84ea9629fad961f3381a978
06:12 Grinnz i just ran some benchmarks running 10000 inserts then 10000 selects and surprisingly there doesn't seem to be a noticeable performance difference
06:13 Grinnz from before i added the hook
06:37 iloveyou joined #mojo
06:43 srini joined #mojo
06:43 Phil21 joined #mojo
06:45 cpan_mojo Mojo-SQLite-0.013 by DBOOK https://metacpan.org/release/DBOOK/Mojo-SQLite-0.013
07:02 eseyman joined #mojo
07:19 AndrewIsh joined #mojo
07:28 trone joined #mojo
07:49 refj joined #mojo
07:53 refj I'm using an "my $auth = $r->under('/')->to('Login#check_auth');" to check if the user is logged, which works fine, but I am seeing the check_auth getting called twice everytime I access a route which resides within '/'. How to avoid this?
07:57 jontaylor joined #mojo
08:02 berov joined #mojo
08:18 Vandal joined #mojo
08:47 jontaylor workflow advice: What strategy do people use to prevent getting caught out by deprecations? I often forget to update modules unless I need something from a newer version, or its a new application, which means I might only update say, twice a year, which puts me outside the deprecation windows
08:48 jontaylor I’m wondering if people have strategies to combat that, like I can already think of some ways to do it, like comparing current versions of installed modules against latest on deploys, or as part of a test or something
08:51 bd jontaylor: i mostly use what my distribution provides
08:52 jontaylor bd: ahh so whatever is available in apt/yum etc?
08:52 bd jontaylor: yeah. there are a couple of modules which are not yet packaged or where we need newer ones
08:52 bd jontaylor: those we package by ourselfs
08:53 jontaylor bd: its that very reason why i’ve always abandoned the distribution packages, because eventually I always need something from cpan, so I just standardise on cpan for everything
08:54 jontaylor that and the fact I develop on OS X, but deploy to both debian linux and FreeBSD :)
08:55 bd we rollout stuff through puppet, so it's just a question of packaging and updating your puppet module
08:57 jontaylor I want to get involved with puppet or maybe chef, but i’ve never felt like i’ve had enough servers to justify it, I only deploy to like 3 servers (which are quite beefy machines)
09:01 jontaylor I always refer to this, https://xkcd.com/1205/ it takes me under 5 hours to set up a server, and I average about 1 per year, maybe less
09:01 bd being able to scale is just one benefit
09:02 bd having one place where all your config resides is something you profit from even with less machines
09:04 jontaylor bd: indeed, its very appealing, i’m starting to feel like my “pragmatism” is turning into neglect :p
09:15 meshl joined #mojo
09:16 ashimema joined #mojo
09:28 meshl joined #mojo
09:28 iloveyou joined #mojo
09:32 refj I found a solution using standard placeholders: my $auth = $r->under('/:*')->to('Login#check_auth'); and moving the '/' route above the "under" and adding a specific check_auth for that route, this eliminated the extra call to the controller.
09:41 asm35 joined #mojo
09:41 iloveyou joined #mojo
09:42 CHYC In the documentation, it says that input field values are populated with existing param values. Is there a way to do this with multiple values of the same parameters and every_param?
09:43 CHYC http://pastebin.com/PUKbiFJx
09:47 srini joined #mojo
09:59 jontaylor CHYC: I think this is what is ultimately called https://github.com/kraih/mojo/blob/a6382fd15fceddf15eec6e3f5f35751538cf562c/lib/Mojolicious/Plugin/TagHelpers.pm#L83
09:59 jontaylor so it appears it will just pull the first value and use that for every field with that name
10:00 CHYC jontaylor: Yes, that's what happens when I tried it :(
10:00 jontaylor What I would do if I were you, is make a new helper, that takes the name of the field, and then loops calling text_field for each one
10:03 melo joined #mojo
10:04 CHYC Thanks, will do. As an aside, doesn't the behaviour you highlighted differ from Mojo::Parameters::param ? That takes the '[-1]'th element rather than [0]
10:40 ashimema joined #mojo
10:56 CHYC jontaylor: Thanks for your help, it was easier than I thought  http://pastebin.com/K3TDbvL7
10:59 jontaylor CHYC: i’m glad you got it sorted
11:04 refj Well, I haven't solved my problem really. How to not include the root path when using an "under" and still succesfully routing to items under "/"?
11:07 refj I'm trying remove an unneeded call to my controller authentication check.
11:10 refj http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Under this will happen here as well.
11:12 refj Perhaps I should stop obsessing about it, but the controller call to '/' seems superflous and I would like to avoid it.
11:14 CHYC refj: I'm not 100% sure what you're trying to do. Does http://pastebin.com/rggaFpiT help?
11:15 dod joined #mojo
11:21 dod joined #mojo
11:24 refj CHYC: No, this doesn't work for me. If I use your syntax the route is not available anymore.  What I am trying to do is:  my $auth = $r->under('/:*')->to('Login#check_auth'); $auth->get('/rfc_kalender')->to(template => 'rfc_order/rfc_kalender'); And I don't want the Login#check_auth to get called for '/'.
11:25 refj Actually my under looks like this atm: my $auth = $r->under('/')->to('Login#check_auth');
11:31 CHYC So you want $r->get('/') to _not_ have a specific call to check_auth in the controller?
11:32 CHYC But all other urls to have it?
11:32 refj CHYC: Exactly!
11:33 refj Because now when I access /rfc_kalender f.ex it calls the check_auth twice.
11:34 refj And I figure it is because it checks for '/' as well, which I find uneeded. But perhaps it is because I lack insight.
11:37 CHYC refj: A chosen route is the first defined one that matches. I don't think there's any problem in $r->get('/)->to('root#welcome'); my $auth => $r->under......
11:38 CHYC Oops, syntax error, but I hope you get what I mean.
11:46 refj I don't quite get it. I think basically I need to read some more documentation, but I expected using wildcards on the route would exempt routes covered by the under, but using a wildcard ('/:') with an under breaks my routes. Steep learning curve atm. I will get it eventually. Thanks for the help CHYC.
11:46 refj sorry what I am writing does not make sense.
11:47 refj correction:  but I expected using wildcards on the route ('/') would exempt /
11:51 dvinci joined #mojo
11:51 refj which it probably does, but it breaks my existing routes at the same time, more experimentation needed. Thanks for your helping med.
11:52 jberger refj: using a wildcard /*something doesn't match / unless you give the placeholder a default value
11:52 CHYC I think I understand what you're doing now. I'll write it in a pastebin because it's easier to read
11:52 jberger And even if it did, they match in order of definition
11:53 pink_mist refj: you asked for an example about staying on the same url when making the user log in? http://p.0au.de/52ce007f here you are, just whipped it up
11:54 iloveyou joined #mojo
11:54 jberger jontaylor: I've been finding ansible very easy to get started with
11:55 CHYC refj: Is this what you want? http://pastebin.com/BaadiziE
11:55 Repaster Repasted text from CHYC: http://fpaste.org/262448/44119492/
12:00 pink_mist refj: of course, if you're not in a lite app, you don't need the group {}
12:05 refj CHYC: This is more or less what I am using now, so I get two calls to the controller. One for / which is covered by the under and one for the called route.
12:05 refj pink_mist: Thanks!
12:08 jberger refj: can you try something for me? Rather than route to a template, make a stub controller action method that just renders that template and point the end route to that
12:11 refj jberger: I will try. I might take some time since I am unsure what a stub controller action is.
12:18 pink_mist refj: I noticed a bug in the authentication helper, but meh .. doesn't matter much :P
12:19 pink_mist refj: here's an updated one: http://p.0au.de/1d0a6891 :P
12:21 jberger refj: stub making tiny
12:21 jberger Grrr s/making/meaning/
12:33 refj jberger: Yes, that worked and it was actually what CHYC was trying to tell me. Thanks.
12:37 asm35 joined #mojo
12:52 jberger So the problem I think it's order of precedence of stash values
12:53 ajr_ joined #mojo
12:53 jberger I wonder now if you go back to your old version, what happens if you set template as before and set action => ''
13:12 refj jberger: This works as well!
13:12 refj :)
13:15 eitz joined #mojo
13:17 hernanGOA joined #mojo
13:20 gryphon joined #mojo
13:27 good_news_everyon joined #mojo
13:27 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vGPgt
13:27 good_news_everyon mojo/master d7a308d Sebastian Riedel: fix handling of parameters with multiple values in Mojolicious::Plugin::TagHelpers
13:27 good_news_everyon left #mojo
13:27 sri CHYC: you're correct, it should be [-1]
13:38 coolo joined #mojo
13:49 inokenty joined #mojo
14:06 iloveyou joined #mojo
14:07 meshl joined #mojo
14:42 zackiv31 joined #mojo
14:52 iloveyou joined #mojo
14:57 inokenty joined #mojo
15:01 * sri yawns
15:05 sri so glad we got rid ->bridge and changed all the docs to not use ->route, so many FAQs just evaporated
15:06 sri only change i would still like to make is rename ->under to ->scope ;p
15:07 jontaylor i’d like that too
15:07 jontaylor its what I say in my head when reading it
15:07 jontaylor only in a major version though, life is hard enough as it is :)
15:08 sri not sure we can ever do it, since it would break so much code
15:09 jontaylor if you are worried about that you could have both with a deprecation warning over ages
15:09 jontaylor it isn’t quite that big a deal though
15:09 stephan48 introduce scope and make under an alias? change all the docs.. and then wait a major or two?
15:09 jontaylor although i’d like that, it feels like more pain than reward
15:10 genio and then 'over' becomes?
15:11 PryMar56 joined #mojo
15:12 jontaylor when
15:12 jontaylor actually no
15:12 jontaylor I take that back
15:30 jberger I could argue to make a under an alias for scope
15:30 jberger I would still call it under in Lite
15:30 * Grinnz_ doesn't really see either name as really descriptive
15:31 Grinnz_ but i don't have a better idea yet :)
15:32 disputin joined #mojo
15:32 disputin1 joined #mojo
15:32 dod joined #mojo
15:34 dod joined #mojo
15:54 stephen joined #mojo
16:23 lluad joined #mojo
16:36 hernanGOA joined #mojo
16:37 jontaylor joined #mojo
16:47 iloveyou joined #mojo
17:05 iloveyou joined #mojo
17:12 iloveyou joined #mojo
17:18 mattastrophe joined #mojo
17:20 mattastrophe_ joined #mojo
17:24 mattastrophe_ joined #mojo
17:25 mattastrophe_ joined #mojo
17:25 good_news_everyon joined #mojo
17:25 good_news_everyon [mojo] kraih tagged v6.18 at 83c7216: http://git.io/vG181
17:25 good_news_everyon left #mojo
17:26 good_news_everyon joined #mojo
17:26 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vG1BT
17:26 good_news_everyon mojo/master 661a3ac Sebastian Riedel: bump version
17:26 good_news_everyon left #mojo
17:28 neilhwatson joined #mojo
17:28 cpan_mojo Mojo-Pg-2.09 by SRI https://metacpan.org/release/SRI/Mojo-Pg-2.09
17:30 cpan_mojo Minion-1.18 by SRI https://metacpan.org/release/SRI/Minion-1.18
17:39 meshl joined #mojo
17:40 Kogurr joined #mojo
17:44 hernanGOA ocooll thanks sri
17:46 berov1 joined #mojo
17:47 jberger release all the things!
17:47 Grinnz_ \o/
17:48 jberger s/(.*)/\U$1/
17:55 amon joined #mojo
17:57 trone joined #mojo
18:05 disputin joined #mojo
18:15 neilhwatson mojo::pg gave me a good speed  boost. Nice work!
18:15 PopeFelix Not mojo-related, but more general.  What do you folks that maintain distributions, such as Mojo, use to keep track of dependencies?
18:23 Grinnz Mojo just keeps them in the Makefile.PL
18:23 Grinnz i use cpanfile usually
18:31 Grinnz It depends a lot on what authoring tools you're using if any
18:32 jberger PopeFelix: MB or MBT+AMBT for me
18:33 PopeFelix jberger, What are MB and MBT+AMBT?
18:33 Grinnz MBT is Module::Build::Tiny
18:33 Grinnz it will use cpanfile to determine dependencies
18:33 PopeFelix And MB would be Module::Build I guess.
18:33 Grinnz if you use the mbtiny tool
18:33 Grinnz or App::ModuleBuildTiny (AMBT)
18:33 PopeFelix ahh
18:34 PopeFelix I'm using dzil, because some of the folks use it at work, so i figured i ought to get a handle on it.
18:34 Grinnz i use it, it takes some doing to get it working how you like but it works for me
18:34 Grinnz i use [PrereqsFromCPANFile] so my prereqs are still read from there
18:35 genio I've always been a fan of the Makefile.PL, but I'm trying to get used to MB
18:36 Grinnz and for dists where it makes sense i've recently switched to using [ModuleBuildTiny::Fallback] as the installer
18:37 Grinnz would just use [ModuleBuildTiny] if i didn't want to support 5.10.1 :/
18:41 PopeFelix Thanks. :)
18:43 Grinnz https://metacpan.org/pod/Dist::Zilla::PluginBundle::Author::DBOOK is my dzil bundle, it looks daunting, but most of it is really just git stuff or metadata collecting... heavily inspired by Dist::Milla which is also worth a look
18:45 PopeFelix Cool.
18:49 Grinnz App::MBT is really nice though, it's actually why i'm writing the reversioning tool i'm about to release
18:57 jberger Grinnz: not happy with perl-reversion?
18:57 Grinnz well, i basically wanted [RewriteVersion] but without dzil, and not using Perl::Version
19:01 Grinnz Perl::Version's "no special treatment for decimal versions" is a bit scary, among other things
19:02 Grinnz i.e you should never increment a version '1.9' to '1.10', but you should increment a version 'v1.0.9' to 'v1.0.10'
19:02 zackiv31 joined #mojo
19:03 Grinnz i havent used it enough to know what it actually does, i just use Version::Next
19:23 jberger Zoffix++ # https://github.com/moritz/ilbot/issues/39
19:23 iloveyou joined #mojo
19:26 PopeF joined #mojo
20:04 ajr_ joined #mojo
20:05 iloveyou joined #mojo
20:12 dexteruk joined #mojo
20:17 Kogurr joined #mojo
20:25 asarch joined #mojo
20:33 meshl joined #mojo
20:33 ZoffixMobile joined #mojo
20:33 ZoffixMobile RT#42 pR#42 #42
20:34 ZoffixMobile ain't set up yet, I guess
20:41 asm35 joined #mojo
20:56 PopeFelix joined #mojo
21:04 dexteruk_ joined #mojo
21:08 jb360 joined #mojo
21:43 iloveyou joined #mojo
22:02 asarch joined #mojo
22:15 iloveyou joined #mojo
22:18 meshl joined #mojo
22:27 mattastrophe joined #mojo
22:27 x86 joined #mojo
22:30 mattastrophe_ joined #mojo
22:35 bpmedley Anyone know if cpantesters still needs any help?
22:37 preaction bytemark is setting up a new box with more RAM, should be done by tomorrow morning (though that's UK time). barbie's going to sync everything there and throw the lever see how it goes
22:38 Grinnz_ "no, the other lever!"
22:38 preaction why do we even have that lever?
22:39 stephan48 "*oops* did i cause that major outtage?"
22:39 Grinnz_ preaction: backwards compatibility of course
22:41 bpmedley preaction: Thanks for the update.
23:03 mattastrophe_ joined #mojo
23:03 upasana joined #mojo
23:03 Lee joined #mojo
23:03 lb joined #mojo
23:03 mattastrophe joined #mojo
23:03 lluad joined #mojo
23:04 upasana_ joined #mojo
23:06 asarch joined #mojo
23:42 iloveyou joined #mojo
23:51 mattastrophe joined #mojo
23:59 mattastrophe joined #mojo
23:59 mattastrophe_ joined #mojo

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