harry_ has quit [Remote host closed the connection]
harry_ has joined #ruby
<baweaver>
chrisseaton: Can't say I know, but someone like eam / havenwood / apeiros might.
jenrzzz_ has joined #ruby
harry_ has quit [Remote host closed the connection]
harry_ has joined #ruby
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #ruby
roshanavand has quit [Quit: Leaving.]
harry_ has quit [Remote host closed the connection]
roshanavand has joined #ruby
harry_ has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 256 seconds]
Emmanuel_Chanel has joined #ruby
harry_ has quit [Remote host closed the connection]
harry_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
harry_ has quit [Client Quit]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
devyn has quit [Remote host closed the connection]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
jcarl43 has quit [Quit: WeeChat 2.1]
Yxhuvud has joined #ruby
ramfjord has quit [Ping timeout: 265 seconds]
Yxhuvud has quit [Client Quit]
Yxhuvud has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 265 seconds]
ramfjord has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
<havenwood>
chrisseaton: "Ruby 1.9 calls setlocale() but only for LC_CTYPE. LC_ALL can cause various problems, so that Ruby will not set LC_ALL implicitly." ~Matz
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #ruby
<mikhael_k33hl>
I have a script that uses concurrent-ruby, however, all threads exit even when it hasn't finished what it is doing yet. How do I make my script wait for all threads to finish before exiting?
<havenwood>
mikhael_k33hl: It looks like the auto_terminate option for FixedThreadPool is true by default.
memo1 has joined #ruby
<havenwood>
mikhael_k33hl: Have you tried?: auto_terminate: false
<havenwood>
Or can you not set that for other reasons?
cyberg has quit [Remote host closed the connection]
<mikhael_k33hl>
havenwood: tried adding that, let me look closely, something isn't right though
amar has quit [Remote host closed the connection]
amar has joined #ruby
zautomata1 has joined #ruby
<mikhael_k33hl>
havenwood: Oh yeah, tried adding that, still exits though
<mikhael_k33hl>
havenwood: can you suggest any other gem where I can create threads and run jobs asynchronously and then collect the results of those jobs afterwards?
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
amar has quit [Ping timeout: 268 seconds]
<mikhael_k33hl>
havenwood: hmmm, that methods seem to be invoked when the appp exits
Yxhuvud has joined #ruby
dinfuehr has joined #ruby
<havenwood>
mikhael_k33hl: shutdown should be what you want, right? but not kill.
<cluelessnewbie>
Any downside to using a service like PiazaCloud, or is there a better one? I used the Railsinstaller, but it has Ruby 2.33 and Rails 5.1. My goal here is to create teaching websits with an interactive test engine that tracks and adjusts material to what the person in learning.
<mikhael_k33hl>
havenwood: yup, but what I need is for my app to not exit before all threads finish their job
cagomez has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
pilne has quit [Quit: Leaving]
<havenwood>
mikhael_k33hl: do you need a reaper to remove dead threads? or are you sure you're threads will stay alive?
cagomez has quit [Ping timeout: 240 seconds]
memo1 has quit [Ping timeout: 268 seconds]
anisha has joined #ruby
<mikhael_k33hl>
havenwood: Okay so basically, what my script/app needs is to run rsync to different upstreams, there will be a `n` number of rsync so I want to run the processes concurrently in a maximum of 10 threads
ramfjord has joined #ruby
Fysicus has quit [Remote host closed the connection]
<mikhael_k33hl>
havenwood: So I got a pool of threads(10), with queue size of 20. I want my app to exit and generate a report about the rsync processes when they are all done.
tolerablyjake has joined #ruby
<mikhael_k33hl>
havenwood: to answer the question, I need the threads to stay alive. When no more jobs are in queue, and all jobs are done, then the script can exit. :)
mostlybadfly has quit [Quit: Connection closed for inactivity]
<mikhael_k33hl>
havenwood: maybe I should just use sleep and read scheduled_task_count on the pool and wait till it gets 0 before exiting. hmmm
tolerablyjake has quit [Ping timeout: 260 seconds]
erlend has quit [Ping timeout: 260 seconds]
mroutis has quit [Remote host closed the connection]
erlend has joined #ruby
n0m4d1c_ has joined #ruby
n0m4d1c_ has quit [Remote host closed the connection]
Miron has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
cats has quit [Ping timeout: 265 seconds]
n0m4d1c has quit [Ping timeout: 268 seconds]
alfiemax has joined #ruby
<mikhael_k33hl>
Oh, I don't think i'tll work though hehe
<havenwood>
mikhael_k33hl: Running to dinner, but if you want to talk options later it's interesting to me.
<mikhael_k33hl>
havenwood: I would love to
<mikhael_k33hl>
havenwood: okay man, thanks, see you later, enjoy your dinner
hfp_work has quit [Ping timeout: 240 seconds]
mikhael_k33hl has quit [Ping timeout: 260 seconds]
hfp_work has joined #ruby
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
RougeR has quit [Ping timeout: 265 seconds]
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
orbyt_ has joined #ruby
jamesaxl has joined #ruby
memo1 has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
cluelessnewbie has left #ruby [#ruby]
anisha has quit [Ping timeout: 265 seconds]
alfiemax has joined #ruby
Puffball has quit [Remote host closed the connection]
anisha has joined #ruby
Psybur has quit [Read error: Connection reset by peer]
alfiemax has quit [Ping timeout: 263 seconds]
kapil___ has joined #ruby
<kapil___>
I want to search content between:
<kapil___>
# Part3A
<kapil___>
....
<kapil___>
# Part3A
<kapil___>
i wrote : `s = datastream.scan(/(\# Part3A(.|\n)*\# Part3A)/).last` but it includes extra space in result
<kapil___>
if second # Part3A has prefix spaces
sent-hil has quit [Quit: Connection closed for inactivity]
arescorpio has joined #ruby
despai has quit [Quit: ...]
jnollette has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jnollette has joined #ruby
zautomata2 has joined #ruby
cbyrda has joined #ruby
alfiemax has joined #ruby
zautomata1 has quit [Ping timeout: 264 seconds]
cbyrda has quit [Quit: leaving]
johnny56_ has quit [Ping timeout: 276 seconds]
johnny56 has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 256 seconds]
erlend has quit [Ping timeout: 260 seconds]
erlend has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
minimalism has quit [Ping timeout: 260 seconds]
halt has joined #ruby
halt is now known as Guest39892
Hobbyboy has quit [Ping timeout: 256 seconds]
nickjj_ has joined #ruby
moei has quit [Quit: Leaving...]
nickjj has quit [Ping timeout: 260 seconds]
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
Hobbyboy has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
minimalism has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Ping timeout: 265 seconds]
anisha has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 264 seconds]
phaul has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
hkais has joined #ruby
reber has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
ragingmonkey has quit [Ping timeout: 268 seconds]
Eiam has quit [Ping timeout: 245 seconds]
sauvin has joined #ruby
alfiemax has joined #ruby
hkais has quit [Ping timeout: 256 seconds]
samort7 has quit [Quit: Leaving]
psychicist__ has joined #ruby
KeyJoo has joined #ruby
sidx64 has joined #ruby
KeyJoo has quit [Max SendQ exceeded]
n008f4g_ has joined #ruby
KeyJoo has joined #ruby
oleo has quit [Quit: Leaving]
arekushi has quit [Ping timeout: 265 seconds]
arescorpio has quit [Quit: Leaving.]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
guacamole has quit [Ping timeout: 276 seconds]
n008f4g_ has quit [Ping timeout: 264 seconds]
aufi has joined #ruby
ragingmonkey has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
phaul has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
mtkd has joined #ruby
sunrunner20 has quit [Remote host closed the connection]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DoubleMalt has joined #ruby
phaul has quit [Quit: WeeChat 2.1]
DoubleMalt has quit [Client Quit]
phaul has joined #ruby
devyn has quit [Remote host closed the connection]
anisha has joined #ruby
govg has joined #ruby
devyn has joined #ruby
andikr has joined #ruby
Deesl has joined #ruby
ta_ has quit [Remote host closed the connection]
venmx has joined #ruby
minimalism has quit [Quit: minimalism]
aufi has quit [Quit: Leaving]
minimalism has joined #ruby
cam27 has quit [Quit: cam27]
jinie has quit [Ping timeout: 264 seconds]
modin has quit [Ping timeout: 264 seconds]
drale2k has quit [Ping timeout: 264 seconds]
hkais has joined #ruby
m4rCsi_ has joined #ruby
m4rCsi has quit [Read error: Connection reset by peer]
modin has joined #ruby
jinie has joined #ruby
drale2k has joined #ruby
mlehrer_ has quit [Ping timeout: 264 seconds]
mlehrer has joined #ruby
clemens3 has joined #ruby
phaul has quit [Quit: WeeChat 2.1]
phaul has joined #ruby
imode has quit [Ping timeout: 260 seconds]
sidx64 has quit [Read error: Connection reset by peer]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
sidx64 has joined #ruby
ta_ has joined #ruby
venmx has quit [Ping timeout: 263 seconds]
venmx has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
TomyWork has joined #ruby
CrazyEddy has quit [Ping timeout: 276 seconds]
alfiemax has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
schneider has joined #ruby
Stanimir has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
moei has joined #ruby
dionysus69 has joined #ruby
qba73 has joined #ruby
qba73 has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 265 seconds]
qba73 has joined #ruby
claudiuinberlin has joined #ruby
yohji has joined #ruby
nowhereman_ has quit [Ping timeout: 246 seconds]
the_drow has joined #ruby
rabajaj has quit [Ping timeout: 240 seconds]
atchoum has quit [Ping timeout: 260 seconds]
venmx has quit [Remote host closed the connection]
rabajaj has joined #ruby
TheBrayn has quit [Ping timeout: 256 seconds]
qba73 has quit [Ping timeout: 260 seconds]
TheBrayn has joined #ruby
rabajaj has quit [Ping timeout: 240 seconds]
the_drow_ has joined #ruby
mikecmpbll has joined #ruby
sundhell_away is now known as sundhell
Raboo has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
the_drow has quit [Ping timeout: 256 seconds]
KeyJoo has quit [Remote host closed the connection]
omps has joined #ruby
KeyJoo has joined #ruby
KeyJoo has quit [Max SendQ exceeded]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
tvw has joined #ruby
KeyJoo has joined #ruby
the_drow_ has quit [Ping timeout: 265 seconds]
drale2k_ has joined #ruby
Azure has quit [Read error: Connection reset by peer]
venmx has joined #ruby
Azure has joined #ruby
marr has joined #ruby
guille-moe has joined #ruby
drale2k_ has quit [Ping timeout: 276 seconds]
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
the_drow_ has joined #ruby
nadir has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
erlend has quit [Ping timeout: 256 seconds]
aupadhye has joined #ruby
erlend has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
RougeR has joined #ruby
RougeR has quit [Changing host]
RougeR has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
Beams has joined #ruby
ur5us has joined #ruby
rabajaj has joined #ruby
amar has joined #ruby
roshanavand has quit [Quit: Leaving.]
roshanavand has joined #ruby
KeyJoo has quit [Remote host closed the connection]
morfin60 has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
z3uS has quit [Remote host closed the connection]
tomphp has joined #ruby
faces has quit [Ping timeout: 264 seconds]
hkais has quit [Ping timeout: 264 seconds]
alfiemax has quit [Remote host closed the connection]
face has joined #ruby
claudiuinberlin has quit [Read error: Connection reset by peer]
ianfleeton has joined #ruby
z3uS has joined #ruby
z3uS has quit [Client Quit]
rabajaj has quit [Ping timeout: 255 seconds]
dr3w_ has joined #ruby
z3uS has joined #ruby
rabajaj has joined #ruby
rahul_bajaj has joined #ruby
z3uS has quit [Client Quit]
rabajaj has quit [Ping timeout: 260 seconds]
z3uS has joined #ruby
z3uS has quit [Client Quit]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
z3uS has joined #ruby
schneider has quit [Ping timeout: 265 seconds]
Asher has quit [Ping timeout: 240 seconds]
z3uS has quit [Remote host closed the connection]
omps has quit [Ping timeout: 240 seconds]
hkais has joined #ruby
alfiemax has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil___ has joined #ruby
marr has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
z3uS has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
mostlybadfly has joined #ruby
DTZUZU has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
ellcs has joined #ruby
rahul_bajaj has quit [Ping timeout: 240 seconds]
lele has quit [Ping timeout: 256 seconds]
GodFather has quit [Read error: No route to host]
lele has joined #ruby
rahul_bajaj has joined #ruby
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Koopz has joined #ruby
<Koopz>
howdy, got a generic question regarding some experiences with ruby based applications (GitLab, Redmine)
<Koopz>
do webservers like Puma have some kind of "hibernation" mode builtin?
<dminuoso>
Koopz: what do you mean by "hibernation"
<Koopz>
'cause when we don't use one of those applications for let's say a few hours and request a page, it takes quite a lot of time for a response
DTZUZU has joined #ruby
<Koopz>
after a few requests the response time is 'normal'
<dminuoso>
Koopz: One big factor might be OS level caching/paging.
<dminuoso>
If the application is not used, then the entire process memory will graduallly be paged out. Furthermore things like assets will not be cached.
marr has joined #ruby
<Koopz>
would that lead to 45 seconds of page loading time?
<dminuoso>
Koopz: You'll have to run a profiler.
deathwishdave has joined #ruby
<dminuoso>
Koopz: puma does reduce the number of threads during inactivity, but that should not be observable in normal cases.
<tbuehlmann>
Koopz: you're not on heroku then, aren't you?
<dminuoso>
Koopz: But there's a whole stack of caches working in the end.
rahul_bajaj has quit [Read error: Connection reset by peer]
rabajaj has joined #ruby
<dminuoso>
Koopz: Between DNS caches, caches for assets, your database having everything in memory, disk caches being filled, paged memory being paged in
<dminuoso>
Disks spinning up
<dminuoso>
That alone can take a good 5-10 seconds. =)
<Koopz>
heh HDD disks spinning up will probably not be the problem in our server rack :P
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
Koopz: I can only speculate unless you give more details. :p
schneider has joined #ruby
tomphp has joined #ruby
Asher has joined #ruby
ferr1 has joined #ruby
ferr1 has left #ruby [#ruby]
erlend has quit [Ping timeout: 240 seconds]
erlend has joined #ruby
<deathwishdave>
morning all
CrazyEddy has joined #ruby
RougeR has quit [Ping timeout: 260 seconds]
qba73 has joined #ruby
ciscam has quit [Ping timeout: 276 seconds]
ciscam has joined #ruby
cadillac_ has quit [Ping timeout: 256 seconds]
cadillac_ has joined #ruby
Cthulu201 has quit [Quit: Nowhere special. I always wanted to go there.]
<rorymckinley>
Can anybody think of a way to do this that does not involve the use of inject: Company.select(:id, :name).inject({}) { |memo, company| memo.merge(company.id => company) }
<rorymckinley>
Where Company is an AR model.
<rorymckinley>
I like #inject, but I find that it tends to scare people off
<rorymckinley>
And a read through Enumerable, Hash and Array apis does nto present me with a cleaner
<rorymckinley>
(a quick read at least)
<ellcs>
i didnt test it, but it should work like this:
<rorymckinley>
ellcs, I am going to sound like I am being argumentative (but really I just framed my question poorly - apologies) - can you do it without defining an accumulator var?
<dminuoso>
ellcs: Use reduce/inject.
<rorymckinley>
I.e. if #map is a higher form of an #inject that transforms
<ellcs>
his question was to avoid reduce/inject if i got it right
<rorymckinley>
ellcs: yes, i want to avoid inject but I would prefer to not explicitly create memo with each
<rorymckinley>
So, something between that and inject - if such a beast exists
<rorymckinley>
and by between, I mean ito ability of inexperienced devs to grok the solution
<ellcs>
while true; break if foo?; end
<ellcs>
xd
<rorymckinley>
:D
<ellcs>
i though about it and got no good solution, sorry mate.
<ellcs>
if i can make another suggestion: you shouldn't change this line but put it into a seperate method.
dr3w_ has joined #ruby
amar has quit [Ping timeout: 265 seconds]
ianfleeton has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rorymckinley>
ellcs: Thanks - good suggestion - allows me to wrap a readable description around it. I am also sure now that if I do love inject too much (is that even possible?) at least I am not alone :P
<dminuoso>
rorymckinley: Here's my piece of advice:
<dminuoso>
Use inject/reduce, but dont name the memo "memo"
<dminuoso>
:P
<dminuoso>
rorymckinley: how about:
<dminuoso>
Company.pluck(:id, :name).to_h
<ellcs>
dminuoso: hoolymolly
<ellcs>
nice move
KeyJoo has joined #ruby
memo1 has quit [Ping timeout: 260 seconds]
dr3w_ has quit [Read error: Connection reset by peer]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cavallari has joined #ruby
<Bish>
somebody explain to me, the following
<Bish>
>> puts {}.to_json
<ruby[bot]>
Bish: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Bish>
>> require 'json';puts {}.to_json
<ruby[bot]>
Bish: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<Bish>
uhm, okay
suukim has joined #ruby
<Bish>
puts {}.to_json
<Bish>
yields "null" for me, and that doesn't make sense for me
dr3w_ has joined #ruby
<Bish>
puts ({}.to_json) does it differently
Mike11 has joined #ruby
<rorymckinley>
dminuoso: Nice! Except that produces `{154=>"Block Inc"}` whereas I need to produce `{154=>#<Company id: 154, name: "Block Inc">}`. If I had a choice, your solution would have been the winner!
atmosx has joined #ruby
ta_ has quit [Remote host closed the connection]
ldnunes has joined #ruby
jeffreylevesque has quit [Ping timeout: 240 seconds]
<rorymckinley>
dminuoso: Yeah, i find it easier to read myself (did I mention how much I like #inject?) but my experience (FWIW) has been that less experienced devs seem to be more comfortable with magic such as #to_h than #inject
ellcs has quit [Ping timeout: 260 seconds]
Burgestrand has quit [Quit: Closing time!]
GodFather has quit [Remote host closed the connection]
amar has joined #ruby
GodFather has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
zautomata2 has quit [Ping timeout: 240 seconds]
sundhell_away is now known as sundhell
zautomata2 has joined #ruby
rorymckinley has quit [Ping timeout: 268 seconds]
jeffreylevesque has joined #ruby
shinnya has joined #ruby
minimalism has quit [Quit: minimalism]
nichol has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
konsolebox has quit [Ping timeout: 264 seconds]
mostlybadfly has joined #ruby
cthulchu has quit [Ping timeout: 240 seconds]
mtkd has quit [Ping timeout: 264 seconds]
konsolebox has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
erlend has quit [Ping timeout: 256 seconds]
erlend has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
Psybur has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Read error: Connection reset by peer]
AJA4351 is now known as AJA4350
dimik--- has joined #ruby
mtkd has joined #ruby
jcalla has joined #ruby
ellcs has joined #ruby
rorymckinley has joined #ruby
ramfjord has joined #ruby
rorymckinley has quit [Client Quit]
vondruch has quit [Ping timeout: 240 seconds]
inerthia has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 260 seconds]
synthroid has quit [Remote host closed the connection]
ta_ has joined #ruby
sundhell is now known as sundhell_away
nowhereman_ has joined #ruby
rwb has joined #ruby
amelliaa has joined #ruby
gigetoo has joined #ruby
inerthia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
grilix_ has joined #ruby
tomphp has quit [Client Quit]
memo1 has joined #ruby
oleo has joined #ruby
ellcs has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
grilix_ has quit [Ping timeout: 264 seconds]
pastorinni has joined #ruby
biox has quit [Quit: probably server crash]
Asher has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
inerthia has joined #ruby
mikecmpb_ has joined #ruby
daed has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 240 seconds]
GodFather has quit [Ping timeout: 246 seconds]
Lyfe has quit [Remote host closed the connection]
SuperChickeNES has quit [Quit: ZNC 1.6.1 - http://znc.in]
s2013 has joined #ruby
ellcs has joined #ruby
Asher has quit [Ping timeout: 276 seconds]
grilix_ has joined #ruby
Janky has quit [Ping timeout: 255 seconds]
qba73 has quit [Remote host closed the connection]
sunrunner20 has joined #ruby
qba73 has joined #ruby
qba73 has quit [Client Quit]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
inerthia has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
Rapture has joined #ruby
inerthia has joined #ruby
cadillac_ has quit [Ping timeout: 264 seconds]
Dimik_djan has joined #ruby
cadillac_ has joined #ruby
fyrril2 has joined #ruby
nichol has quit [Ping timeout: 264 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fyrril has quit [Ping timeout: 276 seconds]
nichol has joined #ruby
venmx has quit [Ping timeout: 264 seconds]
Mike11 has quit [Read error: Connection reset by peer]
sanscoeur has joined #ruby
KeyJoo has joined #ruby
venmx has joined #ruby
nichol has quit [Ping timeout: 240 seconds]
Deesl has joined #ruby
Kake_ has joined #ruby
rabajaj has quit [Quit: Leaving]
netherwolfe has joined #ruby
apparition has quit [Quit: Bye]
<Kake_>
Okay, so I installed MSYS2 and ruby seperately. I did not use the devkit installation. So what can I do now to let them cooperate when doing bundle install?
ellcs has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
bmurt has joined #ruby
vovs03 has joined #ruby
<havenwood>
Kake_: Is `bundle` failing? What's the error message?
grilix_ has quit [Ping timeout: 256 seconds]
<Kake_>
Error in installing http_parser.rb, but I think it's basically that it can't find the program "make"
<havenwood>
Kake_: Mmm, yeah, you'll need make to build C extensions, etc. I'd suggest the WSL, if you're on a modern Windows.
<ruby[bot]>
orbyt_: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<orbyt_>
I only care about the "question" items and their corresponding answers
<orbyt_>
everything else can be ignored. What's the best way to extract that data?
SeepingN has joined #ruby
ta_ has quit [Remote host closed the connection]
guille-moe has quit [Ping timeout: 256 seconds]
govg has quit [Ping timeout: 240 seconds]
cadillac_ has quit [Ping timeout: 256 seconds]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
inerthia has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c0ncealed1 has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 265 seconds]
c0ncealed1 has joined #ruby
harrycs has joined #ruby
kurko_ has quit [Ping timeout: 265 seconds]
kurko_ has joined #ruby
jamesaxl has joined #ruby
alfiemax has joined #ruby
Mia has quit [Read error: Connection reset by peer]
n0m4d1c has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ta_ has joined #ruby
mroutis has joined #ruby
cagomez has quit []
cagomez has joined #ruby
dimik--- has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
nichol has quit [Ping timeout: 264 seconds]
nichol has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
sepp2k has quit [Quit: Leaving.]
rahul_bajaj has quit [Quit: Leaving]
n0m4d1c has quit [Ping timeout: 264 seconds]
alfiemax has quit [Remote host closed the connection]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
n0m4d1c has joined #ruby
SteenJobs has joined #ruby
nichol has quit [Quit: Lost terminal]
SteenJobs has quit [Client Quit]
mtkd has quit []
imode has joined #ruby
aupadhye has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
mtkd has joined #ruby
<harrycs>
I attended a talk about how to prepare for senior eng jobs. My favorite piece of advice: "Having a strong technical opinion of a technology is important. If you haven't worked with something the company uses, search for that tech on HN during your interview prep, find the top post, and sort comments by controversial. Act like the most controversial comment is your opinion."
amar has joined #ruby
alfiemax has quit [Remote host closed the connection]
amar has quit [Ping timeout: 264 seconds]
dimik--- has joined #ruby
dr3w_ has joined #ruby
konsolebox has quit [Ping timeout: 245 seconds]
memo1 has quit [Ping timeout: 264 seconds]
dr3w_ has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
n0m4d1c_ has joined #ruby
n0m4d1c has quit [Ping timeout: 256 seconds]
n0m4d1c_ has quit [Remote host closed the connection]
n0m4d1c has joined #ruby
alex`` has joined #ruby
Mia has quit [Read error: Connection reset by peer]
<mojca>
I only get it installed in current directory, but I would like to install it to wherever other gems are ("system-wide")
dr3w_ has joined #ruby
<mojca>
gem install docbookrx doesn't work because it's not in repository
sameerynho has joined #ruby
Mia has joined #ruby
sidx64 has joined #ruby
<baweaver>
harrycs: that's kinda horrible advice
xt233 has joined #ruby
<baweaver>
Strong opinions loosely founded are terrible ideas
<baweaver>
That's how we get things like "Dynamic typing is the root of all evil", "Everything needs to run on Docker", "Javascript is a toy language", and other such things
<baweaver>
No one can enumerate _why_ exactly, but they're bent on sounding intelligent and regurgitating whatever the community byline is to do so
inerthia has quit [Client Quit]
sidx64_ has joined #ruby
<mroutis>
> "Everything needs to run on Docker" (huge mistake)
sidx64 has quit [Ping timeout: 255 seconds]
alfiemax has joined #ruby
<eam>
I'm about to tell everyone they have to run everything on docker today
<eam>
it's probably fine
xt233 has quit [Quit: Leaving]
sauvin has quit [Remote host closed the connection]
<Eiam>
lol
<Eiam>
I'm literally installing stuff into docker containers right now
<Eiam>
I tried to use them years ago and itw as so much pain I stopped. Giving it another whirl
<Eiam>
baweaver: all fair except that bit about javascript. it is a dumb language. ;)
<mroutis>
eam: I was a strong advocate of the "use Docker everywhere" mantra, but it is not that simple
<Eiam>
but thats from years of experience writing it daily! grounding in frustration of "I wish I was just using Ruby"
alfiemax has quit [Ping timeout: 268 seconds]
Quentinius has joined #ruby
<baweaver>
To be fair we have reasons for it (docker)
bmurt has joined #ruby
* baweaver
actually likes Javascript
Quentinius has quit [Client Quit]
BTRE has quit [Read error: Connection reset by peer]
kapil___ has quit [Quit: Connection closed for inactivity]
<mroutis>
baweaver: can you draft your reasons quickly? I'm about to deprecate Docker where I work, in favour of a better understanding of a Ruby / Rails userland
<eam>
in my case I'm talking about lifting an existing deployment system into it so the encapsulation of all the deployed apps is desirable (and a step towards kubernetes)
<baweaver>
eam could enumerate it far better considering he's the one doing it here
<mroutis>
have you thought on the naunces of dealing with several instances of an application?
<baweaver>
we also have a multi-lang env
pastorinni has quit [Remote host closed the connection]
BTRE has joined #ruby
<baweaver>
At $PREVIOUS_WORK, yes.
<baweaver>
Now I'm a FE engineer :D
pastorinni has joined #ruby
<Eiam>
mroutis: I do it because the OS I'm running changes daily so stability in my dev environment and the ability to move it across configs rapidly is important
workmad3_ has quit [Ping timeout: 240 seconds]
<mr-robert>
baweaver: you use javascript now?
Quentinius has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
<baweaver>
Javascript and Ruby primarily.
mikecmpbll has joined #ruby
suukim has quit [Quit: Konversation terminated!]
<mr-robert>
me too
<Eiam>
mroutis: plus if I'm writing code meant to deploy on say Heroku but I'm running it on macOS, I'm not even building it on what would be production. Also if I'm working on 3 projects at once and each needs postgresql, setting up a single instance inside macOS wouldn't be wise, as they'd all be the same configuration but not each app would be the same. Slapping them in a container allows them to be isolated
jamesaxl has joined #ruby
<harrycs>
baweaver: oh I know it's silly advice. I thought it was interesting though! Honestly it seems like a decent way to enter into the shit flinging wars of any new tech you come across, if nothing else.
<baweaver>
Most of my thing is think of why you have opinions, not necessarily that it's wrong
<baweaver>
I tend to call it Google Culting
<Eiam>
baweaver: if you can keep js purely functional and contained, yeah... I've found that to be incredibly difficult when you step into web space
<harrycs>
Meaning... seeing what sort of things people invested in an unfamiliar tech meme and shitpost about can give you valuable cues on what sort of things to start diving into to understand that tech.
<harrycs>
I just really hate JS. I have no logical reason.
<Eiam>
baweaver: some friends have suggestd I treat javascript like we treat asm, a compile to target, and that I instead look at typescript or elm and totally ignore js
<baweaver>
Eh, I just have to keep it mostly functional
<baweaver>
ES6 is a lot better honestly
mojca has quit [Quit: Leaving.]
<baweaver>
Typescript feels like it's not completely necessary for most apps.
ta_ has quit [Remote host closed the connection]
Quentinius has quit [Remote host closed the connection]
pastorinni has quit [Ping timeout: 268 seconds]
<baweaver>
I've rarely had legit type issues that weren't self-inflicted from lack of testing or docs
<havenwood>
What is it this year, ES9?
<baweaver>
ES2019
<baweaver>
they started using yearly
<havenwood>
ah, right - they switched to the year - that's nicer
<mroutis>
Eiam: that's quite a good excuse, but for me and my team it brought a lot of a hassle...
ramfjord has joined #ruby
<harrycs>
baweaver: the thing about type issues and JS to me is basically... like, you're forced into it. For example, you can make a choice to develop in something besides Ruby is typing is a concern you see beforehand. However, there's no real alternative to JS, so you're kind of screwed if the project would be easier in a strongly typed system
<mr-robert>
no alternative to JS?
<mr-robert>
there's tons
<mroutis>
eam: I don't understand what's the benefit of isolating a database in development
karapetyan has joined #ruby
<havenwood>
raw webassembly! it kinda looks like a lisp
<harrycs>
Well yeah I mean there's typescript, elm, etc
<Eiam>
mroutis: more than one app needs the same database.. why wouldn't you want to isolate that?
<harrycs>
havenwood: that is definitely a reason i'm excited to see how webasm develops!
<baweaver>
In all the years I've used JS I've never had an issue that was purely type inflicted
<baweaver>
Same with Ruby.
<havenwood>
Trivia question - anyone recognize where this is from?
<havenwood>
"If you want a language for easy object-oriented programming, or you don't like the Perl ugliness, or you do like the concept of LISP, but don't like too many parentheses, Ruby might be your language of choice."
<harrycs>
I've had situations that weak typing gave me a headache with Ruby. Nothing that testing couldn't handle, but that's extra code vs strongly typed
<baweaver>
I don't mind static typing like Scala, where a lot of it can be implied
<havenwood>
or Crystal
<harrycs>
ducktyping**
<havenwood>
harrycs: You mean dynamic versus static type?
<baweaver>
Java it just gets tedious
<eam>
mroutis: the benefit is providing a structured way to deploy units of code
<harrycs>
Yes, I'm being a headass havenwood
<mr-robert>
Crystal is too like rubinius. not ready for production yet imo.
<havenwood>
Trivia answer: man ruby
<eam>
how do you deploy X? How do you update X? ideally, you're using the same artifacts
<eam>
the two primary features that are important is the filesystem isolation, which lets you add and remove a service without worrying about mutable state left scattered around the system
claudiuinberlin has joined #ruby
cliluw has quit [Read error: Connection reset by peer]
<eam>
and network isolation, which lets you have multiple things listen on the same port if you wish, or do smart things with routing access to them
<baweaver>
Yep, which is definitely a concern when you have multiple apps
<mroutis>
Eiam: I'm containing myself of creating a wall of text drafting my experience with Docker; it is a cool technology, however, I will advice to learn a lot about what you are putting in a container before containerizing it
<baweaver>
but when you have one? Might not quite be a great idea
<eam>
the best way to view containers is an outgrowth of packaging systems
<havenwood>
FreeBSD jails!
<eam>
yes!
cliluw has joined #ruby
mtkd has quit []
<eam>
chroot() has been a thing since the 1970s, linux namespaces are simply a more well-reasoned solution which covers other kernel subsystems
<havenwood>
i've never actually used a solaris zone
<eam>
the classic bind(0) problem
chongtxtx has joined #ruby
<eam>
I have very basic solaris experience
Burgestrand has quit [Quit: Closing time!]
Janky has joined #ruby
<mroutis>
eam: the ones developing the application should have some knowledge of those key points
<chongtxtx>
ahh good ole Solaris haven't used it since Solaris 10 2007ish
<mroutis>
I've been in situations where devs take wrong assumptions or simply ignore the production environment
<mroutis>
containers won't fix broken developers, I was hopping for that
<mroutis>
hoping*
ta_ has joined #ruby
marxarelli is now known as marxarelli|afk
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Eiam>
mroutis: I'm not sure what you are counseling exactly. The containers are there to mirror the production environment. My app is not run on macOS 10.13.4, its run on Ubuntu LTS. Making my container reflect that reality is important for development.
cajone has joined #ruby
cajone has quit [Read error: Connection reset by peer]
redlegion has quit [Remote host closed the connection]
redlegion has joined #ruby
<mroutis>
what are the main differences you are worried about between macOS and Ubuntu LTS?
rabajaj has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Eiam>
uhm, the threading model is totally different
<Eiam>
kerberos is different
MrPunkin has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
sent-hil has joined #ruby
<MrPunkin>
So I know we can use str % arg for string interpolation, but is there a way with the same format string to pull the data back out into a hash?
<MrPunkin>
so say I do “foo = %{foo}” % {:foo => ‘bar’} … any way to then get {:foo => ‘bar’} back from “foo = foo” using the same format template?
kurko_ has quit [Ping timeout: 264 seconds]
ta_ has quit [Remote host closed the connection]
<mroutis>
Eiam: like, significantly different? have you encountered issues that are related specifically to the operative system in use?
<Eiam>
mroutis: libpthreads and libdispatch are significantly different
<Eiam>
hell dates are different between macos & linux
<Eiam>
mroutis: of course...
<eam>
mroutis: containers can provide fences around developer misbehavior
kurko_ has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
<eam>
I was gonna say osx doesn't have clock_gettime but I think they recently added it
<eam>
like in the last year or so
<eam>
that one always particularly annoyed me, as there was no way to get high resolution time from any standard interface
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<mroutis>
well, I guess it's true eam, Eiam, there are a couple of difference, however, I'm biased with working only with web development, using Ruby on Rails, where abstractions are so high that the developers just doesn't care about dealing with those kind of things
<eam>
maybe!
<mroutis>
if I'm doing system calls or relying on specific libraries as the ones you said, I'd probably want that level of consistancy
<eam>
your modules always are depending on those things. It's a numbers game whether you encounter issues with them or not
<eam>
the larger your dev team and codebase the more likely you will
<eam>
probably the #1 thing a high level developer will notice is how incredibly slow `grep` is on osx :D
jenrzzz has quit [Ping timeout: 256 seconds]
<mroutis>
that's right, eam, a different implementation of sed instead of the common gnu one,
tvw has joined #ruby
rabajaj has quit [Quit: Leaving]
<Eiam>
super old bash too
<Eiam>
mroutis: even in the web stack, having your backend treat dates differently can bite you (its done so for me)
<mroutis>
yeah, I guess it was just my frustration with taking the bullet in those situations when no one cared about the production environment... I thought Docker is favouring/nurishing that kind of approach (where you just don't care)
<Eiam>
I see docker as being about favoring the production environment
<mroutis>
I don't know if it was because of me, trying to babysit my coworkers
<harrycs>
There's really no gem for easily faking user agent in an open-uri request...? weird!
<Eiam>
harrycs: because you can add it yourself?
cagomez has quit [Remote host closed the connection]
<harrycs>
well, yes, it's really easy. Which makes it more surprisingly that there's not a gem for it. Idk.
<Eiam>
{"User-Agent"=>"Blah"}
<Eiam>
why would you need a gem for whats literally supported in the header parameter already?
cagomez has joined #ruby
<harrycs>
Well, I'm surprised there's not a gem for easily building the useragent. Like, {'User-Agent' => HeaderGem.for :chrome} or something
<harrycs>
Eiam: i was thinking basically the opposite, creating the string through passing arguments rather than parsing an existing string. I'll check it out though.
<Eiam>
just enumerate every case to build the strings
<Eiam>
then slap those strings into your object =)
<Eiam>
some simple javascript on the page will pull out the header and child string that you can dump to json then marshal in to an object in short order