<leftylink>
okay so based on that I'm going to disagree with the staetment "you have to use floats"
<AstrallyForged>
That's not a float?
<AstrallyForged>
Oh, Ruby has rational primitives.
<AstrallyForged>
so /that's/ why the default print looks weird like that, okay
<AstrallyForged>
Looks like it works if I use rationals instead. Thanks!
<sam113101>
I want to add a .combination function to Hash, do I need an Enumerator? I mean each is already defined on Hash
grokify has quit [Remote host closed the connection]
<leftylink>
well if I were the one doing it I wouldn't want to have to try to write an implementation of combination, so I'd make use of Array#combination
<sam113101>
yeah but it's going to be different
<sam113101>
values will be arrays and the combination will be among all of those arrays
<sam113101>
one item from first array, one item from second array, etc.
<leftylink>
tjat
<leftylink>
that's cartesian product from Array#product, not combination, then
grokify has joined #ruby
<AstrallyForged>
Awesome, just changed the floats to rationals, and the imprecision is fixed. And the other things can stay the way they are. Thank you~ ^.^
<sam113101>
sigh let me check
<sam113101>
I think it's just what I need
<sam113101>
funnily enough I remember being bothered that it wasn't like array.sum, but not truly understanding what it was doing
grokify has quit [Ping timeout: 250 seconds]
<sam113101>
/home/sam/code/euler/ruby/problem61.rb: failed to allocate memory (NoMemoryError)
<sam113101>
oh boy
<sam113101>
what am I doing wrong lol
<sam113101>
I'm not that tight on ram
grokify has joined #ruby
<sam113101>
weird
moldorcoder7 has quit [Ping timeout: 268 seconds]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
plujon has quit [Remote host closed the connection]
drainpipe has quit [Ping timeout: 268 seconds]
Sheilong has quit []
grokify has joined #ruby
Vonter has quit [Quit: WeeChat 3.7]
grokify has quit [Ping timeout: 260 seconds]
Vonter has joined #ruby
Guimauve has quit [Quit: Client closed]
aeris has quit [Remote host closed the connection]
<svdasein>
Hi folks. I've been working on a site to help make it easier to find gems. I'm still working on it, but I could use a few users. http://gemdex.org
<pavelz>
= неат
<pavelz>
neat
croot has quit [Quit: ZZZzzz…]
<svdasein>
I'm hoping to do a better job than bestgems.org
<eoli3n>
is there any kind of linter which could help ? (like shellcheck)
<eoli3n>
i'm not a ruby dev
cartdrige has joined #ruby
___nick___ has quit [Client Quit]
crux73 has quit [Ping timeout: 268 seconds]
<eoli3n>
let's try to understand how to run it manually to debug
___nick___ has joined #ruby
gonix has joined #ruby
toshiba__ has quit [Ping timeout: 268 seconds]
ur5us has quit [Ping timeout: 250 seconds]
<leftylink>
you would perhaps be better served by also printing e.backtrace, instead of just e.message
<leftylink>
if you only print e.message, you won't know what line of code is causing the problems
Tomte has joined #ruby
<eoli3n>
leftylink: i'm sorry, i don't print anything, this is not my script :)
<eoli3n>
but lets check
<eoli3n>
firstly i'm trying to install ruby2.7.5 with rbenv to be sure that the problem occurs only on ruby3
<eoli3n>
it works well with ruby2.7
Tomte has quit [Read error: Connection reset by peer]
gonix has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
reset has quit [Quit: reset]
szkl has joined #ruby
croot has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
croot has quit [Quit: Textual]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
moldorcoder7 has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
z4kz has joined #ruby
nirvdrum has joined #ruby
John_Ivan has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
kjetilho has joined #ruby
<kjetilho>
hey - is it possible to make binding.eval raise an exception when evaluating an unknown instance variable? e.g., binding.eval('@x') - it returns nil, but binding.eval('x') raises NameError
nirvdrum has quit [Quit: nirvdrum]
nirvdrum has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
joto has joined #ruby
some14u has joined #ruby
<svdasein>
here's a new site that helps you find gems for your projects http://gemdex.org
nirvdrum has quit [Quit: nirvdrum]
jetchisel has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
D_A_N has joined #ruby
<joto>
svdasein cool
<svdasein>
joto thanks
gonix has joined #ruby
some14u has joined #ruby
huiko has joined #ruby
gonix has quit [Ping timeout: 264 seconds]
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]