shiru has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 244 seconds]
svm has joined #ruby
msv has quit [Ping timeout: 248 seconds]
svm is now known as msv
CRISPR has joined #ruby
<
leftylink>
hello friends is it possible to syntax sugar factorial?
<
leftylink>
I guess the best we can do is something like defining _!
<
leftylink>
pandabot: rb using(Module.new { refine(Integer) { def _! = (1..self).reduce(1, :*) }}); 5._!
<
leftylink>
if there's a better way I am eager to hear about it
mahlon has quit [Quit: PotatoTech]
gemmaro_ has quit [Ping timeout: 252 seconds]
gemmaro has joined #ruby
nil78 has quit [Read error: Connection reset by peer]
nil78 has joined #ruby
mange has joined #ruby
hwpplayer1 has quit [Remote host closed the connection]
CRISPR has quit [Ping timeout: 265 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 268 seconds]
CRISPR has joined #ruby
madcabbage has quit [Remote host closed the connection]
madcabbage has joined #ruby
CRISPR has quit [Ping timeout: 268 seconds]
CRISPR has joined #ruby
Guest35 has joined #ruby
Guest35 has quit [Client Quit]
__jmcantrell__ has joined #ruby
jmcantrell has quit [Killed (zinc.libera.chat (Nickname regained by services))]
__jmcantrell__ is now known as jmcantrell
jmcantrell_ has joined #ruby
jmcantrell has quit [Quit: WeeChat 4.5.2]
jmcantrell_ is now known as jmcantrell
cahoots has joined #ruby
__jmcantrell__ has joined #ruby
jmcantrell has quit [Killed (tantalum.libera.chat (Nickname regained by services))]
__jmcantrell__ is now known as jmcantrell
jmcantrell_ has joined #ruby
cahoots has quit [Ping timeout: 245 seconds]
madcabbage has quit [Ping timeout: 246 seconds]
<
havenwood>
leftylink: You could use a unary method for `!5` syntax, which seems factorialish.
<
havenwood>
class Integer def !@ = (1..self).reduce(:*) || 1 end
<
havenwood>
or rather: class Integer def !@ = (1..self).reduce(1, :*) end
<
havenwood>
But yeah, `def ~@` is the best I can think of and it seems nice.
<
havenwood>
`def !@` I mean.
<
havenwood>
I think it's a reasonable refinement.
grenierm has joined #ruby
dviola has quit [Quit: WeeChat 4.5.2]
cahoots has joined #ruby
mahlon has joined #ruby
cahoots has quit [Ping timeout: 244 seconds]
CRISPR has quit [Ping timeout: 272 seconds]
jmcantrell has quit [Quit: WeeChat 4.5.2]
R2robot has quit [Quit: Pull the lever, Kronk. Wrong leverrrrrrr!]
shiru has quit [Remote host closed the connection]
R2robot has joined #ruby
Linux_Kerio has joined #ruby
hwpplayer1 has joined #ruby
hwpplayer1 has quit [Remote host closed the connection]
rvalue- has joined #ruby
rvalue has quit [Ping timeout: 268 seconds]
gr33n7007h has quit [Quit: WeeChat 4.5.2]
rvalue- is now known as rvalue
user71 has joined #ruby
hwpplayer1 has joined #ruby
grenierm has quit [Ping timeout: 240 seconds]
hwpplayer1 has quit [Remote host closed the connection]
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
mange has quit [Remote host closed the connection]
hwpplayer1 has joined #ruby
nil78 has quit [Read error: Connection reset by peer]
hwpplayer1 has quit [Remote host closed the connection]
nil78 has joined #ruby
GreenResponse has joined #ruby
infinityfye has joined #ruby
pounce has quit [Ping timeout: 248 seconds]
meimei has quit [Ping timeout: 248 seconds]
CRISPR has joined #ruby
infinity__fye has joined #ruby
infinityfye has quit [Killed (NickServ (GHOST command used by infinity__fye))]
CRISPR has quit [Ping timeout: 248 seconds]
Sheilong has joined #ruby
Linux_Kerio has quit [Ping timeout: 252 seconds]
CRISPR has joined #ruby
infinity__fye is now known as infinityfye
nil78 has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
nil78 has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
madcabbage has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 252 seconds]
jmcantrell has joined #ruby
jmcantrell has quit [Ping timeout: 248 seconds]
CRISPR has quit [Ping timeout: 246 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 268 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 244 seconds]
jmcantrell has joined #ruby
<
kyber>
havenwood: that's cool
wbooze has joined #ruby
infinityfye has quit [Killed (NickServ (GHOST command used by infinity__fye))]
infinity__fye has joined #ruby
infinityfye has joined #ruby
infinity__fye has quit [Ping timeout: 260 seconds]
fantazo has joined #ruby
cahoots has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
Linux_Kerio has joined #ruby
luna__ has joined #ruby
jmcantrell has quit [Ping timeout: 260 seconds]
luna__ has left #ruby [#ruby]
wbooze has quit [Remote host closed the connection]
wbooze has joined #ruby
nil78 has quit [Read error: Connection reset by peer]
Sheilong has quit []
grenierm has joined #ruby
nil78 has joined #ruby
cahoots has joined #ruby
nil78 has quit [Read error: Connection reset by peer]
cahoots has quit [Ping timeout: 248 seconds]
nil78 has joined #ruby
wbooze has quit [Ping timeout: 248 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 245 seconds]
cappy has joined #ruby
fantazo has quit [Quit: Lost terminal]
user71 has quit [Quit: Leaving]
mahlon has quit [Quit: PotatoTech]
cahoots has joined #ruby
wbooze has joined #ruby
<
o0x1eef>
+1 havenwood
cahoots has quit [Ping timeout: 252 seconds]
reset has joined #ruby
Linux_Kerio has quit [Ping timeout: 265 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
GreenResponse has quit [Quit: Leaving]
wbooze has quit [Ping timeout: 265 seconds]
nil78 has quit [Read error: Connection reset by peer]
nil78 has joined #ruby
infinityfye has quit [Read error: Connection reset by peer]
SPORTIVO_MASCHIO has joined #ruby
SPORTIVO_MASCHIO has joined #ruby
SPORTIVO_MASCHIO has quit [Client Quit]
jmcantrell has joined #ruby
nil78 has quit [Read error: Connection reset by peer]
grenierm has quit [Ping timeout: 240 seconds]
nil78 has joined #ruby
mange has joined #ruby
brokkoli_origin has quit [Ping timeout: 260 seconds]