havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.5.0, 2.4.3, 2.3.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
nerium has joined #ruby
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt has joined #ruby
belmoussaoui has quit [Quit: belmoussaoui]
belmoussaoui has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
belmoussaoui has quit [Client Quit]
al2o3-cr1 has joined #ruby
belmoussaoui has joined #ruby
cschnei__ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
jtdoncas has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
chocoelho_ has joined #ruby
TomyLobo has quit [Ping timeout: 256 seconds]
jmpf has joined #ruby
bronson has joined #ruby
cschneid_ has quit [Ping timeout: 256 seconds]
paulrf has quit [Quit: Leaving]
bronson has quit [Ping timeout: 276 seconds]
fmcgeough has joined #ruby
chocoelho_ has quit [Ping timeout: 256 seconds]
eric_hill has quit [Read error: Connection reset by peer]
eric_hill has joined #ruby
Stazer has quit [Remote host closed the connection]
dhodgkin has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ruby
pastorinni has quit [Remote host closed the connection]
eckhardt has quit [Client Quit]
Toggi3 has quit [Ping timeout: 255 seconds]
nerium has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nerium has joined #ruby
nerium has quit [Client Quit]
eric_hill has quit [Read error: Connection reset by peer]
belmoussaoui has quit [Read error: Connection reset by peer]
eric_hill has joined #ruby
belmoussaoui_ has joined #ruby
belmoussaoui_ is now known as belmoussaoui
dviola has quit [Quit: WeeChat 2.0.1]
kossae has quit [Remote host closed the connection]
Toggi3 has joined #ruby
DTZUZU has quit [Ping timeout: 248 seconds]
zigzig has quit [Remote host closed the connection]
TomyLobo has joined #ruby
chocoelho_ has joined #ruby
zigzig has joined #ruby
eckhardt has joined #ruby
DTZUZU2 has joined #ruby
jnyw has joined #ruby
bronson has joined #ruby
kossae has joined #ruby
jmpf has quit [Quit: leaving]
bronson has quit [Ping timeout: 248 seconds]
kossae has quit [Ping timeout: 248 seconds]
nadir has joined #ruby
rivalomega has quit []
lcarlson has quit [Quit: Leaving]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZU2 has quit [Ping timeout: 255 seconds]
sanscoeur has joined #ruby
nogic has quit [Ping timeout: 264 seconds]
mjolnird has joined #ruby
mtkd has quit [Ping timeout: 256 seconds]
bmurt has joined #ruby
aloy has quit [Ping timeout: 255 seconds]
DTZUZU2 has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
LenPayne has quit [Quit: ZNC 1.6.5 - http://znc.in]
sanscoeur has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
LenPayne has joined #ruby
Nilium has quit [Quit: <kristin> Cower is like... I dunno. sometimes he seems senile and other times he seems like a middle schooler.]
troys is now known as troys_
aloy has joined #ruby
Nilium has joined #ruby
marr has quit [Ping timeout: 265 seconds]
cschneid_ has joined #ruby
jeffreylevesque_ has joined #ruby
jeffreylevesque has quit [Ping timeout: 255 seconds]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aloy has quit [Ping timeout: 256 seconds]
bronson has joined #ruby
LastWhisper____ has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
gizmore|2 has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
elcontrastador has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_aeris_ has quit [Ping timeout: 272 seconds]
zigzig has quit [Ping timeout: 272 seconds]
cschneid_ has quit [Remote host closed the connection]
zigzig has joined #ruby
cschneid_ has joined #ruby
_aeris_ has joined #ruby
marxarelli is now known as marxarelli|afk
jnollette has quit [Ping timeout: 272 seconds]
konsolebox_ has joined #ruby
govg has quit [Ping timeout: 256 seconds]
aloy has joined #ruby
konsolebox has quit [Ping timeout: 256 seconds]
jeffreylevesque has joined #ruby
jeffreylevesque_ has quit [Ping timeout: 264 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vichib has quit [Remote host closed the connection]
jnollette has joined #ruby
tamouse__ has joined #ruby
tamouse__ has left #ruby [#ruby]
Guest73369 has quit [Ping timeout: 248 seconds]
Mia has quit [Read error: Connection reset by peer]
Toggi3 has quit [Ping timeout: 240 seconds]
Toggi3 has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
exchgr has quit [Ping timeout: 252 seconds]
AJA4350 has quit [Quit: AJA4350]
exchgr has joined #ruby
goatish has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cpruitt has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
cpruitt has quit [Ping timeout: 256 seconds]
naprimer has quit [Remote host closed the connection]
elphe has joined #ruby
bronson has joined #ruby
kies has quit [Ping timeout: 255 seconds]
k0mpa has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 264 seconds]
k0mpa has joined #ruby
bmurt has joined #ruby
orbyt_ has joined #ruby
ledestin has joined #ruby
chocoelho_ is now known as chocoelho
chocoelho has quit [Quit: Konversation terminated!]
chocoelho has joined #ruby
pastorinni has joined #ruby
c-c has quit [Ping timeout: 276 seconds]
c-c has joined #ruby
cdg_ has joined #ruby
c-c is now known as Guest23132
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
darkhanb has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
cpruitt has joined #ruby
blackwind_123 has quit [Ping timeout: 276 seconds]
pastorinni has quit [Ping timeout: 256 seconds]
chocoelho has quit [Quit: Konversation terminated!]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cpruitt has quit [Ping timeout: 276 seconds]
cpruitt has joined #ruby
jtdoncas has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
cpruitt has quit [Ping timeout: 240 seconds]
ericx2x has quit [Remote host closed the connection]
orbyt_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
cpruitt has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
Asher has quit [Ping timeout: 256 seconds]
bmurt has joined #ruby
milardovich has quit [Remote host closed the connection]
n0m4d1c has quit [Ping timeout: 256 seconds]
pastorinni has joined #ruby
w0b has joined #ruby
govg has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 256 seconds]
govg has joined #ruby
troys_ is now known as troys
w0b has quit [Quit: -a- IRC for Android 2.1.20]
armyriad has quit [Quit: Leaving]
bmurt has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
jtdoncas has joined #ruby
jjaii9 has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
jtdoncas has quit [Ping timeout: 260 seconds]
Toggi3 has quit [Ping timeout: 256 seconds]
al2o3-cr1 is now known as al2o3-cr
Guest9063 has left #ruby [#ruby]
jtdoncas has joined #ruby
Toggi3 has joined #ruby
jjaii9 has quit []
pastorinni has quit [Remote host closed the connection]
riskish has joined #ruby
jtdoncas has quit [Ping timeout: 256 seconds]
maum has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
c_nick has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
riskish has quit [Quit: Textual IRC Client: www.textualapp.com]
Mutsuhito has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
r3kz has joined #ruby
cschneid_ has quit [Ping timeout: 276 seconds]
oleo has quit [Ping timeout: 276 seconds]
Guest54943 has left #ruby [#ruby]
jtdoncas has joined #ruby
belmoussaoui has quit [Quit: belmoussaoui]
c_nick has quit [Ping timeout: 276 seconds]
jtdoncas has quit [Ping timeout: 268 seconds]
zigzig has quit [Remote host closed the connection]
jtdoncas has joined #ruby
milardovich has joined #ruby
oleo has joined #ruby
KeyJoo has joined #ruby
nadir has joined #ruby
thejamespinto has quit [Ping timeout: 240 seconds]
deathsparton has joined #ruby
deathsparton has quit [Excess Flood]
deathsparton has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Klumben has quit [Ping timeout: 252 seconds]
rabajaj has joined #ruby
iMadper has joined #ruby
deathsparton has quit [Remote host closed the connection]
bronson has joined #ruby
oleo has quit [Quit: Leaving]
cschneid has quit [Ping timeout: 255 seconds]
thejamespinto has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
zigzig has joined #ruby
ohcibi has quit [Remote host closed the connection]
ramfjord has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
iamarun has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
cdg_ has quit [Remote host closed the connection]
aupadhye has joined #ruby
deathsparton has joined #ruby
naprimer has joined #ruby
c_nick has joined #ruby
deathsparton has quit [Client Quit]
ohcibi has joined #ruby
Nilium has quit [Quit: <kristin> Cower is like... I dunno. sometimes he seems senile and other times he seems like a middle schooler.]
Nilium has joined #ruby
ledestin has joined #ruby
IJsbrand has quit [Quit: IJsbrand]
rabajaj has quit [Read error: Connection reset by peer]
rabajaj has joined #ruby
cdg has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
cschneid has joined #ruby
c_nick has quit [Quit: ciaos]
cdg has quit [Ping timeout: 255 seconds]
Klumben has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Remote host closed the connection]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
ahrs has quit [Remote host closed the connection]
cschneid has quit [Ping timeout: 276 seconds]
troys has quit [Quit: Bye]
ahrs has joined #ruby
armyriad has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
elphe has quit [Ping timeout: 264 seconds]
bronson has joined #ruby
oetjenj has joined #ruby
LocaMocha has joined #ruby
chouhoulis has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
Toggi3 has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
reber has joined #ruby
roshanavand has quit [Quit: Leaving.]
cdg has quit [Ping timeout: 248 seconds]
apeiros has quit [Remote host closed the connection]
roshanavand has joined #ruby
elphe has joined #ruby
DaFiN has joined #ruby
<DaFiN> hello, i have a very specific query
<DaFiN> related to gem
<DaFiN> i put > gem search ^git
<DaFiN> i can find all gem packages using "gem search git", but, can i also install them all in windows
<DaFiN> or do i need to export the list and input it?
Toggi3 has joined #ruby
<havenwood> DaFiN: You want to install every gem starting with "git"? Or something else?
<havenwood> DaFiN: You can: gem install gem-name-here
milardovich has quit [Ping timeout: 256 seconds]
<havenwood> DaFiN: Say more about what you're trying to do?
anisha has joined #ruby
_aeris_ has quit [Ping timeout: 272 seconds]
kossae has joined #ruby
iamarun has quit [Ping timeout: 265 seconds]
cschneid has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<DaFiN> havenwood: matching a pattern yes
oetjenj has joined #ruby
<DaFiN> say every git-*
<DaFiN> ^git-\w$ ?
<DaFiN> something like that
_aeris_ has joined #ruby
oetjenj has quit [Client Quit]
kossae has quit [Ping timeout: 256 seconds]
<havenwood> DaFiN: gem search "^git-"
oetjenj has joined #ruby
<DaFiN> havenwood: yes
<havenwood> DaFiN: Do you also want to install them all?
<DaFiN> but howto download those
<DaFiN> do i need to put all of those 1 at a time
<DaFiN> in linux i suppose i could xargs
oetjenj has quit [Client Quit]
<DaFiN> havenwood: yes
oetjenj has joined #ruby
<havenwood> DaFiN: 223 gems?
<DaFiN> i find only 2 matching git-?
<DaFiN> i find only 2 matching git-*?
oetjenj has quit [Client Quit]
Ishido has joined #ruby
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
_aeris_ has quit [Remote host closed the connection]
<DaFiN> sorry sorry i meant other one
oetjenj has joined #ruby
<DaFiN> but yes
oetjenj has quit [Client Quit]
_aeris_ has joined #ruby
<havenwood> DaFiN: PowerShell or cmd.exe?
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
cschneid has quit [Ping timeout: 255 seconds]
<DaFiN> havenwood: i suppose i got the answer
<DaFiN> it implies there is no feature to "pattern install" using gem
<DaFiN> like yum or dnf no?
<havenwood> DaFiN: correct, there's no globbing for install or whatnot
<DaFiN> could you suggest how i could have put that question forth in first place
<DaFiN> i am looking forward to installing packages using gem using a pattern similar to yum
<baweaver> Lies and slander
<baweaver> gems=`gem search ^rails`.lines.grep(/^[a-z]/i).map{|v|v.split[0]}.join(' ');`gem install #{gems}`
<baweaver> :D
lacour has quit [Quit: Leaving]
thejamespinto has quit [Ping timeout: 260 seconds]
<baweaver> Throw that in a bin, take some ARGVs, and boom!
<baweaver> havenwood: I did a bad thing
<havenwood> for gem in $(gem search '^git-' | cut -d' ' -f1); do; gem install "$gem"; done
<dminuoso> baweaver: that .map { |v| v.split[0] } is absolutely gross.
<havenwood> baweaver: install them all!
<baweaver> havenwood: gem takes space delimited gem names
<baweaver> gem install*
<dminuoso> o/ baweaver
<baweaver> dminuoso: All I do is hack hack hack
<dminuoso> \o havenwood
<havenwood> o/
<baweaver> \o/
darkhanb has joined #ruby
<baweaver> ^o^
<baweaver> O=
<baweaver> /o\
<baweaver> It's fun to stay at the...
<havenwood> baweaver: good point, so: gem install $(gem search '^git-' | cut -d' ' -f1 | tr '\n' ' ')
<baweaver> remember it gives you *** REMOTE SOURCE ***
<havenwood> 223 gems later...
<havenwood> ;-)
thejamespinto has joined #ruby
<havenwood> baweaver: cut takes care of those
<havenwood> gem search '^git-' | cut -d' ' -f1 | head -n 1 #=> git-2-s3
ur5us has joined #ruby
<havenwood> baweaver: err, it's not cut that takes care of it, rather the piping it seems
<havenwood> gem search '^git-' | head -n 1 #=> git-2-s3 (0.1.3)
<baweaver> odd
thejamespinto has quit [Ping timeout: 268 seconds]
<havenwood> indeed
<havenwood> convenient, but odd
Toggi3 has quit [Ping timeout: 255 seconds]
iamarun has joined #ruby
<DaFiN> havenwood: thats a dos for
Toggi3 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
zapata has joined #ruby
chouhoulis has joined #ruby
<DaFiN> awesome thanks
eckhardt has joined #ruby
bronson has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
pwnd_nsfw has quit [Read error: Connection reset by peer]
Nilium has quit [Quit: <kristin> Cower is like... I dunno. sometimes he seems senile and other times he seems like a middle schooler.]
pwnd_nsfw has joined #ruby
ta_ has quit [Remote host closed the connection]
Nilium has joined #ruby
deathsparton has joined #ruby
conta has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
andikr has joined #ruby
aufi has joined #ruby
gnufied has quit [Ping timeout: 265 seconds]
deathsparton has quit [Quit: Mutter: www.mutterirc.com]
DaFiN has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
gnufied has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
mtkd has joined #ruby
jenrzzz has joined #ruby
vichib has joined #ruby
cpruitt has quit [Remote host closed the connection]
bawNg has joined #ruby
Toggi3 has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
obzidian has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
jtdoncas has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
comrumino has quit [Quit: ZNC 1.6.5 - http://znc.in]
jenrzzz has joined #ruby
miah has quit [Quit: Lost terminal]
Toggi3 has joined #ruby
roshanavand has quit [Quit: Leaving.]
roshanavand has joined #ruby
soniya29 has joined #ruby
elphe has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
zigzig has quit [Ping timeout: 272 seconds]
zigzig has joined #ruby
apeiros has joined #ruby
elphe has joined #ruby
TomyWork has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
bronson has joined #ruby
ta_ has joined #ruby
cpruitt has joined #ruby
jenrzzz has joined #ruby
bronson has quit [Ping timeout: 276 seconds]
dionysus69 has joined #ruby
soniya29 has quit [Ping timeout: 240 seconds]
Bish has quit [Quit: leaving]
cpruitt has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
snapcase has quit [Remote host closed the connection]
sundhell_away is now known as sundhell
Dimik has quit [Ping timeout: 268 seconds]
mkroman has quit [Ping timeout: 276 seconds]
mark_66 has joined #ruby
elomatreb has joined #ruby
mtkd has quit [Ping timeout: 268 seconds]
cpruitt has joined #ruby
deathsparton has joined #ruby
mkroman has joined #ruby
mtkd has joined #ruby
drewmcmillan has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
drewmcmillan has quit [Client Quit]
guille-moe has joined #ruby
ur5us has joined #ruby
cpruitt has quit [Ping timeout: 256 seconds]
marr has joined #ruby
thejamespinto has joined #ruby
mkroman has quit [Ping timeout: 255 seconds]
ur5us has quit [Ping timeout: 255 seconds]
randomstrangerb has quit [Ping timeout: 260 seconds]
randomstrangerb has joined #ruby
thejamespinto has quit [Ping timeout: 256 seconds]
phaul has joined #ruby
Beams has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
plexigras has quit [Ping timeout: 248 seconds]
Morrolan has quit [Quit: Goodbye]
jenrzzz has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
Toggi3 has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
conta has quit [Quit: conta]
snapcase has joined #ruby
jnyw has quit [Quit: WeeChat 2.0.1]
elphe has quit [Ping timeout: 276 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
bronson has quit [Ping timeout: 265 seconds]
lunarkitty7 has joined #ruby
ramfjord has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
cpruitt has joined #ruby
deathsparton has quit [Remote host closed the connection]
Morrolan has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
ledestin has quit [Quit: Textual IRC Client: www.textualapp.com]
Zamyatin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cpruitt has quit [Ping timeout: 240 seconds]
conta has joined #ruby
zigzig has quit [Ping timeout: 272 seconds]
zigzig has joined #ruby
Mia has quit [Read error: Connection reset by peer]
ledestin has joined #ruby
goatish has joined #ruby
d_kam has joined #ruby
cabotto has joined #ruby
plexigras has joined #ruby
workmad3 has joined #ruby
cabotto has quit [Remote host closed the connection]
cabotto has joined #ruby
Mortomes|Work has joined #ruby
Serpent7776 has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
DaFiN has joined #ruby
cpruitt has joined #ruby
snapcase has quit [Quit: leaving]
snapcase has joined #ruby
KeyJoo has quit [Ping timeout: 255 seconds]
elphe has joined #ruby
cpruitt has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
iamarun has quit [Remote host closed the connection]
DLSteve has quit [Ping timeout: 256 seconds]
iamarun has joined #ruby
mkroman has joined #ruby
cabotto has quit [Remote host closed the connection]
cabotto has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
kossae has joined #ruby
bweston92 has joined #ruby
amatas has joined #ruby
<bawNg> what is the best option if I want to release a gem with a C extension that needs to build against some internal MRI headers? if I copy the Ruby headers into the project, they will have to be manually updated for new Ruby versions, but if I don't, no one will be able to build the gem without downloading the Ruby source
Cavallari has joined #ruby
TinkerTyper has quit [Read error: Connection reset by peer]
KeyJoo has joined #ruby
iamarun has quit [Quit: Leaving]
bronson has joined #ruby
TinkerTyper has joined #ruby
kossae has quit [Ping timeout: 276 seconds]
cdg has joined #ruby
govg has quit [Ping timeout: 256 seconds]
aspiers has quit [Quit: ZNC - http://znc.sourceforge.net]
govg has joined #ruby
InfinityFye has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
InfinityFye has quit [Client Quit]
InfinityFye has joined #ruby
InfinityFye has left #ruby [#ruby]
cdg has quit [Ping timeout: 276 seconds]
InfinityFye has joined #ruby
minimalism has quit [Quit: minimalism]
InfinityFye has left #ruby [#ruby]
belmoussaoui has joined #ruby
ldnunes has joined #ruby
chmurifree is now known as chmuri
Toggi3 has joined #ruby
cpruitt has joined #ruby
cabotto has left #ruby [#ruby]
<dionysus69> is there a cooler way to write this?
<dionysus69> amount = some_params[:amount].to_d
<dionysus69> amount = amount < 0 ? amount * -1 : amount
<dionysus69> I just want to make sure input by user is positive
Toggi3 has quit [Ping timeout: 256 seconds]
<dminuoso> > -5.abs
<dminuoso> >> -5.abs
<ruby[bot]> dminuoso: # => 5 (https://eval.in/936305)
cabotto has joined #ruby
<dminuoso> >> 5.abs
<ruby[bot]> dminuoso: # => 5 (https://eval.in/936306)
cpruitt has quit [Ping timeout: 276 seconds]
<dionysus69> ok forgot about that, and I used it like a week ago thanks dminuoso :D
randomstrangerb has quit [Ping timeout: 256 seconds]
randomstrangerb has joined #ruby
alfiemax_ has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
Guest73369 has joined #ruby
jaruga has joined #ruby
kedare has joined #ruby
kedare has left #ruby [#ruby]
Cavallari1 has joined #ruby
Cavallari has quit [Ping timeout: 255 seconds]
Cavallari1 is now known as Cavallari
mtkd has quit [Ping timeout: 255 seconds]
mtkd has joined #ruby
sundhell is now known as sundhell_away
cpruitt has joined #ruby
DaFiN has quit [Remote host closed the connection]
cschneid has joined #ruby
cpruitt has quit [Ping timeout: 248 seconds]
cschneid has quit [Ping timeout: 256 seconds]
deathsparton has joined #ruby
<apeiros> dminuoso: don't you think some_params[:amount].delete("-").to_d would be nicer? 😇
<apeiros> (math by string manipulation, yay :D)
bronson has joined #ruby
<dminuoso> let me just sed our monorepo.
<dminuoso> git commit -m "Refactoring based on recommendation from #ruby expert"
<dminuoso> Done.
deathsparton has quit [Remote host closed the connection]
<apeiros> 😂
bronson has quit [Ping timeout: 248 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
xfbs has joined #ruby
postmodern has quit [Ping timeout: 255 seconds]
amatas_ has joined #ruby
alfiemax has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
conta1 has joined #ruby
imode has quit [Ping timeout: 255 seconds]
conta has quit [Ping timeout: 248 seconds]
conta1 is now known as conta
tvw has joined #ruby
<dionysus69> :P
Azure has quit [Read error: Connection reset by peer]
kossae has joined #ruby
kossae has quit [Remote host closed the connection]
Azure has joined #ruby
kossae has joined #ruby
tjbp_ has quit [Remote host closed the connection]
cpruitt has joined #ruby
cdg has joined #ruby
xfbs has quit []
AJA4350 has joined #ruby
quobo has joined #ruby
workmad3 has joined #ruby
Toggi3 has joined #ruby
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
cabotto has quit [Remote host closed the connection]
Toggi3 has quit [Ping timeout: 256 seconds]
zautomata has joined #ruby
plexigras has quit [Quit: WeeChat 2.0.1]
plexigras has joined #ruby
fmcgeough has joined #ruby
Yxhuvud has quit [Ping timeout: 268 seconds]
bronson has joined #ruby
kapil___ has joined #ruby
r3kz has quit [Quit: Connection closed for inactivity]
bronson has quit [Ping timeout: 256 seconds]
vtx has joined #ruby
<vtx> hi guys, is there an idiomatic/simple way of comparing two arrays in ruby? essentially i want to check that two arrays contain the same elements, regardless of order. so [“a”,”b”,”c”] and [“c”,”b”,”a”] would be considered equal. how can i do this?
<dminuoso> (a - b).empty?
<dminuoso> vtx: Of course things get a bit more tricky if you admit non unique elements.
<dminuoso> Or rather: ((a - b) | (b - b)).empty?
<dminuoso> Or rather: ((a - b) | (b - a)).empty?
apparition has joined #ruby
VladGh has quit [Quit: Lost terminal]
VladGh has joined #ruby
<tobiasvl> that's nice, I was going to suggest a.to_set == b.to_set (but that requires a require)
<tobiasvl> but yes, non-unique elements are a problem
cabotto has joined #ruby
Guest73369 has quit [Ping timeout: 240 seconds]
John_Ivan has joined #ruby
sepp2k has joined #ruby
Azure has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
cabotto has quit [Ping timeout: 240 seconds]
Camusensei has joined #ruby
<Camusensei> Hello guys! Is there a way to specify a system command through an array of arguments instead of a string? like password="'"; `echo #{password}` sh: 1: Syntax error: Unterminated quoted string
amatas_ has quit [Ping timeout: 265 seconds]
<Camusensei> (I don't want to shellescape the string)
<Camusensei> I know it works, it's just not what I'm looking for
chmuri has quit [Excess Flood]
cabotto has joined #ruby
<apeiros> Camusensei: yes, system(), popen() and spawn() allow that
<Camusensei> system(*myarray) works fine, thanks! (from https://www.ruby-forum.com/topic/2012139)
rabajaj has quit [Quit: Leaving]
<apeiros> note that system does two things vastly different from backticks: it does NOT return its output, it DOES however print its output on ruby's $stdout and $stderr directly.
<Camusensei> oh
MaksimPinigin has joined #ruby
<Camusensei> it's fine, I don't need the output in this case, thank you :)
ped has joined #ruby
srandon111 has joined #ruby
<srandon111> hello all, guys is there any module to do google searches?
chmurifree has joined #ruby
vtx has quit [Quit: vtx]
<apeiros> srandon111: Net::HTTP
<srandon111> apeiros: so low level?
ped has quit [Client Quit]
<apeiros> the more specific your question, the more specific the answer
amatas_ has joined #ruby
<srandon111> apeiros... i would like something where i put the query to do to google and it returns me the results in form of a list or hash
roshanavand has quit [Quit: Leaving.]
<apeiros> I'm not aware of any. but I'd search rubygems.org
nadir has quit [Quit: Connection closed for inactivity]
Vapez has joined #ruby
Guest73369 has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
<tbuehlmann> apeiros: do you know the differences between the several shelling out options by heart?
<dminuoso> I got that printed out on my desk (somewhere)
<tbuehlmann> nice.
mtkd has joined #ruby
jeffreylevesque_ has joined #ruby
guille-moe has quit [Remote host closed the connection]
<apeiros> tbuehlmann: partially
<apeiros> tbuehlmann: I know spawn is the swiss army knife
guille-moe has joined #ruby
<apeiros> and I know the main differences between ``, system, popen, popen3 and popen4. but I lack some minutiae.
<apeiros> and I *always* have to lookup the docs when I want to use spawn :D
gizmore|2 is now known as gizmore
jeffreylevesque has quit [Ping timeout: 256 seconds]
<apeiros> dminuoso: y u no Kernel#spawn there?
bmurt has joined #ruby
<dminuoso> apeiros: Its not mine
<apeiros> oh
<apeiros> imgur
<dminuoso> apeiros: Its from some SO answer, but it was good so I bookmarked it.
<apeiros> meh, that's the domain and I now almost confused it with lemur. I'm terrible.
<apeiros> honestly, nowadays if it's not solved by ``, I go straight to spawn. popen and system are almost always just ever so close but not close enough.
reber has quit [Ping timeout: 256 seconds]
<dminuoso> apeiros: The only diagram floating around by me is http://i.imgur.com/04Mlrwp.png
<dminuoso> And look! Colors!
aspiers has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deathsparton has joined #ruby
tlr has joined #ruby
andikr has quit [Remote host closed the connection]
deathsparton has quit [Client Quit]
<apeiros> colours?
bronson has joined #ruby
xfbs has joined #ruby
amatas_ has quit [Quit: amatas_]
fyrril has joined #ruby
amatas_ has joined #ruby
bronson has quit [Ping timeout: 276 seconds]
shinnya has joined #ruby
workmad3 has joined #ruby
cabotto has quit [Ping timeout: 256 seconds]
amatas_ has quit [Client Quit]
amatas_ has joined #ruby
alfiemax_ has joined #ruby
deathsparton has joined #ruby
deathsparton has quit [Excess Flood]
deathsparton has joined #ruby
deathsparton has quit [Excess Flood]
alfiemax has quit [Ping timeout: 240 seconds]
deathsparton has joined #ruby
<dminuoso> Almost but not quite.
jeffreylevesque_ has quit [Ping timeout: 268 seconds]
deathsparton has quit [Client Quit]
apeiros has quit [Read error: Connection reset by peer]
apeiros__ has joined #ruby
cajone has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ishido has quit [Ping timeout: 248 seconds]
bmurt has joined #ruby
roshanavand has joined #ruby
cajone has left #ruby [#ruby]
dionysus69 has quit [Quit: dionysus69]
amatas_ has quit [Quit: amatas_]
deathsparton has joined #ruby
srandon111 has quit [Quit: Page closed]
amatas_ has joined #ruby
tcopeland has quit [Quit: tcopeland]
Cavallari has quit [Quit: Cavallari]
chocoelho has joined #ruby
dviola has joined #ruby
Beams has quit [Quit: .]
drewmcmillan has joined #ruby
deathsparton has quit [Remote host closed the connection]
aupadhye has quit [Ping timeout: 264 seconds]
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mortomes|Work has quit [Ping timeout: 260 seconds]
cabotto has joined #ruby
nadir has joined #ruby
apeiros__ is now known as apeiros
randomstrangerb has quit [Ping timeout: 260 seconds]
randomstrangerb has joined #ruby
cabotto has quit [Ping timeout: 256 seconds]
cabotto has joined #ruby
drewmcmillan has quit [Quit: Textual IRC Client: www.textualapp.com]
jeffreylevesque has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Toggi3 has joined #ruby
synthroid has joined #ruby
cabotto has quit []
Toggi3 has quit [Ping timeout: 268 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bronson has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
bmurt has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
kapil___ has quit [Quit: Connection closed for inactivity]
apparition has quit [Quit: Bye]
shinnya has quit [Ping timeout: 256 seconds]
deathsparton has joined #ruby
vtx has joined #ruby
deathsparton_ has joined #ruby
DLSteve has joined #ruby
deathsparton has quit [Ping timeout: 255 seconds]
vtx has quit [Client Quit]
rrichardsr3 has joined #ruby
deathsparton_ has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
deathsparton has joined #ruby
nckpz has joined #ruby
Rapture has joined #ruby
deathsparton has quit [Client Quit]
thejamespinto has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
Zamyatin has joined #ruby
kapil___ has joined #ruby
Zamyatin has quit [Client Quit]
hinbody has quit [Quit: leaving]
dionysus69 has joined #ruby
rippa has joined #ruby
AJA4350 has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
LastWhisper____ has joined #ruby
cdg_ has joined #ruby
zautomata has quit [Quit: WeeChat 1.7]
cdg has quit [Ping timeout: 276 seconds]
pastorinni has joined #ruby
AJA4350 has joined #ruby
Toggi3 has joined #ruby
tcopeland has joined #ruby
nckpz has quit [Ping timeout: 240 seconds]
cpruitt has quit [Remote host closed the connection]
cpruitt has joined #ruby
xhoy has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
<xhoy> hi! maybe a stupid question, but strftime *realy* misses a querter option, could just fork ruby and create a PR?
Zamyatin has joined #ruby
elphe has quit [Ping timeout: 256 seconds]
desperek has joined #ruby
Zamyatin has quit [Max SendQ exceeded]
randomstrangerb has quit [Ping timeout: 276 seconds]
deathsparton has joined #ruby
deathsparton has quit [Excess Flood]
deathsparton has joined #ruby
deathsparton has quit [Excess Flood]
randomstrangerb has joined #ruby
deathsparton has joined #ruby
deathsparton has quit [Excess Flood]
deathsparton has joined #ruby
<apeiros> xhoy: Time#strftime is just a thin wrapper around C's strftime, so might need more than just a patch to ruby
alfiemax has joined #ruby
Zamyatin has joined #ruby
<xhoy> apeiros: the rejected it in glibc
Beams has joined #ruby
cek has joined #ruby
alfiemax_ has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
<apeiros> that's a long thread…
<apeiros> but if it's been rejected in glibc, chances are probably not that big to get it added to ruby.
<apeiros> but you can always open a ticket over at bugs.ruby-lang.org
oleo has joined #ruby
<xhoy> well its rejected since it should be part of is 30112
alfiemax_ has joined #ruby
<xhoy> but there hasn't hapend a thing on iso 30112 since 2014
reber has joined #ruby
<xhoy> and possible conflicts in postix something anyway
reber has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 265 seconds]
alfiemax has quit [Ping timeout: 256 seconds]
chocoelho has quit [Ping timeout: 256 seconds]
cek has left #ruby [#ruby]
chocoelho has joined #ruby
nowhereman_ has quit [Remote host closed the connection]
hinbody has joined #ruby
cpruitt has quit [Remote host closed the connection]
justicefries has joined #ruby
Toggi3 has quit [Ping timeout: 268 seconds]
cpruitt has joined #ruby
morfin60 has joined #ruby
<morfin60> hello
<morfin60> i have JSON output parsed to an array ["foo", 1233243, "bar", 56234112] and i wanted to make hash with number key and string value
<havenwood> >> ["foo", 1233243, "bar", 56234112].each_slice(2).map(&:reverse).to_h # morfin60
<ruby[bot]> havenwood: # => {1233243=>"foo", 56234112=>"bar"} (https://eval.in/936574)
<morfin60> values = Hash[*values].invert did it but since numbers aren't unique something collapsed
<havenwood> morfin60: the way above won't have that prob
MaksimPinigin has quit [Quit: My computer went into sleep mode or I turned it off]
<morfin60> >> values = ["foo", 1233243, "bar", 56234112]; Hash[*values].invert
<ruby[bot]> morfin60: # => {1233243=>"foo", 56234112=>"bar"} (https://eval.in/936579)
chocoelho has quit [Ping timeout: 276 seconds]
<morfin60> >> values = ["foo", 1233243, "bar", 56234112, "baz", 1233243]; Hash[*values].invert
<ruby[bot]> morfin60: # => {1233243=>"baz", 56234112=>"bar"} (https://eval.in/936580)
<morfin60> see )
<morfin60> >> ["foo", 1233243, "bar", 56234112, "baz", 1233243].each_slice(2).map(&:reverse).to_h
<ruby[bot]> morfin60: # => {1233243=>"baz", 56234112=>"bar"} (https://eval.in/936582)
<morfin60> anyway "collapsing" )
<morfin60> i guess i need add suffix before making mapo
<morfin60> *hash
<havenwood> morfin60: I assumed you meant the strings were "collapsing" before the invert.
<havenwood> morfin60: Is it really that the integer keys conflict? What should happen in that case?
nckpz has joined #ruby
<havenwood> >> [:a, 1, :b, 2, :a, 3].each_slice(2).map(&:reverse).to_h
<ruby[bot]> havenwood: # => {1=>:a, 2=>:b, 3=>:a} (https://eval.in/936584)
<morfin60> huh?
zigzig has quit [Ping timeout: 272 seconds]
roshanavand has quit [Quit: Leaving.]
<havenwood> morfin60: compare with:
<havenwood> >> values = [:a, 1, :b, 2, :a, 3]; Hash[*values].invert
<ruby[bot]> havenwood: # => {3=>:a, 2=>:b} (https://eval.in/936586)
deathsparton has quit [Ping timeout: 248 seconds]
<havenwood> morfin60: I assumed that ^ was what you were running into.
<havenwood> morfin60: Is it really that the post-invert keys are colliding in your original, or the pre-invert keys?
<havenwood> morfin60: If it's the post-invert keys, what should happen when they collide?
moei has joined #ruby
<havenwood> morfin60: If it's the pre-invert keys, it's not a problem with my version.
zigzig has joined #ruby
alfiemax has joined #ruby
deathsparton has joined #ruby
alfiemax_ has quit [Ping timeout: 260 seconds]
Asher has joined #ruby
roshanavand has joined #ruby
mark_66 has quit [Remote host closed the connection]
cschneid has joined #ruby
Asher has quit [Quit: Leaving.]
conta has quit [Ping timeout: 265 seconds]
cpruitt has quit []
synthroid has quit [Remote host closed the connection]
qba73 has joined #ruby
synthroid has joined #ruby
bweston92 has quit [Quit: Connection closed for inactivity]
Asher has joined #ruby
synthroid has quit [Ping timeout: 265 seconds]
Toggi3 has joined #ruby
synthroid has joined #ruby
<skawa> im having the issue that running "rspec" and "bundle exec rspec" are completely different
<skawa> unfortunately im dealing with a tangle of scripts that all call of "rspec" and not "bundle exec rspec"
<skawa> rspec is only one example
<skawa> how can i clear my ruby environment so that "rspec" is the same as "bundle exec rspec" ?
<skawa> i tried removing all installed gems, then doing bundle install
<skawa> somehow this didn'' solve my problem
<havenwood> skawa: Is rspec installed on other Rubies?
<havenwood> skawa: which -a rspec
<skawa> havenwood: yes it looks like i have two
<skawa> i don
qba73 has quit [Remote host closed the connection]
<skawa> i don't know how or why i have two rubies, i dont' care
<havenwood> skawa: Typically removing all versions later than the bundled version does work. Alternatively, and usually better - update your Gemfile.lock rspec versions.
qba73 has joined #ruby
<skawa> yea so when i removed all gems it probably only removed them from one of the rubies
<skawa> i don't know how to get to the other one
<havenwood> aye
bronson has joined #ruby
<havenwood> skawa: What are you using to change Ruby versions? This is a dev env?
<skawa> havenwood: this is my laptop, yes
<skawa> i really should be running this entire thing in a container, but it would require some effort
<havenwood> skawa: Are you using RVM, chruby, rbenv or non-of-the-above?
<skawa> rvm
<skawa> but there could be ruby installed via some other tool, and i don't need it installed anywhere else
<havenwood> skawa: Probably if you `rvm system` you'll see there's a non-RVM Ruby as well with rspec installed.
<havenwood> Or other RVM Rubies installed. See with: rvm list
<skawa> yea i see. the other is an rbenv
goatish has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> skawa: You might consider: rm -rf ~/.rbenv
<havenwood> skawa: (Assuming you're not using rbenv Ruby and it's some relic.)
<skawa> cool
oetjenj has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
GremL1N has quit [Ping timeout: 256 seconds]
Vapez has quit [Ping timeout: 260 seconds]
<skawa> that looks much better havenwood thanks
<skawa> which -a rspec is brilliant ill remember that maybe
troys has joined #ruby
chocoelho has joined #ruby
aufi has quit [Quit: Leaving]
Zamyatin has quit [Read error: Connection reset by peer]
Zamyatin has joined #ruby
SuperL4g has joined #ruby
tjbp has joined #ruby
dinfuehr has quit [Ping timeout: 256 seconds]
SuperLag has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
elepedus has joined #ruby
nogic has joined #ruby
SuperL4g is now known as SuperLag
[Butch] has joined #ruby
apeiros has quit [Ping timeout: 256 seconds]
deathsparton has quit [Ping timeout: 264 seconds]
Zamyatin has quit [Read error: Connection reset by peer]
Zamyatin has joined #ruby
Zamyatin has quit [Read error: Connection reset by peer]
Zamyatin has joined #ruby
SuperLag has quit [Ping timeout: 255 seconds]
goatish has joined #ruby
alfiemax has quit [Remote host closed the connection]
ldepandis has joined #ruby
alfiemax has joined #ruby
SuperLag has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
TobiFrano has joined #ruby
cdg_ has quit [Read error: Connection reset by peer]
cdg has joined #ruby
mtkd has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
ldepandis has quit [Quit: Textual IRC Client: www.textualapp.com]
Ltem has joined #ruby
lcarlson has joined #ruby
troys is now known as troys_
Fire-Dragon-DoL has quit [Quit: Quit]
nckpz has quit [Ping timeout: 256 seconds]
elepedus has quit [Quit: elepedus]
darkhanb has joined #ruby
elcontrastador has joined #ruby
qba73 has quit []
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fire-Dragon-DoL has joined #ruby
cajone has joined #ruby
cajone has left #ruby [#ruby]
apeiros has joined #ruby
bronson has joined #ruby
nit3rid3 has joined #ruby
miah has joined #ruby
miah has quit [Client Quit]
Serpent7776 has quit [Quit: Leaving]
bronson has quit [Ping timeout: 248 seconds]
Dimik has joined #ruby
alfiemax has joined #ruby
reber has joined #ruby
justicefries has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
Beams has quit [Quit: .]
Zamyatin has quit [Read error: Connection reset by peer]
Zamyatin has joined #ruby
jtdoncas has joined #ruby
jaruga has quit [Quit: jaruga]
Vapez has joined #ruby
hahuang65 has quit [Read error: Connection reset by peer]
hahuang61 has joined #ruby
miah has joined #ruby
sanscoeur has joined #ruby
orbyt_ has joined #ruby
troys_ is now known as troys
TomyWork has quit [Ping timeout: 240 seconds]
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
sspreitz has quit [Ping timeout: 256 seconds]
__main__ has quit [Ping timeout: 248 seconds]
kies has joined #ruby
dstrunk has joined #ruby
eam has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
__main__ has joined #ruby
miah has quit [Quit: DevOps? DerpOps maybe!]
jtdoncas has quit [Ping timeout: 276 seconds]
miah has joined #ruby
k0mpa has quit [Remote host closed the connection]
alfiemax has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
k0mpa has joined #ruby
r3kz has joined #ruby
<havenwood> Interesting, in 2.5: SecureRandom.send(:choose, %w[OMG WTF BBQ], 2) #=> "BBQBBQ"
<kspencer> so I see a '->(var)' in a peice of code I'm looking at, and I don't know what it is
alfiemax has quit [Ping timeout: 240 seconds]
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
eck has joined #ruby
<havenwood> kspencer: It's a stabby lambda.
<kspencer> ok thanks
<havenwood> >> thingy = ->(var){ var }; "it's a #{thingy.class} and it's #{thingy.lambda?} that it's a lambda"
<ruby[bot]> havenwood: # => "it's a Proc and it's true that it's a lambda" (https://eval.in/936678)
fschuindt has joined #ruby
<fschuindt> I'm trying to File.write a string, but every line break is being writed as \r\n. How can write using only \n?
conta has joined #ruby
conta has quit [Client Quit]
sspreitz has joined #ruby
dstrunk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> kspencer: `->(arg) { …code… }` is alternative syntax for `lambda { |arg| …code… }`
<apeiros> fschuindt: windows?
<fschuindt> apeiros: macOS
<kspencer> havenwood: apeiros thanks, yeah once i heard lambda I figured out what it was
<havenwood> >> $/
<ruby[bot]> havenwood: # => "\n" (https://eval.in/936679)
[Butch] has joined #ruby
<apeiros> fschuindt: then your string almost certainly already contains the \r\n
<apeiros> you can gsub it: .gsub("\r\n", "\n")
<fschuindt> apeiros: I thought it, was just trying to see any sign of hope
<fschuindt> I'm going for regex
<apeiros> gsub doesn't require a regex ;-)
alfiemax has joined #ruby
<lcarlson> what is the latest consensus on best framework for making API's in Ruby?
<lcarlson> i just did a rails new --api and it generated a bunch of things I didn't anticipate
<lcarlson> like, why is it bringing in sprockets?
<lcarlson> I get that I can turn that off
<lcarlson> but shouldn't that be part of the default?
troydm has joined #ruby
nicesignal has quit [Remote host closed the connection]
<lcarlson> Is Padrino good?
<troydm> how do I iterate Hash with foreach while also being able to remove elements in the block if I deem necessary
nicesignal has joined #ruby
<apeiros> troydm: iterate over a copy
<troydm> apeiros: there is no way to not use copy, coz I need to iterate about 100 per sec
<troydm> ?
<lcarlson> troydm, you should be able to .clone without impacting performance terribly?
<lcarlson> have you tried? :)
<apeiros> troydm: maybe rethink your algorithm
<troydm> lcarlson: like clone entire Hash or only keys?
oetjenj has quit [Quit: Textual IRC Client: www.textualapp.com]
<lcarlson> troydm, just the item you're interested in that block
<apeiros> it's quite likely less expensive to dup the hash than use .keys
<troydm> what's difference between clone and dup?
<apeiros> unless you don't need the value to determine whether the key should be deleted.
<apeiros> clone additionally copies singleton_class and frozen state.
<havenwood> lcarlson: I'd not use Padrino for an API. It's more a webframework on top of Sinatra as far as I recall.
<troydm> apeiros: I need values, values itself are Proc that I call that might remove key from Hash
<lcarlson> havenwood, so straight Sinatra for web services?
bronson has joined #ruby
<havenwood> lcarlson: I'd recommend taking a look at Roda: http://roda.jeremyevans.net/
<havenwood> lcarlson: What are you doing with the API in particular?
<apeiros> oh, and invokes a different callback (initialize_clone instead of initialize_dup)
<lcarlson> havenwood, thx!
<lcarlson> troydm, ya, it looks like .dup is more perf
<lcarlson> especially if you're not looking to do anything special with its class
<lcarlson> which it sounds like you're not since they're simple hashes
<havenwood> lcarlson: Roda is lovely. It's the same maintainer as the Sequel gem and has a similar plugin system.
<havenwood> lcarlson: You can compose the API framework you need from Roda plugins.
<havenwood> lcarlson: The maintainer of Roda also maintains RodaAuth and the Sequel gem, etc - which are also great for APIs.
<lcarlson> havenwood, it looks pretty nifty!
<havenwood> lcarlson: http://rodauth.jeremyevans.net/
<lcarlson> It's been awhile since I've used sequel
<lcarlson> Do they have nice migrations?
s3nd1v0g1us has joined #ruby
<havenwood> lcarlson: Yeah, they do. Sequel is great.
s3nd1v0g1us has quit [Max SendQ exceeded]
<lcarlson> havenwood, generators too?
<lcarlson> havenwood, not that is necessary
<lcarlson> just nice to have
<havenwood> lcarlson: http://sequel.jeremyevans.net/
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
Zamyatin has quit [Read error: Connection reset by peer]
guille-moe has quit [Quit: guille-moe]
<havenwood> lcarlson: Folk have made various generators, or integrated things like ROM. I don't know of a Sequel specific migration generator, but I'd imagine there is one.
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
Zamyatin has joined #ruby
<lcarlson> havenwood, they're handy when making migrations
<lcarlson> is it considered convention to hand bake migrations when using sequel?
bronson has quit [Ping timeout: 256 seconds]
goatish has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Zamyatin has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
Zamyatin has joined #ruby
<lcarlson> oh
<lcarlson> there is a #sequel chan
<lcarlson> nice
wilbert has joined #ruby
eckhardt has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
sameerynho has joined #ruby
marxarelli|afk is now known as marxarelli
Zamyatin has quit [Max SendQ exceeded]
kapil___ has quit [Quit: Connection closed for inactivity]
claudiuinberlin has joined #ruby
Zamyatin has joined #ruby
goatish has joined #ruby
ta_ has joined #ruby
netherwolfe has joined #ruby
chocoelho has quit [Remote host closed the connection]
chocoelho has joined #ruby
n0m4d1c has joined #ruby
selim has quit [Ping timeout: 264 seconds]
selim has joined #ruby
chocoelho_ has joined #ruby
chocoelho has quit [Ping timeout: 255 seconds]
TobiFrano has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
anisha has joined #ruby
hahuang61 has quit [Ping timeout: 256 seconds]
Cavallari has joined #ruby
elphe has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
Zamyatin has quit [Read error: Connection reset by peer]
__main__ has quit [Read error: Connection reset by peer]
Zamyatin has joined #ruby
troys is now known as troys_
__main__ has joined #ruby
<desperek> how can i def method that adds two fields of class?
<desperek> works
elphe has quit [Ping timeout: 240 seconds]
<havenwood> desperek: fields?
<desperek> havenwood, i mean, i was curious how do i refer to, well, variable in the class
<desperek> but done it already
workmad3 has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
KeyJoo has quit [Ping timeout: 276 seconds]
mtkd has quit [Ping timeout: 256 seconds]
amatas_ has quit [Quit: amatas_]
TobiFrano has joined #ruby
mtkd has joined #ruby
nogic has quit [Ping timeout: 248 seconds]
tomphp has quit [Read error: Connection reset by peer]
_aeris_ has quit [Read error: Connection reset by peer]
mtkd has quit [Read error: Connection reset by peer]
_aeris_ has joined #ruby
chouhoulis has joined #ruby
tomphp has joined #ruby
mtkd has joined #ruby
wilbert_ has joined #ruby
wilbert has quit [Read error: Connection reset by peer]
plexigras has quit [Ping timeout: 256 seconds]
dstrunk has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
Ltem has quit [Quit: Leaving]
BTRE has quit [Read error: Connection reset by peer]
FrostCandy has joined #ruby
wilbert_ has quit [Ping timeout: 268 seconds]
bronson has joined #ruby
BTRE has joined #ruby
LocaMocha has quit [Ping timeout: 248 seconds]
tomphp has joined #ruby
bronson has quit [Ping timeout: 268 seconds]
troydm has left #ruby ["WeeChat 2.0.1"]
pastorinni has quit [Remote host closed the connection]
hahuang61 has joined #ruby
minimalism has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xfbs has quit []
ldnunes has quit [Read error: Connection reset by peer]
ldnunes has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
TobiFrano has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ltem has joined #ruby
mclee has quit [Quit: WeeChat 1.4]
mniip has quit [Changing host]
mniip has joined #ruby
imode has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
d_kam has quit [Ping timeout: 268 seconds]
bmurt has joined #ruby
chocoelho_ has quit [Ping timeout: 240 seconds]
chocoelho_ has joined #ruby
d_kam has joined #ruby
listenmore has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 248 seconds]
sammi` has quit [Quit: Lost terminal]
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
Guest2997 has quit [Changing host]
Guest2997 has joined #ruby
Guest2997 is now known as Kestrel-029
sammi` has joined #ruby
ldnunes has quit [Quit: Leaving]
jtdoncas has joined #ruby
hazelux has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sepp2k has quit [Quit: Leaving.]
Inside has joined #ruby
<Inside> I'm using CentOS. Does it make sense to use SCL ruby 2.4.0 or should I use rvm to install ruby for a new system?
Zamyatin has quit [Read error: Connection reset by peer]
Zamyatin has joined #ruby
Cavallari has quit [Quit: Cavallari]
eckhardt has joined #ruby
Zamyatin has quit [Client Quit]
<havenwood> Inside: SCL 2.4 seems completely reasonable. Dev or prod?
<havenwood> Assuming it's prod, I'd vote SCL.
<havenwood> (You don't see CentOS in dev much I suppose. ;-))
<havenwood> Inside: Alternatively you could use `sudo ruby-install --system --latest` to install 2.5 to /usr/local.
<havenwood> Inside: TL;DR: SCL if prod.
nit3rid3 has quit [Quit: Leaving]
hazelux has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 276 seconds]
hazelux has joined #ruby
orbyt_ has joined #ruby
fschuindt has quit [Quit: WeeChat 2.0]
orbyt_ has quit [Client Quit]
nixy has left #ruby ["WeeChat 1.7"]
eck has quit [Ping timeout: 256 seconds]
Barrt has joined #ruby
hazelux has quit [Ping timeout: 255 seconds]
fmcgeough has quit [Quit: fmcgeough]
ur5us has joined #ruby
ericx2x has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
guacamole has joined #ruby
netherwolfe has quit [Quit: Leaving]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
elphe has joined #ruby
hanmac has joined #ruby
faces has quit [Read error: Connection reset by peer]
elphe has quit [Ping timeout: 248 seconds]
faces has joined #ruby
ericx2x has quit [Quit: Leaving]
ivanskie has joined #ruby
r3kz has quit [Quit: Connection closed for inactivity]
elementaru has quit [Remote host closed the connection]
jottr has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
workmad3 has joined #ruby
gizmore has quit [Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
Eiam has joined #ruby
hazelux has joined #ruby
bmurt has quit [Client Quit]
jottr has quit [Quit: WeeChat 2.0.1]
tvw has joined #ruby
orbyt_ has joined #ruby
d^sh_ has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
oleo has quit [Quit: Leaving]
dviola has quit [Quit: WeeChat 2.0.1]
d^sh has quit [Ping timeout: 265 seconds]
jottr has joined #ruby
oleo has joined #ruby
hazelux has quit [Ping timeout: 248 seconds]
dviola has joined #ruby
fmcgeough has joined #ruby
<Inside> I'm using CentOS. Does it make sense to use SCL ruby 2.4.0 or should I use rvm to install ruby for a new system?
<Inside> whoops
ledestin has joined #ruby
<Inside> havenwood: Yeah, it's for production for a small intranet site.
<Inside> I've been trying to use SCL, but nginx/passenger don't seem to like it
<darix> Inside: you need to set the path to the ruby interpreter that passenger should use for your app
govg has quit [Ping timeout: 248 seconds]
banisterfiend has joined #ruby
<Inside> I had passnger_ruby /opt/rh/rh-ruby24/root/usr/bin/ruby;
hazelux has joined #ruby
tomphp_ has joined #ruby
rrichardsr3 has joined #ruby
dviola has quit [Quit: WeeChat 2.0.1]
tlr has quit [Quit: Textual IRC Client: www.textualapp.com]
Yxhuvud has joined #ruby
Toggi3 has quit [Ping timeout: 268 seconds]
tomphp has quit [Ping timeout: 256 seconds]
jottr_ has joined #ruby
<Inside> I've gone back to trying to use rvm (which has its own issues :D) in this Dockerfile
<Inside> But the bigger philosophical question is -- when should SCL even be used?
<Yxhuvud> I have never looked back after I switched to chruby.
bronson has joined #ruby
cschneid_ has joined #ruby
<Inside> Heh
<Inside> According to my sysadmin guy the whole concept of multiple rubies on a single system is a terrible idea
jeffreylevesque has quit [Ping timeout: 248 seconds]
<Inside> I was trying to explain to him the whole rvm/scl thing and he wasn't having any of it
jottr has quit [Ping timeout: 240 seconds]
Barrt has quit [Ping timeout: 265 seconds]
cschneid has quit [Ping timeout: 255 seconds]
hahuang61 has quit [Ping timeout: 255 seconds]
<havenwood> Inside: In production, you don't need to switch Rubies - you have just your Ruby.
rigby has joined #ruby
<havenwood> Inside: SCL is a package-managed Ruby that's ideal for production.
TobiFrano has joined #ruby
rigby has quit [Client Quit]
cschneid has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
<havenwood> Inside: A good reason for multiple Rubies on a single system is a development machine.
<Inside> Hmmm
<havenwood> Inside: Different projects will require different Ruby engines and versions.
<havenwood> In prod, you know exactly what Ruby you should be providing. Use that.
bmurt has joined #ruby
<ramfjord> yup - that's definitely the ideal state
troulouliou_div2 has joined #ruby
<havenwood> SCL is a great choice. No other Rubies. Or like I said, you can install Ruby to /usr/local if you want to build Ruby yourself for a single install.
rigby has joined #ruby
<havenwood> Inside: ^
<ramfjord> I do find the SCL packages quite irritating though, with everything having to be run through scl enable
<havenwood> I'd personally want at 2.5 ;-)
<havenwood> sudo ruby-install --system --latest -j8 -- --with-jemalloc
<havenwood> \o/
rigby has quit [Client Quit]
cschneid_ has quit [Ping timeout: 248 seconds]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ramfjord> what is this ruby-install?
<havenwood> err, i forgot the `ruby`, oops
<havenwood> sudo ruby-install --system --latest -j8 ruby -- --with-jemalloc
dviola has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> ramfjord: It's by the same author as chruby.
LastWhisper____ has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
<havenwood> It supports updating Ruby metadata (from ruby-version repo) without updating the tool itself, checks md5, sha1, sha256 *and* sha512 checksums, uses package managers for dependencies, etc. It's nicely organized and tested.
amatas has quit [Quit: amatas]
<ramfjord> seems quite nice compared to SCL if it lets you do a system installation like that!
<havenwood> It's just for building Ruby though. No precompiled, statically-linked binaries.
<Inside> App 63 stderr: /opt/rh/rh-ruby24/root/usr/bin/ruby: error while loading shared libraries: libruby.so.2.4: cannot open shared object file: No such file or directory
<Inside> is the error I get w/ passenger
Barrt has joined #ruby
<Inside> And this is part 2 of the Dockerfile: https://gist.github.com/Insood/b6287844905597b9de08a2bb1dad8c23 (which uses the Dockerfile I posted previously as a base)
<bawNg> I wonder how many people use Ruby for soft-realtime applications
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> Inside: Hrm, seems like maybe you need a: LD_LIBRARY_PATH="/opt/rh/ruby24/root/usr/lib64:$LD_LIBRARY_PATH"
<havenwood> Inside: Dunno!
ahrs has quit [Remote host closed the connection]
dviola has quit [Quit: WeeChat 2.0.1]
<havenwood> bawNg: What puts the "soft" in "soft-realtime"?
pastorinni has joined #ruby
<havenwood> ah, can miss some deadlines
<bawNg> havenwood: well true real time applications can't really be built in a high language which has GC, they need to guarantee the CPU time that is needed to perform tasks
ahrs has joined #ruby
<bawNg> but very few real time applications require such strict deadlines
<Inside> blah blah deterministic
<bawNg> this week, I've built a C extension which implements a high precision scheduler of light weight timers for async and fibered Ruby applications
<bawNg> it can fire timers or resume sleeping fibers within precision of a few microseconds
<havenwood> bawNg: ah, nice
<havenwood> how does it compare to hitimes?
<bawNg> I created it for the Sonic Pi project, but I'm thinking I should just turn it into an open source gem in case anyone else wants to use it
<bawNg> it does something completely different to hitimes, though it also includes a high precision cross platform clock like hitimes does
<havenwood> nice
<bawNg> it is high precision reactor, so basically an eventmachine replacement without any IO support
synthroid has quit []
<bawNg> it may eventually include IO support, since things can be a lot more efficient than eventmachine, but I don't know if I'll ever have the time to do that
<bawNg> so it's a timer/fiber scheduler
<bawNg> it includes Mutex and ConditionalVariable replacements, joining on jobs (fibers), job sleeping, fiber-less timers and some other things which I needed to replace native threads with fibers while converting the heavily threaded Sonic Pi project
<havenwood> bawNg: are you familiar with normalperson's Thribers patch?
<havenwood> bawNg: that sounds really interesting
<ramfjord> Inside: I think you'll probably need to change the `passenger_ruby` option or something like that in your nginx.conf if you want to use the SCL packages
<ramfjord> the `scl enable` stuff is supposed to manage the LD_LIBRARY_PATH and other variables for you
<Inside> Well - it is set to where the SCL package is
<Inside> It just looks like nginx isn't using the SCL environment
<bawNg> I saw that sometime last year, does sound interesting, but I've been using fibers in async applications for many years already
Toggi3 has joined #ruby
<bawNg> it definitely seems like a good idea to have better core language support for fibers in the future, at least in some way
jetpack_joe_ has joined #ruby
FrostCandy has quit []
<bawNg> I wish extconf supported magically downloading the compatible ruby source as a dependency when building a gem
jeffreylevesque has joined #ruby
<ramfjord> Inside: are you running passenger inside scl enable?
banisterfiend has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
<Inside> Hmmm
Toggi3 has quit [Ping timeout: 240 seconds]
<Inside> No
sameerynho has quit [Ping timeout: 268 seconds]
<Inside> That's actually what I'm trying to figure out right now
d^sh has joined #ruby
d^sh_ has quit [Ping timeout: 248 seconds]
dviola has joined #ruby
<ramfjord> i.e. `scl enable rh-ruby24 'bundle exec passenger start'`
jenrzzz has joined #ruby
reber has quit [Remote host closed the connection]
Toggi3 has joined #ruby
<Inside> Well - it's technically nginx w/ passenger
<ramfjord> nginx running in some systemd unit?
<ramfjord> tbh I'd be strongly considering trying a ruby-install version of the centos base image if I were you - building from source isn't much of an issue with docker, as long as you put it in a layer that doesn't have to be rebuild often
thejamespinto has quit [Ping timeout: 260 seconds]
<Inside> Thsi isn't even going to be a Docker file =_=
jenrzzz has quit [Ping timeout: 255 seconds]
<Inside> I'm trying to move my stuff to a different box - the sysadmin wants me to give him a list of everything that he needs to do to setup that box
<Inside> And Docker comes into play here
<Inside> Not in a "we're going to use Docker" way, but in a "I'm going to copy the commands over and set up the box from scratch" way
<bawNg> I feel like whatever solution I come up with for building a gem against the Ruby source is going to cause problems for people who have different environments like RVM, even if I detect the current running Ruby version and download the matching source, I'd still need to use the installed Ruby versions config.h
<ramfjord> :S
<bawNg> there must be a better solution, surely it can't be all that uncommon for an extension to depend on the Rruby source
<bawNg> *Ruby
troulouliou_div2 has quit [Quit: Leaving]
jdawgaz has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
<ramfjord> run in docker on new host, so he only needs to install docker and you can have the same dev environment as prod?
tvw has quit []
<Inside> i'm not even using docker for development
<Inside> \o/
<ramfjord> or, figure out where the nginx binary is getting invoked and surround it in scl enable rh-ruby24
<cjohnson> In ruby, I have two arrays, and I want to take the product of those two arrays and run a command on each combination. I know about Arra#product but the question is how can I easily consume them? Does this work?
<cjohnson> arr1.product(arr2).each do |arr1_arg, arr2_arg|
<cjohnson> Or do I need to use something beside each to iterate the array of arrays
<Inside> you want to do a[n] * b[n]?
<Inside> a.each_with_index { |a_val, index| a_val * b[index] } ?
<Inside> Oi
<Inside> this is a combinatorial question
<havenwood> cjohnson: Seems like you want #map not #each. Hard to tell unless you say what result you want.
* Inside slinks away.
<baweaver> mmm
<havenwood> >> [1, 2, 3].product([4, 5, 6]).map(&:sum)
<ruby[bot]> havenwood: # => undefined method `sum' for [1, 4]:Array (NoMethodError) ...check link for more (https://eval.in/936877)
<havenwood> We need to update that bot!
<havenwood> #=> [5, 6, 7, 6, 7, 8, 7, 8, 9]
<baweaver> >>a=[1,2,3];b=%w[a b c]; a.product(b).map { |(a,b)| "#{a}#{b}" }
<ruby[bot]> baweaver: # => ["1a", "1b", "1c", "2a", "2b", "2c", "3a", "3b", "3c"] (https://eval.in/936878)
<baweaver> >>a=[1,2,3];b=%w[a b c]; a.product(b).map { |a,b| "#{a}#{b}" }
<ruby[bot]> baweaver: # => ["1a", "1b", "1c", "2a", "2b", "2c", "3a", "3b", "3c"] (https://eval.in/936879)
<baweaver> ah, so it does work both ways, good
<guacamole> TIL #product
thejamespinto has joined #ruby
<havenwood> >> 'guaca'.chars.product('mole'.chars).map(&:join)
<ruby[bot]> havenwood: # => ["gm", "go", "gl", "ge", "um", "uo", "ul", "ue", "am", "ao", "al", "ae", "cm", "co", "cl", "ce", "am ...check link for more (https://eval.in/936881)
<Inside> I'm not even seeing how people are using scl with nginx, heh.
<havenwood> oops, forgot my final join
<havenwood> >> 'guaca'.chars.product('mole'.chars).map(&:join).join
<ruby[bot]> havenwood: # => "gmgoglgeumuoulueamaoalaecmcoclceamaoalae" (https://eval.in/936882)
<havenwood> guacamole: ^
<bawNg> >> 'guaca'.each_char.product('mole'.chars).map(&:join)
<ruby[bot]> bawNg: # => undefined method `product' for #<Enumerator: "guaca":each_char> ...check link for more (https://eval.in/936883)
<ramfjord> >> 'guaca'.chars.product('mole'.chars).join
<ruby[bot]> ramfjord: # => "gmgoglgeumuoulueamaoalaecmcoclceamaoalae" (https://eval.in/936884)
<havenwood> ramfjord: good point
<baweaver> yep
<baweaver> was about to mention that one
<bawNg> someone should do something about Enumerator#product, useless to alloocate an array of chars for that
jnyw has joined #ruby
<baweaver> Take a look at its arity
<baweaver> not so easy
<baweaver> &ri Enumerable#product
<_derpy> No results
<baweaver> &ri Array#product
<baweaver> I always forget what's in what
<guacamole> whats the difference between product and combination?
<Inside> 5~
<ramfjord> I'm guessing product is linear algebra/matrix product
<ramfjord> though...
<ramfjord> not at all
<guacamole> i demand havenwood do a talk on the difference
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ltem has quit [Quit: good night]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
<ramfjord> they have different arities as baweaver pointed out
<ramfjord> but yeah
<baweaver> guacamole: it would be a productive talk
<guacamole> bwahaha
SeepingN has joined #ruby
phaul has quit [Ping timeout: 248 seconds]
<havenwood> baweaver: we could do a combo talk where we each cover a different permutation of the topic
bronson has joined #ruby
TobiFrano has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Azure has joined #ruby
phaul has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
desperek has quit [Quit: xoxo]
hazelux has quit []
TobiFrano has joined #ruby
ant[]_ has joined #ruby
<ant[]_> hola
<ant[]_> /usr/lib64/ruby/site_ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem rake (>= 0.a) with executable rake (Gem::GemNotFoundException)
<ant[]_> anyone?
randomstrangerb has quit [Ping timeout: 248 seconds]
elphe has joined #ruby
randomstrangerb has joined #ruby
<cjohnson> havenwood: The result is side effects -- it's saving a record on a rails model
<cjohnson> baweaver: thanks! I knew there was some syntax way to destructure that
<baweaver> cjohnson: what's the full code? May be a better way to do it.
<havenwood> cjohnson: You can omit the #each even, since #product takes a block directly.
<cjohnson> havenwood: nice
<cjohnson> baweaver: as.product(bs) do |(a, b)| MyModel.where(a: a, b: b, id: id).first_or_intialize end
elphe has quit [Ping timeout: 256 seconds]
<baweaver> where's id?
<baweaver> I have a hunch, one sec
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cjohnson> id is the instance id of this model
<cjohnson> So this model is Program and an instance method is seed_eulas which does the above code
<baweaver> MyModel.where(id: id).index_by { |m| [m.id, m.a, m.b] }
<cjohnson> so id = Program#id
d_kam has quit [Quit: Be back later ...]
<baweaver> as.product(bs) { |a,b| [id, a, b] }
TobiFrano has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> then diff the two hashes, you only need to create the ones which don't exist meaning less queries
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
tcopeland has quit [Quit: tcopeland]
<cjohnson> So that will find every MyModel matching my program id as one query, and then I will use ruby to find those combinations of records which don't yet exist
<cjohnson> is that right?
AgentVenom has quit [Quit: Textual IRC Client: www.textualapp.com]
ant[]_ has left #ruby [#ruby]
chouhoulis has quit [Remote host closed the connection]
IJsbrand has joined #ruby
oetjenj has joined #ruby
chouhoulis has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
LastWhisper____ has joined #ruby
moei has quit [Quit: Leaving...]
_main_ has joined #ruby
chouhoulis has quit [Ping timeout: 256 seconds]
chouhoul_ has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
__main__ has quit [Ping timeout: 256 seconds]
_main_ is now known as __main__
hahuang61 has joined #ruby
marr has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
kossae has quit [Remote host closed the connection]
IJsbrand has quit [Quit: IJsbrand]
workmad3 has joined #ruby
tomphp_ has quit [Ping timeout: 248 seconds]
electrostat has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
_main_ has joined #ruby
tomphp has joined #ruby
__main__ has quit [Ping timeout: 276 seconds]
_main_ is now known as __main__
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gnufied has quit [Quit: Leaving]
marxarelli is now known as marxarelli|afk
TomyLobo has quit [Ping timeout: 256 seconds]
marxarelli|afk is now known as marxarelli
mtkd has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
r3kz has joined #ruby
randomstrangerb has quit [Ping timeout: 260 seconds]
__main__ has quit [Read error: Connection reset by peer]
_main_ has joined #ruby
mtkd has joined #ruby
randomstrangerb has joined #ruby
_main_ is now known as __main__
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 276 seconds]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
tcopeland has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
kossae has joined #ruby
chocoelho_ has quit [Ping timeout: 268 seconds]
GremL1N has joined #ruby
chouhoulis has joined #ruby
paulrf has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
paulrf has quit [Client Quit]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quobo has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
d_kam has joined #ruby