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

IRC log for #mojo, 2015-04-27

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

All times shown according to UTC.

Time Nick Message
00:00 Grinnz how's that
00:15 jberger Grinnz: looks good
00:25 Grinnz https://metacpan.org/pod/release/DBOOK/Mojolicious-Plugin-SetUserGroup-0.001/lib/Mojolicious/Plugin/SetUserGroup.pm boom
00:27 jberger Grinnz: nice
00:34 cpan_mojo Mojolicious-Plugin-SetUserGroup-0.001 by DBOOK https://metacpan.org/release/DBOOK/Mojolicious-Plugin-SetUserGroup-0.001
00:37 asarch joined #mojo
00:43 wingfold joined #mojo
00:43 Grinnz note to self, don't test privilege dropping in a process that's already dropping privileges because of the hypnotoad configuration
00:44 Grinnz anyway; running an actual app with it now!
00:44 Grinnz not on port 80 though :P
00:51 sri Grinnz++
00:52 good_news_everyon joined #mojo
00:52 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vfyFU
00:52 good_news_everyon mojo/master 8d28581 Sebastian Riedel: next_tick belongs to Mojo::Reactor::Poll
00:52 good_news_everyon left #mojo
00:53 Grinnz ouch... that will break my reactors
00:53 hshong joined #mojo
00:54 sri they should have been broken already
00:54 sri the reset code was in Mojo::Reactor::Poll
00:54 Grinnz they all reimplement reset, but not next_tick
00:55 sri still broken
00:55 sri you need to reset the next_tick stuff
00:55 Grinnz oh you mean resetting next_tick
00:55 Grinnz fair enough
00:55 sri not that i'm happy with the next_tick implementation
00:55 sri but i don't think there's much that can be done
00:56 sri at least as long as we want to support many reactors
01:04 mattastrophe joined #mojo
01:07 good_news_everyon joined #mojo
01:07 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vfyNI
01:07 good_news_everyon mojo/master 2c26e31 Sebastian Riedel: test reset with next_tick
01:07 good_news_everyon left #mojo
01:23 klapperl_ joined #mojo
01:40 tempire Grinnz++
01:47 inokenty-w joined #mojo
01:59 good_news_everyon joined #mojo
01:59 good_news_everyon [mojo] kraih tagged v6.10 at 32979bc: http://git.io/vfSvN
01:59 good_news_everyon left #mojo
02:00 good_news_everyon joined #mojo
02:00 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vfSfT
02:00 good_news_everyon mojo/master de392ab Sebastian Riedel: bump version
02:00 good_news_everyon left #mojo
02:16 hshong joined #mojo
02:26 * sri waits for the angry mob
02:32 wingfold joined #mojo
02:40 tempire That was a pretty good email. The fact that that can be pointed to is a good response, particularly framed as a security issue.
02:55 noganex_ joined #mojo
03:02 jberger Grinnz++ # fallback options
03:02 jberger sri++ # email
03:03 jberger tempire++ # tempire
03:04 dotandimet joined #mojo
03:21 mattastrophe joined #mojo
03:52 lluad_ joined #mojo
03:57 jberger another weekend another module: https://metacpan.org/release/JBERGER/Mojolicious-Plugin-ReplyTable-0.01
03:58 basic6 joined #mojo
03:58 jberger preaction: ^^
03:58 preaction wooo!
04:02 memowe joined #mojo
04:04 jberger Grinnz: you mentioned an interest too ^^
04:21 wingfold joined #mojo
04:35 cpan_mojo Mojolicious-Plugin-ReplyTable-0.01 by JBERGER https://metacpan.org/release/JBERGER/Mojolicious-Plugin-ReplyTable-0.01
04:38 Grinnz only rectangular? all my data is trapezoidal!
05:11 lluad_ joined #mojo
05:15 kaare joined #mojo
05:23 mattastrophe joined #mojo
05:32 berov joined #mojo
05:40 melo1 joined #mojo
05:42 melo2 joined #mojo
05:53 batman Grinnz++ # nice :)
05:53 batman Grinnz: add reference to SetUserGroup in https://github.com/jhthorsen/toadfarm/commit/86bbf99ff673b6c26e9dd56a3570424132229d16 as well
05:59 melo joined #mojo
06:06 dod joined #mojo
06:09 wingfold joined #mojo
06:11 dod joined #mojo
06:31 irq joined #mojo
06:46 bramirez joined #mojo
06:55 AndrewIsh joined #mojo
07:04 eseyman joined #mojo
07:06 ashimema joined #mojo
07:19 trone joined #mojo
07:31 bramirez joined #mojo
07:42 wariat joined #mojo
07:43 dod joined #mojo
07:53 wariat_ joined #mojo
07:58 wariat joined #mojo
07:58 wingfold joined #mojo
08:03 memowe joined #mojo
08:06 bramirez joined #mojo
08:09 wariat_ joined #mojo
08:10 odc joined #mojo
08:15 batman finally! https://github.com/kraih/mojo/wiki/User-quotes
08:16 Vandal joined #mojo
08:37 dod1 joined #mojo
08:46 Lee joined #mojo
08:50 gatitskiy joined #mojo
08:50 marcusr joined #mojo
08:52 marcusr joined #mojo
08:54 bramirez joined #mojo
08:55 stokachu joined #mojo
09:00 stokachu joined #mojo
09:01 stokachu joined #mojo
09:09 misty_g3ar joined #mojo
09:24 dod joined #mojo
09:47 wingfold joined #mojo
10:02 memowe joined #mojo
10:06 mattastrophe joined #mojo
10:24 niczero joined #mojo
10:26 dod joined #mojo
10:34 dotan1 joined #mojo
10:48 Kripton joined #mojo
10:48 wingfold joined #mojo
10:50 McA joined #mojo
11:09 ashimema anyone out there using AssetPack?
11:09 ashimema I'm wondering what the best way to set the cache header on the resultant files is?
11:21 ashimema @seen jnap
11:22 ashimema hmm.. not in this channel obviosly
11:22 marcusr ashimema: batman uses assetpack :)
11:22 misty_g3ar joined #mojo
11:23 batman ashimema: what do you want to change?
11:23 ashimema I wanted to know an aproach to adding cache_control headers to the packed assets it produces
11:23 ashimema (when in production mode)
11:24 ashimema as it handles the routing etc internally I wasn't sure how to add the headers?
11:24 batman there's no way at the moment, except with a hook. what do you want to set it to?
11:24 ashimema a very long cache ;)
11:25 batman indeed. i was sure i did that already :(
11:25 batman ashimema: i'm the author
11:25 ashimema Unles i'm misreading stuff.. then assetpack creates nice uniquely names files per packing time.. so a very long timeout seems apropriate.
11:25 ashimema hmm.. really..
11:25 ashimema I'm not seeing the headers filled at all here?
11:25 batman can you make an issue? https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues
11:25 ashimema sure..
11:25 ashimema I'll have a quick gander at the code first.. see if I can also make a patch ;)
11:26 batman ashimema: the thing is that if you're creating assets on disk, the it's Mojolicious::Static that render the files and not AssetPack
11:26 ashimema oh yeah.. of course it is.
11:27 ashimema interesting..
11:27 ashimema does look like it sets the last_modified header
11:27 ashimema but nto the cache-control ones
11:28 batman ashimema: it sets etag and last_modified https://metacpan.org/pod/Mojolicious::Static#is_fresh
11:30 batman i guess i could just make a route for get '/packed/*file' => sub { .... }; and manually set Cache-Control: max-age=9999999999 or something :)
11:30 batman no, that won't work because the static file is already located
11:30 ashimema https://metacpan.org/source/JHTHORSEN/Mojolicious-Plugin-AssetPack-0.54/lib/Mojolicious/Plugin/AssetPack.pm
11:31 ashimema I reckon we probably want something added around lines 130ish
11:31 batman ashimema: that's only for in-memory assets
11:31 batman won't help if they are on disk
11:31 ashimema but that's only a feeling after a very quck gander at the code ;)
11:31 ashimema ack.. of course..
11:31 ashimema muppet me
11:32 batman i think i won't change AssetPack, but rather provide a howto change Cache-Control using hook after_static => sub {}
11:32 ashimema :)
11:32 batman but please open an issue. maybe someone else can provide information
11:32 batman *ideas
11:34 ashimema submitted an issue
11:34 ashimema https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues/55
11:34 batman ashimema: is this a _real_ problem or are you just inventing an issue?
11:34 ashimema :)
11:35 batman it's a serious question from my side. i'm not trying to be rude.
11:35 ashimema It's only an issue so much as it's one of the top complaints a number of 'pagespeed' checkers does on a site (googles one is the obvious example)
11:35 ashimema certainly not taking it as rude ;)
11:36 ashimema I'm just gong through my app and attempting to get it to past all the low hanging fruit performance gains mentioned..  ;)
11:36 batman but how does caching help google?
11:36 ashimema it doesn't help google ;)
11:37 batman oh. i'm pretty sure this isn't a "low hanging fruit"
11:37 ashimema it's helps a user of your site upon their second visit to the site.. as in theory the browser keeps a copy of the asset for allot longer
11:37 ashimema really..
11:38 batman yeah. i get that.
11:45 meshl joined #mojo
11:46 dotan joined #mojo
11:46 ashimema I 'think' it's one of those things google uses for page rank too.. but i'm nto 100% on that.
11:47 ashimema either way.. if it's not low hanign fruit.. then it's not really worth it in the grand scheme ;)
11:47 ashimema jsut somthing I imagined AssetPack already did ;)
11:47 batman yeah, i thought about it and then... *meh*
11:48 batman :)
11:56 wingfold joined #mojo
12:03 dod joined #mojo
12:06 marcusr batman: I think the default should be to cache the shit out of your assets. At least that is what I would expect.
12:07 batman marcusr: https://github.com/jhthorsen/mojolicious-plugin-assetpack/issues/55#issuecomment-96618443
12:08 neilhwatson joined #mojo
12:12 batman ashimema: guess you got your +1
12:12 ashimema :)
12:12 batman marcusr: and you're positive that the suggested "max_age" header i suggested will result in this?
12:12 marcusr ¯\_(ツ)_/¯
12:13 marcusr batman: pretty confident
12:14 batman right.
12:14 marcusr of course my whole life could be a lie...
12:14 marcusr ¯\(°_o)/¯
12:15 ashimema you got some wicked smileys there
12:16 marcus ashimema: thanks. ┐( ̄ー ̄)┌
12:19 ashimema thanks guys.. most helpful
12:19 Grinnz joined #mojo
12:22 ToApolytoXaos joined #mojo
12:26 bramirez joined #mojo
12:35 Lee https://groups.google.com/forum/#!topic/mojolicious/M_xB_Vy7e8g # me suggests some blog noise is made about this
12:47 ajr_ joined #mojo
12:52 asarch joined #mojo
12:53 * batman deleted the message
12:53 batman waiting for Grinnz to comment.
12:53 batman i'm not suited to say anything. (sorry)
12:54 Lee i mean more for the Change than the issue
12:56 Grinnz batman, your message was correct
12:56 batman ok.. hehe. i'm to scared to get my head chewed off :P
12:57 Grinnz batman, just more specifically: no matter what you specified, it would not use the secondary groups of the user
12:57 batman Grinnz: can you post?
12:57 Grinnz ok
12:58 batman awesome
12:58 mattastrophe joined #mojo
13:02 batman Grinnz++
13:28 odin22 joined #mojo
13:34 chansen joined #mojo
13:43 firnsy joined #mojo
13:44 gryphon joined #mojo
13:48 gryphon_ joined #mojo
13:49 gryphon__ joined #mojo
13:53 Lee Grinnz_: just raised a PR against your plugin
13:54 niczero Just seen that the default version of perl on debian is v5.20.2
13:55 niczero I'm pretty confident in saying debian has never ever been that uptodate
13:58 Grinnz joined #mojo
14:01 Lee that means they've leapfrogged 2 major versions?
14:02 * Lee expects hash key ordering bugs a plenty :)
14:03 mattastrophe joined #mojo
14:11 lluad joined #mojo
14:27 Lee Grinnz_: ta!
14:34 cpan_mojo Mojolicious-Plugin-ReplyTable-0.02 by JBERGER https://metacpan.org/release/JBERGER/Mojolicious-Plugin-ReplyTable-0.02
14:34 cpan_mojo Mojolicious-Plugin-Directory-0.10 by HAYAJO https://metacpan.org/release/HAYAJO/Mojolicious-Plugin-Directory-0.10
14:34 tiejl joined #mojo
14:37 jberger I think having a correct link to my employer merits a release :P
14:38 batman :)
14:42 Ptolemarch joined #mojo
14:47 jberger and ... since I copied the pod bottom from previous modules ...
14:53 tiejl_ joined #mojo
15:02 memowe joined #mojo
15:10 jberger oh blast, my pin_inc trick doesn't work on older perls :(
15:11 jberger http://matrix.cpantesters.org/?dist=Mojolicious-Plugin-ReplyTable%200.01
15:11 jberger ok, time to be less clever
15:18 dod joined #mojo
15:20 mst jberger: pin_inc ?
15:21 jberger mst: i was using a little hack of my own design to prevent loading of modules: https://github.com/jberger/Mojolicious-Plugin-ReplyTable/blob/5611d5c29f91dc6045fac2b238f6db77aa7b1004/t/basic.t#L9-L13
15:21 jberger but it seems that that doesn't work on all perl versions
15:21 jberger so I just uploaded a module that uses Test::Without::Module
15:21 Grinnz_ heh
15:21 jberger I'm a little curious what changed to make it work on more recent ones, but not enough to really investigate
15:22 jberger http://matrix.cpantesters.org/?dist=Mojolicious-Plugin-ReplyTable%200.01
15:22 mst I would suspect something to do with localizing %INC confusing things
15:22 jberger (oops, forgot I already linked)
15:22 Grinnz_ oh damn, by older perls you meant basically all ther perls
15:22 Grinnz_ lol
15:22 jberger yeah
15:22 jberger including the one we use at $work
15:23 Grinnz_ heh
15:23 jberger we are lucky enough to be on 5.18, but that's not quite good enough for this ;-D
15:23 Grinnz_ yeah we just moved to 5.18 here...
15:23 jberger anyway, new one coming
15:25 Grinnz_ also, Fedora 22 will have 5.20.2, finally
15:25 Grinnz_ 21 is still on 5.18.4
15:27 mst jberger: if you want to build something more complicated, btw, there's a Devel::OverrideGlobalRequire or something
15:28 * jberger looks
15:29 jberger mst: ah, if I had seen that I might have used it
15:29 jberger perhaps a future version
15:31 mst jberger: I figured out how to do it for @INC shuffling on an ancient cdx prototype, then ribasushi solidified it in DBIC, then (doy? I think) packaged it up and cpan'ed it
15:33 jberger mst: the code for that one is more what I expected to find in the modules that I did see
15:34 jberger which is why I stuck to my hack rather than using one of them
15:34 jberger but clearly, not the right call
15:35 cpan_mojo Mojolicious-Plugin-ReplyTable-0.03 by JBERGER https://metacpan.org/release/JBERGER/Mojolicious-Plugin-ReplyTable-0.03
15:35 cpan_mojo Mojo-JWT-0.04 by JBERGER https://metacpan.org/release/JBERGER/Mojo-JWT-0.04
15:35 cpan_mojo Mojolicious-Plugin-SetUserGroup-0.002 by DBOOK https://metacpan.org/release/DBOOK/Mojolicious-Plugin-SetUserGroup-0.002
15:36 Grinnz_ damn metacpan, took long enough
15:36 Grinnz_ i guess that was only an hour, still
15:37 Grinnz_ i briefly considered looking into metacpan's indexing solution, but then i decided i'm content with just managing the complexity of realtime indexing for one project right now
15:41 tiejl joined #mojo
15:50 ajr_ joined #mojo
15:58 Ptolemarch joined #mojo
15:58 ajr_ joined #mojo
16:07 sri yay, no angry mob
16:07 * genio starts passing out pitchforks :)
16:07 sri should have bumped the perl dependency to 5.14 too ;p
16:07 ribasushi mst: you are likely thinking of something else - D::OGR is 100% zefram-code, which I lifted for DBIC, and xdg threw on CPAN later on
16:07 ribasushi (credit where credit's due)
16:08 mst ribasushi: yeah?
16:08 purl totally!
16:09 ribasushi mst: onwards from https://metacpan.org/source/ZEFRAM/Lexical-SealRequireHints-0.009/lib/Lexical/SealRequireHints.pm#L179
16:10 ribasushi (his code evolved since, I need to make a pass at updating mine)
16:12 Grinnz_ sri: lol
16:15 mst ribasushi: oh, fair enough, not surprising that zefram came up with the same trick and did it better than me
16:15 mst ribasushi: we definitely discussed my original implementation before L::SRH existed though
16:16 mst ribasushi: so I stand by "to my knowledge, I did it first"
16:34 Ptolemar_ joined #mojo
16:34 cpan_mojo Mojolicious-Plugin-PlackMiddleware-0.34 by JAMADAM https://metacpan.org/release/JAMADAM/Mojolicious-Plugin-PlackMiddleware-0.34
16:52 ashimema ooh.. hadn't seen mojo::jwt befor
16:53 ashimema and there's me using JSON::WebToken
16:53 tiejl joined #mojo
16:53 * ashimema heads off to investigate the differences
16:54 wariat joined #mojo
16:55 mattastrophe joined #mojo
17:06 * ashimema notes he started using JSON::WebToken before Mojo::JWT was a twinkle in the eye it seems form the commit dates..
17:07 ashimema it's nice to see someone in the Mojo namespace has picked this feature up... :)
17:08 lluad Each time I come back to do another Mojo-based mini-app I discover a dozen new plugins that'd have been *really* useful on the previous app.
17:11 ashimema out of interest jberger.. what put you off JSON::WebToken?
17:11 ashimema was it the 'THIS IS AN ALPHA LEVEL INTERFACE' ;)
17:12 disputin joined #mojo
17:17 tiejl_ joined #mojo
17:24 jberger ashimema: that and I didn't like some of the code
17:25 tiejl joined #mojo
17:26 ashimema it's a while since I looked..
17:26 jberger although tbh when I look back at it, I see why some of it is there
17:27 ashimema seem to remember similar feelings.. though I didn't know how to do it better..
17:27 jberger stuff that I didn't understand before I started
17:27 jberger I don't like the Carp level stuff
17:27 ashimema yeah.. I had a feeling that was going to be how I felt if I attempted to re-write it ;)
17:27 jberger and the plugin system isn't my favorite
17:27 ashimema cool.. we'll I think I'll be watching you work in that area with baited breath ;)
17:28 jberger ashimema: what do you use if for? Google or something else?
17:28 jberger seems like most people use it with google apis
17:28 ashimema might even send a pull request now and then if I find anything worthwhile adding
17:28 ashimema I'm using it instead of cookies
17:29 ashimema can't remember why now really, but we wanted to be cookie free in this app (a decision which I think we're going to reverse)
17:30 jberger ashimema: that's funny, since basically I'm using it in a situation where I can't use the standard mojo cookie (multiple servers, can't share login for legal reasons)
17:30 ashimema but basically I wanted to implement a JWT based auth mechanism mostly so I could get my head around how they're meant to work..
17:30 ashimema aha.. you've pretty much hit the nail on the head there..
17:30 jberger all in all, its very similar to the mojo token
17:30 ashimema that's exactly why we were avoiding cookies ;)
17:30 jberger s/token/cookie/
17:31 ashimema I'll have to have a read of your code..
17:31 jberger ashimema: health care?
17:31 purl i think health care is a bitch
17:31 jberger shut up purl!
17:31 purl ;-(
17:31 ashimema I would love to use things like the authentication and authorization helper plugins.. but they both plug onto the Mojo::Sessions stuff
17:31 ashimema libraries.. but many are in healthcare area..
17:32 ashimema UK though.. so probably not the same set of rules..
17:32 ashimema your USA right?
17:32 jberger yeah
17:32 ashimema (from your employer link ;) )
17:32 tiejl_ joined #mojo
17:32 ashimema brb.. just gotta tuck the daughter in for bedtime ;)
17:33 jberger np
17:39 tiejl joined #mojo
17:46 berov joined #mojo
17:47 tiejl_ joined #mojo
17:52 ashimema So, yeah..
17:52 ashimema am back now..
17:56 trone joined #mojo
17:58 ashimema So.. are you using sessions still.. just replacing the cookie with a token?
17:59 jberger I use sessions per-server (ie. per location)
17:59 ashimema Is the code open.. would be interested to see how your using your jwt's ;)
17:59 jberger then in the cases where I need a user from location A to take some action at location B, the user first gets a JWT from A and then uses it to authorize action on B
17:59 jberger no, its not
18:00 jberger and indeed it isn't even written yet
18:00 ashimema no worries then
18:00 ashimema lol
18:00 jberger we are still "getting requirements" from business
18:00 jberger but I knew that we were going to have to address a scenarios like that, so I was being proactive
18:00 ashimema I see..
18:01 jberger the primary motivation, a customer transfering their account from location to location
18:01 ashimema I think I see.
18:01 jberger clearly, the actor making the transfer is only going to have access at one, but needs to be able to add an item to the work queue at the other location
18:02 ashimema so your using a signed token to in effect transfer the 'session' from one app to another
18:02 jberger yes
18:02 batman weird... if i want to install libmojolicious-perl in ubuntu, i also have to install libjs-prettify and libmojo-server-fastcgi-perl...
18:02 jberger the other thing I could have done is make the secrets the same at all the locations, so the cookies would be valid, but then I would have to do lots of access restrictions by location
18:03 jberger and that seemed much more prone to failure
18:03 punter joined #mojo
18:03 jberger always try to fail safely
18:03 ashimema did you think of using one of the off the shelf solutions.. OAuth for example?
18:03 jberger I don't grok OAuth very well
18:04 ashimema OAuth is pretty much what you just described I think ;)
18:04 jberger hehe, well then
18:04 ashimema it's uses JWT bearer tokens mostly
18:04 ashimema basically somewhere 'authorizes' a user and an app..
18:05 ashimema then shares a token identifying the user to the app.. and the app to the user
18:05 ashimema I think
18:05 ashimema Or.. you could use shibboleth I would have thought?
18:06 ashimema if your looking for single sign on.. as opposed to single log on
18:06 ashimema are you also shareing authorization (as opposed to just authentication) in your tokens
18:07 ashimema So.. initially we were trying to get a completely cookie free webapp..
18:08 ashimema but then I realised there's no real point.. you have to save state somewhere.. whether it be in a token or a cookie.. in either case the web browsers these days will flag you are using 'cookies' 'cause a cookie has become a generic name for client storage
18:08 ashimema at which point in the EU we still 'need' to show a 'this site uses cookie's' banner..
18:08 ashimema which is what we were trying to get around.
18:09 ashimema where tokens really come into their own are API's.. where the 'storage' is often not going to be a browser and as such a cookie is meaningless ;)
18:09 ashimema anywho.. just a few thoughts for you.
18:10 ZoffixWork joined #mojo
18:11 jberger its not really single sign on
18:11 jberger its more like one-off authorizations
18:11 jberger the JWT is basically only going to be good for one action, then I'm going to throw it away
18:12 ashimema I see.. so it's the 'forgotten password' case
18:12 tiejl joined #mojo
18:13 ashimema only your using it for more than just forgotten passwords.
18:13 ashimema one time tokens
18:13 ashimema I see..
18:13 ZoffixWork batman, recall you said you felt stupid for that mojopaste bug? :) I think I have you beat. I just came back to work after a week-long vacation, during which time a script I wrote was supposed to test some of our accounts who have website issues, by logging in as them 10,000 times, but only during the night. This is the code: http://fpaste.scsys.co.uk/474689  try to guess what the script did for the entire week :)
18:15 batman ZoffixWork: it's not as bad. but i guess this is the bug? sleep 60 while $is_day
18:16 ZoffixWork Yeah. It just sat in that loop the entire time :)
18:16 batman but at least, it didn't do any damage, hehe
18:17 ZoffixWork :P
18:17 batman you better make some damage if you try to beat me :)
18:17 ZoffixWork haha, I'll get right on it ;)
18:18 batman hehe
18:25 irq joined #mojo
18:33 jberger at a past job, the devs above me wouldn't accept a patch for something I considered a security bug
18:33 jberger they responded that it hadn't been it hadn't been reported in production yet, so it was low priority and they would get back to me in 6 mo
18:34 jberger to which I replied "would you like me to make it an issue in production?"
18:34 jberger still didn't get the patch merged
18:35 ZoffixWork :)
18:36 vaewyn joined #mojo
18:45 Grinnz "to which they responded "would you like to get arrested?""
18:45 vaewyn Hey all... not sure if perl or what updated on my ubuntu box... but suddenly I have no returns from $self->param()  and I have tons of fun errors like "morbo: Use of uninitialized value $name in hash element at /usr/local/share/perl/5.18.2/Mojolicious/Controller.pm line 67."   any ideas?
18:45 vaewyn I tried reinstall/upgrade of mojo and still same... so at 6.10
18:46 jberger what version were you at before?
18:46 Grinnz vaewyn, you probably updated Mojolicious, see https://github.com/kraih/mojo/wiki/Upgrading
18:47 Grinnz for example, $self->param() is no longer implemented
18:47 Grinnz (with no arguments)
18:47 vaewyn Holy @#$@#$ cow!  That shoulda had a deprecation warning... egas
18:47 vaewyn egads even
18:47 Grinnz it did
18:47 vaewyn I've been using 6.8 with no warning
18:48 Grinnz you mean 5.8?
18:48 ZoffixWork vaewyn, that update was in 5.47
18:48 vaewyn 5.8 yeah
18:48 Grinnz actually, it didn't because 6.0 was a major release
18:48 ZoffixWork or 87
18:49 lluad joined #mojo
18:49 vaewyn I hope my remote production box hasn't upgraded or I am seriously screwed :(  Ohh well... easy search and replace fix but wow
18:50 Grinnz vaewyn, for major releases backwards compatibility is not assured, you need to be aware of updates to perl modules in general
18:50 ZoffixWork Live and learn :) There's always an option to downgrade until you fix any incompatibilities
18:50 Grinnz (mojolicius isn't the only one who will update backwards incompatible changes)
18:51 Grinnz this is why a custom built perl where you can control the module versions separate from system perl, or especially a carton or similar, is a nice setup
18:51 vaewyn Grinnz: in general I do...  but I thought the deprecation policy went with majors also...  live and learn I guess
18:51 Grinnz for production systems
18:51 jberger vaewyn: sorry, no
18:51 romel hi. what's the env variable's name for tracing queries made with mojo::pg? i've seen this somewhere but can't find now :)
18:52 ZoffixWork vaewyn, security issues are also excluded from deprecation policy.
18:53 Grinnz romel, i don't see any, unless it's something from DBD::Pg
18:53 vaewyn ZoffixWork: other packages I use exclude also... but they normally put an die catch if you try to use it... rather than just having odd log warnings
18:53 lluad DBI_TRACE will turn on DBI-level tracing, romel
18:54 jberger vaewyn: this has been discussed before, but its clearly in the Mojolicious policy statement, and really we need the ability to move forward in order to keep the code sane
18:55 jberger I encourage Carton for module pinning, though sri has some security concerns
18:55 Grinnz vaewyn, sri tends to avoid putting "programmer sanity checks" everywhere, to avoid clutter; i like to have them but i see the reasoning
18:55 jberger IMO those concerns affect most perl deployment systems, so I would rather have the stability of Carton than nothing
18:55 romel *facepalm* i wrote it as DBI_TRTRACE=1 before
18:55 romel thanks lluad
18:56 Grinnz hehe
19:03 tiejl_ joined #mojo
19:04 tiejl_ joined #mojo
19:07 vaewyn jberger: We are doing a more system level of that stuff with docker images that we have juju charms to install...  the docker images are regenerated nightly though and the next time a remote production machine needs to be created it pulls them...  for now I just reverted our docker images for a bit here until I get it fixed
19:07 vaewyn Need to ditch the docker in juju since juju can do most of that itself but... that is to come
19:09 vaewyn Might have to make a helper of $c->names() so I don;t have to constantly do @{$c->req->params->names}
19:10 melo joined #mojo
19:17 Grinnz_ vaewyn: may i suggest param_names?
19:17 * vaewyn nods
19:19 berov joined #mojo
19:21 bwf joined #mojo
19:21 genio anyone done IP cam streaming over web sockets with mojo yet?
19:23 disputin joined #mojo
19:27 Grinnz_ no, but that would be a neat trick... arent those usually rtmp or something?
19:27 genio rtsp
19:28 genio I think I'm going to have to go through ffmpeg
19:28 genio :/
19:31 mattastrophe joined #mojo
19:32 genio nah.  that'd die quickly
19:34 genio Converting an RTSP stream to web socket for every connection would be pretty stupid now that I think about it more
19:34 Grinnz_ heh
19:34 genio file that one under "bad ideas"
19:37 depesz joined #mojo
19:39 depesz hi. what am i missing here: http://i.imgur.com/IU2nHmf.png ?
19:39 depesz route looks like defined
19:40 Grinnz_ can you paste the route definitions? paste.scsys.co.uk/mojo
19:41 sri also, your mojolicious version is oooooooooooold
19:42 shadowpaste "depesz" at 217.168.150.38 pasted "routes for my problem" (8 lines) at http://paste.scsys.co.uk/474712
19:42 * jberger guesses controller code isn't working correctly
19:42 jberger either doesn't compile or doesn't render anything
19:43 depesz the login controlled just redirects
19:43 shadowpaste "depesz" at 217.168.150.38 pasted "unlogged controller" (25 lines) at http://paste.scsys.co.uk/474713
19:44 depesz works. sorry for being stupid.
19:45 Grinnz_ yeah, not_found gets shown if the controller doesn't render
19:45 depesz forgot about use Mojo::Base 'Mojolicious::Controller';
19:45 Grinnz_ a bit confusing, but thats what happens...
19:45 Grinnz_ hah that would do it
19:45 jberger redirect_to is a render of sorts
19:46 sri a newer version of mojolicious would have told you just that...
19:46 Grinnz_ not just of sorts, redirect_to does render :P
19:46 genio all of the RTSP:: modules seem stale
19:46 jberger Grinnz_: fine, if you want to be all "proper"
19:47 depesz Can't locate object method "bridge" via package "Mojolicious::Routes" :( .. checking docs
19:48 Grinnz_ bridge has been removed
19:48 depesz yeah. checking how I can get similar functionality
19:48 Grinnz_ purl: upgrading
19:48 purl upgrading is, like, usually good (at least for the soul)
19:48 Grinnz_ purl: no, upgrading is https://github.com/kraih/mojo/wiki/Upgrading
19:48 purl okay, Grinnz_.
19:49 sri Grinnz++ # already updated for 6.10
19:49 jberger Grinnz++
19:50 sri Bender: trust Grinnz_
19:50 Bender OK, sri
19:50 depesz how can I get name for current route, in template ?
19:50 genio https://github.com/kyriesent/node-rtsp-stream  could be a starting point
19:51 jberger depesz: there is a helper, exactly for that purpose
19:51 depesz where can I find list of helpers?
19:51 sri you could try the documentation
19:51 sri http://mojolicio.us/perldoc/Mojolicious/Guides/Routing#Named-routes
19:51 depesz I'm looking there.
19:52 depesz ok. i see: my $name = $c->current_route;
19:52 jberger for the record, most of the helpers are defined in Mojolicious::Plugin::DefaultHelpers
19:52 jberger with the exception of the html generation ones which are in ::TagHelpers
19:53 sri which is conincidentally explained in the section on helpers... http://mojolicio.us/perldoc/Mojolicious/Guides/Rendering#Helpers
19:55 meshl joined #mojo
20:29 meshl joined #mojo
20:34 basic6 joined #mojo
20:43 Ptolemarch joined #mojo
20:43 mattastrophe joined #mojo
20:48 vaewyn left #mojo
20:49 KindOne joined #mojo
21:37 ajr_ joined #mojo
21:40 vmbrasseur joined #mojo
21:58 genio well, it looks like I'll be writing a mojo version of the one above as zoneminder is a POS
22:04 memowe joined #mojo
22:06 ajr_ Is there a simple example available showing a Mojolicious (non-lite) app that accepts one or more entries in fields, then displays the completed form? I'm not getting the results I expect, and a working example might dispel the mystery.
22:28 Grinnz_ ajr_: "fields": post parameters?
22:29 Grinnz_ ajr_: whether it's lite or not is mostly just a matter of where the code that sends stuff to the template goes
22:29 Grinnz_ there's no functional difference
22:37 memowe joined #mojo
22:46 vmb joined #mojo
22:46 ajr_ Grinnz - by "fields" I mean an area on a form, so yes, they'll become POST values
22:48 ajr_ Just like entering the login and password in one of the Mojocasts
22:53 hernan604 ajr_: did you check your firebug ?
22:53 hernan604 or your console..
22:53 hernan604 check whats going out into server
22:54 hernan604 what are you trying to do ?
22:55 hernan604 you want to 1. open a page with blank form. 2. fill in some data into form 3. submit 4. open the same page with the form filled ?
22:59 ajr_ hernan604 - that's exactly what I'm trying to do. (BTW, what's a firebug?)
23:00 hernan604 firebug is devtools
23:00 hernan604 press F12 in chrome or firefox
23:00 hernan604 then you will see a network tab
23:00 hernan604 you can analyse the requests your page makes to webservers
23:00 hernan604 and you can view request content...
23:00 hernan604 that way you can see if your form is going out properly
23:01 hernan604 are you new to web development ?
23:01 DesertFox same in chrome.
23:01 DesertFox hotkey for console that is, or debug tools.
23:01 ajr_ Apologies for the brief absence; F12 also turns off my Wifi. :-(*
23:02 hernan604 hahahh
23:02 DesertFox rekt
23:02 hernan604 go from the menu
23:02 hernan604 webconsole
23:02 hernan604 or something
23:02 DesertFox I assume fn f12 turns it off.
23:02 DesertFox f12 just turning off wifi seems dangerous
23:03 ajr_ Thanks for the hint, and yes, I've finally been dragged into web development, (actually, conversion).
23:03 hernan604 thats a tool you will use a lot
23:07 Grinnz_ rofl
23:08 tianon joined #mojo
23:12 ajr_ Remember the "UserFriendly" where skiddies are hassling Miranda, and she tells them her IP address is 127.0.0.1?
23:23 ajr_ After the first screen (i.e. the initally blank form is submitted), the next method obviously receives the data, because $self->req->body_params retrieves a long string of fieldname=value pairs; can't be a hash, though, because of blank entries.
23:27 Grinnz_ what do you mean?
23:28 Grinnz_ you can get a hash with $self->req->params->to_hash
23:28 Grinnz_ (blank values are just empty strings)
23:28 ajr_ Oh.
23:29 Grinnz_ and $self->req->param('name') to get an individual value... etc
23:29 Grinnz_ you can also just do $self->param('name')
23:30 ajr_ I've seen some of those methods. Is there a convenient summary of the available methods?
23:31 ajr_ I'd rather RTFM than ask noob questions, but if I can't find TFM....
23:32 ajr_ Working examples also help clarify manuals.
23:33 Grinnz_ the guides, generally
23:34 Grinnz_ the individual modules (in this case Mojolicious::Controller and Mojo::Message::Request) have the method documentation but not a lot of context
23:34 cpan_mojo Mojo-Reactor-IOAsync-0.005 by DBOOK https://metacpan.org/release/DBOOK/Mojo-Reactor-IOAsync-0.005
23:34 cpan_mojo Mojo-Reactor-Epoll-0.005 by DBOOK https://metacpan.org/release/DBOOK/Mojo-Reactor-Epoll-0.005
23:34 cpan_mojo Mojo-Reactor-POE-0.008 by DBOOK https://metacpan.org/release/DBOOK/Mojo-Reactor-POE-0.008
23:35 Grinnz_ https://metacpan.org/pod/Mojolicious::Guides::Tutorial#GET-POST-parameters for example
23:37 Zoffix joined #mojo
23:38 ajr_ Those look helpful, cpan_mojo and Grinnz. Thanks.
23:38 Grinnz_ lol, cpan_mojo is a bot announcing cpan releases
23:39 Grinnz_ maybe should say "CPAN Upload:" at the beginning like the other bot
23:43 ajr_ On the Internet, nobody knows you're a bot.
23:45 Grinnz_ anyway you can use metacpan to find documentation for any of the modules quickly
23:45 ajr_ That's where I've been looking
23:49 meshl joined #mojo
23:49 hasan joined #mojo
23:49 hasan how can I load multiple plugins of the same plugin in mojolicious?
23:50 hasan see this example: https://github.com/hayajo/Mojolicious-Plugin-Web-Auth/blob/master/examples/AuthFacebook
23:50 hasan I would need one for github, facebook, google, etc. afaik I can't use $self->plugin(...) in my controllers. so I need to put them into my startup sub.
23:51 hasan how can I organize/load them the right way?
23:58 mattastrophe joined #mojo

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