havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.3, 2.4.5, 2.3.8, 2.6.0-rc2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
Arkantos has joined #ruby
blackmesa has quit [Quit: WeeChat 2.3]
Arkantos has quit [Client Quit]
Arkantos has joined #ruby
ellcs has quit [Ping timeout: 250 seconds]
Arkantos has quit [Client Quit]
Arkantos has joined #ruby
hutch has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
JoshS has joined #ruby
Arkantos has quit [Client Quit]
Arkantos has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
uplime has joined #ruby
nowhere_man has joined #ruby
uplime is now known as Rudolph
hutch has quit [Ping timeout: 240 seconds]
elphe has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
nchambers has quit [Ping timeout: 246 seconds]
dbz_ has joined #ruby
cnsvc_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dbz has quit [Ping timeout: 244 seconds]
dbz_ has quit [Ping timeout: 244 seconds]
krawchyk has quit [Quit: krawchyk]
davidw has quit [Ping timeout: 250 seconds]
hutch has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
evdubs has quit [Remote host closed the connection]
jthomas1 has quit [Ping timeout: 240 seconds]
evdubs has joined #ruby
SeepingN has quit [Ping timeout: 250 seconds]
m0w has quit [Remote host closed the connection]
jthomas1 has joined #ruby
m0w has joined #ruby
kapil____ has joined #ruby
Renich has joined #ruby
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has joined #ruby
orbyt_ has joined #ruby
jthomas1 has quit [Ping timeout: 246 seconds]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has joined #ruby
ixti has joined #ruby
ixti has quit [Client Quit]
<havenwood> cah, oh - they left :(
<havenwood> &>> 0.1.yield_self.to_a.pack(?g).unpack1('B*')
<rubydoc> # => "00111101110011001100110011001101" (https://carc.in/#/r/5ttx)
* havenwood does a binary solo
hutch has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
GinoMan2440 has quit [Read error: Connection reset by peer]
Exuma has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tiff has joined #ruby
Exuma has joined #ruby
rem_ has joined #ruby
Arkantos has joined #ruby
tiff has quit [Client Quit]
rem_ has quit [Client Quit]
tiff has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has quit [Quit: leaving]
elphe has joined #ruby
cnsvc_ has quit [Ping timeout: 256 seconds]
bmurt has joined #ruby
cnsvc_ has joined #ruby
haylon has joined #ruby
cnsvc_ has quit [Ping timeout: 256 seconds]
haylon has quit [Ping timeout: 250 seconds]
AJA4350 has quit [Remote host closed the connection]
AJA4350 has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
tenchi4615 has quit [Remote host closed the connection]
dviola has quit [Quit: WeeChat 2.3]
cnsvc_ has joined #ruby
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has joined #ruby
nine_milli has joined #ruby
nine_milli was kicked from #ruby by ChanServ [User is banned from this channel]
cnsvc_ has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
eminencehc has joined #ruby
tiff has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Arkantos has joined #ruby
eminencehc has quit [Remote host closed the connection]
tiff has joined #ruby
tiff has quit [Client Quit]
tiff has joined #ruby
iovis has joined #ruby
iovis has quit [Quit: BitchX Official WWW Site -- http://www.bitchx.org/]
AJA4350 has quit [Quit: AJA4350]
Exuma has joined #ruby
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tiff has joined #ruby
tiff has quit [Client Quit]
nowhere_man has quit [Ping timeout: 252 seconds]
nowhereman has joined #ruby
nowhereman is now known as Guest78161
tiff has joined #ruby
akem has quit [Ping timeout: 272 seconds]
jthomas1 has joined #ruby
akem has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
jthomas1 has quit [Ping timeout: 272 seconds]
powerbit has quit [Read error: Connection reset by peer]
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tau has joined #ruby
Renich has quit [Quit: Renich]
tiff has joined #ruby
gnufied has quit [Quit: Leaving]
dbz has joined #ruby
cnsvc_ has quit [Ping timeout: 256 seconds]
dbz has quit [Ping timeout: 250 seconds]
Inside has quit [Disconnected by services]
Azure has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
haylon has joined #ruby
Exuma has joined #ruby
haylon has quit [Ping timeout: 250 seconds]
Exuma has quit [Client Quit]
dinfuehr has quit [Ping timeout: 272 seconds]
dinfuehr has joined #ruby
braincrash has quit [Quit: bye bye]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
braincrash has joined #ruby
cnsvc_ has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
roshanavand has joined #ruby
Freshnuts has joined #ruby
cnsvc_ has quit [Remote host closed the connection]
cnsvc_ has joined #ruby
code_zombie has joined #ruby
dbz has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
cd has quit [Quit: cd]
tau has quit [Remote host closed the connection]
sauvin has joined #ruby
roshanavand has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
Exuma has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
davidw has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
Fusl has quit [Remote host closed the connection]
Fusl has joined #ruby
dbz has quit [Read error: Connection reset by peer]
dbz has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
dbz has quit [Remote host closed the connection]
paranoicsan has joined #ruby
dbz has joined #ruby
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
d10n-work has quit [Quit: Connection closed for inactivity]
code_zombie has quit [Quit: Leaving]
dellavg_ has quit [Ping timeout: 250 seconds]
jthomas1 has joined #ruby
klaas has joined #ruby
jthomas1 has quit [Ping timeout: 272 seconds]
davidw has quit [Ping timeout: 250 seconds]
venmx has joined #ruby
coderphive has quit [Read error: Connection reset by peer]
venmx_ has joined #ruby
impermanence has quit [Ping timeout: 268 seconds]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
endemic has quit [Ping timeout: 250 seconds]
endemic has joined #ruby
stooj has quit [Quit: ZNC 1.7.0 - https://znc.in]
stooj has joined #ruby
Inline has quit [Quit: Leaving]
coderphive has joined #ruby
rippa has joined #ruby
pwnd_nsfw has quit [Ping timeout: 245 seconds]
clemens3_ has joined #ruby
za1b1tsu has joined #ruby
s3nd1v0g1us has joined #ruby
aupadhye has joined #ruby
s3nd1v0g1us has quit [Client Quit]
venmx has quit [Ping timeout: 246 seconds]
venmx_ has quit [Ping timeout: 250 seconds]
neuraload has joined #ruby
paranoicsan has quit [Quit: paranoicsan]
kapil____ has joined #ruby
clemens3_ has quit [Ping timeout: 244 seconds]
neuraload has quit [Remote host closed the connection]
tiff has joined #ruby
Furai has quit [Quit: WeeChat 2.3]
tiff has quit [Client Quit]
ansraliant has joined #ruby
cats has quit [Ping timeout: 268 seconds]
cnsvc_ has quit [Ping timeout: 256 seconds]
conta has joined #ruby
cats has joined #ruby
coderphive6 has joined #ruby
coderphive has quit [Quit: coderphive]
coderphive6 has quit [Client Quit]
coderphive has joined #ruby
Furai has joined #ruby
blackmesa has joined #ruby
cnsvc_ has joined #ruby
bathtub_shark has quit [Quit: WeeChat 2.2]
Zarthus has quit [Ping timeout: 252 seconds]
dbz has quit [Remote host closed the connection]
marz_d`ghostman has joined #ruby
<marz_d`ghostman> Why is the job I'm passing in to concurrent-ruby doesn't seem to be registered. Tried to output completed_task_count but it's zero: https://gist.github.com/marzdgzmn/e42976cfd10a45690d29e751104d0f7a
\void has quit [Quit: So long, and thanks for all the fish.]
Zarthus has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
dviola has joined #ruby
m0w has quit [Ping timeout: 250 seconds]
cnsvc_ has quit [Ping timeout: 256 seconds]
akem has quit [Ping timeout: 268 seconds]
conta has quit [Ping timeout: 244 seconds]
akem has joined #ruby
keden has joined #ruby
m0w has joined #ruby
akem has quit [Ping timeout: 244 seconds]
mikecmpbll has joined #ruby
powerbit has joined #ruby
powerbit has quit [Excess Flood]
m0w has quit [Max SendQ exceeded]
m0w has joined #ruby
paranoicsan has joined #ruby
cnsvc_ has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
powerbit has joined #ruby
dionysus69 has joined #ruby
Freshnuts has quit [Quit: Leaving]
akem has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
cnsvc_ has quit [Ping timeout: 256 seconds]
Guest49234 has joined #ruby
Guest78161 has quit [Ping timeout: 250 seconds]
venmx has joined #ruby
venmx_ has joined #ruby
cnsvc_ has joined #ruby
prestorium has joined #ruby
jthomas1 has joined #ruby
jottr has joined #ruby
jthomas1 has quit [Ping timeout: 250 seconds]
Guest78161 has joined #ruby
Guest78161 has quit [Ping timeout: 252 seconds]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpb_ has joined #ruby
Arkantos has quit [Read error: Connection reset by peer]
mikecmpbll has quit [Ping timeout: 250 seconds]
dviola has quit [Quit: WeeChat 2.3]
Exagone313 has quit [Ping timeout: 245 seconds]
paranoicsan is now known as paranoicsan[Away
paranoicsan[Away has quit [Quit: paranoicsan[Away]
Exagone313 has joined #ruby
cnsvc_ has quit [Ping timeout: 256 seconds]
paranoicsan has joined #ruby
phaul has joined #ruby
coderphive has quit [Ping timeout: 244 seconds]
coderphive has joined #ruby
saTchymoto has joined #ruby
m0w has quit [Remote host closed the connection]
venmx_ has quit [Quit: leaving]
venmx has quit [Quit: leaving]
venmx has joined #ruby
mikecmpb_ has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
<alxd> Is there any Ruby OpenAPI / Swagger gem which works as well as Django REST Swagger?
Guest78161 has joined #ruby
<alxd> I found https://github.com/fotinakis/swagger-blocks to be popular, but it requires writing stuff by hand for every single view
<alxd> s/view/endpoint/
lambarena has quit [Quit: Ping timeout (120 seconds)]
lambarena has joined #ruby
keden has quit [Ping timeout: 244 seconds]
paranoicsan is now known as paranoicsan[Away
RougeR has joined #ruby
paranoicsan[Away has quit [Quit: paranoicsan[Away]
Guest78161 has quit [Ping timeout: 252 seconds]
hdabrows has quit []
paranoicsan has joined #ruby
yokel has quit [Remote host closed the connection]
lypsis has quit [Quit: ZNC - http://znc.in]
lypsis has joined #ruby
yokel has joined #ruby
keden has joined #ruby
lypsis has quit [Quit: ZNC - https://znc.in]
lypsis has joined #ruby
lypsis has quit [Client Quit]
keden has quit [Ping timeout: 246 seconds]
dbz has joined #ruby
RougeRR has joined #ruby
RougeR has quit [Ping timeout: 244 seconds]
lypsis has joined #ruby
dbz has quit [Ping timeout: 244 seconds]
lypsis has quit [Client Quit]
lypsis has joined #ruby
lucasb has joined #ruby
keden has joined #ruby
keden has quit [Ping timeout: 250 seconds]
Guest49234 has quit [Ping timeout: 250 seconds]
Guest78161 has joined #ruby
Guest49234 has joined #ruby
sylario has joined #ruby
RougeRR has quit [Ping timeout: 244 seconds]
m0w has joined #ruby
Guest49234 has quit [Ping timeout: 268 seconds]
cnsvc_ has joined #ruby
keden has joined #ruby
Guest78161 has quit [Ping timeout: 252 seconds]
Guest49234 has joined #ruby
m0w has quit [Remote host closed the connection]
mostlybadfly has joined #ruby
m0w has joined #ruby
jthomas1 has joined #ruby
Guest49234 has quit [Ping timeout: 268 seconds]
jthomas1 has quit [Ping timeout: 268 seconds]
saTchymoto has quit [Ping timeout: 250 seconds]
roshanavand has quit [Remote host closed the connection]
saTchymoto has joined #ruby
roshanavand has joined #ruby
Guest78161 has joined #ruby
Zarthus_ has joined #ruby
Zarthus has quit [Ping timeout: 272 seconds]
Zarthus_ is now known as Zarthus
bathtub_shark has joined #ruby
eminencehc has joined #ruby
elphe has quit [Ping timeout: 250 seconds]
cd has joined #ruby
Rudolph has quit [Quit: WeeChat 2.2]
AJA4350 has joined #ruby
tjarvis has joined #ruby
Guest49234 has joined #ruby
Guest49234 has quit [Ping timeout: 246 seconds]
bmurt has joined #ruby
alan_w has joined #ruby
ixti has joined #ruby
regedit has joined #ruby
Guest78161 has quit [Ping timeout: 252 seconds]
paranoicsan has quit [Quit: paranoicsan]
paranoicsan has joined #ruby
Guest49234 has joined #ruby
haylon has joined #ruby
Guest49234 has quit [Ping timeout: 245 seconds]
reber has joined #ruby
saTchymoto has quit [Ping timeout: 272 seconds]
haylon has quit [Remote host closed the connection]
ellcs has joined #ruby
d10n-work has joined #ruby
jgpawletko has joined #ruby
akaiiro has quit [Quit: Ping timeout (120 seconds)]
akaiiro has joined #ruby
krawchyk has joined #ruby
Guest78161 has joined #ruby
Inline has joined #ruby
ellcs has quit [Ping timeout: 250 seconds]
catphish has joined #ruby
<catphish> i'm a little confused, i found some documentation that states that Process.setproctitle will change a process name, but when i use it, it seems to instead change the cmdline
<catphish> which is correct? has this behaviour changed?
<jhass> I think it does different things on different platforms
<catphish> oh, i'm quite certain it changes the cmdline on linux, the documentation was on OSX
<jhass> best effort basically
<catphish> jhass: yeah you're right, thanks
<catphish> i'm quite happy with the cmdline behaviour, it shows up in process lists and isn't truncated as process names are
za1b1tsu has quit [Ping timeout: 250 seconds]
paranoicsan has quit [Quit: paranoicsan]
aupadhye has quit [Ping timeout: 268 seconds]
ixti has quit [Quit: WeeChat 2.3]
armyriad has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
ixti has joined #ruby
twobitsprite has joined #ruby
<twobitsprite> I'm just now trying to learn a little ruby, coming from a python background... Looking at some docs, I two different block notations and I'm curious what the difference is between something like << Find.find("mydir") do |path| ... end >> and << Find.find("mydir
<twobitsprite> sorry << Find.find("mydir") { |path| ... } >>
<jhass> mostly style
<jhass> there's a technical differencence in precedence
<twobitsprite> jhass: ok, but the behavior is identical?
<jhass> foo bar do x end; # foo will receive the block
<jhass> foo bar { x }; # bar will receive the block
<twobitsprite> ahh
<jhass> but most people follow do/end for multiline, { / } for single line
<twobitsprite> Can you use parenthesis to affect that? I.e: foo (bar do x end)
<jhass> yes
<twobitsprite> cool... thanks :)
<jhass> there's also a semantic style some people follow, see http://www.virtuouscode.com/2011/07/26/the-procedurefunction-block-convention-in-ruby/
<twobitsprite> interesting
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
krawchyk has quit [Quit: krawchyk]
ixti has quit [Read error: Connection timed out]
ixti has joined #ruby
Emmanuel_Chanel has joined #ruby
tjmcginnis has joined #ruby
jsc has joined #ruby
jsc is now known as status402
NL3limin4t0r has joined #ruby
tjarvis has quit [Quit: WeeChat 2.3]
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
tjmcginnis has quit [Quit: Textual IRC Client: www.textualapp.com]
jthomas1 has joined #ruby
krawchyk has joined #ruby
<NL3limin4t0r> Hey. I want the inform the maintainers of ruby-community.com that there are two links under resourses > links > tutorials & learning that changed. 1) The CodeCademy link changed, CodeCademy changed their file structure "https://www.codecademy.com/tracks/ruby" should be changed to "https://www.codecademy.com/learn/learn-ruby", "https://tryruby.org" is bought by Pluralsight and now redirects to
davidw has joined #ruby
impermanence has joined #ruby
cnsvc_ has quit [Ping timeout: 256 seconds]
krawchyk_ has joined #ruby
zapata_ has joined #ruby
krawchyk has quit [Ping timeout: 250 seconds]
zapata has quit [Ping timeout: 252 seconds]
davidw has quit [Ping timeout: 246 seconds]
status402 has quit [Read error: Connection reset by peer]
status402 has joined #ruby
krawchyk_ has quit [Quit: krawchyk_]
prestorium has quit [Read error: Connection reset by peer]
status402 has quit [Quit: status402]
prestorium has joined #ruby
marz_d`ghostman has quit [Ping timeout: 256 seconds]
spacesuitdiver has joined #ruby
ixti has quit [Quit: WeeChat 2.3]
krawchyk has joined #ruby
davidw has joined #ruby
Guest49234 has joined #ruby
akaiiro has quit [Ping timeout: 240 seconds]
conta has joined #ruby
akaiiro has joined #ruby
<twobitsprite> Trying to understand blocks/iterators/etc... I have a file with one word per line, and I'm trying to count the number of times each word is used in another file, so I'm trying to read the words file in to a hash. Here's what I have:
<twobitsprite> --module_list = Hash[File.readlines(__dir__ + "/modules.txt").each { |line| [line.strip, 0] }]
<twobitsprite> (oops, ignore the -- at the beginning, that's my editor)
<twobitsprite> anyway, module_list just ends up getting set to the raw lines, including the \n
<twobitsprite> What I'm trying to get is a hash like {word1: 0, word2: 0} etc
catphish has left #ruby ["Leaving"]
Guest49234 has quit [Ping timeout: 245 seconds]
<phaul> twobitsprite: it's a each vs map misunderstanding
<phaul> &ri each
<rubydoc> I found 69 entries matching method each. Use &list each if you would like to see a list
krawchyk has quit [Quit: krawchyk]
<phaul> ffs rubydoc
<phaul> &ri Array#each
<phaul> &ri Array.map
<rubydoc> Found no entry that matches class Array class method map
<phaul> &ri Enumerable#map
impermanence46 has joined #ruby
impermanence has quit [Ping timeout: 250 seconds]
Emmanuel_Chanel has joined #ruby
cthulchu has quit [Read error: Connection reset by peer]
cthulchu has joined #ruby
polishdub has joined #ruby
gnufied has joined #ruby
m0w has quit [Ping timeout: 268 seconds]
JoshS has quit [Ping timeout: 250 seconds]
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
mostlybadfly has quit [Quit: Connection closed for inactivity]
dbz has joined #ruby
dbz has quit [Remote host closed the connection]
epochwolf has joined #ruby
JoshS has joined #ruby
grenierm_ has joined #ruby
planigan has quit [Ping timeout: 244 seconds]
themsay has quit [Ping timeout: 250 seconds]
cnsvc_ has joined #ruby
conta has quit [Quit: conta]
Guest49234 has joined #ruby
ua has quit [Quit: Leaving]
heydonovan has joined #ruby
Guest78161 has quit [Ping timeout: 252 seconds]
keden has quit [Quit: WeeChat 2.3]
JoshS has quit [Quit: Leaving]
themsay has joined #ruby
planigan has joined #ruby
Guest49234 has quit [Ping timeout: 244 seconds]
themsay has quit [Ping timeout: 246 seconds]
prestori_ has joined #ruby
RougeR has joined #ruby
prestori_ has quit [Client Quit]
nchambers has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
heydonovan has quit [Quit: WeeChat 2.3]
prestorium has quit [Ping timeout: 250 seconds]
cnsvc_ has quit [Ping timeout: 256 seconds]
postmodern has quit [Quit: Leaving]
marz_d`ghostman has joined #ruby
<marz_d`ghostman> Why am I getting a ruby_executable_hooks: end of file reached (EOFError) when sending emails? https://gist.github.com/marzdgzmn/614969af17f74b3f6fdc2422d7c4cfae
hiroaki has joined #ruby
ua has joined #ruby
bmurt has quit [Ping timeout: 268 seconds]
themsay has joined #ruby
m0w has joined #ruby
<marz_d`ghostman> I have created two ruby files under /config/initializers. How do I run one when I'm testing and the other when I'm not testing?
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
hiroaki has quit [Ping timeout: 252 seconds]
r29v has joined #ruby
nchambers has quit [Ping timeout: 250 seconds]
orbyt_ has joined #ruby
mikecmpbll has joined #ruby
code_zombie has joined #ruby
cnsvc_ has joined #ruby
Exuma has joined #ruby
bmurt has joined #ruby
sauvin has quit [Remote host closed the connection]
hiroaki has joined #ruby
<jordanm> marz_d`ghostman: you can check Rails.env.test? in your initializer
<marz_d`ghostman> jordanm: I'm not using Rails though
<jordanm> what are you using that is loading config/initializers?
<marz_d`ghostman> under /lib I have my main ruby file say main.rb then I require the initializer file under project/config/initializers/production.rb via require File.join(__dir__, '../../config/initializers/production) in main.rb
dellavg_ has joined #ruby
<marz_d`ghostman> the production.rb has this require line for Foo::Bar::Configuration but it doesn't seem to be able to find it though
darkhanb has joined #ruby
<marz_d`ghostman> it says cannot load such file -- foo/bar/configuration
hiroaki has quit [Ping timeout: 250 seconds]
impermanence46 has quit [Ping timeout: 245 seconds]
Pisuke has quit [Ping timeout: 250 seconds]
<marz_d`ghostman> Ohhh, I may need to add it to load_path
Pisuke has joined #ruby
themsay has quit [Ping timeout: 268 seconds]
hutch has joined #ruby
mostlybadfly has joined #ruby
zapata_ is now known as zapata
nchambers has joined #ruby
postmodern has joined #ruby
justinmrkva has joined #ruby
<twobitsprite> phaul: sorry, got pulled away... So, I'm just trying to understand the syntax/semantics... if I do << lines = File.readlines(__dir__ + "/modules.txt") >> I get an array of lines, with newlines, like I expect
<twobitsprite> phaul: but then if I do << lines.each { |line| line.strip } >> I still get lines with newlines at the end... I expected an array of stripped lines... so I guess that's where my misunderstanding is.
<phaul> twobitsprite: bascially what I said meant that .each returns the array unmodified
stooj has quit [Quit: ZNC 1.7.0 - https://znc.in]
<twobitsprite> phaul: ahh, ok, so I need .map?
stooj has joined #ruby
<phaul> yes
<twobitsprite> phaul: so, .each is purely for side-effect?
<phaul> yes
<twobitsprite> cool, thanks
<phaul> yw
Tharbakim has quit [Ping timeout: 252 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
Dbugger has joined #ruby
samort7 has joined #ruby
za1b1tsu has joined #ruby
conta has joined #ruby
akem__ has joined #ruby
akem has quit [Ping timeout: 244 seconds]
Arkantos has joined #ruby
dellavg_ has quit [Ping timeout: 244 seconds]
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Nicmavr has joined #ruby
hutch has quit [Ping timeout: 244 seconds]
nchambers has quit [Remote host closed the connection]
elphe has joined #ruby
Arkantos has joined #ruby
gnufied has quit [Quit: Leaving]
themsay has joined #ruby
ixti has joined #ruby
conta has quit [Quit: conta]
lunarkitty7 has quit [Ping timeout: 252 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
Sembei has joined #ruby
Pisuke has quit [Ping timeout: 250 seconds]
lxsameer has joined #ruby
<ua> >Warning, new version of rvm available '1.29.6', you are using older version '1.29.7'.
<ua> lol
orbyt_ has joined #ruby
<havenwood> ua: When a project is written in tens of thousands of lines of shell... the versions sometimes start going backwards.
<havenwood> ¯\_(ツ)_/¯
alan_w has quit [Quit: WeeChat 2.3]
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch has joined #ruby
bjpenn has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
hutch has quit [Ping timeout: 244 seconds]
reber has quit [Remote host closed the connection]
prestorium has joined #ruby
gix has joined #ruby
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Dbugger has quit [Remote host closed the connection]
AndBobsYourUncle has quit [Ping timeout: 246 seconds]
hahuang6- has joined #ruby
hahuang65 has quit [Ping timeout: 268 seconds]
elcontrastador has joined #ruby
hutch has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
akem__ has quit [Quit: Leaving]
dbz has joined #ruby
themsay has quit [Ping timeout: 240 seconds]
themsay has joined #ruby
nahra has quit [Read error: Connection reset by peer]
<Eiam> reminds me of all the people using ruby to parse version strings in macOS and getting that 10.10 was less than 10.9
nahra has joined #ruby
m0w has quit [Ping timeout: 272 seconds]
themsay has quit [Ping timeout: 268 seconds]
themsay has joined #ruby
jcalla has quit [Remote host closed the connection]
themsay has quit [Ping timeout: 246 seconds]
<havenwood> Eiam: It's kinda baffling how hard it is to do on BSD/macOS.
<havenwood> Eiam: GNU `sort` is nice with its -g, --general-numeric-sort
agent_white has joined #ruby
<havenwood> Eiam: I end up doing monstrosities like: sort -t "." -k "1,1" -k "2,2n" -k "3,3n" -k "4,4n"
mostlybadfly has quit [Quit: Connection closed for inactivity]
<havenwood> Eiam: Reminds me of this PR: https://github.com/postmodern/chruby/pull/278
prestorium has quit [Quit: prestorium]
grenierm_ has quit [Quit: Page closed]
dbz has quit [Remote host closed the connection]
go|dfish has quit [Ping timeout: 250 seconds]
\void has joined #ruby
m0w has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
tiff has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
nchambers has joined #ruby
themsay has joined #ruby
maetthew has joined #ruby
jottr has joined #ruby
themsay has quit [Ping timeout: 245 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 245 seconds]
polishdub has quit [Quit: leaving]
themsay has joined #ruby
s3nd1v0g1us has joined #ruby
themsay has quit [Ping timeout: 268 seconds]
themsay has joined #ruby
twobitsprite has quit [Ping timeout: 250 seconds]
Xenosine has joined #ruby
ricer2 has quit [Remote host closed the connection]
RougeR has quit [Ping timeout: 250 seconds]
cthulchu has quit [Read error: Connection reset by peer]
RougeR has joined #ruby
cthulchu has joined #ruby
jottr has joined #ruby
hutch has quit [Ping timeout: 245 seconds]
go|dfish has joined #ruby
ellcs has joined #ruby
cd has quit [Ping timeout: 256 seconds]
spacesuitdiver has quit [Ping timeout: 250 seconds]
stooj has quit [Quit: ZNC 1.7.0 - https://znc.in]
stooj has joined #ruby
cd has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
s3nd1v0g1us has quit [Ping timeout: 250 seconds]
jsrtr has joined #ruby
<jsrtr> Hi
za1b1tsu has quit [Ping timeout: 250 seconds]
<jsrtr> I have to generate a hash for a rake task which looks like { "1" => 8, "2" => 16, ... }
<jsrtr> Is there some way to do that using a loop in line so the result is a constant?
<jsrtr> Oh hi @ixti
<havenwood> ua: It was a yak shave, but fixed. Just waiting on CI and a review to merge: https://github.com/rvm/rvm/pull/4539
<havenwood> jsrtr: How high do you want to go?
<havenwood> jsrtr: What's the third pair value? 24 or 32?
<jsrtr> 32
regedit has quit [Quit: Connection closed for inactivity]
<jsrtr> So the first kvp would be "1" => 8 and the last would be "32" => 256
<jsrtr> The third would be 24
<jsrtr> "3" => 24
RougeR has quit [Ping timeout: 245 seconds]
<jsrtr> Oh wait, you can pass a proc to the Hash constructor and it will call it when the hash is evaluated? O_o
<ixti> jsrtr: it's not called when evaluated
<ixti> It's default value proc
segy has quit [Quit: ZNC - http://znc.in]
<havenwood> jsrtr: Yes, you can vivify. For example:
<havenwood> &>> jsrtr = Hash.new { |h, k| h[k] = k.to_i * 8 }; jsrtr['32']
<rubydoc> # => 256 (https://carc.in/#/r/5u1i)
<havenwood> #=> 256
<ixti> `Hash.new { 42 }[:xxx] # => 42`
<havenwood> &>> 1.upto(32).map { |n| [n.to_s, n * 8] }.to_h # jsrtr
<rubydoc> # => {"1"=>8, "2"=>16, "3"=>24, "4"=>32, "5"=>40, "6"=>48, "7"=>56, "8"=>64, "9"=>72, "10"=>80, "11"=>88, ...check link for more (https://carc.in/#/r/5u1j)
<ixti> havenwood: from description above at the end he needs to freeze
<jsrtr> Well, I guess it doesn't have to be a constant
<jsrtr> It's just a little rake task, no need to be that efficient
<havenwood> ixti: JSRTR = Hash.new { |h, k| h[k] = k.to_i * 8 }.freeze
<havenwood> ixti: it actually does work frozen
<jsrtr> Huh
<havenwood> not that i'd do it
<ixti> `1.upto(32)` IMO is probably the best option
<havenwood> in 2.6, there's a slightly nicer version:
<havenwood> 1.upto(32).to_h { |n| [n.to_s, n * 8] }
<ixti> havenwood: it won't work forzen
<jsrtr> we're on 2.4
<ixti> *frzen
<havenwood> ixti: ah, yeah - you're right
<Eiam> havenwood: or just call the appkit API? =)
<havenwood> jsrtr: Or: Array.new(32) { |n| [n.succ.to_s, n.succ * 8] }.to_h
<ixti> IMO `1.upto(32).map { |i| [i.to_s, i * 8] }.to_h.freeze` looks cleaner
<havenwood> jsrtr: Or: 32.times.with_object({}) { |n, h| h[n.succ.to_s] = n.succ * 8 }
<havenwood> ixti: Yeah, that's what I'd do too.
segy has joined #ruby
<ixti> or: `1.upto(32).with_object({}) { |i, o| o[i.to_s] = i * 8 }.freeze` :D
<havenwood> ixti: I like the 2.6 way best. :)
<ixti> havenwood: no doubts, me too. I was actually going to add a shim for meself ;))
raulp has quit [Quit: raulp]
<ixti> `FutureIsUnwritten` module with refinements ;))
cnsvc_ has quit [Ping timeout: 256 seconds]
<jsrtr> I'm not clear on why to_h has to be used, but ok
<jsrtr> I guess the concept of a key-value pair doesn't exist outside the context of having a hash to contain it?
s3nd1v0g1us has joined #ruby
<havenwood> jsrtr: The new #to_h will create a Hash from a block. If you want to use an intermediary Array of pairs, the current #to_h is handy.
nchambers is now known as uplime
RougeR has joined #ruby
spacesuitdiver has joined #ruby
isene has joined #ruby
jottr has joined #ruby
ansraliant has quit [Quit: My planet needs me]
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<isene> Upgrade from 18.04 to 18.10: Now when I do "require 'fileutils'" I get "false". How do I fix this (a 2.5 issue?)?
<isene> (Ubuntu that is)