« Back to channel list

#ruby - 12 July 2019

« Back 1 day Forward 1 day »
[00:04:37] involans: has joined #ruby
[00:05:11] queip: has joined #ruby
[00:06:30] skryking_: has joined #ruby
[00:10:26] envex: has joined #ruby
[00:17:41] lepepe: has joined #ruby
[00:18:14] lepepe_: has joined #ruby
[00:28:04] Dr_MDMA_MD: has joined #ruby
[00:34:35] involans: has joined #ruby
[00:40:05] xco: has joined #ruby
[00:46:28] AJA4351: has joined #ruby
[01:01:45] cornfeedhobo: has joined #ruby
[01:19:04] involans: has joined #ruby
[01:19:41] davorb: has joined #ruby
[01:30:13] Thenekofell: has joined #ruby
[01:31:47] colechristensen: has joined #ruby
[01:37:37] xco: has joined #ruby
[01:41:54] colechristensen: has joined #ruby
[01:50:15] jenrzzz: has joined #ruby
[01:54:59] Fusl: has joined #ruby
[01:58:35] Thenekofell: has joined #ruby
[02:07:47] dviola: has joined #ruby
[02:12:19] lepepe: has joined #ruby
[02:21:18] ElFerna: has joined #ruby
[02:21:57] Swyper: has joined #ruby
[02:27:31] DaRock: has joined #ruby
[02:35:05] lepepe_: has joined #ruby
[02:37:17] cornfeedhobo: has joined #ruby
[02:46:43] lepepe: has joined #ruby
[02:55:50] chalkmonster: has joined #ruby
[03:02:53] s3nd1v0g1us: has joined #ruby
[03:03:29] xco: has joined #ruby
[03:12:14] Swyper: has joined #ruby
[03:16:20] Dbugger: has joined #ruby
[03:19:00] jenrzzz: has joined #ruby
[03:22:29] lepepe: has joined #ruby
[03:30:07] xfbs: has joined #ruby
[03:30:10] jenrzzz: has joined #ruby
[03:48:14] s3nd1v0g1us: has joined #ruby
[03:50:03] peterson: has joined #ruby
[04:03:54] peterson: has joined #ruby
[04:08:49] Nicmavr: has joined #ruby
[04:18:23] DTZUZO: has joined #ruby
[04:26:59] evdubs: has joined #ruby
[04:30:29] jcalla: has joined #ruby
[04:34:01] jenrzzz: has joined #ruby
[04:36:10] houhoulis: has joined #ruby
[04:36:41] chalkmonster: has joined #ruby
[04:39:03] jenrzzz: has joined #ruby
[04:46:42] dellavg_: has joined #ruby
[05:06:14] jmcgnh: has joined #ruby
[05:12:21] chalkmonster: has joined #ruby
[05:12:41] t3hyoshi: has joined #ruby
[05:13:02] marvin81: has joined #ruby
[05:13:25] marvin81: has left #ruby: ()
[05:30:02] conta: has joined #ruby
[05:32:01] absolutejam: has joined #ruby
[05:36:50] Autolycus: has joined #ruby
[05:37:21] jenrzzz: has joined #ruby
[05:42:31] kyrylo: has joined #ruby
[05:45:15] conta: has joined #ruby
[05:49:33] ivanskie: has joined #ruby
[05:50:32] ivanskie: is anyone using ElastiCache Redis on aws with encryption at rest and in transit turned on?
[05:50:52] ivanskie: hmm i guess this is more of a rails question
[05:55:15] aither: has joined #ruby
[06:01:49] tdy: has joined #ruby
[06:03:15] johnny56: has joined #ruby
[06:16:22] DTZUZO: has joined #ruby
[06:17:31] SeepingN: has joined #ruby
[06:20:40] chalkmonster: has joined #ruby
[06:23:20] schne1der: has joined #ruby
[06:24:32] andikr: has joined #ruby
[06:27:16] queip: has joined #ruby
[06:27:50] kyrylo: has joined #ruby
[06:31:34] silviu: has joined #ruby
[06:33:29] jenrzzz: has joined #ruby
[06:38:25] jenrzzz: has joined #ruby
[06:40:20] olspookishmagus: has joined #ruby
[06:49:57] conta: has joined #ruby
[06:52:08] aupadhye: has joined #ruby
[06:53:25] snickers: has joined #ruby
[07:03:22] vondruch: has joined #ruby
[07:14:24] queip: has joined #ruby
[07:15:01] lxsameer: has joined #ruby
[07:18:22] Thenekofell: has joined #ruby
[07:20:03] absolutejam: has joined #ruby
[07:21:04] ascarter: has joined #ruby
[07:22:34] TomyWork: has joined #ruby
[07:24:42] m04ftKK: has joined #ruby
[07:25:05] m04ftKK: Why this doesn't works ruby -e '3.times { |n| exec("echo #{n}") }
[07:27:08] rubydoc: I found 2 entries matching method exec. Use &list exec if you would like to see a list
[07:27:36] phaul: ri Kernel#exec
[07:27:39] phaul: &ri Kernel#exec
[07:27:39] rubydoc: https://ruby-doc.org/core-2.6/Kernel.html#method-i-exec
[07:27:51] ytti: because exec works same as in shells
[07:27:55] ytti: it replaces the current running process
[07:28:10] ytti: if you do that in your bash or zsh or whatever, same thing happens
[07:28:44] ytti: use-case is some wrapper which is meant to do something and lauch some program with some arguments
[07:28:56] m04ftKK: This works ruby -e '3.times { |n| fork { exec("echo #{n}") }}'
[07:29:10] ytti: because it replaced the forked pid
[07:29:12] ytti: not the ruby pid
[07:29:51] ytti: you may want
[07:30:03] ytti: %x("command here")
[07:30:06] ytti: or system("command here")
[07:30:19] ytti: however, personally, I would always use popen3
[07:30:34] ytti: because shell interpretation usually is undesirable and dangerous
[07:30:48] ytti: and with popen3 you can pass name of executable and its arguments separately
[07:31:23] phaul: altough echo in this example is probably built in
[07:31:45] m04ftKK: has joined #ruby
[07:31:54] ytti: i think programmign languages like ruby, should make shell expansion the special case
[07:32:02] ytti: and system(bin, args) the common case
[07:32:07] ytti: so that it would be easy to code safe
[07:32:11] ytti: and hard to code unsafe
[07:32:40] ytti: now it's the converse, people code unsafe shell execution, because the safe way is bit more trouble and they are not aware of the implications
[07:34:08] phaul: I rarely use ruby as a shell script replacement so I almost never need to call external programs. Even when there is functionality I prefer a lib
[07:34:19] m04ftKK: ruby -e '3.times { |n| %x("echo #{n}") }'
[07:34:33] m04ftKK: sh: echo 0: command not found
[07:34:33] m04ftKK: sh: echo 1: command not found
[07:34:33] m04ftKK: sh: echo 2: command not found
[07:40:25] queip: has joined #ruby
[07:41:56] reber: has joined #ruby
[07:42:05] m04ftKK: has joined #ruby
[07:42:58] phaul: ruby -e '3.times { |n| puts %x("echo" "#{n}") }' # works
[07:46:50] Nitza: has joined #ruby
[07:46:56] deepredsky: has joined #ruby
[08:10:40] teclator: has joined #ruby
[08:16:57] conta: has joined #ruby
[08:20:13] BH23: has joined #ruby
[08:29:44] jenrzzz: has joined #ruby
[08:30:19] claudiuinberlin: has joined #ruby
[08:40:47] deepredsky: has joined #ruby
[08:47:28] jenrzzz: has joined #ruby
[08:57:58] jenrzzz: has joined #ruby
[09:02:25] chalkmonster: has joined #ruby
[09:04:15] c0ncealed4: has joined #ruby
[09:06:49] ivanskie: has joined #ruby
[09:08:45] ellcs: has joined #ruby
[09:09:51] jenrzzz: has joined #ruby
[09:17:42] chalkmonster: has joined #ruby
[09:21:11] tdy: has joined #ruby
[09:21:40] m04ftKK: has joined #ruby
[09:27:20] m04ftKK: has joined #ruby
[09:29:55] tdy: has joined #ruby
[09:33:26] manveru: %x still needs escaping, while `"" ""` may look like two separate strings, they actually become one
[09:34:54] manveru: >> "a" "b"
[09:34:59] ruby[bot]: manveru: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[09:36:42] rubydoc: # => "ab" (https://carc.in/#/r/77vi)
[09:37:23] manveru: guess that's not documented
[09:38:33] NL3limin4t0r: rubybot got recently some new sytax. I still have to figure out how to let rubybot point to documentation.
[09:39:43] m04ftKK: has joined #ruby
[09:40:33] NL3limin4t0r: The only thing that I don't understand is why use: puts %x("echo" "#{n}") instead of: puts %x(echo #{n})
[09:40:59] NL3limin4t0r: %x is comparable with %q
[09:41:36] NL3limin4t0r: &>> %("echo" "#{0}") # might not be a valid shell command
[09:41:37] rubydoc: # => "\"echo\" \"0\"" (https://carc.in/#/r/77vj)
[09:41:39] m04ftKK: has joined #ruby
[09:42:07] NL3limin4t0r: &>> %(echo #{0}) # is valid
[09:42:08] rubydoc: # => "echo 0" (https://carc.in/#/r/77vk)
[09:45:16] NL3limin4t0r: ACTION needs to restart his PC to finish up some system updates
[09:49:19] m04ftKK: has joined #ruby
[09:53:39] manveru: &>> %x(echo $3.50)
[09:53:41] rubydoc: # => "" (https://carc.in/#/r/77vm)
[09:54:56] conta: has joined #ruby
[10:01:06] Thenekofell: has joined #ruby
[10:02:30] NL3limin4t0r: has joined #ruby
[10:02:35] m04ftKK: has joined #ruby
[10:08:05] drnerdius: has joined #ruby
[10:08:47] dviola: has joined #ruby
[10:09:22] dviola: has joined #ruby
[10:09:31] m04ftKK: has joined #ruby
[10:15:06] m04ftKK: has joined #ruby
[10:18:00] drnerdius: Hello, everyone! My friend recommended to ask this question here. So, I was trying to programmatically fill a 3×3 2D array with numbers from 1 to 9, but for some reason, it fills in all 3 subarrays with last three numbers. Here's the code: ```a = Array.new(3, Array.new(3, 0)); a.each_with_index {|val, i| val.each_with_index {|_val, j| a[i][j] = 3 * i + j}}```. Then I tried to use a global variable to see what was really going on and print the variable
[10:18:02] drnerdius: values as it ran, but I got even more confused, because it prints everything as it shouls, but the resulting array is still wrong. Code: ```a = Array.new(3, Array.new(3, 0)); $n = 0; a.each_with_index {|_val, i| a[i].each_with_index {|_val, j| $n += 1; a[i][j] = $n; p "#{i}, #{j} - #{$n}"}}``` Is there a reason why this is happening? And what's the right way of doing this?
[10:23:46] jenrzzz: has joined #ruby
[10:28:15] m04ftKK: has joined #ruby
[10:31:53] r3m: has joined #ruby
[10:33:05] ruby[bot]: dionysus69: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[10:33:17] dionysus69: << ruby 1 + 2
[10:33:24] al2o3-cr: &>> (1..9).each_slice(3).to_a
[10:33:25] rubydoc: # => [[1, 2, 3], [4, 5, 6], [7, 8, 9]] (https://carc.in/#/r/77vq)
[10:33:36] rubydoc: # => "lol" (https://carc.in/#/r/77vr)
[10:33:59] dionysus69: drnerdius says thanks al2o3-cr
[10:34:43] d^sh: has joined #ruby
[10:35:36] queip: has joined #ruby
[10:38:25] manveru: &>> Array.new(3){|x| Array.new(3){|y| (x+1) * (y+1) }}
[10:38:26] rubydoc: # => [[1, 2, 3], [2, 4, 6], [3, 6, 9]] (https://carc.in/#/r/77vs)
[10:38:53] manveru: but not sure if that's what you expect as result... :)
[10:40:11] chalkmonster: has joined #ruby
[10:42:02] akem-lnvo: has joined #ruby
[10:51:08] drnerdius: al2o3-cr, manveru, thanks! A lot better, but any ideas what's wrong with my approach? Why is Ruby evaluating it like this?
[10:51:18] conta: has joined #ruby
[10:52:06] drnerdius: &>> a = Array.new(3, Array.new(3, 0)); a.each_with_index {|_val, i| a[i].each_with_index {|_val, j| a[i][j] = 3 * i + j}}
[10:52:07] rubydoc: # => [[6, 7, 8], [6, 7, 8], [6, 7, 8]] (https://carc.in/#/r/77vu)
[10:52:27] al2o3-cr: drnerdius: use the block form of Array.new
[10:53:21] al2o3-cr: &>> a = Array.new(3) { Array.new(3, 0) }; a.each_with_index {|_val, i| a[i].each_with_index {|_val, j| a[i][j] = 3 * i + j}}
[10:53:22] rubydoc: # => [[0, 1, 2], [3, 4, 5], [6, 7, 8]] (https://carc.in/#/r/77vz)
[10:53:27] drnerdius: al2o3-cr, I understand; I was just asking about the behaviour.
[10:54:07] jenrzzz: has joined #ruby
[10:54:22] AJA4350: has joined #ruby
[10:54:30] al2o3-cr: drnerdius: well, it uses the same references
[10:55:20] al2o3-cr: with the block form you're creating individual objects
[11:00:41] al2o3-cr: &>> a = Array.new(3, Array.new(3, 'x')); a[0][0] = 'y'; a
[11:00:42] rubydoc: # => [["y", "x", "x"], ["y", "x", "x"], ["y", "x", "x"]] (https://carc.in/#/r/77w1)
[11:00:56] al2o3-cr: &>> a = Array.new(3) { Array.new(3) { 'x' } }; a[0][0] = 'y'; a
[11:00:57] rubydoc: # => [["y", "x", "x"], ["x", "x", "x"], ["x", "x", "x"]] (https://carc.in/#/r/77w2)
[11:05:55] al2o3-cr: if that makes sense drnerdius
[11:09:30] drnerdius: al2o3-cr, thanks a lot! Also, what's the best way to transose and mutate that array? There's no transpose! method AFAIK. This is not the onlyexample; in many cases, there are no mutating counterparts to methods.
[11:09:59] ElFerna: has joined #ruby
[11:10:32] al2o3-cr: there is a transpose method and just save it to a another variable
[11:11:03] al2o3-cr: &>> [[1,2,3], [4,5,6], [7,8,9]].transpose
[11:11:04] rubydoc: # => [[1, 4, 7], [2, 5, 8], [3, 6, 9]] (https://carc.in/#/r/77w3)
[11:12:08] drnerdius: Yep, but I'm asking wether or not you can avoid that in case you don't want to allocatea memory for that.
[11:12:11] al2o3-cr: oh, sorry yeah, there is not counter-part mutating method
[11:12:48] drnerdius: Can I prepend it with something to mutate the array instead of re-assigning the value?
[11:13:56] paraxial2: has joined #ruby
[11:13:59] al2o3-cr: drnerdius: i'm not sure i understand what you mean?
[11:16:30] drnerdius: Like calling with map! or something to change the array dirrectly rather than do ```a = a.transpose```
[11:16:44] drnerdius: If that makes sense
[11:18:14] m04ftKK: has joined #ruby
[11:18:49] al2o3-cr: drnerdius: ah!
[11:19:21] al2o3-cr: you'd have to write your own method though.
[11:21:34] drnerdius: al2o3-cr, I though so. Thanks a lot again.
[11:21:48] al2o3-cr: drnerdius: sure, np.
[11:23:11] queip: has joined #ruby
[11:23:26] phaul: has joined #ruby
[11:28:49] jenrzzz: has joined #ruby
[11:30:29] chalkmonster: has joined #ruby
[11:32:45] phaul: has joined #ruby
[11:40:37] absolutejam: has joined #ruby
[11:43:41] queip: has joined #ruby
[11:49:50] conta1: has joined #ruby
[11:59:40] NL3limin4t0r: drnerdius: https://gist.github.com/3limin4t0r/b3c6a9cb7c8df924e17a6a0fefd75607
[12:01:51] snickers: has joined #ruby
[12:03:35] al2o3-cr: NL3limin4t0r: nifty :)
[12:03:40] NL3limin4t0r: You can make your own method more memory efficient. But this is an simple example
[12:03:56] livcd: Anyone tried Sorbet?
[12:05:50] drnerdius: NL3limin4t0r, that's awesome, but I wonder why mutating methods need to be implemented as new ones. Can't Ruby developers make it a part of the syntax?
[12:06:35] kyrylo: has joined #ruby
[12:08:07] RiPuk: has joined #ruby
[12:09:17] al2o3-cr: i suppose some methods don't warrant mutation.
[12:09:48] al2o3-cr: &>> Array.instance_methods(false).grep /!/
[12:09:50] rubydoc: # => [:rotate!, :sort!, :sort_by!, :collect!, :map!, :select!, :filter!, :reject!, :uniq!, :flatten!,... check link for more (https://carc.in/#/r/77w8)
[12:10:46] NL3limin4t0r: Also, not all mutating methods end with an exclamation mark.
[12:11:06] al2o3-cr: NL3limin4t0r: true, like concat
[12:11:14] al2o3-cr: and clear :)
[12:11:16] NL3limin4t0r: In my code snippet I use Array#clear and Array#concat with are both mutating methods.
[12:12:37] NL3limin4t0r: Some muting methods have also have quite another syntax than there non-mutating counterpart.
[12:13:08] NL3limin4t0r: string_var += "new string"
[12:13:17] NL3limin4t0r: string_var << "new string"
[12:13:56] al2o3-cr: but ones an operator the other a method
[12:16:01] solars: has joined #ruby
[12:18:22] Inline: has joined #ruby
[12:18:36] lepepe: has joined #ruby
[12:19:51] lepepe: has joined #ruby
[12:26:06] absolutejam: has joined #ruby
[12:30:56] jenrzzz: has joined #ruby
[12:34:16] claudiuinberlin: has joined #ruby
[12:37:04] m04ftKK: has joined #ruby
[12:37:05] drnerdius: Thanks to both of you. :-)
[12:44:52] alan_w: has joined #ruby
[12:50:11] involans: has joined #ruby
[12:50:50] deepredsky: has joined #ruby
[12:53:28] lepepe: has joined #ruby
[12:55:26] lepepe: has joined #ruby
[12:58:19] involans: has joined #ruby
[12:58:44] ljarvis__: has joined #ruby
[12:59:29] unreal_: has joined #ruby
[13:00:43] jtdowney: has joined #ruby
[13:02:39] JasonO: has joined #ruby
[13:04:07] caduguedess: has joined #ruby
[13:04:57] GodFather: has joined #ruby
[13:07:05] deepredsky: has joined #ruby
[13:08:09] lepepe_: has joined #ruby
[13:08:47] AndreYuhai: has joined #ruby
[13:09:09] AndreYuhai: Hi there, how do I loop through months instead of all all the days withing the two months?
[13:09:50] AndreYuhai: for example : 2019, 05 -> 2019, 07 I want to loop through 2019, 05 / 2019, 06 / 2019, 07
[13:10:04] AndreYuhai: date.downto or upto loops through all the days
[13:12:20] Dr_MDMA_MD: has joined #ruby
[13:13:04] conta1: has joined #ruby
[13:17:34] chalkmonster: has joined #ruby
[13:17:49] teclator: has joined #ruby
[13:18:14] RiPuk: has joined #ruby
[13:21:49] jottr: has joined #ruby
[13:21:58] al2o3-cr: AndreYuhai: https://carc.in/#/r/77wd
[13:22:37] Inline__: has joined #ruby
[13:26:19] snickers: has joined #ruby
[13:26:22] ghostlines: has joined #ruby
[13:27:03] AndreYuhai: al2o3-cr: Thank you.
[13:27:26] tf2ftw: has joined #ruby
[13:27:56] al2o3-cr: AndreYuhai: np. :)
[13:27:58] teclator: has joined #ruby
[13:33:28] lucasb: has joined #ruby
[13:33:48] cyclonis: has joined #ruby
[13:33:57] deepredsky: has joined #ruby
[13:34:14] cyclonis: has joined #ruby
[13:52:25] skryking: has joined #ruby
[14:06:56] lepepe: has joined #ruby
[14:13:09] emptyflask: has joined #ruby
[14:13:19] lepepe: has joined #ruby
[14:19:18] caduguedess: has joined #ruby
[14:21:12] fuzzface: has joined #ruby
[14:23:18] tdy: has joined #ruby
[14:27:48] conta1: has joined #ruby
[14:31:29] lepepe: has joined #ruby
[14:34:36] lepepe_: has joined #ruby
[14:34:39] Esa_: has joined #ruby
[14:35:50] RiPuk: has joined #ruby
[14:36:37] rippa: has joined #ruby
[14:37:12] yalue: has joined #ruby
[14:37:44] lepepe: has joined #ruby
[14:41:56] lepepe_: has joined #ruby
[14:42:53] ElFerna: has joined #ruby
[14:46:59] lepepe: has joined #ruby
[14:48:13] drnerdius: Can you also get an index of each iteration with `Array.new(3) { <block> }`?
[14:48:32] Nicmavr: has joined #ruby
[14:48:37] lepepe_: has joined #ruby
[14:48:59] drnerdius: Obviously it's doing some kind of loop
[14:49:34] drnerdius: &>> Array.new(3) { p :test }
[14:49:36] rubydoc: # => :test (https://carc.in/#/r/77x2)
[14:50:05] drnerdius: &>> Array.new(3) { Array.new(3, 0); p :test }
[14:50:06] rubydoc: # => :test (https://carc.in/#/r/77x3)
[14:51:30] drnerdius: &>> Array.new(3) { Array.new(3, 0); p 5 }
[14:51:31] rubydoc: # => 5 (https://carc.in/#/r/77x4)
[14:52:00] al2o3-cr: Array.new(3) { |index| ...
[14:53:09] drnerdius: Haha, that was stupidly easy
[14:53:20] drnerdius: &>> Array.new(3) {|index| Array.new(3, 0); p index }
[14:53:20] rubydoc: # => 0 (https://carc.in/#/r/77x5)
[14:53:32] drnerdius: (DOesn't work here, but it does in IRB)
[14:55:39] chalkmonster: has joined #ruby
[15:07:00] RiPuk: has joined #ruby
[15:07:08] teclator_: has joined #ruby
[15:07:18] tf2ftw: has joined #ruby
[15:08:33] retromode: has joined #ruby
[15:09:04] retromode: is there a method on collections like 'each_with_index' but that stops mapping once we've reached a certain index?
[15:09:11] lepepe_: has joined #ruby
[15:10:10] SeepingN: has joined #ruby
[15:10:14] havenwood: retromode: take(index + 1).each_with_index
[15:10:39] akem-lnvo: has joined #ruby
[15:11:08] RiPuk_: has joined #ruby
[15:11:41] retromode: havenwood that works, thanks!
[15:11:57] havenwood: retromode: or you can `break` once you reach the index you're looking for!
[15:12:12] retromode: yeah, i was doing that but was hoping there were something more elegant :)
[15:17:18] teclator: has joined #ruby
[15:18:02] tf2ftw: has joined #ruby
[15:18:34] RiPuk: has joined #ruby
[15:22:33] lepepe: has joined #ruby
[15:29:41] yokel: has joined #ruby
[15:36:52] lepepe: has joined #ruby
[15:37:11] ivanskie: has joined #ruby
[15:48:30] queip: has joined #ruby
[15:54:31] Megamos: has joined #ruby
[15:56:18] iffraff: has joined #ruby
[15:58:37] ivanskie: has joined #ruby
[16:04:53] lepepe: has joined #ruby
[16:05:07] chalkmonster: has joined #ruby
[16:12:38] ElFerna: has joined #ruby
[16:16:17] lepepe: has joined #ruby
[16:17:06] Bounga: has joined #ruby
[16:18:44] queip: has joined #ruby
[16:23:23] ivanskie: has joined #ruby
[16:25:20] moei: has joined #ruby
[16:26:44] lepepe: has joined #ruby
[16:29:01] lepepe: has joined #ruby
[16:30:36] paraxial2: has joined #ruby
[16:30:58] orbyt_: has joined #ruby
[16:31:13] tdy: has joined #ruby
[16:35:14] jenrzzz: has joined #ruby
[16:36:25] paraxial2: has joined #ruby
[16:40:25] lepepe: has joined #ruby
[16:42:40] psilly0: has joined #ruby
[16:50:55] claudiuinberlin: has joined #ruby
[16:51:45] lepepe: has joined #ruby
[16:52:49] miskatonic: has joined #ruby
[16:59:38] tf2ftw: has joined #ruby
[17:00:08] RiPuk: has joined #ruby
[17:08:31] lepepe_: has joined #ruby
[17:19:20] Swyper: has joined #ruby
[17:20:06] RiPuk: has joined #ruby
[17:20:25] lepepe: has joined #ruby
[17:22:38] gell5: has joined #ruby
[17:25:31] cyclonis_: has joined #ruby
[17:30:07] gix: has joined #ruby
[17:30:17] jenrzzz: has joined #ruby
[17:30:47] Swyper: has joined #ruby
[17:31:31] cyclonis: has joined #ruby
[17:34:40] lepepe: has joined #ruby
[17:37:31] cyclonis: has joined #ruby
[17:39:54] Swyper: has joined #ruby
[17:43:31] cyclonis: has joined #ruby
[17:43:57] AndreYuhai: has joined #ruby
[17:49:31] AndreYuhai: has joined #ruby
[17:49:31] cyclonis: has joined #ruby
[17:52:50] tf2ftw: has joined #ruby
[17:55:32] cyclonis: has joined #ruby
[17:57:32] bga57: has joined #ruby
[17:59:45] baweaver: havenwood / retromode: why not just use slices?
[18:00:10] baweaver: list[0..(index + 1)].each_with_index ...
[18:01:32] cyclonis: has joined #ruby
[18:02:03] Inline: has joined #ruby
[18:06:17] baweaver: or first, or several other bits
[18:06:37] baweaver: Ah, also havenwood, TIL: [1,2].first(1)
[18:06:39] baweaver: &>> [1,2].first(1)
[18:06:42] rubydoc: # => [1] (https://carc.in/#/r/77xy)
[18:07:00] lepepe: has joined #ruby
[18:07:31] cyclonis: has joined #ruby
[18:07:35] Swyper: has joined #ruby
[18:09:20] bga57: has joined #ruby
[18:18:31] lepepe_: has joined #ruby
[18:25:47] tf2ftw: has joined #ruby
[18:32:13] lepepe: has joined #ruby
[18:32:23] TomyLobo: has joined #ruby
[18:32:55] lxsameer: has joined #ruby
[18:40:15] jenrzzz: has joined #ruby
[18:43:31] cyclonis_: has joined #ruby
[18:48:06] xco: has joined #ruby
[18:55:33] cyclonis: has joined #ruby
[18:58:49] AJA4351: has joined #ruby
[19:02:29] cyclonis: has joined #ruby
[19:02:59] cyclonis: has joined #ruby
[19:03:24] cyclonis: has joined #ruby
[19:09:21] drnerdius: has joined #ruby
[19:11:04] jenrzzz: has joined #ruby
[19:15:03] lepepe_: has joined #ruby
[19:27:20] tomaw: has joined #ruby
[19:28:13] ivanskie: has joined #ruby
[19:28:37] kyrylo: has joined #ruby
[19:31:35] houhoulis: has joined #ruby
[19:39:42] jenrzzz: has joined #ruby
[19:43:01] zapata: has joined #ruby
[19:46:53] absolutejam: has joined #ruby
[19:48:59] BloopMonster: has joined #ruby
[19:54:05] redlegion: has joined #ruby
[19:55:53] Thenekofell: has joined #ruby
[19:58:18] jenrzzz: has joined #ruby
[20:02:06] BloopMonster: has joined #ruby
[20:12:39] Swyper: has joined #ruby
[20:23:02] Swyper: has joined #ruby
[20:26:35] Swyper: has joined #ruby
[20:33:14] tdy: has joined #ruby
[20:33:43] snowy: has joined #ruby
[20:39:16] kyrylo: has joined #ruby
[20:50:31] absolutejam2: has joined #ruby
[20:52:39] lepepe: has joined #ruby
[20:57:37] jenrzzz: has joined #ruby
[21:00:31] ElFerna: has joined #ruby
[21:06:36] absolutejam3: has joined #ruby
[21:12:33] pygmypuppy: has joined #ruby
[21:19:00] Fernando-Basso: has joined #ruby
[21:20:25] lepepe_: has joined #ruby
[21:30:39] fphilipe_: has joined #ruby
[21:34:12] lepepe: has joined #ruby
[21:35:18] AJA4351: has joined #ruby
[21:46:28] Thenekofell: has joined #ruby
[21:46:28] snowy: has joined #ruby
[21:53:38] queip: has joined #ruby
[21:54:17] claudiuinberlin: has joined #ruby
[21:57:06] matheusmoreira: has joined #ruby
[21:58:36] fphilipe_: has joined #ruby
[21:59:29] jenrzzz_: has joined #ruby
[22:08:49] emptyflask: has joined #ruby
[22:16:18] code_zombie: has joined #ruby
[22:16:37] lepepe: has joined #ruby
[22:25:02] budonyc: has joined #ruby
[22:53:47] cyclonis: has joined #ruby
[22:54:12] cyclonis: has joined #ruby
[22:59:51] involans: has joined #ruby
[23:04:22] claudiuinberlin: has joined #ruby
[23:05:46] Dr_MDMA_MD: has joined #ruby
[23:08:36] DTZUZO: has joined #ruby
[23:09:25] Swyper: has joined #ruby
[23:13:30] SanguineAnomaly: has joined #ruby
[23:30:01] Swyper: has joined #ruby
[23:54:05] AJA4351: has joined #ruby
[23:59:15] AJA4351: has joined #ruby