havenwood changed the topic of #ruby to: Ruby 3.2.2, 3.1.4, 3.3.0-preview1: https://www.ruby-lang.org | Rules: https://ruby-community.com | Logs: https://libera.irclog.whitequark.org/ruby
hightower3 has joined #ruby
hightower2 has quit [Ping timeout: 240 seconds]
szkl has joined #ruby
<johnjaye> hmm. so the motivation for my question before is I wanted to compute the probability of a dice roll
<johnjaye> i.e. how many ways can you get two dice sum to 2,3,...,12.
<johnjaye> is there a more "ruby" way to do it than just a double loop?
<johnjaye> i.e. for i in (1..6) for j in (1..6) if i+j is 3 then s++ type of thing
John_Ivan has quit [Quit: Disrupting the dragon's slumber one time too often shall eventually bestow upon all an empirical and indiscriminate conflagration that will last for all goddamn eternity.]
<leftylink> apparently you were not satisfied with permutation(2), even though that is the correct answer
<leftylink> okay then maybe you will accept Array#product as the answer then?
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink> since you have just asked for a cartesian product.
<leftylink> obviously with both of those you use Enumerable#count.
eddof13 has joined #ruby
c10l6 has quit [Ping timeout: 246 seconds]
eddof13 has quit [Client Quit]
shokohsc5100 has joined #ruby
shokohsc510 has quit [Ping timeout: 252 seconds]
shokohsc5100 is now known as shokohsc510
rvalue has quit [Quit: ZNC - https://znc.in]
rvalue has joined #ruby
Huckleberry777 has quit [Ping timeout: 246 seconds]
Huckleberry777 has joined #ruby
<leftylink> I am sorry, correction. it's repeated_permutation(2)
konsolebox has joined #ruby
Vonter has joined #ruby
<gr33n7007h> >> [*1..6].repeated_permutation(2).map(&:sum).tally
<ruby[bot]> gr33n7007h: I'm terribly sorry, I could not evaluate your code because of an error: JSON::ParserError:784: unexpected token at '<!DOCTYPE html>
<gr33n7007h> come on ruby[bot] you having a day off XD
_ht has joined #ruby
_ht has quit [Quit: _ht]
Maccab has joined #ruby
Maccab has quit [Ping timeout: 246 seconds]
grenierm has joined #ruby
otisolsen70 has joined #ruby
teclator has joined #ruby
reset has joined #ruby
grenierm has quit [Quit: Client closed]
grenierm has joined #ruby
crespire has joined #ruby
crespire1 has quit [Ping timeout: 260 seconds]
patrick- has quit [Ping timeout: 245 seconds]
patrick- has joined #ruby
MarvelousWololo has quit [Read error: Connection reset by peer]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
Furai has quit [Quit: WeeChat 4.0.2]
Furai has joined #ruby
TheCatCollective has quit [Ping timeout: 246 seconds]
slothby has quit [Ping timeout: 240 seconds]
Caius has quit [Quit: ZNC - https://znc.in]
grenierm has quit [Quit: Client closed]
Caius has joined #ruby
slothby has joined #ruby
TheCatCollective has joined #ruby
infinityfye has joined #ruby
konsolebox has quit [Ping timeout: 256 seconds]
Pixi` has joined #ruby
Pixi has quit [Ping timeout: 246 seconds]
otisolsen70 has quit [Ping timeout: 244 seconds]
Caius has quit [Quit: ZNC - https://znc.in]
otisolsen70 has joined #ruby
Caius has joined #ruby
hightower3 has quit [Ping timeout: 246 seconds]
Roy_Mustang has joined #ruby
isene has quit [Ping timeout: 260 seconds]
A_Dragon is now known as Guest8048
Guest8048 has quit [Killed (tungsten.libera.chat (Nickname regained by services))]
Roy_Mustang is now known as A_Dragon
Sankalp has quit [Ping timeout: 256 seconds]
Sankalp has joined #ruby
isene has joined #ruby
miah has quit [*.net *.split]
jtperreault has quit [*.net *.split]
quintasan has quit [*.net *.split]
roger_rabbit has quit [*.net *.split]
GvJordan has quit [*.net *.split]
Bitflux has quit [*.net *.split]
thomas25 has quit [*.net *.split]
Hobbyboy has quit [*.net *.split]
pandabot has quit [*.net *.split]
ccooke has quit [*.net *.split]
jposer has quit [*.net *.split]
mooff has quit [*.net *.split]
JayDoubleu__ has quit [*.net *.split]
cuppajoeman has quit [*.net *.split]
Spitfire has quit [*.net *.split]
joto has quit [*.net *.split]
wakaflaka has quit [*.net *.split]
thomas25 has joined #ruby
quintasan has joined #ruby
jtperreault has joined #ruby
roger_rabbit has joined #ruby
GvJordan has joined #ruby
miah has joined #ruby
Bitflux has joined #ruby
Hobbyboy has joined #ruby
ccooke has joined #ruby
Spitfire has joined #ruby
cuppajoeman has joined #ruby
jposer has joined #ruby
joto has joined #ruby
JayDoubleu__ has joined #ruby
mooff has joined #ruby
pandabot has joined #ruby
wakaflaka has joined #ruby
Spitfire has quit [Max SendQ exceeded]
Bitflux has quit [Max SendQ exceeded]
thomas25 has quit [Max SendQ exceeded]
Byteflux has joined #ruby
Spitfire_ has joined #ruby
thomas25 has joined #ruby
JayDoubleu__ has quit [Ping timeout: 258 seconds]
pounce has quit [Ping timeout: 244 seconds]
JayDoubleu__ has joined #ruby
pounce has joined #ruby
Caius has quit [Ping timeout: 244 seconds]
Caius has joined #ruby
Vonter has quit [Ping timeout: 246 seconds]
hightower2 has joined #ruby
user23 has joined #ruby
Caius has quit [Quit: ZNC - https://znc.in]
Caius has joined #ruby
shokohsc5107 has joined #ruby
shokohsc510 has quit [Ping timeout: 256 seconds]
shokohsc5107 is now known as shokohsc510
user23 has quit [Remote host closed the connection]
konsolebox has joined #ruby
konsolebox has quit [Ping timeout: 246 seconds]
mx has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nkm has joined #ruby
Rounin has quit [Quit: Rounin]
nkm has quit [Quit: Client closed]
polishdu1 has quit [Ping timeout: 260 seconds]
<johnjaye> it was the right answer I just asked a more involved question
<johnjaye> gr33n7007h: thanks!
eddof13 has joined #ruby
some14u has joined #ruby
_ht has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MarvelousWololo has joined #ruby
polishdub has joined #ruby
some14u has joined #ruby
Vonter has joined #ruby
desnudopenguino has quit [Ping timeout: 256 seconds]
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
desnudopenguino has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
some14u has joined #ruby
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 246 seconds]
desnudopenguino1 is now known as desnudopenguino
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
infinityfye has quit [Ping timeout: 256 seconds]
Vonter has quit [Ping timeout: 246 seconds]
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 246 seconds]
desnudopenguino1 is now known as desnudopenguino
Guest25 has joined #ruby
Guest25 has quit [Client Quit]
Guest71 has joined #ruby
Guest71 has quit [Client Quit]
Linux_Kerio has joined #ruby
desnudopenguino1 has joined #ruby
gr33n7007h has quit [Quit: WeeChat 4.0.2]
desnudopenguino has quit [Ping timeout: 246 seconds]
desnudopenguino1 is now known as desnudopenguino
gr33n7007h has joined #ruby
yassernasc has joined #ruby
MarvelousWololo has quit [Ping timeout: 256 seconds]
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 260 seconds]
desnudopenguino1 is now known as desnudopenguino
_ht has quit [Quit: _ht]
yassernasc has quit [Remote host closed the connection]
yassernasc has joined #ruby
CrazyEddy has quit [Ping timeout: 260 seconds]
some14u has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
CrazyEddy has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
CrazyEddy has joined #ruby
howdoi has joined #ruby
mbarbar has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
mbarbar has joined #ruby
desnudopenguino1 has joined #ruby
yassernasc has quit [Remote host closed the connection]
desnudopenguino has quit [Ping timeout: 245 seconds]
desnudopenguino1 is now known as desnudopenguino
nmollerup has quit [Quit: Leaving]
hightower2 has quit [Ping timeout: 246 seconds]
Linux_Kerio has quit [Ping timeout: 246 seconds]
otisolsen70 has quit [Quit: Leaving]
Guest18 has joined #ruby
<Guest18> hey brash
<Guest18> brahs
Guest18 has quit [Client Quit]
shokohsc510 has quit [Ping timeout: 258 seconds]
shokohsc510 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
eddof13 has joined #ruby
brokkoli_origin has quit [Ping timeout: 260 seconds]
brokkoli_origin has joined #ruby
teclator has joined #ruby
John_Ivan has joined #ruby
<johnjaye> what does pack.c mean
<johnjaye> i see a line referring to it under help(Array)
<ox1eef_> Try help "Array#pack".
hightower2 has joined #ruby
<ox1eef_> And help "String#unpack".
<johnjaye> that's a handy help syntax i didn't know about, thanks
<johnjaye> but i don't understand if that was an answer about what pack.c refers to
<ox1eef_> Ah, not sure what it refers to, my guess is that it is an implementation for both those methods or one of them, let me see.
<johnjaye> i mean right before the active_support section it literally says "for pack.c"
<ox1eef_> Most likely refers to that file, and that looks like pack / unpack implementation. There's pack.rb too.
<johnjaye> hmm i see
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gr33n7007h has quit [Ping timeout: 245 seconds]
gr33n7007h has joined #ruby
johnjaye has quit [Quit: WeeChat 4.0.0-dev]
johnjaye has joined #ruby
konsolebox has joined #ruby
teclator has quit [Ping timeout: 260 seconds]