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

IRC log for #mojo, 2016-10-19

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

All times shown according to UTC.

Time Nick Message
02:00 aborazmeh joined #mojo
02:57 noganex joined #mojo
03:08 tyldis dave: async vs threads is complicaed and depends on OS and the programming language in question. For most dynamic languages threading has a lot of issues and few modules/libraries are thread safe.
03:10 tyldis dave: Even in Java the trend is now async over threads because the threads, while easy to manage there, are very expencive memory-wise and gives bad CPU yield when scaling to a large amount of concurrent requests
03:11 tyldis Given that trend more and more libraries are not thread safe in Java world either.
03:18 Grinnz also, threading is unnecessary for IO-based async
05:23 dod joined #mojo
05:28 dod joined #mojo
05:47 polettix joined #mojo
05:50 inokenty-w joined #mojo
05:56 dod joined #mojo
05:57 Lee joined #mojo
06:14 sri Grinnz: well, that's not quite true ;p
06:15 sri since you'll pretty much always need a thread pool to do getaddrinfo
06:16 sri i know, i'm not helping with the problem of teaching async to beginners ;p
06:17 Grinnz lol
06:32 Jonis morning :)
06:38 Vandal joined #mojo
06:44 vicash joined #mojo
06:54 sri noooooo
06:54 sri i lost my round tuit :(
06:54 genio I'm still in the office, so bah humbug
06:55 sri the one i got in oslo
06:56 genio that last post of mine was steered towards the cheery morning greeting.  that sucks about losing the tuit
06:57 bpmedley What's a tuit?
06:57 purl a tuit is, like, what we all lack, especially the round ones
06:59 Jonis genio: what timezone are you in?
06:59 genio bpmedley: https://en.wiktionary.org/wiki/round_tuit
06:59 genio Jonis: EST or EDT or whatever crazy thing it's been switched to for now.  it's 3am
07:00 genio I've been here since 8am yesterday
07:00 Jonis :/
07:02 bpmedley genio : That's weird, why are you still there?
07:02 genio ServiceRocket and Jira broke our stuff. So, apparently a coworker and I are the magic button that will fix all the things
07:03 bpmedley That's unfortunate
07:05 mbudde joined #mojo
07:06 AndrewIsh joined #mojo
07:14 bpmedley sri : höchst bedauerlich (trying to say "that's unfortunate" auf deutsch)
07:20 trone joined #mojo
08:15 osfabibisi joined #mojo
08:42 rshadow joined #mojo
09:32 jkramer perl -MMojo::UserAgent -e 'print Mojo::UserAgent->new->get("http://www.faz.net/aktuell/wirtschaft/wirtschaftspolitik/eugh-kippt-preisbindung-bei-medikamenten-auf-rezept-14488074.html")->res->dom->find("head > meta:nth-child(1)")->size, "\n"'
09:33 jkramer Is this a bug or am I doing something wrong with that selector?
09:33 jkramer Without the :nth-child(1) it does return all the metas. nth-child(odd) also works, just not numbers
09:44 jkramer Interestingly it's working with numbers >= 5 :D
10:27 tyldis sri: I got some tuits to spare. Considering freight prices it might be cheaper for you to visit Tromsø, though
10:29 Jonis :)
10:29 Jonis can probably send them in a normal envelope, no? Posten isn't _that_ expensive
10:30 che-quest joined #mojo
10:30 tyldis Jonis: Stickermule.com wants $50 for shipping a single sticker to me (which was a candid joke in my reply)
10:31 Jonis ah!
10:31 Jonis normal delivery isn't available? I had to check to see if it's the same to Bergen
10:32 Jonis option 1 is $2 and expedited is $49
10:32 tyldis I wasn't presented with a choice
10:32 tyldis Lemme check
10:33 tyldis Yup, only expedited available
10:33 Jonis wow
10:33 Jonis weird
10:34 tyldis It would have been nice if it really was 3 days, but that's a lie. It's 3 days to Oslo and then UPS will send it by regular mail from there.
10:34 Jonis yeah
10:34 tyldis UPS is a scam
10:34 tyldis Fedex is actually all the way through
10:52 itaipu joined #mojo
10:57 dotan_convos joined #mojo
10:59 tchaves joined #mojo
11:02 tchaves joined #mojo
11:08 coolo joined #mojo
11:14 coolo joined #mojo
11:45 sri anyone happen to know how to search through a json array in sqlite?
11:46 sri as in, the array is a field guaranteed to be an array, and i want to search for a specific value it contains
11:47 sri (may contain)
11:54 spicyjack sri: http://www.sqlite.com/json1.html#jex ???
12:00 sri not if this is the best way, but i've found something
12:00 sri json_each()
12:01 sri select foo from bar, json_each(bar.foo) where json_each.value = 'yada yada';
12:02 sri little awkward, but works
12:05 jkramer Can anyone reproduce that :nth-child thing or is it just me? Seems a bit random to me
12:15 polettix joined #mojo
12:32 gizmomathboy joined #mojo
12:42 Atog jkramer i got the same problem while trying other css selectors, i was even unable to use last-of-type for example
12:42 Atog i was always getting all the objects
12:53 zivester joined #mojo
12:54 ivi joined #mojo
13:07 aborazmeh joined #mojo
13:07 jkramer What really bugs me is that it works for some higher numbers but not 1-5, for example :D
13:14 ramortegui joined #mojo
13:29 jabberwok left #mojo
13:30 zamanf left #mojo
13:41 ptolemarch joined #mojo
13:49 kes joined #mojo
14:00 BinGOs joined #mojo
14:01 go|dfish joined #mojo
14:04 mcsnolte joined #mojo
14:24 itaipu joined #mojo
14:40 dotan_convos joined #mojo
15:30 disputin joined #mojo
15:35 Atog joined #mojo
15:52 sh14 joined #mojo
15:54 Grinnz sri: if you want to see awkward, you should see how I implemented your array logic in Minion::Backend::SQLite :P
15:54 Grinnz i should probably comment some of it, it takes a few reads to even remember what i did
16:01 dod joined #mojo
16:11 jabberwok joined #mojo
16:27 disputin joined #mojo
16:54 rshadow joined #mojo
17:02 PryMar56 joined #mojo
17:54 demian joined #mojo
17:58 demian I have a question about storing info in a model (developed with moose), loaded in as a helper.
17:59 demian if I push information into the model data structures, within memory (array of messages or what not)
17:59 demian how does that data in memory persist?  Do I need to shuffle into and out of a db or local files?
18:01 demian retrieving model info from different routes, from memory, seems to work some of the time, but not always.
18:23 sri multiple server processes will not share that data structure
18:28 demian Thank you, sri.  I have been using ajax posts to successfully dump the memory datastructure from the model to the morbo debug screen for 12 minutes (with a max spread of 5 mins between)
18:29 demian should it work at all?
18:31 sri it's not worth trying, just get a database
18:31 sri yes, if you know what you're doing, keeping some data in memory makes sense
18:32 sri but for learning you'll just run into problems
18:33 demian Thanks, sir!  I am learning something new every day, and it's great
18:33 demian sri
18:33 sri now that i'm running vmware all the time i'm a little sad i got this macbook with only 8gb ram :(
18:36 genio is it upgradeable?
18:45 sri of course not ;p
18:46 genio sadface
19:48 rshadow joined #mojo
20:04 rshadow joined #mojo
20:47 kryp joined #mojo
21:01 rshadow joined #mojo
21:03 sri no idea what i was thinking, got the big ssd (which can be upgraded) but not extra ram (which can't)
21:04 nic I'm still laughing at 8 GB not being enough in a laptop  --  I am so behind the curve :D
21:05 sri and next week they'll be releasing new macbooks, then i'll never get one with more ram :(
21:07 sri normally 8gb would be more than enough, if it wasn't for virtual machines
21:08 * nic nods
21:14 stephan48 or firefox, or multiple IDEs(eclipse, android studio)
21:15 pink_mist firefox rarely needs more than a few hundred MB for me
21:20 haarg when i got this mba, i went for the minimum specs except for the ram (8gb)
21:30 stephan48 yea i seem to be the only person having this particular problem with firefox.. after a few days of runtime or some tabs it will eat into the GBs
21:30 stephan48 it won't easily free them when you close tabs. nowadays i don't even have many plugins installed just noscript and ublock origin
21:31 stephan48 still this is a repeated scheme so either i am doing something wrong or noscript is leaking like hell, because i already tried other adblockers
21:31 pink_mist firefox is currently at 850MB for me with about 70 tabs and it's been running for .... hmm, probably 2 weeks
21:31 pink_mist I don't even use noscript
21:33 jberger twitter is the hog for me
21:33 jberger I guess I haven't profiled RAM, but the twitter page is noticeable on the power consumption thingy
21:33 sri lol
21:33 sri i make it a habit to restart chrome at least once a day to free up ram
21:34 stephan48 not that i care how much RAM firefox takes..i got 24 gigs in this WKS but still.... it gets slugish after its 1,5 Gig :D
21:34 jberger go on battery (on a mac), look at the battery "apps using significant energy" and if you are me it is none
21:35 jberger then open twitter in chrome (presumably you already had chrome running)
21:35 jberger Chrome is now in the list, then look at the details, it is just one chrome helper, and it disappears when twitter is closed
21:35 stephan48 woosh.. battery empty?
21:35 jberger yep
21:35 sri can confirm
21:35 jberger if i'm on battery I can't keep twitter open
21:36 jberger cool, so its not just me :P
21:36 sri what scares me about running VMs with little ram is that it can quickly start swapping if i'm not careful and eat up ssd lifetime
21:37 mib_hf55di joined #mojo
21:37 jberger I thought that a lot of that ssd lifetime stuff had been addressed at the OS level now?
21:38 stephan48 i bought a samsung ssd last month. now i already have some 2.54TB written - which makes not much sense. maybe half a TB wasted on reinstalls.
21:38 stephan48 until i read what firefox and chrome do with their swappyness on disk
21:38 stephan48 or rather their profiles. they tend to use quite a bit of it
21:42 pink_mist SSD lifetime is measured in decades these days, even with constant swapping
21:42 pink_mist I wouldn't worry
21:46 sri hehe, tell him https://twitter.com/augiedb/status/788808360447578112
21:53 Grinnz 17:04:28 <nic> I'm still laughing at 8 GB not being enough in a laptop  --  I am so behind the curve :D
21:54 Grinnz i did finally upgrade my desktop to 16GB, but i still barely use 8GB of it with overwatch, several chromes, discord, and a few twitch streams open
21:54 Grinnz but yeah, a VM can bump it up a bit
21:55 Grinnz also neither my work workstation nor my home desktop are ever running for more than 12-14 hours at a time so you could say i restart chrome often :P
21:55 stephan48 sri: surely CGI!
21:55 stephan48 :D
22:11 disputin joined #mojo
22:23 blonewolfs joined #mojo
22:25 blonewolfs is it possible to drop privileges in mojolicious?  i have an app that i wrote that is started at system boot by systemd (rhel 7) but, i don't want it to run as root.
22:28 bpmedley blonewolfs : https://metacpan.org/pod/Mojolicious::Plugin::SetUserGroup <-- Something like this?
22:30 blonewolfs bpmedley: that looks like just the thing i was looking for.  thank you.
22:44 Grinnz blonewolfs: note that you can also add User=foo to the [Service] section of the unit file, unless you need to bind to a privileged port like 80 or 443
22:44 Grinnz i.e. there's no reason otherwise to start it as root to begin wtih
22:45 Grinnz https://www.freedesktop.org/software/systemd/man/systemd.exec.html
22:45 Grinnz maybe that could be mentioned in the cookbook example? dunno
22:46 Grinnz it's a good default, except not when you need port 80
23:48 howitdo joined #mojo

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