00:00
Arkantos has joined #ruby
00:00
blackmesa has quit [Quit: WeeChat 2.3]
00:01
Arkantos has quit [Client Quit]
00:01
Arkantos has joined #ruby
00:02
ellcs has quit [Ping timeout: 250 seconds]
00:02
Arkantos has quit [Client Quit]
00:03
Arkantos has joined #ruby
00:03
hutch has joined #ruby
00:04
nowhere_man has quit [Ping timeout: 252 seconds]
00:04
JoshS has joined #ruby
00:04
Arkantos has quit [Client Quit]
00:04
Arkantos has joined #ruby
00:07
mikecmpbll has quit [Quit: inabit. zz.]
00:08
uplime has joined #ruby
00:08
nowhere_man has joined #ruby
00:10
uplime is now known as Rudolph
00:14
hutch has quit [Ping timeout: 240 seconds]
00:15
elphe has quit [Ping timeout: 240 seconds]
00:18
blackmesa has joined #ruby
00:23
nchambers has quit [Ping timeout: 246 seconds]
00:24
dbz_ has joined #ruby
00:25
cnsvc_ has joined #ruby
00:27
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:27
dbz has quit [Ping timeout: 244 seconds]
00:28
dbz_ has quit [Ping timeout: 244 seconds]
00:29
krawchyk has quit [Quit: krawchyk]
00:29
davidw has quit [Ping timeout: 250 seconds]
00:36
hutch has joined #ruby
00:38
blackmesa has quit [Ping timeout: 252 seconds]
00:43
evdubs has quit [Remote host closed the connection]
00:43
jthomas1 has quit [Ping timeout: 240 seconds]
00:43
evdubs has joined #ruby
00:47
SeepingN has quit [Ping timeout: 250 seconds]
00:51
m0w has quit [Remote host closed the connection]
00:54
jthomas1 has joined #ruby
00:54
m0w has joined #ruby
00:54
kapil____ has joined #ruby
00:56
Renich has joined #ruby
00:57
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
00:58
Exuma has joined #ruby
01:00
orbyt_ has joined #ruby
01:02
jthomas1 has quit [Ping timeout: 246 seconds]
01:03
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:03
elphe has joined #ruby
01:03
ixti has joined #ruby
01:03
ixti has quit [Client Quit]
01:04
<
havenwood >
cah, oh - they left :(
01:05
<
havenwood >
&>> 0.1.yield_self.to_a.pack(?g).unpack1('B*')
01:06
* havenwood
does a binary solo
01:07
hutch has quit [Ping timeout: 245 seconds]
01:09
blackmesa has joined #ruby
01:09
GinoMan2440 has quit [Read error: Connection reset by peer]
01:10
Exuma has joined #ruby
01:17
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:18
tiff has joined #ruby
01:18
Exuma has joined #ruby
01:19
rem_ has joined #ruby
01:21
Arkantos has joined #ruby
01:21
tiff has quit [Client Quit]
01:21
rem_ has quit [Client Quit]
01:23
tiff has joined #ruby
01:28
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:31
elphe has quit [Quit: leaving]
01:31
elphe has joined #ruby
01:33
cnsvc_ has quit [Ping timeout: 256 seconds]
01:38
bmurt has joined #ruby
01:40
cnsvc_ has joined #ruby
01:49
haylon has joined #ruby
01:53
cnsvc_ has quit [Ping timeout: 256 seconds]
01:53
haylon has quit [Ping timeout: 250 seconds]
01:54
AJA4350 has quit [Remote host closed the connection]
01:57
AJA4350 has joined #ruby
02:01
lucasb has quit [Quit: Connection closed for inactivity]
02:04
tenchi4615 has quit [Remote host closed the connection]
02:05
dviola has quit [Quit: WeeChat 2.3]
02:07
cnsvc_ has joined #ruby
02:07
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:16
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:20
Exuma has joined #ruby
02:23
nine_milli has joined #ruby
02:23
nine_milli was kicked from #ruby by ChanServ [User is banned from this channel]
02:24
cnsvc_ has quit [Remote host closed the connection]
02:25
cnsvc_ has joined #ruby
02:27
eminencehc has joined #ruby
02:28
tiff has joined #ruby
02:29
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:34
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:35
Arkantos has joined #ruby
02:36
eminencehc has quit [Remote host closed the connection]
02:38
tiff has joined #ruby
02:40
tiff has quit [Client Quit]
02:40
tiff has joined #ruby
02:44
iovis has joined #ruby
02:52
AJA4350 has quit [Quit: AJA4350]
02:54
Exuma has joined #ruby
02:55
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:56
tiff has joined #ruby
02:57
tiff has quit [Client Quit]
02:58
nowhere_man has quit [Ping timeout: 252 seconds]
02:58
nowhereman has joined #ruby
02:59
nowhereman is now known as Guest78161
02:59
tiff has joined #ruby
02:59
akem has quit [Ping timeout: 272 seconds]
02:59
jthomas1 has joined #ruby
03:01
akem has joined #ruby
03:01
blackmesa has quit [Ping timeout: 250 seconds]
03:04
jthomas1 has quit [Ping timeout: 272 seconds]
03:06
powerbit has quit [Read error: Connection reset by peer]
03:07
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:10
tau has joined #ruby
03:22
Renich has quit [Quit: Renich]
03:23
tiff has joined #ruby
03:26
gnufied has quit [Quit: Leaving]
03:36
dbz has joined #ruby
03:43
cnsvc_ has quit [Ping timeout: 256 seconds]
03:43
dbz has quit [Ping timeout: 250 seconds]
03:49
Inside has quit [Disconnected by services]
03:51
Azure has joined #ruby
03:52
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:56
haylon has joined #ruby
03:57
Exuma has joined #ruby
04:00
haylon has quit [Ping timeout: 250 seconds]
04:02
Exuma has quit [Client Quit]
04:03
dinfuehr has quit [Ping timeout: 272 seconds]
04:03
dinfuehr has joined #ruby
04:05
braincrash has quit [Quit: bye bye]
04:06
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
04:10
braincrash has joined #ruby
04:16
cnsvc_ has joined #ruby
04:16
roshanavand has quit [Ping timeout: 250 seconds]
04:19
roshanavand has joined #ruby
04:24
Freshnuts has joined #ruby
04:35
cnsvc_ has quit [Remote host closed the connection]
04:36
cnsvc_ has joined #ruby
04:39
code_zombie has joined #ruby
04:39
dbz has joined #ruby
04:41
dbz has quit [Remote host closed the connection]
04:42
dbz has joined #ruby
04:42
cd has quit [Quit: cd]
04:42
tau has quit [Remote host closed the connection]
04:48
sauvin has joined #ruby
04:48
roshanavand has quit [Remote host closed the connection]
04:51
AndBobsYourUncle has joined #ruby
04:51
Exuma has joined #ruby
05:05
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:07
roshanavand has joined #ruby
05:09
davidw has joined #ruby
05:12
kapil____ has quit [Quit: Connection closed for inactivity]
05:15
dbz has quit [Remote host closed the connection]
05:15
dbz has joined #ruby
05:15
Fusl has quit [Remote host closed the connection]
05:17
Fusl has joined #ruby
05:17
dbz has quit [Read error: Connection reset by peer]
05:18
dbz has joined #ruby
05:32
roshanavand has quit [Remote host closed the connection]
05:33
roshanavand has joined #ruby
05:33
dbz has quit [Remote host closed the connection]
05:35
paranoicsan has joined #ruby
05:38
dbz has joined #ruby
05:39
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:44
d10n-work has quit [Quit: Connection closed for inactivity]
05:48
code_zombie has quit [Quit: Leaving]
05:56
dellavg_ has quit [Ping timeout: 250 seconds]
05:58
jthomas1 has joined #ruby
06:00
klaas has joined #ruby
06:03
jthomas1 has quit [Ping timeout: 272 seconds]
06:05
davidw has quit [Ping timeout: 250 seconds]
06:10
venmx has joined #ruby
06:12
coderphive has quit [Read error: Connection reset by peer]
06:17
venmx_ has joined #ruby
06:28
impermanence has quit [Ping timeout: 268 seconds]
06:30
roshanavand has quit [Remote host closed the connection]
06:30
roshanavand has joined #ruby
06:37
endemic has quit [Ping timeout: 250 seconds]
06:39
endemic has joined #ruby
06:42
stooj has joined #ruby
06:45
Inline has quit [Quit: Leaving]
06:47
coderphive has joined #ruby
06:51
rippa has joined #ruby
06:54
pwnd_nsfw has quit [Ping timeout: 245 seconds]
06:56
clemens3_ has joined #ruby
06:58
za1b1tsu has joined #ruby
06:59
s3nd1v0g1us has joined #ruby
07:00
aupadhye has joined #ruby
07:00
s3nd1v0g1us has quit [Client Quit]
07:01
venmx has quit [Ping timeout: 246 seconds]
07:01
venmx_ has quit [Ping timeout: 250 seconds]
07:08
neuraload has joined #ruby
07:12
paranoicsan has quit [Quit: paranoicsan]
07:12
kapil____ has joined #ruby
07:18
clemens3_ has quit [Ping timeout: 244 seconds]
07:20
neuraload has quit [Remote host closed the connection]
07:25
tiff has joined #ruby
07:27
Furai has quit [Quit: WeeChat 2.3]
07:29
tiff has quit [Client Quit]
07:30
ansraliant has joined #ruby
07:31
cats has quit [Ping timeout: 268 seconds]
07:33
cnsvc_ has quit [Ping timeout: 256 seconds]
07:40
conta has joined #ruby
07:41
cats has joined #ruby
07:42
coderphive6 has joined #ruby
07:42
coderphive has quit [Quit: coderphive]
07:42
coderphive6 has quit [Client Quit]
07:42
coderphive has joined #ruby
07:48
Furai has joined #ruby
07:56
blackmesa has joined #ruby
07:59
cnsvc_ has joined #ruby
08:02
bathtub_shark has quit [Quit: WeeChat 2.2]
08:05
Zarthus has quit [Ping timeout: 252 seconds]
08:07
dbz has quit [Remote host closed the connection]
08:09
marz_d`ghostman has joined #ruby
08:10
\void has quit [Quit: So long, and thanks for all the fish.]
08:18
Zarthus has joined #ruby
08:21
blackmesa has quit [Ping timeout: 250 seconds]
08:21
dviola has joined #ruby
08:43
m0w has quit [Ping timeout: 250 seconds]
08:45
cnsvc_ has quit [Ping timeout: 256 seconds]
08:45
akem has quit [Ping timeout: 268 seconds]
08:48
conta has quit [Ping timeout: 244 seconds]
08:57
akem has joined #ruby
09:00
keden has joined #ruby
09:06
m0w has joined #ruby
09:06
akem has quit [Ping timeout: 244 seconds]
09:09
mikecmpbll has joined #ruby
09:10
powerbit has joined #ruby
09:10
powerbit has quit [Excess Flood]
09:11
m0w has quit [Max SendQ exceeded]
09:11
m0w has joined #ruby
09:12
paranoicsan has joined #ruby
09:15
cnsvc_ has joined #ruby
09:15
dionysus69 has quit [Ping timeout: 272 seconds]
09:16
powerbit has joined #ruby
09:18
dionysus69 has joined #ruby
09:19
Freshnuts has quit [Quit: Leaving]
09:21
akem has joined #ruby
09:21
jottr has quit [Ping timeout: 268 seconds]
09:22
cnsvc_ has quit [Ping timeout: 256 seconds]
09:43
Guest49234 has joined #ruby
09:46
Guest78161 has quit [Ping timeout: 250 seconds]
09:49
venmx has joined #ruby
09:49
venmx_ has joined #ruby
09:53
cnsvc_ has joined #ruby
09:53
prestorium has joined #ruby
09:59
jthomas1 has joined #ruby
10:01
jottr has joined #ruby
10:03
jthomas1 has quit [Ping timeout: 250 seconds]
10:19
Guest78161 has joined #ruby
10:26
Guest78161 has quit [Ping timeout: 252 seconds]
10:30
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:32
mikecmpb_ has joined #ruby
10:33
Arkantos has quit [Read error: Connection reset by peer]
10:34
mikecmpbll has quit [Ping timeout: 250 seconds]
10:34
dviola has quit [Quit: WeeChat 2.3]
10:36
Exagone313 has quit [Ping timeout: 245 seconds]
10:39
paranoicsan is now known as paranoicsan[Away
10:39
paranoicsan[Away has quit [Quit: paranoicsan[Away]
10:39
Exagone313 has joined #ruby
10:44
cnsvc_ has quit [Ping timeout: 256 seconds]
10:45
paranoicsan has joined #ruby
10:46
phaul has joined #ruby
10:48
coderphive has quit [Ping timeout: 244 seconds]
10:49
coderphive has joined #ruby
10:53
saTchymoto has joined #ruby
10:56
m0w has quit [Remote host closed the connection]
11:14
venmx_ has quit [Quit: leaving]
11:15
venmx has quit [Quit: leaving]
11:15
venmx has joined #ruby
11:17
mikecmpb_ has quit [Quit: inabit. zz.]
11:19
mikecmpbll has joined #ruby
11:21
<
alxd >
Is there any Ruby OpenAPI / Swagger gem which works as well as Django REST Swagger?
11:21
Guest78161 has joined #ruby
11:23
<
alxd >
s/view/endpoint/
11:30
lambarena has quit [Quit: Ping timeout (120 seconds)]
11:31
lambarena has joined #ruby
11:35
keden has quit [Ping timeout: 244 seconds]
11:39
paranoicsan is now known as paranoicsan[Away
11:40
RougeR has joined #ruby
11:47
paranoicsan[Away has quit [Quit: paranoicsan[Away]
11:48
Guest78161 has quit [Ping timeout: 252 seconds]
11:48
hdabrows has quit []
11:54
paranoicsan has joined #ruby
11:58
yokel has quit [Remote host closed the connection]
12:00
lypsis has joined #ruby
12:00
yokel has joined #ruby
12:05
keden has joined #ruby
12:06
lypsis has joined #ruby
12:07
lypsis has quit [Client Quit]
12:09
keden has quit [Ping timeout: 246 seconds]
12:11
dbz has joined #ruby
12:12
RougeRR has joined #ruby
12:14
RougeR has quit [Ping timeout: 244 seconds]
12:15
lypsis has joined #ruby
12:15
dbz has quit [Ping timeout: 244 seconds]
12:16
lypsis has quit [Client Quit]
12:17
lypsis has joined #ruby
12:19
lucasb has joined #ruby
12:26
keden has joined #ruby
12:30
keden has quit [Ping timeout: 250 seconds]
12:31
Guest49234 has quit [Ping timeout: 250 seconds]
12:33
Guest78161 has joined #ruby
12:34
Guest49234 has joined #ruby
12:36
sylario has joined #ruby
12:37
RougeRR has quit [Ping timeout: 244 seconds]
12:38
m0w has joined #ruby
12:40
Guest49234 has quit [Ping timeout: 268 seconds]
12:41
cnsvc_ has joined #ruby
12:46
keden has joined #ruby
12:55
Guest78161 has quit [Ping timeout: 252 seconds]
12:55
Guest49234 has joined #ruby
12:56
m0w has quit [Remote host closed the connection]
12:57
mostlybadfly has joined #ruby
12:58
m0w has joined #ruby
12:59
jthomas1 has joined #ruby
13:01
Guest49234 has quit [Ping timeout: 268 seconds]
13:04
jthomas1 has quit [Ping timeout: 268 seconds]
13:11
saTchymoto has quit [Ping timeout: 250 seconds]
13:12
roshanavand has quit [Remote host closed the connection]
13:12
saTchymoto has joined #ruby
13:15
roshanavand has joined #ruby
13:19
Guest78161 has joined #ruby
13:26
Zarthus_ has joined #ruby
13:30
Zarthus has quit [Ping timeout: 272 seconds]
13:30
Zarthus_ is now known as Zarthus
13:32
bathtub_shark has joined #ruby
13:37
eminencehc has joined #ruby
13:37
elphe has quit [Ping timeout: 250 seconds]
13:39
cd has joined #ruby
13:42
Rudolph has quit [Quit: WeeChat 2.2]
13:45
AJA4350 has joined #ruby
13:46
tjarvis has joined #ruby
13:47
Guest49234 has joined #ruby
13:57
Guest49234 has quit [Ping timeout: 246 seconds]
13:57
bmurt has joined #ruby
14:04
alan_w has joined #ruby
14:09
ixti has joined #ruby
14:14
regedit has joined #ruby
14:17
Guest78161 has quit [Ping timeout: 252 seconds]
14:17
paranoicsan has quit [Quit: paranoicsan]
14:23
paranoicsan has joined #ruby
14:27
Guest49234 has joined #ruby
14:31
haylon has joined #ruby
14:32
Guest49234 has quit [Ping timeout: 245 seconds]
14:32
reber has joined #ruby
14:33
saTchymoto has quit [Ping timeout: 272 seconds]
14:34
haylon has quit [Remote host closed the connection]
14:39
ellcs has joined #ruby
14:41
d10n-work has joined #ruby
14:42
jgpawletko has joined #ruby
14:45
akaiiro has quit [Quit: Ping timeout (120 seconds)]
14:46
akaiiro has joined #ruby
14:46
krawchyk has joined #ruby
14:48
Guest78161 has joined #ruby
14:50
Inline has joined #ruby
14:52
ellcs has quit [Ping timeout: 250 seconds]
14:57
catphish has joined #ruby
14:57
<
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
14:57
<
catphish >
which is correct? has this behaviour changed?
14:58
<
jhass >
I think it does different things on different platforms
14:59
<
catphish >
oh, i'm quite certain it changes the cmdline on linux, the documentation was on OSX
14:59
<
jhass >
best effort basically
14:59
<
catphish >
jhass: yeah you're right, thanks
14:59
<
catphish >
i'm quite happy with the cmdline behaviour, it shows up in process lists and isn't truncated as process names are
15:05
za1b1tsu has quit [Ping timeout: 250 seconds]
15:10
paranoicsan has quit [Quit: paranoicsan]
15:11
aupadhye has quit [Ping timeout: 268 seconds]
15:14
ixti has quit [Quit: WeeChat 2.3]
15:15
armyriad has quit [Read error: Connection reset by peer]
15:15
armyriad has joined #ruby
15:16
ixti has joined #ruby
15:23
twobitsprite has joined #ruby
15:25
<
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
15:25
<
twobitsprite >
sorry << Find.find("mydir") { |path| ... } >>
15:25
<
jhass >
mostly style
15:25
<
jhass >
there's a technical differencence in precedence
15:25
<
twobitsprite >
jhass: ok, but the behavior is identical?
15:26
<
jhass >
foo bar do x end; # foo will receive the block
15:26
<
jhass >
foo bar { x }; # bar will receive the block
15:27
<
jhass >
but most people follow do/end for multiline, { / } for single line
15:27
<
twobitsprite >
Can you use parenthesis to affect that? I.e: foo (bar do x end)
15:28
<
twobitsprite >
cool... thanks :)
15:29
<
twobitsprite >
interesting
15:35
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
15:41
krawchyk has quit [Quit: krawchyk]
15:42
ixti has quit [Read error: Connection timed out]
15:43
ixti has joined #ruby
15:44
Emmanuel_Chanel has joined #ruby
15:45
tjmcginnis has joined #ruby
15:47
jsc has joined #ruby
15:47
jsc is now known as status402
15:48
NL3limin4t0r has joined #ruby
15:49
tjarvis has quit [Quit: WeeChat 2.3]
15:50
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
15:51
jthomas1 has joined #ruby
15:54
krawchyk has joined #ruby
15:58
davidw has joined #ruby
15:59
impermanence has joined #ruby
16:00
cnsvc_ has quit [Ping timeout: 256 seconds]
16:01
krawchyk_ has joined #ruby
16:02
zapata_ has joined #ruby
16:03
krawchyk has quit [Ping timeout: 250 seconds]
16:04
zapata has quit [Ping timeout: 252 seconds]
16:04
davidw has quit [Ping timeout: 246 seconds]
16:07
status402 has quit [Read error: Connection reset by peer]
16:07
status402 has joined #ruby
16:12
krawchyk_ has quit [Quit: krawchyk_]
16:14
prestorium has quit [Read error: Connection reset by peer]
16:15
status402 has quit [Quit: status402]
16:15
prestorium has joined #ruby
16:17
marz_d`ghostman has quit [Ping timeout: 256 seconds]
16:19
spacesuitdiver has joined #ruby
16:20
ixti has quit [Quit: WeeChat 2.3]
16:21
krawchyk has joined #ruby
16:25
davidw has joined #ruby
16:28
Guest49234 has joined #ruby
16:30
akaiiro has quit [Ping timeout: 240 seconds]
16:30
conta has joined #ruby
16:30
akaiiro has joined #ruby
16:34
<
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:
16:34
<
twobitsprite >
--module_list = Hash[File.readlines(__dir__ + "/modules.txt").each { |line| [line.strip, 0] }]
16:34
<
twobitsprite >
(oops, ignore the -- at the beginning, that's my editor)
16:35
<
twobitsprite >
anyway, module_list just ends up getting set to the raw lines, including the \n
16:35
<
twobitsprite >
What I'm trying to get is a hash like {word1: 0, word2: 0} etc
16:36
catphish has left #ruby ["Leaving"]
16:37
Guest49234 has quit [Ping timeout: 245 seconds]
16:38
<
phaul >
twobitsprite: it's a each vs map misunderstanding
16:38
<
rubydoc >
I found 69 entries matching method each. Use &list each if you would like to see a list
16:38
krawchyk has quit [Quit: krawchyk]
16:38
<
phaul >
ffs rubydoc
16:38
<
phaul >
&ri Array#each
16:38
<
phaul >
&ri Array.map
16:38
<
rubydoc >
Found no entry that matches class Array class method map
16:39
<
phaul >
&ri Enumerable#map
16:48
impermanence46 has joined #ruby
16:49
impermanence has quit [Ping timeout: 250 seconds]
16:49
Emmanuel_Chanel has joined #ruby
16:50
cthulchu has quit [Read error: Connection reset by peer]
16:50
cthulchu has joined #ruby
16:54
polishdub has joined #ruby
16:57
gnufied has joined #ruby
17:04
m0w has quit [Ping timeout: 268 seconds]
17:05
JoshS has quit [Ping timeout: 250 seconds]
17:06
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
17:07
mostlybadfly has quit [Quit: Connection closed for inactivity]
17:10
dbz has joined #ruby
17:12
dbz has quit [Remote host closed the connection]
17:13
epochwolf has joined #ruby
17:14
JoshS has joined #ruby
17:16
grenierm_ has joined #ruby
17:16
planigan has quit [Ping timeout: 244 seconds]
17:16
themsay has quit [Ping timeout: 250 seconds]
17:18
cnsvc_ has joined #ruby
17:18
conta has quit [Quit: conta]
17:21
Guest49234 has joined #ruby
17:26
ua has quit [Quit: Leaving]
17:26
heydonovan has joined #ruby
17:27
Guest78161 has quit [Ping timeout: 252 seconds]
17:27
keden has quit [Quit: WeeChat 2.3]
17:28
JoshS has quit [Quit: Leaving]
17:29
themsay has joined #ruby
17:30
planigan has joined #ruby
17:30
Guest49234 has quit [Ping timeout: 244 seconds]
17:33
themsay has quit [Ping timeout: 246 seconds]
17:36
prestori_ has joined #ruby
17:36
RougeR has joined #ruby
17:36
prestori_ has quit [Client Quit]
17:37
nchambers has joined #ruby
17:37
venmx has quit [Ping timeout: 240 seconds]
17:37
mikecmpbll has quit [Quit: inabit. zz.]
17:38
heydonovan has quit [Quit: WeeChat 2.3]
17:38
prestorium has quit [Ping timeout: 250 seconds]
17:46
cnsvc_ has quit [Ping timeout: 256 seconds]
17:47
postmodern has quit [Quit: Leaving]
17:47
marz_d`ghostman has joined #ruby
18:02
hiroaki has joined #ruby
18:02
ua has joined #ruby
18:08
bmurt has quit [Ping timeout: 268 seconds]
18:09
themsay has joined #ruby
18:12
m0w has joined #ruby
18:12
<
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?
18:12
themsay has quit [Read error: Connection reset by peer]
18:13
themsay has joined #ruby
18:16
hiroaki has quit [Ping timeout: 252 seconds]
18:17
r29v has joined #ruby
18:17
nchambers has quit [Ping timeout: 250 seconds]
18:18
orbyt_ has joined #ruby
18:19
mikecmpbll has joined #ruby
18:19
code_zombie has joined #ruby
18:20
cnsvc_ has joined #ruby
18:21
Exuma has joined #ruby
18:22
bmurt has joined #ruby
18:23
sauvin has quit [Remote host closed the connection]
18:29
hiroaki has joined #ruby
18:29
<
jordanm >
marz_d`ghostman: you can check Rails.env.test? in your initializer
18:30
<
marz_d`ghostman >
jordanm: I'm not using Rails though
18:31
<
jordanm >
what are you using that is loading config/initializers?
18:32
<
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
18:32
dellavg_ has joined #ruby
18:33
<
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
18:33
darkhanb has joined #ruby
18:33
<
marz_d`ghostman >
it says cannot load such file -- foo/bar/configuration
18:33
hiroaki has quit [Ping timeout: 250 seconds]
18:34
impermanence46 has quit [Ping timeout: 245 seconds]
18:34
Pisuke has quit [Ping timeout: 250 seconds]
18:35
<
marz_d`ghostman >
Ohhh, I may need to add it to load_path
18:37
Pisuke has joined #ruby
18:42
themsay has quit [Ping timeout: 268 seconds]
18:43
hutch has joined #ruby
18:46
mostlybadfly has joined #ruby
18:53
zapata_ is now known as zapata
19:01
nchambers has joined #ruby
19:02
postmodern has joined #ruby
19:05
justinmrkva has joined #ruby
19:11
<
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
19:12
<
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.
19:12
<
phaul >
twobitsprite: bascially what I said meant that .each returns the array unmodified
19:12
<
twobitsprite >
phaul: ahh, ok, so I need .map?
19:12
stooj has joined #ruby
19:13
<
twobitsprite >
phaul: so, .each is purely for side-effect?
19:13
<
twobitsprite >
cool, thanks
19:14
Tharbakim has quit [Ping timeout: 252 seconds]
19:16
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:22
Dbugger has joined #ruby
19:22
samort7 has joined #ruby
19:25
za1b1tsu has joined #ruby
19:36
conta has joined #ruby
19:37
akem__ has joined #ruby
19:39
akem has quit [Ping timeout: 244 seconds]
19:39
Arkantos has joined #ruby
19:47
dellavg_ has quit [Ping timeout: 244 seconds]
19:49
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:53
Nicmavr has joined #ruby
19:56
hutch has quit [Ping timeout: 244 seconds]
19:56
nchambers has quit [Remote host closed the connection]
19:59
elphe has joined #ruby
19:59
Arkantos has joined #ruby
20:10
gnufied has quit [Quit: Leaving]
20:18
themsay has joined #ruby
20:19
ixti has joined #ruby
20:20
conta has quit [Quit: conta]
20:21
lunarkitty7 has quit [Ping timeout: 252 seconds]
20:24
Nicmavr has quit [Read error: Connection reset by peer]
20:24
Nicmavr has joined #ruby
20:27
Sembei has joined #ruby
20:27
Pisuke has quit [Ping timeout: 250 seconds]
20:37
lxsameer has joined #ruby
20:42
<
ua >
>Warning, new version of rvm available '1.29.6', you are using older version '1.29.7'.
20:44
orbyt_ has joined #ruby
20:44
<
havenwood >
ua: When a project is written in tens of thousands of lines of shell... the versions sometimes start going backwards.
20:45
<
havenwood >
¯\_(ツ)_/¯
20:52
alan_w has quit [Quit: WeeChat 2.3]
20:53
Arkantos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:00
hutch has joined #ruby
21:00
bjpenn has joined #ruby
21:02
roshanavand has quit [Remote host closed the connection]
21:06
roshanavand has joined #ruby
21:09
hutch has quit [Ping timeout: 244 seconds]
21:11
reber has quit [Remote host closed the connection]
21:12
prestorium has joined #ruby
21:20
gix has joined #ruby
21:24
Dbugger has quit [Remote host closed the connection]
21:25
AndBobsYourUncle has quit [Ping timeout: 246 seconds]
21:26
hahuang6- has joined #ruby
21:29
hahuang65 has quit [Ping timeout: 268 seconds]
21:31
elcontrastador has joined #ruby
21:31
hutch has joined #ruby
21:32
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
21:32
akem__ has quit [Quit: Leaving]
21:37
dbz has joined #ruby
21:41
themsay has quit [Ping timeout: 240 seconds]
21:48
themsay has joined #ruby
21:49
nahra has quit [Read error: Connection reset by peer]
21:49
<
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
21:49
nahra has joined #ruby
21:54
m0w has quit [Ping timeout: 272 seconds]
21:55
themsay has quit [Ping timeout: 268 seconds]
21:56
themsay has joined #ruby
22:00
jcalla has quit [Remote host closed the connection]
22:00
themsay has quit [Ping timeout: 246 seconds]
22:02
<
havenwood >
Eiam: It's kinda baffling how hard it is to do on BSD/macOS.
22:03
<
havenwood >
Eiam: GNU `sort` is nice with its -g, --general-numeric-sort
22:03
agent_white has joined #ruby
22:04
<
havenwood >
Eiam: I end up doing monstrosities like: sort -t "." -k "1,1" -k "2,2n" -k "3,3n" -k "4,4n"
22:05
mostlybadfly has quit [Quit: Connection closed for inactivity]
22:06
prestorium has quit [Quit: prestorium]
22:12
grenierm_ has quit [Quit: Page closed]
22:13
dbz has quit [Remote host closed the connection]
22:14
go|dfish has quit [Ping timeout: 250 seconds]
22:19
\void has joined #ruby
22:21
m0w has joined #ruby
22:22
kapil____ has quit [Quit: Connection closed for inactivity]
22:25
tiff has joined #ruby
22:27
jottr has quit [Ping timeout: 244 seconds]
22:32
nchambers has joined #ruby
22:34
themsay has joined #ruby
22:35
maetthew has joined #ruby
22:35
jottr has joined #ruby
22:38
themsay has quit [Ping timeout: 245 seconds]
22:40
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:40
jottr has quit [Ping timeout: 245 seconds]
22:42
polishdub has quit [Quit: leaving]
22:43
themsay has joined #ruby
22:46
s3nd1v0g1us has joined #ruby
22:48
themsay has quit [Ping timeout: 268 seconds]
22:49
themsay has joined #ruby
22:51
twobitsprite has quit [Ping timeout: 250 seconds]
22:56
Xenosine has joined #ruby
23:00
ricer2 has quit [Remote host closed the connection]
23:02
RougeR has quit [Ping timeout: 250 seconds]
23:05
cthulchu has quit [Read error: Connection reset by peer]
23:06
RougeR has joined #ruby
23:06
cthulchu has joined #ruby
23:06
jottr has joined #ruby
23:11
hutch has quit [Ping timeout: 245 seconds]
23:12
go|dfish has joined #ruby
23:18
ellcs has joined #ruby
23:20
cd has quit [Ping timeout: 256 seconds]
23:22
spacesuitdiver has quit [Ping timeout: 250 seconds]
23:24
stooj has joined #ruby
23:27
cd has joined #ruby
23:27
jottr has quit [Ping timeout: 246 seconds]
23:27
s3nd1v0g1us has quit [Ping timeout: 250 seconds]
23:29
jsrtr has joined #ruby
23:29
za1b1tsu has quit [Ping timeout: 250 seconds]
23:30
<
jsrtr >
I have to generate a hash for a rake task which looks like { "1" => 8, "2" => 16, ... }
23:30
<
jsrtr >
Is there some way to do that using a loop in line so the result is a constant?
23:31
<
jsrtr >
Oh hi @ixti
23:32
<
havenwood >
jsrtr: How high do you want to go?
23:34
<
havenwood >
jsrtr: What's the third pair value? 24 or 32?
23:34
regedit has quit [Quit: Connection closed for inactivity]
23:34
<
jsrtr >
So the first kvp would be "1" => 8 and the last would be "32" => 256
23:34
<
jsrtr >
The third would be 24
23:35
RougeR has quit [Ping timeout: 245 seconds]
23:35
<
jsrtr >
Oh wait, you can pass a proc to the Hash constructor and it will call it when the hash is evaluated? O_o
23:37
<
ixti >
jsrtr: it's not called when evaluated
23:37
<
ixti >
It's default value proc
23:38
<
havenwood >
jsrtr: Yes, you can vivify. For example:
23:38
<
havenwood >
&>> jsrtr = Hash.new { |h, k| h[k] = k.to_i * 8 }; jsrtr['32']
23:38
<
havenwood >
#=> 256
23:38
<
ixti >
`Hash.new { 42 }[:xxx] # => 42`
23:38
<
havenwood >
&>> 1.upto(32).map { |n| [n.to_s, n * 8] }.to_h # jsrtr
23:38
<
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 )
23:38
<
ixti >
havenwood: from description above at the end he needs to freeze
23:39
<
jsrtr >
Well, I guess it doesn't have to be a constant
23:39
<
jsrtr >
It's just a little rake task, no need to be that efficient
23:39
<
havenwood >
ixti: JSRTR = Hash.new { |h, k| h[k] = k.to_i * 8 }.freeze
23:39
<
havenwood >
ixti: it actually does work frozen
23:39
<
havenwood >
not that i'd do it
23:39
<
ixti >
`1.upto(32)` IMO is probably the best option
23:40
<
havenwood >
in 2.6, there's a slightly nicer version:
23:40
<
havenwood >
1.upto(32).to_h { |n| [n.to_s, n * 8] }
23:40
<
ixti >
havenwood: it won't work forzen
23:40
<
jsrtr >
we're on 2.4
23:40
<
havenwood >
ixti: ah, yeah - you're right
23:41
<
Eiam >
havenwood: or just call the appkit API? =)
23:42
<
havenwood >
jsrtr: Or: Array.new(32) { |n| [n.succ.to_s, n.succ * 8] }.to_h
23:42
<
ixti >
IMO `1.upto(32).map { |i| [i.to_s, i * 8] }.to_h.freeze` looks cleaner
23:42
<
havenwood >
jsrtr: Or: 32.times.with_object({}) { |n, h| h[n.succ.to_s] = n.succ * 8 }
23:42
<
havenwood >
ixti: Yeah, that's what I'd do too.
23:43
segy has joined #ruby
23:43
<
ixti >
or: `1.upto(32).with_object({}) { |i, o| o[i.to_s] = i * 8 }.freeze` :D
23:44
<
havenwood >
ixti: I like the 2.6 way best. :)
23:44
<
ixti >
havenwood: no doubts, me too. I was actually going to add a shim for meself ;))
23:45
raulp has quit [Quit: raulp]
23:46
<
ixti >
`FutureIsUnwritten` module with refinements ;))
23:48
cnsvc_ has quit [Ping timeout: 256 seconds]
23:49
<
jsrtr >
I'm not clear on why to_h has to be used, but ok
23:50
<
jsrtr >
I guess the concept of a key-value pair doesn't exist outside the context of having a hash to contain it?
23:51
s3nd1v0g1us has joined #ruby
23:52
<
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.
23:52
nchambers is now known as uplime
23:54
RougeR has joined #ruby
23:55
spacesuitdiver has joined #ruby
23:56
isene has joined #ruby
23:56
jottr has joined #ruby
23:56
ansraliant has quit [Quit: My planet needs me]
23:56
tiff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:57
<
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?)?
23:57
<
isene >
(Ubuntu that is)