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

IRC log for #mojo, 2017-05-17

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

All times shown according to UTC.

Time Nick Message
01:47 howitdo joined #mojo
02:00 VVelox joined #mojo
02:10 noganex joined #mojo
02:14 Janos joined #mojo
02:57 mcsnolte joined #mojo
04:04 dboehmer_ joined #mojo
04:43 inokenty-w joined #mojo
04:55 maschine joined #mojo
05:42 dod joined #mojo
05:53 marty joined #mojo
05:54 prg joined #mojo
06:21 dod joined #mojo
06:28 dod joined #mojo
06:29 dod joined #mojo
06:30 webart joined #mojo
06:56 AndrewIsh joined #mojo
07:20 trone joined #mojo
07:35 Vandal joined #mojo
08:15 dod1 joined #mojo
08:18 sri i guess nothing has ever resulted in volunteers stepping up after i mention it's complicated ;p
08:20 ashimema late to the party but +1 to adding links from docs back up to relevant guides.. took me a while to get my head around that.
08:22 sri ashimema: the question is less *if* at this point, but *how*
08:23 sri jberger: then the organization of the guides makes no sense anymore
08:23 sri feel free to reorganize though
08:24 ashimema documentation is hard to get right.. you guys have done a pretty good job so far.. it's a big framework.. there's always going to be a certain amount of learning curve to it.
08:24 ashimema hmm. The how question is interesting..
08:25 * ashimema will ponder that one.. see if he has any worth mentioning suggestions.
09:11 rshadow joined #mojo
09:50 prg any suggestions on how to maintain a patched version of a basically dead CPAN module?
10:39 castaway joined #mojo
10:57 tchaves joined #mojo
11:37 stryx` joined #mojo
11:37 TBSliver prg: either remember to install it first, or use something like opan (http://p3rl.org/App::opan) or pinto (http://p3rl.org/pinto)
11:38 TBSliver or track down the original author and see if they'l take a patch heh
11:49 pink_mist or track down the original author and ask if you can take it over
12:12 nic prg: Have you considered opan?
12:13 prg no, i'll look into it, thanks
12:13 prg so far i considered pinto/stratopan, gitpan forking or just dropping it in a repo somewhere
12:14 nic if it's for an organisation/company, opan (or equivalents) is a good way to go
12:15 prg as far as the original author goes, there are already two tickets open about the same issue i ran into
12:15 prg last activity was 4 years ago
12:15 nic if it's just for yourself, github is a good way to go.  That way, if the upstream version comes back to life, it's easy to track (and merge) changes
12:16 prg yeah, there's https://github.com/gitpan which has a copy of that module
12:16 prg not sure how active gitpan is though
12:16 nic treat that as read-only
12:16 nic it let's you work with the history of a package
12:16 prg yeah, i read that. but i guess i could fork it?
12:17 nic sure
12:17 nic I guess that takes some of the tracking work out of the equation
12:17 prg if it ever comes back to life i should be able to merge new releases quite easily
12:18 prg and cpanm docs say it can install from a git repo, so...
12:18 nic there's a hidden advantage that might be remotely useful...  others get to see who has forked it, in case someone else is having the same thoughts as you, they can contribute to your fork instead
12:19 nic cpanm is awesome at installing from github
12:27 dod joined #mojo
12:31 Janos joined #mojo
12:42 Grinnz be careful with that, it only works if the author provides the right files in the repo
12:42 Grinnz particularly the Build.PL or Makefile.PL
12:43 haarg and that it includes the prereqs
13:01 stryx` joined #mojo
13:06 prg since gitpan says it's tracking CPAN releases it should be fine
13:11 gryphon joined #mojo
13:15 bwf joined #mojo
13:16 gizmomathboy joined #mojo
13:31 maschine joined #mojo
13:46 mcsnolte joined #mojo
13:56 nic ah, true.  I exclude quite a few files when bundling up into a release (which is what you see under gitpan)
13:57 nic what i do personally is look whether a source repo is mentioned against the package (eg on its metacpan page or within its Makefile.PL if there is one) and then track that
14:01 Grinnz prg: right, good point
14:02 Grinnz prg: that also means you may need to delete some generated files or add some for an useful development environment, though (like .gitignore is usually missing)
14:02 Grinnz and META.json/META.yml should only be present if you have something autogenerating them
14:03 prg i don't need an development environment, the patch is just one additional line. i just need a way to deploy that version of the module instead of the one on CPAN
14:06 prg (in case anyone is wondering, Net::AMQP is the culprit and the issue is https://rt.cpan.org/Public/Bug/Display.html?id=86856)
14:06 Grinnz well as long as your  patch doesn't need changes to META.json/META.yml that would need to be regenerated
14:06 Grinnz then you could make the changes, re-tar it up, and opan add it, probably
14:07 Grinnz but my preference would be to redo the dist build, which is usually `perl Makefile.PL; make dist`
14:09 Grinnz ah, that one is `perl Build.PL; ./Build; ./Build dist`
14:09 Grinnz it has a useless Makefile.PL that should be ignored
14:09 prg haha, awesome :D
14:10 prg the myriad of all build systems in perl leaves me dumbfounded every time
14:11 prg (one of the many reasons i'm not interested in taking over as maintainer)
14:11 nic it would be nice if cpanm had a patch-on-the-fly option
14:12 Grinnz these days most people either trudge through doing the wrong thing in Module::Build, or have some tools that make EUMM less painful
14:12 Grinnz but there are nice easy options like mbtiny and minilla if your dist is simple
14:13 prg great, two new systems i haven't even heard of before :D
14:13 Pyritic joined #mojo
14:13 Grinnz mbtiny is an authoring tool for Module::Build::Tiny which basically does everything for you (the Build.PL is two lines)
14:14 Grinnz minilla is a less-dependency-heavy version of Dist::Milla which is a do-everything-for-you built on Dist::Zilla
14:14 Grinnz i believe minilla generates a MBT Build.PL as well by default
14:21 disputin joined #mojo
14:24 karjala_ joined #mojo
14:26 FROGGS joined #mojo
14:27 FROGGS hi, I've hit a possible bug and wonder if it is me...
14:27 FROGGS doing this is fine: perl5.24.0 -MMojo::UserAgent -E 'say Mojo::UserAgent->new->get("https://10.0.16.22:5665/v1/status")->result->body' # <h1>Unauthorized</h1>
14:28 FROGGS it is correct that I get an Unauthorized, since I did not specify the username and password
14:28 FROGGS but when I do so, I get:
14:28 FROGGS perl5.24.0 -MMojo::UserAgent -E 'say Mojo::UserAgent->new->get("https://foo:bar@10.0.16.22:5665/v1/status")->result->body # Can't resolve: Der Name oder der Dienst ist nicht bekannt at -e line 1
14:28 FROGGS "Name or service not known"
14:29 FROGGS that's strange, isnt it?
14:35 Armen FROGGS: passing user/pass that way isn't the standard, I think. Some clients might parse that before making the request, but that information should be in the Authorization header of the request
14:36 FROGGS Armen: and how so?
14:36 cstamas joined #mojo
14:36 Armen the request header should look like Authorization: Basic <base64 encoded username:password>
14:37 FROGGS http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Basic-authentication
14:37 Armen then again, there is an rfc doc that describes using it as part of the url as you've done, so maybe it's a bug
14:38 sri perl -E 'say "https://foo:bar@10.0.16.22:5665/v1/status"'
14:38 sri hehe
14:38 FROGGS I also escaped the @ and switched the quotes
14:39 FROGGS damn
14:40 FROGGS thanks sri, seems like I messed something up when switching the quotes
14:40 FROGGS works now -.-
14:40 Armen nice :)
14:40 FROGGS Armen: thanks anyway
14:41 Armen all good, I've learned a new way to pass authorization info ;)
14:43 Grinnz not a good way, since it will be sent in plaintext despite https
14:43 Grinnz though maybe not in Mojo::UA, not sure
14:44 sri it's fine with https
14:44 dod joined #mojo
14:57 zivester joined #mojo
15:05 cheako joined #mojo
15:13 maschine in Mojo::pg::database, if I'm doing an insert ($db->insert('some_table', {foo => 'bar', baz => 'yada'});) with a long list of columns/values, can I use a hashref (or arrayref) instead of listing each one individually?
15:15 Grinnz isn't that what you just did?
15:16 maschine right but I don't want to write out foo => 'bar' etc for all of the columns
15:16 Grinnz however you construct the hash doesn't matter
15:16 maschine something like {$hashref} instead
15:16 Grinnz ...no
15:17 Grinnz {} is a hashref
15:17 maschine Then wouldn't it work without {}?
15:19 Grinnz this is basic perl data structures, the function takes a hashref of columns to insert
15:26 sri that display on the samsung s8 is breathtaking... omg
15:27 sri i want that as a 27" monitor please
15:27 cheako joined #mojo
15:33 maschine $db->insert('some_table', $buffer); works, where $buffer is a hashref passed from my route
15:35 sh14 joined #mojo
15:37 jberger it is tempting to use "" in one-liners, but so often I get escaping problems
15:37 jberger so I'm pretty quick to go to q[] or the like
15:38 jberger I only use "" or qq[] when I intend to interpolate, because then I know to watch for interpolations
15:50 zen joined #mojo
15:51 zen hi ppl, I try to upload a file using Mojo, 500mb files no problemo however about 600mb files wont upload: "Event "read" failed: Can't write to asset: No space left on device"
15:52 zen I understand this message, however the machine where I run this on has alot of mountpoints with very little free space, how do I find out which dir is used for temporary writing to asset?
15:52 zen thanks in advance :)
15:54 prg zen: probably /tmp
15:56 zen prg: this makes alot of sense, was already suspecting that mountpoint
15:57 jberger zen: http://mojolicious.org/perldoc/Mojo/Asset/File#tmpdir
15:58 zivester2 joined #mojo
16:00 zen jberger: thank you so much!
16:00 jberger np
16:01 Pyritic joined #mojo
17:04 jberger IIRC https://github.com/kraih/mojo/issues/1095 is expected behavior
17:04 jberger but I can't find the code that implements it
17:05 jberger certainly you don't want to close a 101, and reading the description for 100 and 102 seems like they all are in that camp
17:06 karjala_ joined #mojo
17:06 stryx` joined #mojo
17:07 PryMar56 joined #mojo
17:09 preaction all the 1xx codes should be, as far as i know, part of a single connection
17:10 jberger also, for 1094, I don't see a reason not to consider a patch, but I'm not writing the code to try to get the mode into Mojolicious::Static and Mojolicious::Renderer
17:12 jberger I guess there could just be a "bundled" boolean attribute that gets its value from app->mode eq 'development' in Mojolicious.pm
17:13 kyclark joined #mojo
17:19 jnap zen: I'm mostly a lurker here, but if you are running out of disk space with a single upload (probably a test) you should consider the expected real load in production.
17:19 jnap you might get several uploads at once I imagine.
17:26 zen hi jnap, thanks for your reply: I'm pushing the size limits: the /tmp on that server had 500 mb free
17:26 zen tried uploading 600mb file, so no dice
17:27 zen however changing the tmpdir to a mountpoint with more space available did the trick :D
17:28 jnap Mojolicious probably has some tricks around this, but sometimes with Catalyst when I've had this huge file upload stuff I've aimed the file uploads at S3 and returned the S3 url in the request instead.
17:42 Grinnz some dists make /tmp a tmpfs, which may help or may make the problem worse :)
17:53 disputin joined #mojo
17:54 rshadow joined #mojo
18:16 howitdo joined #mojo
18:23 jberger I don't understand how in the modern day do people still write SQL injection vulns http://thehackernews.com/2017/05/joomla-security-update.html
18:37 Grinnz holy shit, in joomla?
18:38 cheako joined #mojo
18:39 Grinnz i mean even in PHP there have been at least two ways to connect to mysql in core that have parameter binding
18:39 Grinnz for a decade
18:42 punter joined #mojo
18:49 dod joined #mojo
18:54 jberger inorite
19:06 Pyritic joined #mojo
19:52 stryx` joined #mojo
20:04 orev joined #mojo
20:07 mishanti1 The best spam subject today: "Dont let a limpy destroy your life"
20:07 mishanti1 Oh noes! The limpy! Run!
20:07 jberger OH NOES
20:27 itaipu joined #mojo
21:01 Grinnz https://www.polygon.com/2017/5/17/15651948/the-witcher-netflix-series-platige-image
21:02 gryphon joined #mojo
21:03 sri could be the next game of thrones
21:04 sri that said, i'm more interested in the next the expanse ;p
21:05 cheako joined #mojo
21:09 Grinnz biggest question is who will be geralt :P
21:19 pink_mist clearly sean bean!
21:29 maschine got most of my app converted to postgre - not bad considering I basically started yesterday, I don't know SQL, and being pretty new to mojo.  Thanks for the great modules and documentation guys!
21:29 Grinnz cool, but it's spelled postgres :P
21:31 maschine lol yes I know ;)
21:42 sri CHYC: this is your new daily reminder to send a patch!
21:44 CHYC Haha! I'm actually writing the tests now! If it's OK with you, would you accept a patch on the understanding that it's a starting point for discussion rather than something I actually expect to be merged?
21:46 CHYC Actually, maybe a gist would be more appropriate
21:47 CHYC Hmm, I'm torn, because I really value the per-line review comments in a PR.
21:47 * CHYC stops waffling
21:48 sri mmmmm... waffles
22:00 cheako joined #mojo
22:30 sri guess i'll settle for a new star trek series :o https://streamable.com/pmp54
23:18 pink_mist there's also https://youtu.be/Yy9sKeCE8V0 ... which seems like it could be fun :P
23:20 cheako joined #mojo
23:37 stryx` joined #mojo
23:39 disputin joined #mojo
23:43 marty joined #mojo

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