00:04
hightower3 has joined #ruby
00:06
hightower2 has quit [Ping timeout: 240 seconds]
00:19
szkl has joined #ruby
00:36
<
johnjaye >
hmm. so the motivation for my question before is I wanted to compute the probability of a dice roll
00:36
<
johnjaye >
i.e. how many ways can you get two dice sum to 2,3,...,12.
00:36
<
johnjaye >
is there a more "ruby" way to do it than just a double loop?
00:37
<
johnjaye >
i.e. for i in (1..6) for j in (1..6) if i+j is 3 then s++ type of thing
00:48
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.]
01:12
<
leftylink >
apparently you were not satisfied with permutation(2), even though that is the correct answer
01:12
<
leftylink >
okay then maybe you will accept Array#product as the answer then?
01:12
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:12
<
leftylink >
since you have just asked for a cartesian product.
01:18
<
leftylink >
obviously with both of those you use Enumerable#count.
01:25
eddof13 has joined #ruby
01:27
c10l6 has quit [Ping timeout: 246 seconds]
01:27
eddof13 has quit [Client Quit]
01:30
shokohsc5100 has joined #ruby
01:30
shokohsc510 has quit [Ping timeout: 252 seconds]
01:30
shokohsc5100 is now known as shokohsc510
01:34
rvalue has joined #ruby
02:18
Huckleberry777 has quit [Ping timeout: 246 seconds]
02:18
Huckleberry777 has joined #ruby
03:01
<
leftylink >
I am sorry, correction. it's repeated_permutation(2)
03:02
konsolebox has joined #ruby
03:14
Vonter has joined #ruby
03:37
<
gr33n7007h >
>> [*1..6].repeated_permutation(2).map(&:sum).tally
03:38
<
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>
03:38
<
gr33n7007h >
come on ruby[bot] you having a day off XD
04:07
_ht has joined #ruby
05:30
_ht has quit [Quit: _ht]
05:52
Maccab has joined #ruby
05:58
Maccab has quit [Ping timeout: 246 seconds]
06:03
grenierm has joined #ruby
06:49
otisolsen70 has joined #ruby
06:52
teclator has joined #ruby
06:54
reset has joined #ruby
06:56
grenierm has quit [Quit: Client closed]
06:56
grenierm has joined #ruby
07:17
crespire has joined #ruby
07:18
crespire1 has quit [Ping timeout: 260 seconds]
07:31
patrick- has quit [Ping timeout: 245 seconds]
07:48
patrick- has joined #ruby
07:54
MarvelousWololo has quit [Read error: Connection reset by peer]
08:02
jvalleroy has joined #ruby
08:24
Furai has quit [Quit: WeeChat 4.0.2]
08:24
Furai has joined #ruby
09:58
TheCatCollective has quit [Ping timeout: 246 seconds]
09:58
slothby has quit [Ping timeout: 240 seconds]
10:10
grenierm has quit [Quit: Client closed]
10:11
Caius has joined #ruby
10:12
slothby has joined #ruby
10:12
TheCatCollective has joined #ruby
10:35
infinityfye has joined #ruby
10:37
konsolebox has quit [Ping timeout: 256 seconds]
10:40
Pixi` has joined #ruby
10:43
Pixi has quit [Ping timeout: 246 seconds]
11:02
otisolsen70 has quit [Ping timeout: 244 seconds]
11:11
otisolsen70 has joined #ruby
11:14
Caius has joined #ruby
11:28
hightower3 has quit [Ping timeout: 246 seconds]
11:38
Roy_Mustang has joined #ruby
11:38
isene has quit [Ping timeout: 260 seconds]
11:41
A_Dragon is now known as Guest8048
11:41
Guest8048 has quit [Killed (tungsten.libera.chat (Nickname regained by services))]
11:41
Roy_Mustang is now known as A_Dragon
11:45
Sankalp has quit [Ping timeout: 256 seconds]
11:49
Sankalp has joined #ruby
11:54
isene has joined #ruby
12:05
miah has quit [*.net *.split]
12:05
jtperreault has quit [*.net *.split]
12:05
quintasan has quit [*.net *.split]
12:05
roger_rabbit has quit [*.net *.split]
12:05
GvJordan has quit [*.net *.split]
12:05
Bitflux has quit [*.net *.split]
12:05
thomas25 has quit [*.net *.split]
12:05
Hobbyboy has quit [*.net *.split]
12:05
pandabot has quit [*.net *.split]
12:05
ccooke has quit [*.net *.split]
12:05
jposer has quit [*.net *.split]
12:05
mooff has quit [*.net *.split]
12:05
JayDoubleu__ has quit [*.net *.split]
12:05
cuppajoeman has quit [*.net *.split]
12:05
Spitfire has quit [*.net *.split]
12:05
joto has quit [*.net *.split]
12:05
wakaflaka has quit [*.net *.split]
12:05
thomas25 has joined #ruby
12:05
quintasan has joined #ruby
12:05
jtperreault has joined #ruby
12:05
roger_rabbit has joined #ruby
12:05
GvJordan has joined #ruby
12:05
miah has joined #ruby
12:05
Bitflux has joined #ruby
12:05
Hobbyboy has joined #ruby
12:05
ccooke has joined #ruby
12:05
Spitfire has joined #ruby
12:05
cuppajoeman has joined #ruby
12:05
jposer has joined #ruby
12:05
joto has joined #ruby
12:05
JayDoubleu__ has joined #ruby
12:05
mooff has joined #ruby
12:05
pandabot has joined #ruby
12:05
wakaflaka has joined #ruby
12:05
Spitfire has quit [Max SendQ exceeded]
12:05
Bitflux has quit [Max SendQ exceeded]
12:05
thomas25 has quit [Max SendQ exceeded]
12:05
Byteflux has joined #ruby
12:05
Spitfire_ has joined #ruby
12:06
thomas25 has joined #ruby
12:07
JayDoubleu__ has quit [Ping timeout: 258 seconds]
12:08
pounce has quit [Ping timeout: 244 seconds]
12:09
JayDoubleu__ has joined #ruby
12:09
pounce has joined #ruby
12:17
Caius has quit [Ping timeout: 244 seconds]
12:19
Caius has joined #ruby
12:32
Vonter has quit [Ping timeout: 246 seconds]
12:58
hightower2 has joined #ruby
13:00
user23 has joined #ruby
13:20
Caius has joined #ruby
13:27
shokohsc5107 has joined #ruby
13:28
shokohsc510 has quit [Ping timeout: 256 seconds]
13:28
shokohsc5107 is now known as shokohsc510
13:45
user23 has quit [Remote host closed the connection]
13:54
konsolebox has joined #ruby
14:32
konsolebox has quit [Ping timeout: 246 seconds]
14:44
mx has joined #ruby
14:46
eddof13 has joined #ruby
14:57
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
15:12
nkm has joined #ruby
15:20
Rounin has quit [Quit: Rounin]
15:37
nkm has quit [Quit: Client closed]
15:49
polishdu1 has quit [Ping timeout: 260 seconds]
15:56
<
johnjaye >
it was the right answer I just asked a more involved question
15:57
<
johnjaye >
gr33n7007h: thanks!
15:58
eddof13 has joined #ruby
16:01
some14u has joined #ruby
16:01
_ht has joined #ruby
16:06
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
16:07
MarvelousWololo has joined #ruby
16:11
polishdub has joined #ruby
16:16
some14u has joined #ruby
16:25
Vonter has joined #ruby
16:39
desnudopenguino has quit [Ping timeout: 256 seconds]
16:44
Rounin has joined #ruby
16:44
Rounin has quit [Changing host]
16:44
Rounin has joined #ruby
16:56
desnudopenguino has joined #ruby
17:05
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:18
some14u has joined #ruby
17:25
desnudopenguino1 has joined #ruby
17:28
desnudopenguino has quit [Ping timeout: 246 seconds]
17:28
desnudopenguino1 is now known as desnudopenguino
17:37
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:40
infinityfye has quit [Ping timeout: 256 seconds]
18:23
Vonter has quit [Ping timeout: 246 seconds]
18:25
desnudopenguino1 has joined #ruby
18:28
desnudopenguino has quit [Ping timeout: 246 seconds]
18:28
desnudopenguino1 is now known as desnudopenguino
18:30
Guest25 has joined #ruby
18:31
Guest25 has quit [Client Quit]
18:31
Guest71 has joined #ruby
18:32
Guest71 has quit [Client Quit]
19:09
Linux_Kerio has joined #ruby
19:25
desnudopenguino1 has joined #ruby
19:26
gr33n7007h has quit [Quit: WeeChat 4.0.2]
19:28
desnudopenguino has quit [Ping timeout: 246 seconds]
19:28
desnudopenguino1 is now known as desnudopenguino
19:41
gr33n7007h has joined #ruby
19:49
yassernasc has joined #ruby
19:49
MarvelousWololo has quit [Ping timeout: 256 seconds]
19:55
desnudopenguino1 has joined #ruby
19:59
desnudopenguino has quit [Ping timeout: 260 seconds]
19:59
desnudopenguino1 is now known as desnudopenguino
20:02
_ht has quit [Quit: _ht]
20:04
yassernasc has quit [Remote host closed the connection]
20:04
yassernasc has joined #ruby
20:05
CrazyEddy has quit [Ping timeout: 260 seconds]
20:14
some14u has joined #ruby
20:24
CrazyEddy has joined #ruby
20:26
CrazyEddy has quit [Remote host closed the connection]
20:31
CrazyEddy has joined #ruby
20:31
howdoi has joined #ruby
20:32
mbarbar has joined #ruby
20:41
desnudopenguino1 has joined #ruby
20:41
yassernasc has quit [Remote host closed the connection]
20:41
desnudopenguino has quit [Ping timeout: 245 seconds]
20:41
desnudopenguino1 is now known as desnudopenguino
20:46
nmollerup has quit [Quit: Leaving]
21:11
hightower2 has quit [Ping timeout: 246 seconds]
21:19
Linux_Kerio has quit [Ping timeout: 246 seconds]
21:23
otisolsen70 has quit [Quit: Leaving]
21:30
Guest18 has joined #ruby
21:30
<
Guest18 >
hey brash
21:30
Guest18 has quit [Client Quit]
21:32
shokohsc510 has quit [Ping timeout: 258 seconds]
21:32
shokohsc510 has joined #ruby
21:55
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:00
ruby[bot] has quit [Remote host closed the connection]
22:00
ruby[bot] has joined #ruby
22:05
eddof13 has joined #ruby
22:05
brokkoli_origin has quit [Ping timeout: 260 seconds]
22:05
brokkoli_origin has joined #ruby
22:19
teclator has joined #ruby
22:25
John_Ivan has joined #ruby
22:29
<
johnjaye >
what does pack.c mean
22:29
<
johnjaye >
i see a line referring to it under help(Array)
22:37
<
ox1eef_ >
Try help "Array#pack".
22:38
hightower2 has joined #ruby
22:38
<
ox1eef_ >
And help "String#unpack".
22:40
<
johnjaye >
that's a handy help syntax i didn't know about, thanks
22:40
<
johnjaye >
but i don't understand if that was an answer about what pack.c refers to
22:40
<
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.
22:40
<
johnjaye >
i mean right before the active_support section it literally says "for pack.c"
22:42
<
ox1eef_ >
Most likely refers to that file, and that looks like pack / unpack implementation. There's pack.rb too.
22:44
<
johnjaye >
hmm i see
22:45
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:46
gr33n7007h has quit [Ping timeout: 245 seconds]
22:48
gr33n7007h has joined #ruby
22:53
johnjaye has quit [Quit: WeeChat 4.0.0-dev]
22:55
johnjaye has joined #ruby
23:09
konsolebox has joined #ruby
23:35
teclator has quit [Ping timeout: 260 seconds]