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

IRC log for #mojo, 2015-12-04

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

All times shown according to UTC.

Time Nick Message
00:25 berov2 joined #mojo
01:00 jontaylor joined #mojo
01:52 jontaylor joined #mojo
01:59 nnutter joined #mojo
02:16 nnutter joined #mojo
02:34 good_news_everyon joined #mojo
02:34 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vRc2w
02:34 good_news_everyon mojo/master 1ce3882 Sebastian Riedel: move problematic test to the end
02:34 good_news_everyon left #mojo
02:43 Zoffix joined #mojo
02:45 good_news_everyon joined #mojo
02:45 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vRcwU
02:45 good_news_everyon mojo/master 95b1686 Sebastian Riedel: better POD tests
02:45 good_news_everyon left #mojo
03:07 noganex joined #mojo
03:21 Bender joined #mojo
03:24 kaare joined #mojo
03:28 garu joined #mojo
03:33 garu_ joined #mojo
03:38 BinGOs joined #mojo
04:12 nnutter joined #mojo
04:49 irqq joined #mojo
04:59 jontaylor joined #mojo
05:40 Adura joined #mojo
05:42 orev joined #mojo
05:44 initialo joined #mojo
05:44 oalders joined #mojo
05:45 voldemortensen joined #mojo
05:47 melo joined #mojo
06:14 nnutter joined #mojo
06:15 nnutter_ joined #mojo
06:20 marty_ joined #mojo
06:35 sugar_ joined #mojo
06:39 voldemortensen joined #mojo
06:56 stephen joined #mojo
07:50 kes joined #mojo
08:01 jontaylor joined #mojo
08:01 Vandal joined #mojo
08:25 trone joined #mojo
08:48 tyldis joined #mojo
08:50 marcusr joined #mojo
08:58 CandyAngel Editing old code in old format is bleh :P
08:59 marcus perltidy <3
09:07 jontaylor joined #mojo
09:11 punter joined #mojo
09:15 eseyman joined #mojo
09:17 osfabibisi joined #mojo
09:48 CandyAngel Also, there is a bunch of stuff in Mojolicious::Command that seems like it should be in Mojo::Util
09:49 CandyAngel Like create_rel_dir
09:54 CandyAngel I can submit a patch to move them if there is interest in doing so
10:01 irqq joined #mojo
10:05 punter joined #mojo
10:05 moritz joined #mojo
10:05 tianon joined #mojo
10:05 jontaylor joined #mojo
10:05 Vandal joined #mojo
10:05 kes joined #mojo
10:05 oalders joined #mojo
10:05 initialo joined #mojo
10:05 Bender joined #mojo
10:05 Zoffix joined #mojo
10:05 Lee joined #mojo
10:05 crux joined #mojo
10:05 salva joined #mojo
10:05 lsm joined #mojo
10:05 Quai joined #mojo
10:05 CandyAngel joined #mojo
10:05 stuart joined #mojo
10:05 anon3252523 joined #mojo
10:05 HtbaaPi joined #mojo
10:05 al joined #mojo
10:05 preaction joined #mojo
10:05 McA joined #mojo
10:05 pink_mist joined #mojo
10:05 nicomen joined #mojo
10:05 lb joined #mojo
10:05 mishanti1 joined #mojo
10:05 rwp joined #mojo
10:05 plicease joined #mojo
10:05 cosimo joined #mojo
10:05 Foxcool joined #mojo
10:05 Jonis joined #mojo
10:05 mattp joined #mojo
10:05 marcus joined #mojo
10:05 bd joined #mojo
10:05 bayashi joined #mojo
10:05 Phil21 joined #mojo
10:05 augensalat joined #mojo
10:05 Ralesk joined #mojo
10:05 shadowpaste joined #mojo
10:06 tinita joined #mojo
10:06 eseyman joined #mojo
10:06 orev joined #mojo
10:06 noganex joined #mojo
10:06 janus joined #mojo
10:06 _dave_ joined #mojo
10:06 vytas joined #mojo
10:06 Lucas1 joined #mojo
10:06 SmokeMachine joined #mojo
10:06 phillipadsmith joined #mojo
10:06 sivoais joined #mojo
10:06 jzawodn_ joined #mojo
10:06 bobkare joined #mojo
10:06 bc547 joined #mojo
10:06 geheimnis` joined #mojo
10:06 mudler joined #mojo
10:06 batman joined #mojo
10:06 Grinnz joined #mojo
10:06 hahainternet joined #mojo
10:06 mtj joined #mojo
10:06 go|dfish joined #mojo
10:06 cpan_mojo joined #mojo
10:06 bjoernfan joined #mojo
10:06 osfameron joined #mojo
10:06 robinsmidsrod joined #mojo
11:18 * CandyAngel facepalms
11:19 CandyAngel I just wrote like.. 5 lines with a loops and all sorts when I could just use $collection->grep(sub{});
11:30 melo joined #mojo
11:36 CandyAngel There we go, down to 2 statements (3 lines). Much better ^_^
12:05 phillipadsmith joined #mojo
12:08 neilhwatson joined #mojo
12:25 sue joined #mojo
12:27 Adurah joined #mojo
12:31 dod joined #mojo
12:35 asarch joined #mojo
12:42 sri CandyAngel: what makes you think that stuff belongs in Mojo::Util?
12:50 CandyAngel They are both useful outside of Mojolicious::Command and not really strongly related to commands
12:50 CandyAngel Making a directory would be useful in a post route (uploading file), for example
12:51 CandyAngel Going into a hashed directory structure comes to mind (aF/8g/filename.jpg)
12:53 sri Mojo::Util is for stuff that doesn't fit in anywhere else, that's it
12:54 sri everything in Mojolicious::Command actually works relative to cwd, that's not very general purpose at all
12:55 CandyAngel Ah, okies
12:55 sri Mojo::Home contains the stuff that's relative to the home directory of your app
12:56 CandyAngel I see why
12:57 kaare joined #mojo
12:57 CandyAngel otherwise, if you did like.. mojo generate, it would (try to) generate the files wherever the mojo script was, rather than $CWD
12:57 Zoffix left #mojo
12:57 sri yes
12:58 CandyAngel I see
12:59 sri you could add a Mojo::Home::create_rel_dir... but that seems a little silly with File::Path::mkpath existing
13:00 sri mkpath $app->home->rel_dir('foo/bar')
13:00 sri generally i'm happy enough with the path generation stuff
13:02 sri one thing i've considered moving was Mojo::Home::list_files, since it's used in so many places in Mojolicious
13:02 sri bit of an odd one
13:03 nic It's quite easy to remember that file-/dir-related stuff is in ::Home, so I think it's more useful where it is
13:08 cpan_mojo Test-Clustericious-Cluster-0.26 by PLICEASE https://metacpan.org/release/PLICEASE/Test-Clustericious-Cluster-0.26
13:11 dod joined #mojo
13:13 marcusr joined #mojo
13:13 cpan_mojo Mad-Mapper-0.07 by JHTHORSEN https://metacpan.org/release/JHTHORSEN/Mad-Mapper-0.07
13:26 stephen joined #mojo
13:34 CandyAngel Yeah, I understand. It's a little weird that Mojo will actually create the directories for you in ::Command but you have to do it yourself in ::Home
13:37 sri CandyAngel: doesn't seem weird to me at all, directory or file manipulation  is not a Mojo::Home feature
13:37 sri very different scopes
13:58 stephan48 is there already someone who build a letsencrypt client in perl with mojo?
14:00 nic so many customers and no supplier :)
14:03 sri the big problem is that you need to renew your cert all the time, so you want automation
14:03 sri and you need access to the running server, for validation
14:03 sri i still think a plugin would make sense
14:04 irqq_ joined #mojo
14:04 sri a pure command line client will never work well, since you need to run a web server on the domain to validate yourself on every renewal
14:07 jberger With a plugin it's not hard to then make a command line client
14:13 stephan48 as far as i know you would need to serve a file from a "wellknownTM"(documented in the spec) url which then contains the authentication response
14:14 stephan48 so this could be done via a two step process even from the commandline. a plugin would then just combine them together(instead of dumping a file -> install a route)
14:14 stephan48 planed on readin the spec this weekend
14:15 stephan48 the renewal is a mintor problem throu. depending on how you layout your webroot you would not even need root for doing the challenge response authentication
14:15 nnutter joined #mojo
14:39 melo joined #mojo
14:43 cpan_mojo Test-Clustericious-Cluster-0.27 by PLICEASE https://metacpan.org/release/PLICEASE/Test-Clustericious-Cluster-0.27
14:50 bpmedley joined #mojo
14:52 jberger stephan48: ?
14:54 sri stephan48: of course it's a problem, you need to serve the challenge response from a production server
14:55 sri and you need to do it every 90 days
14:56 sri i think a plugin that installs a route and a command would be the best solution
14:57 jberger I think that's the reason that the python client likes to muck with your nginx config
14:57 jberger it just serves the challenge response via your existing nginx
14:57 sri ye
14:57 jberger which IMO is kinda insane in a production environment
14:58 jberger fine in a testing environment
14:58 jberger (fine-ish)
14:58 sri they expect server extensions or even built-in support to arrive over time i imagine
14:58 sri just like a mojolicious plugin ;p
14:59 stephan48 yea. for a cli tool you would need to create a static file in your public/ for the certificate authentication process and then do a restart of the production system to apply the certificate.
14:59 sri hmm, i guess installing a route might not be necessary then
15:00 stephan48 i can tell you more after the weekend
15:00 stephan48 there is a webroot plugin
15:00 sri just a command that deals with the letsencrypt api and generates the static file
15:00 stephan48 if i understand that correctly it does exactly that.. dumps a file waits for the authentication to finish and then you geta cert+key
15:00 stephan48 i think the big problem with letsencrypt authentication will be frontend SSL terminators
15:01 stephan48 especially when they are not on the same machine
15:09 kes joined #mojo
15:12 stephan48 https://github.com/letsencrypt/letsencrypt/blob/master/letsencrypt/plugins/webroot.py https://github.com/letsencrypt/letsencrypt/blob/master/letsencrypt/auth_handler.py#L173 - if I understand it correctly the client will place a file and then do polling on the received authentication token to check if the LE backend could verify the challange response
15:12 stephan48 just doing cross reading there throu
15:15 voldemortensen joined #mojo
15:26 CandyAngel sri: Okie dokie
15:27 CandyAngel I think I get the logic behind it :)
15:31 marty joined #mojo
15:31 berov2 left #mojo
15:46 lluad joined #mojo
15:46 stephan48 this seems to be a minimal implementation for CLI: https://github.com/diafygi/acme-tiny
16:04 * sri added mojolicious knit caps to the shop https://image.spreadshirtmedia.com/image-server/v1/products/1009030054/views/1,width=400,height=400,appearanceId=2,version=1449244803.jpg
16:05 jberger :o
16:15 stephen left #mojo
16:16 gryphon joined #mojo
16:37 cpan_mojo Test-Clustericious-Cluster-0.28 by PLICEASE https://metacpan.org/release/PLICEASE/Test-Clustericious-Cluster-0.28
16:37 bpmedley joined #mojo
16:48 PryMar56 joined #mojo
17:46 good_news_everyon joined #mojo
17:46 good_news_everyon [mojo] kraih tagged v6.35 at 2a4b608: http://git.io/vR4T6
17:46 good_news_everyon left #mojo
17:47 berov joined #mojo
17:47 good_news_everyon joined #mojo
17:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/vR4kO
17:47 good_news_everyon mojo/master 217ef4a Sebastian Riedel: bump version
17:47 good_news_everyon left #mojo
18:18 jberger so one of the few things I liked about python was its mock library
18:18 * jberger just discovered https://metacpan.org/pod/Mock::Sub
18:19 jberger very much like it, in fact, I'd be very much surprised if it wasn't directly inspired by it
18:19 jberger it is a BIT nicer in python because of the "with" keyword
18:19 jberger and of course local can't be controlled from the outside
18:20 preaction https://metacpan.org/pod/Mock::Sub#ACKNOWLEDGEMENTS
18:20 jberger but those faults are Perl's
18:20 * jberger facepalms
18:21 preaction though now that you mention it, couldn't a with keyword as a topicalizer be done?
18:21 jberger what's "magic"
18:21 jberger so, the mock could call "unmock" on DESTROY
18:22 preaction oh, hm. it's not overriding DESTROY for some reason
18:23 * jberger has opened several small issues already
18:23 jberger just added that one
18:24 jberger I also dropped him an email so that he didn't freak out with the slew of new issues
18:24 preaction heh
18:26 voldemortensen joined #mojo
18:26 voldemortensen1 joined #mojo
18:31 marty joined #mojo
18:47 kes joined #mojo
18:47 dod joined #mojo
18:51 dod joined #mojo
19:04 ipunter joined #mojo
19:05 ipunter Hi
19:10 CandyAngel Heyas ipunter
19:16 ipunter I am punter but I'm on an iphone now
19:16 ipunter Hence ipunter
19:19 CandyAngel I'm sorry
19:19 CandyAngel :P
19:20 * sri waits for ipunter 2
19:21 CandyAngel If the jailbreak isn't called "punted", I will be disappoint
19:25 trone joined #mojo
19:31 irqq joined #mojo
19:54 jberger sri: you'll be sorry, I've heard there's an ipunter 2s coming 3 months later
20:02 Grinnz_ lol
20:19 jb360 joined #mojo
20:46 punter joined #mojo
20:47 macaque joined #mojo
21:01 jjohn joined #mojo
21:01 jjohn good day, mojo jojos.
21:02 punter hello jjohn
21:02 jjohn just a lark, but anyone here use DBIx::Class with a date column? When I try to use this with the date_field, the value re-inflates to a datetime, not a date.
21:02 ipunter joined #mojo
21:03 jjohn Here is the inflate/deflate routines:
21:03 jjohn inflate => sub { my $d = shift;
21:03 jjohn return unless $d;
21:03 jjohn DateTime::Format::MySQL->parse_date($d) },
21:03 jjohn deflate => sub { DateTime::Format::MySQL->format_date(shift) },
21:04 jjohn When I run just DateTime::Format::MySQL in the debugger, it seems to emit 'YYYY-MM-DD' correctly.
21:05 jjohn But in the Mojo form, the value becomes (for example) '2015-12-18T00:00:00'
21:05 sri please don't ever paste into an irc channel
21:05 jjohn Sorry.
21:05 sri it's extremely rude
21:05 jjohn I thought it was short enough.
21:06 jjohn I certainly could have removed the newlines. That is a bit much.
21:07 sri you should be using a paste site
21:08 jjohn In the live DOM if I truncate the datetime value manually to just YYYY-MM-DD, it works as expected, of course.
21:09 jjohn It is funny, but I thought I saw date_field work with datetime fields just fine.
21:23 jjohn Mmm. It is actually calling inflate, which is returning a DateTime object. That stringifies to 'YYYY-MM-DDTHH:MM:SS'.  So clearly, I need to call ymd() explicitly at the view level.
21:24 jjohn Good enough.
21:27 jjohn OK. That seems to work. Thanks for listening. ;-D
21:30 jberger ncie
21:30 jberger nice
21:36 jjohn have a good weekend.
21:36 jjohn left #mojo
22:18 hobbs joined #mojo
22:19 hobbs http://stackoverflow.com/questions/34097859/how-to-send-synchronous-websocket-events-to-client -- I think this person's problem is that they're not giving the event loop any chance to run in the midst of all their expensive "computation" but I don't know enough mojo to offer a sane suggestion
22:21 jberger likely true
22:21 jberger but they don't really show enough to be certain of that
22:22 jberger also, this "long running operation" might be a blocking operation
22:22 jberger which would just be preventing the loop from ticking
22:22 jberger hobbs: ^^
22:23 hobbs hmm yeah
22:24 hobbs and yeah, it's not the best question ever but they don't seem clueless so I was hoping someone would be able to dig into it and help... on a friday evening ;)
22:24 sri ->send() call without a callback is a red flag in that context
22:37 hobbs sri: actually, is that an answer? Instead of do A, send result, do B, send result, etc., do each next step in the callback of the previous send?
22:40 hobbs that way the loop always advances before calling the cb
23:02 berov joined #mojo
23:18 harleypig joined #mojo
23:55 punter joined #mojo

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