adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.1, 2.7.3, 2.6.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
memcorrupt has joined #ruby
memcorrupt has quit [Remote host closed the connection]
queip has joined #ruby
ur5us has quit [Ping timeout: 258 seconds]
jaybe1001 has joined #ruby
ChmEarl has quit [Quit: Leaving]
jaybe1001 has quit [Quit: Textual IRC Client: www.textualapp.com]
mangold has quit [Ping timeout: 265 seconds]
postmodern has joined #ruby
mangold has joined #ruby
teclator has quit [Remote host closed the connection]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
wald0 has quit [Quit: leaving]
DTZUZU has joined #ruby
mangold_ has joined #ruby
mangold has quit [Ping timeout: 268 seconds]
evdubs__ has quit [Quit: Leaving]
ur5us has joined #ruby
evdubs has joined #ruby
znz_jp has quit [Remote host closed the connection]
mangold_ has quit [Ping timeout: 240 seconds]
mangold_ has joined #ruby
znz_jp has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
mangold_ has quit [Ping timeout: 260 seconds]
infernix has quit [Ping timeout: 246 seconds]
BTRE has quit [Read error: Connection reset by peer]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
infernix has joined #ruby
wald0 has joined #ruby
wald0 has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 252 seconds]
BTRE has joined #ruby
evdubs_ has joined #ruby
evdubs has quit [Ping timeout: 268 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix- has joined #ruby
gix has quit [Disconnected by services]
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
m27frogy has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
robotbee has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
robotbee has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
robotbee has quit [Ping timeout: 240 seconds]
mcspud has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
mcspud has joined #ruby
al2o3-cr has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
coniptor has quit [Ping timeout: 246 seconds]
coniptor has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
ur5us has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
TrufflePump has quit [Ping timeout: 258 seconds]
robotbee has joined #ruby
fercell has quit [Quit: ZNC - https://znc.in]
fercell has joined #ruby
jla has joined #ruby
TrufflePump has joined #ruby
eXadeci has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<eXadeci> Hello, I've just updated my project to rails 6.1.3.2 and db:create throws an odd error about not finding the configs https://gist.github.com/exadeci/1eae49082fba4ed8b3366d67dba9b95e
jenrzzz has joined #ruby
<eXadeci> I've also tried with a clean database.yml taken from a new rails 6.1 project and I still get that error
lightstalker has quit [Ping timeout: 240 seconds]
lightstalker has joined #ruby
canbenshanlo has joined #ruby
pyra has joined #ruby
jla has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
<_rg> eXadeci: #rubyonrails might know
<eXadeci> @_rg I've asked there too but there's a 1/4th of the users on Ruby
Rudd0 has quit [Ping timeout: 252 seconds]
ap4y has quit [Quit: WeeChat 3.1]
gix- has quit [Ping timeout: 252 seconds]
<_rg> word
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
Milos_ has joined #ruby
Milos has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
robotbee has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
canbenshanlo has quit [Ping timeout: 260 seconds]
cow[moo] has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
zapata has joined #ruby
shtirlic has quit [Ping timeout: 260 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Milos_ is now known as Milos
shtirlic has joined #ruby
hiroaki has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
hsmath has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
hiroaki has joined #ruby
jenrzzz has joined #ruby
gearnode has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 265 seconds]
daemonwrangler_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
daemonwrangler has joined #ruby
elcuervo has quit [Ping timeout: 265 seconds]
elcuervo has joined #ruby
alexherbo2 has joined #ruby
jenrzzz has joined #ruby
teclator has joined #ruby
elcuervo has quit [Ping timeout: 265 seconds]
mahlon has quit [Ping timeout: 260 seconds]
jla has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
mahlon has joined #ruby
jenrzzz has joined #ruby
shtirlic has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
al2o3-cr has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
canbenshanlo has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
john__ has quit [Remote host closed the connection]
john__ has joined #ruby
Rudd0 has joined #ruby
greengriminal has joined #ruby
jenrzzz has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
eXadeci has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
queip has quit [Remote host closed the connection]
queip has joined #ruby
jla has quit [Ping timeout: 260 seconds]
DarthGandalf has quit [Quit: Bye]
m27frogy has joined #ruby
dputtick has quit [Quit: Connection closed for inactivity]
tempate has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
<tempate> There are no such thing as tuples or pairs in Ruby, right? You're supposed to use a 2-sized array, correct?
jla has joined #ruby
DarthGandalf has joined #ruby
DarthGandalf has quit [Excess Flood]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
DarthGandalf has joined #ruby
kktt007 has joined #ruby
jenrzzz has joined #ruby
kktt007 has quit [Remote host closed the connection]
cliluw has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
DarthGandalf has quit [Ping timeout: 260 seconds]
sshine has joined #ruby
<sshine> hi. is it possible to install gems locally, i.e., without requiring root? I've managed to install rbenv into my .zshrc, assuming that it'd tamper with the environment variables enough to not try to copy files into /usr (on my mac), but 'gem install bundler' still tries to write to both /Library/Ruby/Gems and /usr/local/bin.
al2o3-cr has joined #ruby
DarthGandalf has joined #ruby
<sshine> ah, gem install --user-install.
jenrzzz has joined #ruby
DarthGandalf has quit [Quit: Bye]
DarthGandalf has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
cthulchu_ has joined #ruby
vondruch has joined #ruby
postmodern has quit [Quit: Leaving]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
kktt007 has joined #ruby
kktt007 has quit [Remote host closed the connection]
jenrzzz has joined #ruby
orbyt_ has joined #ruby
al2o3-cr has quit [Quit: WeeChat 3.1]
jla has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
jla has joined #ruby
jenrzzz has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
cer-0 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
stryek has joined #ruby
sshine has left #ruby [#ruby]
vondruch has quit [Ping timeout: 252 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
jenrzzz has joined #ruby
Some-body_ has joined #ruby
DarthGandalf has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
Some-body_ is now known as DarthGandalf
jenrzzz has joined #ruby
DarthGandalf has quit [Remote host closed the connection]
Jonopoly has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jla has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
howdoi has joined #ruby
kktt007 has joined #ruby
kktt007 has quit [Remote host closed the connection]
User458764 has joined #ruby
User4588 has joined #ruby
DarthGandalf has joined #ruby
jenrzzz has joined #ruby
cer-0 has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 240 seconds]
User458764 has left #ruby ["Textual IRC Client: www.textualapp.com"]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
Jonopoly has quit [Quit: WeeChat 3.0.1]
greengriminal has joined #ruby
Jonopoly has joined #ruby
greengriminal has quit [Client Quit]
jenrzzz has joined #ruby
ChmEarl has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
prion has joined #ruby
x0n- has quit [Ping timeout: 246 seconds]
x0n has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
Jonopoly has quit [Quit: WeeChat 3.0.1]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
moldorcoder7 has quit [Ping timeout: 240 seconds]
moldorcoder7 has joined #ruby
moldorcoder7 has quit [Excess Flood]
moldorcoder7 has joined #ruby
teclator has quit [Ping timeout: 240 seconds]
moldorcoder7 has quit [Excess Flood]
moldorcoder7 has joined #ruby
prion has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
moldorcoder7 has quit [Ping timeout: 240 seconds]
teclator has joined #ruby
moldorcoder7 has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
BSaboia has joined #ruby
jla has joined #ruby
jenrzzz has joined #ruby
ttoocs has quit [Ping timeout: 248 seconds]
ttoocs has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
wnd-trans has joined #ruby
wnd has quit [Read error: Connection reset by peer]
d0liver has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
d0liver has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
feriman has joined #ruby
wnd-trans is now known as wnd
ByronJohnson has quit [Ping timeout: 260 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
ByronJohnson has joined #ruby
jla has quit [Ping timeout: 252 seconds]
amateurassassin has joined #ruby
<adam12> tempate: Correct.
cd has joined #ruby
brunosaboia_ has joined #ruby
BSaboia has quit [Ping timeout: 260 seconds]
feriman has quit [Quit: WeeChat 3.1]
alexherbo2 has quit [Read error: Connection reset by peer]
alexherbo20 has joined #ruby
prion has joined #ruby
ljarvis has joined #ruby
brunosaboia_ has quit [Ping timeout: 240 seconds]
alexherbo20 has quit [Ping timeout: 252 seconds]
<havenwood> tempate: Or a Struct if you'd like a bit more structure.
<havenwood> tempate: An Array is the norm.
brunosaboia_ has joined #ruby
alexherbo2 has joined #ruby
BSaboia has joined #ruby
brunosaboia_ has quit [Ping timeout: 252 seconds]
alexherbo2 has quit [Ping timeout: 265 seconds]
duderonomy has joined #ruby
brunosaboia_ has joined #ruby
<tempate> Alright, thanks
BSaboia has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #ruby
jetchisel has joined #ruby
pwnd_3 has joined #ruby
pwnd_ has quit [Ping timeout: 240 seconds]
pwnd_3 is now known as pwnd_
brunosaboia_ has quit [Quit: Leaving]
prion has quit [Ping timeout: 252 seconds]
guriya has joined #ruby
prion has joined #ruby
shakes has joined #ruby
shakes has quit [Client Quit]
hiroaki has quit [Ping timeout: 260 seconds]
swaggboi has quit [Quit: C-x C-c]
cliluw has joined #ruby
vondruch has joined #ruby
gix has joined #ruby
orbyt_ has joined #ruby
guriya has quit [Quit: Connection closed]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
moldorcoder7 has quit [Quit: %bye mirc%]
moldorcoder7 has joined #ruby
queip has quit [Remote host closed the connection]
cd has quit [Quit: cd]
Xiti has quit [Quit: Leaving]
queip has joined #ruby
queip has quit [Ping timeout: 260 seconds]
TCZ has joined #ruby
actuallybatman has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
robotbee has joined #ruby
prion has quit [Ping timeout: 260 seconds]
Xiti has joined #ruby
johnny56 has quit [Remote host closed the connection]
johnny56 has joined #ruby
evdubs_ is now known as evdubs
braws has joined #ruby
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #ruby
ur5us has joined #ruby
hiroaki has joined #ruby
cognemo has quit [Ping timeout: 268 seconds]
gearnode has quit [Ping timeout: 245 seconds]
gearnode has joined #ruby
TCZ has quit [Quit: ...]
elcuervo has joined #ruby
gearnode has quit [Ping timeout: 250 seconds]
prion has joined #ruby
cer-0 has joined #ruby
Guest16506 has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
Guest16506 has quit [Quit: Connection closed]
mynameisdebian has joined #ruby
john__ has quit [Ping timeout: 252 seconds]
john__ has joined #ruby
Rudd0 has quit [Ping timeout: 260 seconds]
mynameisdebian has quit [Ping timeout: 250 seconds]
Rudd0 has joined #ruby
mynameisdebian has joined #ruby
john__ has quit [Ping timeout: 260 seconds]
yuesbeez has joined #ruby
swaggboi has joined #ruby
<tempate> I tried doing https://bpa.st/3U4A but it gives "undefined method `sum' for nil:NilClass"
gearnode has joined #ruby
prion has quit [Ping timeout: 240 seconds]
<tempate> I guess I can get away with: prob * (1 - (pn[i..] || [0]).sum)
<tempate> Is it better than my original version though
<havenwood> tempate: #with_index takes an argument for offset, so you can: .with_index(-1)
<havenwood> tempate: Then instead of `[0, i-1].max` you can: i.clamp(0..)
<havenwood> tempate: Might as well `.sum` rather than `inject(:+)` at the end.
<havenwood> tempate: Consider that you don't need to sum so often. :P
<havenwood> tempate: You could #flat_map and #sum once.
<tempate> havenwood: how am I summing so often? don't I just sum once?
<tempate> havenwood: you're right on the .sum rather than .inject(:+), obviously
<havenwood> tempate: Yeah, I guess so, since you have a multiplier for the internal sum.
<tempate> havenwood: oh, right; I sum all those
<havenwood> tempate: #sum also takes a block, for like line 3.
<havenwood> tempate: count.times.sum { rand(1..sides) }
<tempate> havenwood: what was clamp for again?
<havenwood> tempate: [0, i-1].max
<tempate> havenwood: oh, for some reason I thought it didn't
<tempate> havenwood: orly? hmmm
<havenwood> &>> -42.clamp 0..
<rubydoc> # => 0 (https://carc.in/#/r/b4nu)
<havenwood> &>> 42.slamp 0..
<rubydoc> stderr: -e:4:in `<main>': undefined method `slamp' for 42:Integer (NoMethodError)... check link for more (https://carc.in/#/r/b4nv)
<havenwood> &>> 42.clamp 0..
<rubydoc> # => 42 (https://carc.in/#/r/b4nw)
<havenwood> i.negative? ? 0 : i
<tempate> what are the .. for?
<havenwood> tempate: This is a range: 0..
<havenwood> &>> 0..
<rubydoc> # => 0.. (https://carc.in/#/r/b4o2)
<tempate> Yes, I'm aware
<havenwood> It's a Range literal.
<tempate> &>> 42.clamp
<havenwood> I don't understand your question then.
<rubydoc> stderr: -e:4:in `clamp': wrong number of arguments (given 0, expected 1..2) (ArgumentError)... check link for more (https://carc.in/#/r/b4o4)
<tempate> &>> 42.clamp(0)
<rubydoc> stderr: -e:4:in `clamp': wrong argument type Integer (expected Range) (TypeError)... check link for more (https://carc.in/#/r/b4o5)
<tempate> &>> 42.clamp(0..)
<rubydoc> # => 42 (https://carc.in/#/r/b4o7)
<tempate> Not sure I understand how that works
<tempate> If all it does is i.negative? ? 0 : i
<havenwood> 42 is an Integer. Integer#clamp is a method that takes an argument. The argument is 0.., which is a Range starting at zero with no ending.
<tempate> Why does it have to take an argument?
<havenwood> tempate: I like to `wins.fdiv(k)` rather than `wins / k.to_f`, personally.
<havenwood> tempate: Because you can clamp to other Ranges.
<havenwood> &>> 42.clamp(40..80)
<rubydoc> # => 42 (https://carc.in/#/r/b4oa)
<havenwood> &>> -42.clamp(40..80)
<rubydoc> # => 40 (https://carc.in/#/r/b4ob)
<tempate> havenwood: oh, so clamp means to get either the i of the minimum of that range?
<tempate> oh, I see
<havenwood> yup
<tempate> kk
<havenwood> For line 9, #count takes a block.
<tempate> first time I hear of fdiv, honestly
<tempate> right
<havenwood> tempate: For line 36, it saves a method call to do: Array.new sides do |number|
<tempate> havenwood: not sure I got that last one
hiroaki has quit [Ping timeout: 260 seconds]
<tempate> havenwood: gotcha
<havenwood> &>> Array.new(3) { rand }
<rubydoc> # => [0.3993434331307153, 0.7654919450707365, 0.1487725645984841] (https://carc.in/#/r/b4od)
<tempate> It took me a while to wake up
<tempate> That's the final version
<tempate> havenwood: could I use that somehow for my L3 ?
alexherbo2 has quit [Ping timeout: 240 seconds]
<havenwood> tempate: You could do the #fdiv on line 29 too, FWIW: 1.fdiv(sides)
<havenwood> tempate: looks good to me
<tempate> havenwood: is #fdiv more efficient in any way or is it just syntatic sugar?
<tempate> havenwood: thanks a lot for the help
<havenwood> tempate: In some cases it saves a method call, like: integer.to_f / 42
<havenwood> tempate: Here, it's just 1.0 versus 1.
<havenwood> So stylistic, I'd say.
<tempate> I see
<tempate> Great
<tempate> &>> Array.new(3)
<rubydoc> # => [nil, nil, nil] (https://carc.in/#/r/b4oe)
<havenwood> tempate: Array.new(3, 42) #=> [42, 42, 42]
<havenwood> tempate: Or the block form is evaluated for each element of the Array.
<havenwood> tempate: How you have it is nice.
<havenwood> Avoiding the second argument ftw.
Rudd0 has quit [Ping timeout: 252 seconds]
<tempate> I'm not avoiding the second argument tho, am I?
duderonomy has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
pyra has quit [Quit: Konversation terminated!]
shokohsc68 has quit [Quit: The Lounge - https://thelounge.chat]
ur5us has joined #ruby
stryek has quit [Quit: Connection closed for inactivity]
shokohsc68 has joined #ruby
<nakilon> why does $ gem search 'irc*bot' prints girbot (0.2.3) ?
<nakilon> there is no 'c' in it
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
cthulchu_ has quit [Ping timeout: 260 seconds]
<Iambchop> nakilon: gem search takes a regex not a glob
<nakilon> oh