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

IRC log for #mojo, 2016-08-02

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

All times shown according to UTC.

Time Nick Message
00:03 cfedde joined #mojo
00:18 ningu joined #mojo
00:19 ningu I noticed that t/mojo/log.t fails when export PERL_UNICODE=63. is this expected? is it the fault of the person setting the environment variable?
00:21 jberger ningu: we have specifically stated that you need to run the tests in a clean environment
00:21 ningu ah ok
00:21 ningu where does it say that?
00:21 jberger the only discussion of trying to guard against a crazy environment has led to "that would be a huge undertaking" and I think I suggested it would be something good for GSoC perhaps
00:22 jberger http://mojolicious.org/perldoc/Mojolicious/Guides/FAQ#Do-I-need-to-clean-my-environment-before-testing-Mojolicious
00:22 ningu yes, I am not suggesting doing anything differently, just confirming
00:22 ningu ok, thanks
00:24 jberger and actually I think that only ever considered the MOJO_ envs
00:24 Grinnz_ that env variable setting causes basically all filehandles, STDIN/OUT/ERR, and command line arguments to have a utf-8 layer; this is probably mostly problematic for the filehandles, as Mojolicious is going to assume its handles don't have the utf-8 layer
00:25 ningu Grinnz_: yes, I completely agree it's problematic
00:26 ningu although in googling online for how to make Perl handle Unicode "correctly" I found recommendations for setting it... so...
00:26 Grinnz_ in a program you're writing from scratch that uses no libraries, sure
00:26 ningu I never set it, myself
00:26 Grinnz_ but it affects any code you load, which isn't expecting it
00:26 ningu right
00:26 Grinnz_ sort of like the -w commandline switch
00:27 Grinnz_ actually, if i remember correctly, Mojo::Log encodes output to UTF-8 before passing to STDERR as well, so it's assuming there's no layer set there
00:48 jberger I thought mojo use syswrite in most places though
00:49 jberger uses
01:00 Grinnz not in Mojo::Log
01:08 kaare_ joined #mojo
01:56 itaipu joined #mojo
02:01 zivester joined #mojo
02:09 geheimnis` joined #mojo
02:19 kid511 joined #mojo
02:32 noganex joined #mojo
05:05 sri i just don't understand apple, they are completely neglecting the mac
05:05 sri it's like everybody at the company is now working on headphones with lightning connectors
05:10 sri the trashcan mac pro has not been updated in 3 years! :o http://buyersguide.macrumors.com/#Mac
05:12 sri if they hadn't refreshed the shitty 12" this year one might even get the idea that they are switching cpu architectures again... perhaps to arm
05:13 jberger I've literally only ever seen one of those
05:13 jberger The trash can i mean
05:13 jberger Ib wonder what the market penetration on that is? Might not be worth development time
05:14 sri considering they manufacture them by hand in the us, i think they sell very very few
05:14 sri but still, how hard could it be to update them to the latest intel generation once a year
05:15 jberger Tbh besides the occasional gamer box when was the last time someone bought an actual desktop?
05:16 jberger And not for their grandmother to type Christmas letters
05:16 sri youtubers love those for encoding video i believe
05:17 jberger Guess i can see that
05:18 sri they are great for many graphics design tasks i bet
05:18 sri 3d modeling, cad, editing huge raw photos
05:18 sri animating, rendering stuff
05:18 * jberger cries uncle
05:31 sri looks like bitcoin prices are plummeting
05:41 sri those 27" imacs seem pretty good for programming
05:42 sri i bet code looks amazing on a 5k display
06:17 preaction i like using headless mac minis for base stations and remote computing power
06:18 preaction i really need to refresh my mini, because it can't sync any of my devices, and using my laptop to sync my devices is terrible because it can only connect one at a time and only through a USB-C adapter
06:20 inokenty-w joined #mojo
06:46 mbudde joined #mojo
07:17 trone joined #mojo
07:21 Vandal joined #mojo
08:19 mbudde1 joined #mojo
08:20 marcusr joined #mojo
08:25 trone joined #mojo
08:28 osfabibisi joined #mojo
08:32 Lee joined #mojo
08:46 ribasushi joined #mojo
09:46 mib_4yqtt0 joined #mojo
10:02 jkramer left #mojo
10:30 sugar__ joined #mojo
11:05 tchaves joined #mojo
11:32 icjs joined #mojo
11:36 itaipu joined #mojo
11:36 sugar__ joined #mojo
11:43 Kripton joined #mojo
11:46 inbioz joined #mojo
11:55 punter joined #mojo
12:14 kid51 joined #mojo
12:15 Janos joined #mojo
12:33 itaipu joined #mojo
12:36 kid51 joined #mojo
12:43 zivester joined #mojo
12:58 zivester joined #mojo
12:58 neilhwatson joined #mojo
13:12 gizmomathboy joined #mojo
13:20 Kripton joined #mojo
13:37 mcsnolte joined #mojo
14:05 nic joined #mojo
14:07 nic Grinnz: re SetUserGroup.  You said that failing to set supplemental groups was a security concern, but I'm not seeing why
14:07 jkramer joined #mojo
14:07 jkramer Ahoy!
14:07 nic Retaining supplemental groups from the previous user would be a security concern
14:08 jkramer Is "Premature connection close" always caused by internal mojolicious timeouts or can it also be caused by a remote server that closes a connection during a Mojo::UserAgent request or something?
14:08 nic Is there a way to clear out previous supplemental groups but only flag a warning if additional supplementals fail to be set?
14:09 nic (I'm running morbo as the target user, but it still breaks in an obscure way because it can't set supplemental groups)
14:11 sugar__ joined #mojo
14:12 jkramer Or is there anything else that can cause a "premature connection close" when I have set {inactivity,connect,request}_timeout on the useragent to 5000 as well as MOJO_INACTIVITY_TIMEOUT=5000 for morbo?
14:14 Bean joined #mojo
14:18 itaipu joined #mojo
14:21 Grinnz nic, setting the supplemental groups and clearing the previous ones are the same action
14:22 Grinnz the newest version won't set anything if the user and primary group are correct
14:22 nic hmmm, ok, I guess I need to dig more to see what's up then
14:23 nic for now it's working if I comment out that line
14:24 nic I guess what I need is the OS to allow any user to set their supplemental groups to the empty list
14:25 jkramer Is there maybe a limit to parallel requests/open connections in Mojo::UserAgent?
14:26 nic yes, and it's configurable
14:27 jkramer max_connections? I understand that this is about connections to keep alive after requests have finished, or am I getting this wrong?
14:29 nic jkramer: ignore me.  I think I misunderstood your question
14:29 jkramer Ok :) max_connections = 100 didn't help anyway
14:36 sri http://mojolicious.org/perldoc/Mojolicious/Guides/FAQ#What-does-Premature-connection-close-mean
14:36 Kripton joined #mojo
14:47 Bean_ joined #mojo
14:49 dotan jkramer: if you are trying to make a large number of concurrent/non-blocking requests with Mojo::UserAgent, some of them may fail because the event loop was too busy handling other requests to give them attention
14:52 cuechan joined #mojo
14:52 zivester joined #mojo
15:01 nnms joined #mojo
15:06 sri lots of good stuff on the postgres 10 roadmap http://blog.2ndquadrant.com/postgresql-10-roadmap/
15:07 jkramer dotan: Can I somehow increase the timeout or whatever in the event loop?
15:15 jkramer Ah, guess I'll have to split it up in smaller chunks and do them sequentially
15:19 lluad joined #mojo
15:21 itaipu joined #mojo
15:26 orev joined #mojo
15:52 kes joined #mojo
16:04 AirDisa joined #mojo
16:07 dotan jkramer: the classic solution is to use a rate-limiting queue, so your useragent is only handling X requests at a time
16:07 dotan http://blogs.perl.org/users/stas/2013/01/web-scraping-with-modern-perl-part-1.html
16:08 dotan or Joel's answer here: http://stackoverflow.com/questions/15152633/perl-mojo-and-json-for-simultaneous-requests
16:08 dotan Also, it's very worthwhile to install Net::DNS::Native if you can - a lot of latency in requests comes from DNS lookup
16:10 jkramer I made it work by generating all transactions first with build_tx, splitting them in chunks of 5 and then pushing two steps on the delay queue for each, one for starting the requests and one for handling the results.
16:11 jkramer It's actually just ~40 requests but they're all biggish file uploads to a really slow shit API
16:15 preaction making them concurrently isn't going to make them faster if it's a server problem
16:16 jkramer It definitely makes them fail faster :)
16:16 preaction one of my previous jobs, every month some new dev would DDoS my database because it was slow and they had "grid computing" and would request the same data thousands of times at once...
16:17 GabrielVieira joined #mojo
16:35 Grinnz_ hooray, DoS
16:36 jberger it is amazing how many people forget that not every service is run by google-level hardware
16:36 neilhwatson I've seen that happen with test result emails :)
17:06 preaction it used to be pretty reliable that the server was going to be more expensive and beefier than your pathetic home computer. that is no longer the case
17:24 * neilhwatson buys servers boards for home. More reliable.
17:41 * vicash recently bought Dell servers from an IT liquidator on eBay for dirt cheap
17:53 sri running servers at home doesn't seem like a good idea
17:55 sri high electricity bills, noise, and workstations or even laptops tend to be just as powerful these days
18:00 lluad I run some servers at home, but they're server boards in low-noise tower cases. Actual rackmount servers are just too loud.
18:02 sri yea, i meant big iron
18:03 mantovani you should be rich to run servers at home
18:03 sri small home automation servers make total sense
18:04 mantovani you are right, I do it too but for the context I understood that was other kind of servers.
18:33 sri looks like the big windows update is out :o
18:33 sri that means bash on windows for everybody \o/
18:34 pink_mist well, everybody who's on win10 =)
18:35 sri https://i.imgflip.com/j0780.jpg
18:38 jberger I find it really interesting that the whole reason that this bash-on-windows works (and showed up so quickly) was that the subsystem (I think at the NT kernel level) was built for it, and then they just forgot about it for a decade or so
18:39 jberger it was in one of their videos
18:39 jberger the one that explained the process model
18:39 jberger basically someone rediscovered it and it built up quickly from there
18:39 sri yea, microsoft has lots of cool stuff that got lost over the years because of bad company policies
18:41 jberger also interesting that NT has has fork all this time and it just wasn't exposed in the api
18:41 jberger *has had
18:45 Janos I think the idea behind bash on windows is good, but there is so much more than bash needed, specially when programing on perl, don't get me wrong I use windows all the time, but doing perl on windows sounds really painful
18:49 sri Janos: like?
18:51 Janos well, most open source software is a lot easier to install on linux, apt-get on debian etc, and a nice terminal emulator, there is been some work on that area on windows, things like chocolatey as package manager and conemu as terminal, but I must say there is still ways to go
18:53 sri Did you actually look at bash on windows?
18:53 sri It's a linux subsystem based on ubuntu
18:54 Janos sorry, I have read about it and see the docs, but never gave it a go, is it a complete ubuntu ?
18:55 Janos or not complete but apt ?
18:57 Janos mm there IS apt, that's awesome, I stand corrected, will try it asap :P
19:09 PryMar56 joined #mojo
19:17 jberger Janos: bash-on-windows is really a terrible name for it
19:17 jberger the thing is that was the first thing it was known by and so it has kinda stuck
19:17 jberger a better name is "windows subsystem for linux" but that might actually go too far the other direction
19:18 jberger the thing they actually ship is WSL with an Ubuntu userspace
19:18 jberger complete and unmodified Ubuntu userspace, it just runs on WSL, which is very cool
19:20 Janos I'll give it a try, windows is my main OS, but I have never manage to work on it, so I use a Debian VM on my second monitor
19:21 sri i think the real name is bash on ubuntu on windows ;p
19:22 Janos how are they handling the file system issues ? I do some some nodejs programming and the way npm handle deps used to break ntfs because of the long names
19:23 Janos I was able to install and use the modules, but could not delete node_modules from the command line with cmd or powershell, I had to open the windows explorer to be able to delete node_modules :P
19:27 Janos maybe rm -r will do the trick with the new subsystem
19:28 zivester joined #mojo
19:37 asarch joined #mojo
19:45 disputin joined #mojo
19:56 cuechan joined #mojo
20:32 Grinnz_ i wonder if it would be worthwhile to add the PrivateTmp=1 option to the example systemd configs, and if it would break anything
20:33 Grinnz_ documentation here: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
20:34 Grinnz_ basically just causes /tmp to be private to the service
20:35 jberger that's an interesting feature
20:36 pink_mist I'm not sure why mojo would specifically enable that 0_o
20:36 pink_mist but sure, it's an interesting feature
20:36 Grinnz_ it's a security benefit
20:37 Grinnz_ seems to work ok with my lite app
20:40 jberger I always use random tmp dirs when I need them, but having this additional level of isolation seems handy
20:43 cuechan joined #mojo
21:07 Grinnz_ pink_mist: mojo uses /tmp for e.g. Mojo::Asset::File and the prefork server's pidfile
21:07 Grinnz_ (by default)
21:08 jberger Grinnz_: doesn't it use File::Spec's tempdir
21:09 jberger I wonder if that is smart or just '/tmp'
21:09 Grinnz_ yes, which defaults to /tmp unless you set some env vars
21:09 Grinnz_ private tmp would probably make the prefork server's pidfile a bit pointless though
21:10 Grinnz_ i guess relying on /tmp/prefork.pid wouldn't be the best idea either way
21:11 Grinnz_ (from an outside process)
21:13 Grinnz_ so if you needed the pidfile, you'd be better off passing the --pid-file option for somewhere not in /tmp
21:19 disputin joined #mojo
21:35 sugar__ joined #mojo
21:39 sugar joined #mojo
21:39 asarch joined #mojo
22:37 y1mmm joined #mojo
22:38 sugar joined #mojo
23:02 romel how do i pass :id part of a route with link_to helper?
23:02 romel nvm
23:21 sri funny how not too long ago we thought meteor.js could be the future
23:22 sri and these days all you hear about is them burning vc money
23:33 y1mmm joined #mojo
23:35 preaction isn't that what one is supposed to do with vc money?
23:37 * sri shrugs
23:38 sri also... hahahahaha... another bitcoin exchange has been hacked and bitcoin is crashing
23:41 sugar joined #mojo
23:52 Grinnz_ welp

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