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

IRC log for #mojo, 2014-11-14

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

All times shown according to UTC.

Time Nick Message
00:18 al joined #mojo
00:20 jmmills joined #mojo
00:34 zivester joined #mojo
00:43 neyasov____ joined #mojo
00:44 KCL_ joined #mojo
01:11 basic6 joined #mojo
01:19 user_4692 joined #mojo
01:44 neyasov____ joined #mojo
02:27 woz joined #mojo
02:45 neyasov____ joined #mojo
02:47 jberger_ joined #mojo
02:47 jberger_ Sorry I haven't had a chance to comment yet
02:48 jberger_ sri: see query
02:57 jberger_ mst: does FatPacker handle ShareDir?
02:59 jberger_ sri: there is no magic in ShareDir, just paths that Perl makes available for this purpose
02:59 jberger_ ShareDir just wraps it in a function
03:00 sri dude, we talked about that exact topic before :p
03:01 jberger_ Oooops
03:01 * jberger_ re-read log
03:01 sri sharedir is kinda the result of what we hacked together in catalyst
03:02 sri thing is, it doesn't magically solve anything
03:06 sri maybe you're seeing something i'm missing
03:06 * sri shrugs
03:06 sri make a pull request
03:06 jberger_ Since ShareDir and __DATA__ aren't good, the only thing I can think of is a module which keeps the content of those files in heredocs
03:06 sri no good
03:06 sri files need to be easily editable
03:08 sri also, who's going to regularly update this?! https://github.com/kraih/mojo/tree/master/lib/Mojolicious/public/mojo/prettify
03:08 jberger_ Hmmmm
03:08 sri heredoc or DATA, that's gonna suck
03:09 jberger_ Only if that is human edited
03:09 jberger_ You are fully opposed to generating a file full of heredocs?
03:10 sri yea
03:10 sri what's next, tools for adding $VERSION to every file?
03:11 jberger_ I'm not saying I like the options
03:11 tianon and git commit (oh wait) :D
03:11 * jberger_ sets tianon on fire
03:11 * tianon BURNS
03:11 jberger_ Obviously
03:12 sri once we accept fatpacking it's gonna be fun trying to add support for something that requires an xs module
03:12 sri like http/2
03:13 jberger_ Fair point
03:13 sri i'm developing a real hate for fatpacking
03:13 jberger_ It's just duo tantalizingly close
03:13 jberger_ Really, why?
03:13 purl hmmm... Really, why is it green, and what is its favorite treat?
03:14 jberger_ Shut it purl
03:14 sri once you accept it as a valid deployment option, your future is severely limited
03:14 jberger_ Yeah, that was my realization at "fair point"
03:15 jberger_ that's not a hate for it in general, but by project
03:16 sri i think my "please find a solution for embedding all files" plea is pointless... there just isn't a good solution
03:17 sri only thing we can do is inline entities in Mojo::Util, and let them hack around everything else... or just don' change a thing
03:17 * jberger_ nods
03:18 sri Atom is not very good at editing huge files... so i'll prolly hack less on Mojo::Util in the future if we do it
03:18 jberger_ I'm still left reeling over the realization of the limitation of ever claiming FatPacker as a deployment option
03:22 sri i guess there's also the possibility of supporting dirty fatpacking
03:23 sri as in, have exceptions for all files, so if they are not found they default to an empty string
03:23 sri i suspect it mostly works that way by accident already
03:24 sri missing 404/500 pages should result in connection timing out, not crash
03:24 sri or maybe deep recursion
03:25 sri guess that might change between releases ;p
03:35 sri jberger_: if you can't vote on the issue please leave comment stating that you're neutral
03:38 jberger_ Will do
03:45 basic6_ joined #mojo
03:46 neyasov____ joined #mojo
03:46 meredith joined #mojo
03:48 inokenty joined #mojo
03:57 sujithm joined #mojo
04:06 bwf joined #mojo
04:08 sri i'm going to count batman as neutral too, that leaves only tempire and crab
04:17 sri i can't even remember the last time crab voted, so i guess tempire gets to dictate :o
04:27 bpmedley If fatpacker had the ability to embed a file, then the entities.txt, certificates, and public files could be tar’ed up and blasted to a temp directory at runtime.  After that, it should be possible to make things accessible to the fatpacked script at runtime - with some tweaks.
04:29 basic6 joined #mojo
04:38 Eke- joined #mojo
04:48 neyasov____ joined #mojo
04:56 * tempire looks
04:56 tempire I don't really know much about fatpacker - is there no way to currently make it work?
04:56 tempire (packing up a mojo app, I mean)
04:57 * tempire reads backlog
04:58 bpmedley I have used the perlpdk
04:58 bpmedley It’s a commericial product, tho
04:59 * jberger is now thinking of directing FatPacker questions at https://metacpan.org/pod/Carton#Bundling-modules
05:01 tempire What if there was a MOJO_ENTITITES= that defaulted to lib/Mojo/entitites.t
05:01 tempire xt
05:01 tempire That's a bad name. But something like that.
05:01 tempire That would solve the issue without requiring embedding.
05:02 * jberger wonders what an entitite is
05:02 bpmedley What about the other files?  The certificates, html, css, and javascript?
05:04 tempire That's not really a problem that mojo has to solve. That's the responsibility of the dev trying to fatpack
05:04 tempire They can all be specified.
05:06 jamesw_ joined #mojo
05:21 good_news_everyon joined #mojo
05:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/MfKyew
05:21 good_news_everyon mojo/master f7c286c Sebastian Riedel: test without Net::DNS::Native for now, since it fails to install too often
05:21 good_news_everyon left #mojo
05:25 tempire whoa
05:25 tempire https://github.com/kripken/sql.js
05:27 woz joined #mojo
05:36 sri tempire: if we add an env var it's an actually supported api
05:36 sri does that seem like a clean solution?
05:37 sri think about it, an env var in our public api, for the sole purpose of allowing people to break up mojolicious into smaller, mostly broken pieces
05:38 sri it's not even full fatpacker support, just "set this env var to make fatpack not fail right away"
05:40 tempire ok
05:40 sri inlining entities.txt in Mojo::Util i could have accepted teeth-gnashingly, since it's not really a committment in any way
05:41 sri someone may make a fatpacked app, it may break again, not our fault... but once we enter actual support territory, with env vars and stuff, it needs to be a 100% good solution
05:42 sri in retrospect, i think i was more neutral than -1 on inlining entities.txt, but i wanted to counter marcus to see what everyone else on the team thought about it
05:44 * sri was never happy with entities.txt, but it's the solution that sucks the least
05:49 neyasov____ joined #mojo
06:06 sujithm joined #mojo
06:13 irq joined #mojo
06:16 rem_lex| joined #mojo
06:21 sugar joined #mojo
06:32 sugar_ joined #mojo
06:49 Eke- joined #mojo
07:01 sugar__ joined #mojo
07:06 Lee joined #mojo
07:11 marmez joined #mojo
07:16 woz joined #mojo
07:36 neyasov____ joined #mojo
07:40 dod joined #mojo
08:11 neyasov_____ joined #mojo
08:12 neyasov_____ joined #mojo
08:15 Vandal joined #mojo
08:21 dp_ joined #mojo
08:21 sujithm joined #mojo
08:25 basiliscos joined #mojo
08:26 trone joined #mojo
09:01 woz joined #mojo
09:06 Dandre joined #mojo
09:16 chansen joined #mojo
09:23 fhelmber_ joined #mojo
09:33 sugar joined #mojo
09:47 irq joined #mojo
09:52 GillesM joined #mojo
09:53 zivester joined #mojo
10:00 sujithm joined #mojo
10:01 sujithm joined #mojo
10:12 user_4692 joined #mojo
10:42 neyasov_____ joined #mojo
11:00 irq following my yesterday chat with hernan604 and his suggestion of Mojolicious::Plugin::Config, I came with an idea of Mojolicious::Plugin::Getopt : http://pgsql.privatepaste.com/e7a72c7b71
11:00 irq it still has some clashes between own mojo Getopt and the extra ones.
11:01 irq But generally, does it make sense? O I am reinventing the weel?
11:02 batman irq: not sure where you're going with this, but command line options to instruct hypnotoad is a bad idea, since you can't change them during runtime
11:02 batman the config file on the other hand will be read on each hot reload
11:05 irq I see. What I generally want is ability, probably while developing only, to alter some general config of myapp (like database location, username, etc) and not dealing with a bunch of different config files
11:07 batman i'm using %env to accomplish that: MYAPP_DO_THIS=42 morbo script/my-app
11:08 batman it also allows me to set MYAPP_DO_THIS in the config file. (if it's a regular Mojolicious::Plugin::Config file, with perl)
11:13 arthas joined #mojo
12:51 neilhwatson joined #mojo
12:54 sugar_ joined #mojo
12:57 marty joined #mojo
13:27 mst batman:
13:27 mst marty:
13:27 mst gah, no marcus
13:28 batman what?
13:28 mst what's your specific use case for fatpacking?
13:28 mst nobody's talking to me here
13:28 mst and there's not really an easy solution without something on the fatpacker side
13:29 batman marcus wants to fatpack http://marcus.nordaaker.com/building-ansible-modules-with-perl-and-mojolicious/
13:31 batman i'm not familar with the details, but i think you can simply reproduce with echo "use Mojo::Util; print Mojo::Util::md5_sum(123);" > myapp.pl; fatpack pack myapp.pl 1>/dev/null
13:31 mst does the ansible code in that particular case run on your machine or a remote one?
13:35 batman it runs locally
13:36 batman but i think marcus just wants it to be easy to download. like "curl https://some.thing > ansible/library/coolhandler"
13:36 mst right
13:37 mst which is all very well, but '| tar xzf -' might also solve that
13:38 batman what's infront of the pipe?
13:38 batman ah
13:38 batman of course :S
13:38 * mst facedesks
13:38 mst and your case was uploading to some sort of random service-y thing, right?
13:39 mst or am I misremembering
13:40 batman not sure if i have a case
13:40 mst ok
13:40 mst the thing is ... for some cases, embedding a file is fine
13:41 mst for some cases, spewing into a tempdir would be fine
13:41 mst for some cases, that wouldn't, but having a specific 'unpack into X directory once' step would be fine
13:45 batman it would be pretty cool if perl supported running program.tar.gz :) (without a module)
13:48 batman endelig fikk jeg installert mysql! :P
13:48 batman oops! wrong window
13:48 * mst burns the heretic
13:49 mst but, yeah, I mean, I could have ansible/library/coolhandler explode itself and make ansible/library/.coolhandler on first run
13:49 mst and that could probably be coaxed into all working
13:49 batman yeah, i'm looking into that now
13:49 mst but it seems like different scenarios would require different path selections
13:50 mst e.g. a remote plugin for ansible/Object::Remote/whatever would want to use /tmp I guess
13:50 mst but then you have potential cleanup problems
14:20 zivester joined #mojo
14:23 denis_boyun joined #mojo
15:11 sh4 joined #mojo
15:12 odc joined #mojo
15:42 amon joined #mojo
15:59 good_news_everyon joined #mojo
15:59 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/dLnv_w
15:59 good_news_everyon mojo/master 71c6d85 Sebastian Riedel: try running tests with Net::DNS::Native again
15:59 good_news_everyon left #mojo
16:05 disputin joined #mojo
16:17 KCL_ joined #mojo
16:25 sugar__ joined #mojo
16:46 marty_ joined #mojo
16:50 gtodd joined #mojo
16:55 s1037989 joined #mojo
17:09 ashimema anyone out there aware of any JWT implementations in perl?
17:10 ashimema just trying to get my head around it now..
17:10 ashimema JSON::WebToken appears to be alpha.. though may be worth a look..
17:10 * ashimema talking to himself again ;)
17:11 Fistful_of_Coins joined #mojo
17:33 sri marcus: you really need to explain this to me https://github.com/kraih/mojo/pull/707#issuecomment-63079374
17:34 sri "we are making change foo, so you can do bar, but that does not mean we support bar!"
17:34 sri WAT?
17:34 purl Watt?  Watt?  I can't hear you, there's this buzzing noise where my brain should be. or https://www.destroyallsoftware.com/talks/wat
17:36 mst sri: "we are making change foo in order to not unnecessarily make it impossible for you to do bar at all, but that doesn't imply a commitment to support for bar going forwards"
17:36 mst in the same way that I'll accept patches that avoid pointlessly breaking 5.6 but that doesn't mean I give a fuck about 5.6
17:38 * mst comments with an actual phrasing
17:38 sri but are you willing to accept new technical debt?
17:41 sri sure, you can stay compatible with 5.8 by avoiding defined or, but odds are your code is a lot less easy to read and more prone to those good old undef errors
17:45 fhelmber_ joined #mojo
17:46 mst sri: ok, so, when I said *pointlessly*, I actually meant it
17:47 mst and was trying to head off that particular "counterargument", because it really wasn't my point
17:48 sri i see
17:48 sujithm joined #mojo
17:48 mst to me, file versus data section is a choice, and there's not really technical debt involved either way
17:50 KCL_ joined #mojo
17:50 sri it's minimal in this case, "perl examples/entities.pl > lib/Mojo/entities.txt" becomes running the script and cut'n paste into DATA
17:54 mst sri: I might add a feature to rewrite data sections or something
17:54 mst could be useful for people with Lite apps
17:55 sri rewrite?
17:55 purl well, rewrite is callback-based at the bedrock level
17:56 mst as in (ish) perl examples/entities.pl | bin/replace-data-section-in lib/Mojo/Util.pm
17:57 sri ah
17:57 mst i.e. automate the C&P
17:58 sri haha
17:59 sri i want to hate that idea
17:59 sri but it makes sense
18:00 marty joined #mojo
18:00 sri although, for lite apps you'd need a little more magic
18:00 sri to build the @@ foo.html.ep sections
18:00 sri but that's not very hard
18:02 marmez joined #mojo
18:10 irq joined #mojo
18:10 batman https://github.com/jhthorsen/app-implode # i wonder how well this works
18:12 batman i guess it gets a lot "fatter" than what fatpacker produces, but it might not be too bad
18:15 marty joined #mojo
18:15 batman mst: ^ got any comments?
18:16 mst batman: oh, you untar yourself every time the script runs?
18:17 batman yeah
18:17 sugar joined #mojo
18:17 mst that's how PAR works
18:17 mst that's one of the things I wanted to get away from
18:17 mst I don't want a crashing script to take a shit in /tmp
18:18 mst OTOH if you have XS bits, it's pretty much the only possible thing to do
18:18 mst but I'd regard it as an alternative to PAR, not to fatpacker
18:18 mst it looks significantly less insane than PAR for that purpose :)
18:19 batman i guess it's sane enough for cpan then :-)
18:20 batman i'm considering allowing the script to unpack to a *special* directory instead of /tmp/xyz, since then it won't eat more-and-more space at least...
18:20 mst it's a nicely minimalist implementation of an approach I desperately try and avoid ever needing :)
18:21 batman hehe
18:21 batman that's one of the nicest things you've ever told me, haha :)
18:21 good_news_everyon joined #mojo
18:21 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/GT1cJw
18:21 good_news_everyon mojo/master 8fe3573 Sebastian Riedel: moved entities.txt into the DATA section of Mojo::Util to avoid gratuitously breaking module bundlers like App::FatPacker (closes #707)
18:21 good_news_everyon left #mojo
18:31 sri https://github.com/kraih/mojo/pull/707#issuecomment-63108152
18:36 sri i suspect the PAR example might change jberger's mind
18:38 Eke- joined #mojo
18:50 jamesaxl joined #mojo
18:52 disputin joined #mojo
18:54 sujithm joined #mojo
19:05 marcus joined #mojo
19:06 * marcus has beer, and fatpackable mojo tools.
19:06 * marcus is a happy admin monkey.
19:06 mst marcus: note: I'm still willing to consider sharedir support of some sort
19:07 mst I'm just not convinced I understand the use cases well enough to figure out how to best implement it
19:07 mst and I'm definitely convinced that some of those use cases will end up in the category of "fatpacker isn't designed for problems that complicated and I regret nothing; please see PAR for why"
19:12 Trelane why do we need sharedir?
19:13 Trelane Can't we just do something clever with Mojo::Assets
19:14 mst this is systems. "Can't we just" and "clever" are both disallowed
19:14 mst fucking apps developers.
19:15 Trelane The whole packaging this up into a script thing is already "clever"
19:15 Trelane And involves much special casing
19:15 mst have you looked at how fatpacker does it?
19:15 mst it involves no special casing and as little clever as possible
19:15 mst unless you regard hashes and HERE documents as clever, in which case I have a PHP to sell you
19:15 Trelane True, but we're already doing things that break the underlying assumptions that were made when the thing was originally written
19:16 mst one can equally argue that the shared hack breaks the underlying assumptions of what a perl distribution means
19:16 mst *sharedir
19:16 Trelane true
19:17 Trelane Anyway....
19:17 Trelane speaking of php
19:17 mst personally, I think something along the lines of packing just templates into ... something
19:17 mst and then having bin/myapp explode
19:17 Trelane The php solution is "untar this here"
19:18 batman hey! what's wrong with "untar this here" ? ;)
19:18 batman hehe
19:18 Trelane mst: that sounds...complex
19:18 Trelane would each instance get their own version of the untar?
19:18 mst what's an instance? what's a version?
19:19 Trelane each execution
19:19 mst why would you run the 'explode' subcommand on each execution?
19:19 mst surely you'd do 'bin/myapp explode' once
19:19 Trelane oh, I see, a custom command
19:19 mst and then just run the application
19:20 mst and basically you'd stuff all the data for explode into __END__
19:20 mst so perl never even parses it
19:20 marcus bin/myapp explode && echo "everyone dies"
19:21 batman mst: https://github.com/jhthorsen/app-implode/commit/534c9847295be094a4efc19ed27a4af0682c5584 :)
19:21 mst echo "boom today" >>~/ivanova/told-you-so
19:21 marcus btw, I plan to move cpanmin.us over to cloudflare so we can have https.
19:21 marcus apropos pushing perl security forward a bit
19:22 mst hah
19:23 marcus I asked miyagawa and he thought it might be a good idea.
19:24 batman mst: do you think this fix the "don't want to fill /tmp with crap" problem? https://github.com/jhthorsen/app-implode/commit/64c3c8587c68df2e3962f22661b1d8de4a57abf6
19:24 batman i think it's a bit too easy, but i have a hard time figuring out a better idea
19:25 batman i was considering a md5_sum() of $0 instead (to avoid conflicts), but i like that a new version use the same "temp" area
19:25 marcus btw, I think miyagawa said something else is on it's way to replace carton?
19:25 disputin joined #mojo
19:25 mst there are some people working on a carton 2
19:25 mst but he's been very vague about who or how far they've got
19:33 irq joined #mojo
19:35 * marcus opens a german beer in honour of sri.
19:36 mst batman: that just opens you up to a different set of problems
19:36 mst batman: like versioning
19:36 batman what is "that" referring to? md5 sum or the diff?
19:38 mst batman: the diff
19:38 purl hmmm... the diff is that in some cpus under some fp settings some nans can signal. (floating point exception.)  if they don’t, they are quiet.
19:38 mst batman: a new tempdir every time is ugly but relatively safe
19:38 mst batman: except that the user now needs to ensure they do
19:38 mst batman: $SIG{INT} = $SIG{TERM} = sub { exit 255 }
19:38 mst batman: otherwise Ctrl-C will kill cleanup
19:39 batman yeah, i really don't want to start poking around %SIG
19:40 batman that's even worse imo
19:40 batman the idea why it _could_ work is that today, you have unique application names. so why should these "imploded" apps be any different?
19:41 batman today = on a system (that's not true, but close enough?)
19:41 marcus mojoapp.war
19:41 * marcus hides
19:41 batman marcus: where are you?
19:42 marcus batman: on the floor in my living room
19:42 marcus waiting for my daughter to crash so I can watch a movie with my wife
19:42 marcus then sleeeeep
19:42 batman doesn't sound too bad :)
19:43 good_news_everyon joined #mojo
19:43 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/u-a9kQ
19:43 good_news_everyon mojo/master 7cfbe25 Sebastian Riedel: no need to mention specific module bundlers
19:43 good_news_everyon left #mojo
19:43 marcus Tomorrow is brew day. Got a feisty yeast starter on the kitchen bench
19:43 risugg_ joined #mojo
19:43 batman mst: how about if i track the temp dir on startup, so i at least avoid making a lot of those?
19:44 batman tracking would open up other problem though :P
19:46 sri marcus: making cpanmin.us work with HTTPS sounds like a great idea
19:46 basic6_ joined #mojo
19:58 jamesaxl joined #mojo
19:58 marcus sri: I'll get on it this weekend then.
20:26 entranzd joined #mojo
20:41 sugar_ joined #mojo
20:52 KCL_ joined #mojo
20:53 oetiker joined #mojo
21:03 alnewkirk joined #mojo
21:14 * sri wonders if POD above DATA is better for modules
21:21 sri btw. something i did not know, DATA sections are counted as perl code by sloccount... so our results are not completely distorted
21:22 sri s/not/now/
21:22 sugar__ joined #mojo
21:23 disputin joined #mojo
21:25 good_news_everyon joined #mojo
21:25 good_news_everyon [mojo] kraih pushed 1 new commit to master: http://git.io/G6tLiA
21:25 good_news_everyon mojo/master bf763eb Sebastian Riedel: move DATA sections to the bottom
21:25 good_news_everyon left #mojo
21:26 sri think i like this a little more
21:35 sri btw. the number we have to subtract from sloccount results for correct results is 2386
21:38 sri cloc gets it right
21:38 sri in fact, cloc even manages to count the javascript and css correctly
22:00 bpmedley_ joined #mojo
22:12 disputin joined #mojo
22:34 s1037989 joined #mojo
23:12 s1037989 joined #mojo
23:21 s1037989 joined #mojo
23:37 s1037989 joined #mojo
23:46 s1037989 joined #mojo

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