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

IRC log for #mojo, 2017-05-30

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

All times shown according to UTC.

Time Nick Message
00:59 cheako joined #mojo
01:54 marty joined #mojo
02:07 genio I'm still trying to figure out how I feel about American Gods. The IMDB score is great, but so far I'm kind of meh
02:53 noganex_ joined #mojo
03:01 karjala_ joined #mojo
03:56 marty joined #mojo
03:59 irqq joined #mojo
04:04 dboehmer_ joined #mojo
04:53 sivoais joined #mojo
05:36 Peppard joined #mojo
05:52 dod joined #mojo
05:55 inokenty-w joined #mojo
05:55 eseyman joined #mojo
05:57 marty joined #mojo
05:59 dod joined #mojo
06:50 Fran_73 joined #mojo
07:14 Vandal joined #mojo
07:39 AndrewIsh joined #mojo
07:49 AndrewIsh joined #mojo
07:52 Vandal joined #mojo
07:58 trone joined #mojo
07:58 marty joined #mojo
07:59 CHYC batman: Thanks for the response on the PR. Unfortunately I'm on holiday this week with very little internet so won't be able to respond fully until next week.
08:33 dod joined #mojo
08:37 rshadow joined #mojo
08:39 karjala_ joined #mojo
08:54 gregf_ joined #mojo
08:57 irqq joined #mojo
08:59 prg joined #mojo
09:08 irqq joined #mojo
09:39 Petru joined #mojo
09:57 karjala_ Should a subprocess (from Mojo::IOLoop::Subprocess) be able to successfully launch a sub-Subprocess? I'm having a bit of a trouble doing that...
09:57 karjala_ the sub-subprocess quits unexpectedly
10:00 marty joined #mojo
10:01 pink_mist I believe you'd specifically need to set up an event loop for that in the first subprocess if you wanted to use Mojo::IOLoop::Subprocess for it
10:02 pink_mist but I'm not absolutely certain
10:07 pink_mist otherwise, you should be able to use system(), piped open(), and qx() just like normal as far as I'm aware
10:07 pink_mist or even fork()+exec()
10:39 Petru joined #mojo
10:49 kes joined #mojo
10:51 karjala_ turns out the process didn't quit early - just systemd doesn't log the last lines of STEDERR output for some reason
10:52 karjala_ the output lines were many (around 20-25)
10:54 batman CHYC: i'm not overly positive to the PR... I think it needs to be cleaned up and maybe redesigned
11:09 tchaves joined #mojo
11:15 aborazmeh joined #mojo
11:18 sri batman/chyc: definitely redesigned
11:19 PopeF0 joined #mojo
11:19 batman yeah. sorry. "definitely".
11:30 PopeF0 joined #mojo
11:34 rshadow joined #mojo
11:37 rshadow joined #mojo
11:41 karjala_ (My problem was solved: I needed to set STDOUT's autoflush)
11:41 karjala_ (unrelated to Mojo, sorry)
11:55 tyldis Am I abusing UserAgent if I keep reusing the same object, but changing host? Seems to cause a memoryleak when I do so
11:57 pink_mist no
12:02 marty joined #mojo
12:10 PopeF0 joined #mojo
12:14 gryphon joined #mojo
12:17 gizmomathboy joined #mojo
12:28 tyldis Ah, no, of course it wasn't Mojo::UserAgent, it was a badly placed call to Memory::Usage->record
12:32 PopeF0 joined #mojo
12:33 gryphon joined #mojo
12:41 sri btw. anyone know a reliable way to test chmod on windows?
12:41 sri i still wouldn't mind having this https://github.com/kraih/mojo/compare/chmod
12:41 sri if it was testable
12:43 sri i suppose the test could be skipped on windows
12:51 rshadow joined #mojo
12:52 tyldis But there is something strange happeninbg when the response body exceeds a certain size
12:53 tyldis I do get leaks with UserAgent, and currently it looks like it's related to the response size
13:00 good_news_everyon joined #mojo
13:00 good_news_everyon [mojo] kraih deleted subprocess_fix at 5c58240: https://git.io/vHlZN
13:00 good_news_everyon left #mojo
13:13 rshadow joined #mojo
13:14 PopeFelix joined #mojo
13:17 marty joined #mojo
13:21 Pyritic joined #mojo
13:22 PopeFelix joined #mojo
13:33 marty joined #mojo
13:39 Armen hi
13:39 purl niihau, Armen.
13:40 tyldis Doing "$ua->get($uri)", if the body is less than 1489 bytes, there is no leak. At some point beyond that I do get memory leaks (Perl 5.24, Mojo 7.31). Compared over several thousand of iterations.
13:40 tyldis JSON payload, plain HTTP
13:43 tyldis Working with JSON response bodies up to about 10kb, so nothing too drastic
13:44 tyldis (away for hour, picking up the kids)
13:49 rshadow joined #mojo
14:08 jnap sri: not sure this is something you're into (or anyone on the channel actually) but I was considering blogging about PSGI versus 'The Mojo Way', a sorta pros/cons list to help people think about it
14:08 jnap mostly aimed at the P6 group at this point.
14:09 jnap I probably don't myself grasp all the issue, or have the ability to see if what the P6 people are doing is any better.  If willing to help me I'd be grateful.  If not I totally get that as well :)
14:18 trwww I set HTTP_COOKIE in my shells environment expecting it to be available when doing something like 'script/my_app get /whatever' on the command line. Anyone know how to do this?
14:29 batman trwww: you need to use -H to set the cookie header. try "mojo get -h"
14:32 jberger jnap the reason Mojo doesn't use PSGI all the time is that PSGI is bad at non-blocking
14:32 jberger and kinda can't be fixed IIUC
14:32 jnap jberger: right I learned that much doing the Catalyst take on it :)
14:33 jnap But I was under the impression there's also other more subtle issues around disconnection errors, 'back pressure', etc
14:33 jberger ah, yeah, I recall sri having the run down on that, you're right, wait for him
14:33 jnap and of course a list of my pet peeves like how PSGI servers tend to buffer POST/PUT input automatically, etc
14:34 jnap thanks :)
14:34 jnap jberger++
14:34 jberger np, sorry I don't have the detail in my head anymore
14:38 jberger https://irclog.perlgeek.de/mojo/2014-08-30#i_9273134
14:40 PryMar56 joined #mojo
14:57 kgoess joined #mojo
15:18 cheako joined #mojo
15:21 karjala_ joined #mojo
15:31 maschine joined #mojo
15:46 cheako joined #mojo
15:49 sri it's so stupid that you can't actually watch house of cards when you have a netflix subscription in germany
15:50 sri you have to pirate it because they sold off the rights to shitty pay tv
15:51 Armen they did?
15:51 jberger after all their BS about "non-geographic" blah blah
15:51 jberger then they go and do it themselves
15:51 jberger yeah that sucks
15:51 Armen that's stupid. I've had some success using opera's built-in vpn to watch foreign netflix libraries
15:52 sri ooh, i have not tried the opera vpn yet
15:53 sri guess that's a feature that makes me actually install opera again
15:54 gizmomathboy joined #mojo
15:59 trwww joined #mojo
16:00 trwww batman: gah, of course, thank you!
16:09 sri Armen++ # that actually works
16:09 Armen nice :)
16:10 sri i thought netflix was crackign down on vpn use
16:11 tchaves joined #mojo
16:30 arcanez they "are"
16:37 sri jnap: like three years ago discussing custom web servers vs psgi would have actually been interesting to me, now it's just meh
16:38 jnap sri: I totally understand.  It just came up for me again because I was lurking in Gabor's P6 web development channel and given P6 is a fresh start I was suggesting rethinking porting PSGI
16:38 jnap I think the gut reaction is 'just port stuff from P5' without re asking the question 'what is relevant for development TODAY'
16:39 jnap but thank you anyway :)
16:40 jberger jnap: didn't someone already port PSGI, like a year ago or so I recall there being lots of discussion on bpo
16:40 jnap yeah I think there's more than one port...
16:40 sri there's like two or three PSGI ports
16:41 jnap it was more of a 'pros /cons PSGI versus custom web server and if we learned lessons and did things better for P6 or not'
16:42 jnap I mean as far as I know the question is not asked.
16:43 jnap and people are just assuming its good enough, even though my 1.5+ years struggling with async / streaming on Catalyst with PSGI suggests otherwise.
16:43 sri i think mostly dancer people work on perl 6 web stuff, they will prolly use the same outdated tech they are used to
16:43 jnap :(
16:44 sri as far as i'm aware gabor never really tried the async mojo features when he wrote about it
16:44 sri just 1:1 translations of dancer stuff he wrote before
16:45 jnap I think he's the first to say he might not be expert on that
16:45 sri he doesn't seem very much into it
16:45 jnap it might also be him responding to what Perl developers are asking
16:46 jnap its not easy to change the dialog, I tried a number of years and failed so I can't really demerit someone for it
16:47 sri see, this is why custom web servers are better, we don't even think about all these problems anymore
16:47 sri they are just solved, for years
16:49 sri that said, there is one aspect of our api i would liek to improve
16:50 sri http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Streaming-multipart-uploads
16:50 sri that is still kinda clunky
16:51 Petru joined #mojo
16:53 jnap right and that is the sort of think that I am finding completely impossible.
16:54 sri upload progress was one of the most annoying things ever to implement with catalyst
16:54 sri so i made sure to fix that early on in mojolicious
16:55 litwol left #mojo
16:57 sri for a time we also allowed double dispatching, once after headers had been received, and once the whole request with message body had been received
16:57 jnap right there's really should be a list of use cases that any p6sgi need to compare against.  In terms of 'as a developer I do this and need to do this.'
17:06 itaipu joined #mojo
17:07 good_news_everyon joined #mojo
17:07 good_news_everyon [mojo] kraih tagged v7.32 at 6c70765: https://git.io/vHlxN
17:07 good_news_everyon left #mojo
17:08 good_news_everyon joined #mojo
17:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vHlpk
17:08 good_news_everyon mojo/master 723a4e0 Sebastian Riedel: bump version
17:08 good_news_everyon left #mojo
17:11 sri allright, you can now pipe data to the get command :)
17:14 Lee joined #mojo
17:19 jberger \o/
17:20 cheako joined #mojo
17:23 Petru_ joined #mojo
17:29 sh14 joined #mojo
17:32 [0xAF] Hi guys, I'm looking to solve a trivial problem in the best possible way. Let's say we have array with paths ($self->renderer->paths or $self->static->paths) and I want to remove some path from there and then prepend/unshift it, to be the first in the list. Example code: https://gist.github.com/0xAF/3d82ab50515c4a1c6762a1ea9bac3846   what do you think would be the best way to do this?
17:40 [0xAF] I know it's Perl related and not Mojo itself, but since I cannot come up with good ideq and you're gurus around, I thought it's worth to ask you.
17:42 dod joined #mojo
17:43 genio line 9: unshift, @{$arr}, @backup if @backup;   you can provide a list directly to unshift. no need to iterate through yourself
17:43 genio err, no leading comma. Why the world did I put _that_ there?
17:44 [0xAF] genio: good point.
17:44 purl nice and sharp
17:45 trone joined #mojo
17:45 Grinnz [0xAF]: https://metacpan.org/pod/List::UtilsBy#extract_by
17:45 genio Also, you can use List::Util
17:46 Grinnz @$arr = ((extract_by { $_ eq $path } @$arr), @$arr); # might have to split this up, not sure if the last @$arr will have the right elements yet
17:47 genio @$arr = grep {$_ && $_ ne $path} @$arr; unshift @$arr, $path;   ?
17:48 Grinnz you don't know if $path was there yet
17:48 Grinnz (unless the intent was to add it unconditionally)
17:48 genio the sub name is remove_and_prepend_path   so, I'm definitely assuming
17:49 [0xAF] Grinnz: good idea, but I would like to not use extra modules if possible. Thought List::Util is already there I guess...
17:50 [0xAF] genio: yeah, grep is very good idea, idk why i havent thought of it...
17:50 disputin joined #mojo
17:51 [0xAF] genio: thanks a lot :) i knew there should be more perly way to do it... but i guess i was stuck for some time...
17:52 rshadow joined #mojo
17:54 disputin1 joined #mojo
18:03 Lee joined #mojo
18:18 cheako joined #mojo
18:32 prg sri: did you do anything special to watch Netflix over Opera VPN? I'm just getting the "Streaming Error" page...
18:32 prg sri: nvm, setting location to USA works
18:57 irqq joined #mojo
19:17 frankjance joined #mojo
19:33 zivester joined #mojo
19:46 rshadow joined #mojo
20:03 Lee joined #mojo
20:05 Petru_ joined #mojo
20:29 jacobydave joined #mojo
20:43 stryx` joined #mojo
21:13 stryx` joined #mojo
21:53 dotan_convos joined #mojo
22:04 Lee joined #mojo
23:11 zivester joined #mojo
23:19 zivester2 joined #mojo
23:25 q_gone joined #mojo

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