havenwood changed the topic of #ruby to: Ruby 3.3.0, 3.2.3, 3.1.4 https://www.ruby-lang.org | Rules https://ruby-community.com | Logs https://libera.irclog.whitequark.org/ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
jmcantrell has quit [Quit: WeeChat 4.2.1]
jmcantrell has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
<sam113101> how do I force pry to print an array on a single line?
<sam113101> I guess doing "p array; nil" does it
jenrzzz_ has joined #ruby
justache has quit [Ping timeout: 255 seconds]
brandonld has joined #ruby
justache has joined #ruby
brandonld has quit [Quit: Leaving]
brandonld has joined #ruby
brandonld has quit [Quit: Leaving]
justache has quit [Ping timeout: 255 seconds]
justache has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
hightower4 has joined #ruby
gaussianblue has quit [Quit: leaving]
hightower3 has quit [Ping timeout: 264 seconds]
wyclif has quit [Ping timeout: 255 seconds]
justache has quit [Ping timeout: 264 seconds]
wyclif has joined #ruby
<havenwood> sam113101: You can do: puts array.to_s
<sam113101> yo I thought ruby had support for infinitly large numbers
<sam113101> [94] pry(main)> ('9' * 1000000000000000000000000000000000000000000000000000).to_i
<sam113101> RangeError: bignum too big to convert into `long'
justache has joined #ruby
<havenwood> sam113101: Consider that 100000000000000 bytes is 100 terrabytes. Like `String.new(capacity: 100000000000000)`.
<havenwood> sam113101: It's a problem with the size of the String rather than Ruby's Integer.
<[0x1eef_]> Probably a good thing that didn't work then :)
<sam113101> are you saying I don't have enough ram
jenrzzz_ has quit [Ping timeout: 256 seconds]
<[0x1eef_]> Unless you have a supercomputer then probably not enough ram.
fercell has joined #ruby
<[0x1eef_]> I think Ruby handles that though (with NoMemoryError) so computer would probably be sluggish and then return to normal.
fercell_ has quit [Ping timeout: 264 seconds]
krez has joined #ruby
krez has left #ruby [#ruby]
<sam113101> would bignum be able to hold that number though?
<havenwood> sam113101: To be clear, you're talking about one sexdecillion 9s (10**51).
<havenwood> sam113101: Are you wanting a sexdecillion worth of nines or are you wanting 52 places?
<havenwood> Consider that `(0..52).reduce { 10 * _1 + 9 }` would be 52 9s.
<havenwood> >> (0..52).reduce { 10 * _1 + 9 }
<ruby[bot]> havenwood: # => (https://carc.in/#/r/gjii)
<havenwood> You can easily have say a million 9s: (0..1_000_000).reduce { 10 * _1 + 9 }
<havenwood> Ruby doesn't mind if you want a sexdecillion worth of 9s, but you need an enormous amount of memory.
<havenwood> Keep in mind, a google is 100 zeros and a sexdecillion is 51 so you're talking an enormous scale.
<havenwood> sam113101: If you had the computer, you could: (0..10**51).reduce { 10 * _1 + 9 }
<havenwood> It's a truly enormous number.
justache has quit [Ping timeout: 264 seconds]
justache has joined #ruby
<havenwood> sam113101: Keep in mind the universe isn't even 10**27 nanoseconds old and you're talking 10**51 9s.
<havenwood> sam113101: I'm not sure if you mean that many digits? Were you thinking trillions of nines or you really meant a sexdecillion?
<sam113101> it was just an example, I'm hitting the limit in a project euler problem, I guess I'll have to use modulo or some other trick
<sam113101> I'd be a pretty big number though
<sam113101> it'd*
<sam113101> big boy number
JordiGH has quit [Ping timeout: 264 seconds]
wyclif has quit [Ping timeout: 264 seconds]
wyclif has joined #ruby
johnjaye has quit [Ping timeout: 268 seconds]
johnjaye has joined #ruby
Perflosopher has quit [Quit: The Lounge - https://thelounge.chat]
Linux_Kerio has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 256 seconds]
JordiGH has joined #ruby
brandonld has joined #ruby
jmcantrell has quit [Quit: WeeChat 4.2.1]
hightower3 has joined #ruby
brandonld has quit [Quit: Leaving]
brandonld has joined #ruby
hightower4 has quit [Ping timeout: 272 seconds]
brandonld has quit [Quit: Leaving]
user71 has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 246 seconds]
jenrzzz_ has joined #ruby
_ht has joined #ruby
justache has quit [Ping timeout: 264 seconds]
jenrzzz_ has quit [Ping timeout: 264 seconds]
justache has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
JordiGH has quit [Ping timeout: 246 seconds]
johnjaye has quit [Ping timeout: 264 seconds]
johnjaye has joined #ruby
Axenntio has joined #ruby
user71 has quit [Quit: Leaving]
<rapha> just for fun i put (0..10**27).reduce{10 * _1 + 9} into pry. it's still prying 1 hour later. will head to work now. curious to see if it'll still be prying tonight.
helmut has left #ruby [#ruby]
jenrzzz_ has joined #ruby
wyclif has quit [Ping timeout: 252 seconds]
jenrzzz_ has quit [Ping timeout: 268 seconds]
jenrzzz_ has joined #ruby
wyclif has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
rvalue- has joined #ruby
rvalue has quit [Ping timeout: 268 seconds]
rvalue- is now known as rvalue
osc4rpt has quit [Ping timeout: 246 seconds]
osc4rpt has joined #ruby
wyclif has quit [Ping timeout: 260 seconds]
desnudopenguino has quit [Quit: desnudopenguino]
wyclif has joined #ruby
jenrzzz_ has joined #ruby
Vonter has quit [Ping timeout: 272 seconds]
Vonter has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
osc4rpt has quit [Ping timeout: 246 seconds]
osc4rpt has joined #ruby
infinityfye has quit [Ping timeout: 264 seconds]
Linux_Kerio has quit [Ping timeout: 256 seconds]
jenrzzz_ has quit [Ping timeout: 268 seconds]
Vonter has quit [Ping timeout: 264 seconds]
Vonter has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
crespire has quit [Killed (NickServ (GHOST command used by crespire1))]
crespire1 has joined #ruby
osc4rpt has quit [Ping timeout: 255 seconds]
osc4rpt has joined #ruby
meimei has joined #ruby
pounce has joined #ruby
osc4rpt has quit [Ping timeout: 268 seconds]
osc4rpt has joined #ruby
ninoy has joined #ruby
johnjaye has quit [Ping timeout: 268 seconds]
wyclif has quit [Read error: Connection reset by peer]
johnjaye has joined #ruby
wyclif has joined #ruby
ninoy has quit [Remote host closed the connection]
wyclif has quit [Ping timeout: 272 seconds]
wyclif has joined #ruby
graywolf has joined #ruby
Thanzex has quit [Ping timeout: 255 seconds]
osc4rpt has quit [Ping timeout: 255 seconds]
osc4rpt has joined #ruby
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Ping timeout: 264 seconds]
user71 has joined #ruby
osc4rpt has quit [Ping timeout: 260 seconds]
osc4rpt has joined #ruby
user71 has quit [Quit: Leaving]
JordiGH has joined #ruby
infinityfye has joined #ruby
justache has quit [Ping timeout: 264 seconds]
JordiGH has quit [Ping timeout: 260 seconds]
justache has joined #ruby
Thanzex has joined #ruby
johnjaye has quit [Ping timeout: 260 seconds]
johnjaye has joined #ruby
justache has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
justache has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
JordiGH has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 252 seconds]
jenrzzz_ has joined #ruby
desnudopenguino has joined #ruby
polishdub has quit [Quit: leaving]
jenrzzz_ has quit [Ping timeout: 256 seconds]
donofrio has joined #ruby
Linux_Kerio has joined #ruby
jenrzzz_ has joined #ruby
kaivai has quit [Ping timeout: 252 seconds]
jenrzzz_ has quit [Ping timeout: 264 seconds]
eddof13 has joined #ruby
jenrzzz_ has joined #ruby
polishdub has joined #ruby
jenrzzz_ has quit [Ping timeout: 246 seconds]
eddof13 has quit [Quit: eddof13]
Axenntio has quit [Quit: Axenntio]
jenrzzz_ has joined #ruby
user71 has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
<rapha> huh? why does the output of `... | ruby -pe '$_.gsub!(/\s/,"+")'` end in a plus followed by an inverted-colors percent sign?
eddof13 has joined #ruby
user71 has quit [Remote host closed the connection]
user71 has joined #ruby
desnudopenguino has quit [Ping timeout: 264 seconds]
hightower4 has joined #ruby
<adam12> rapha: newline?
<adam12> $echo 'foo bar' | ruby -pe '$_.gsub!(/\s/,"+")'
<adam12> foo+bar+⏎
<rapha> oh. indeed, .strip fixes it. i've never seen an inverted-colour % sign for newline before.
<rapha> thank you!
hightower3 has quit [Ping timeout: 240 seconds]
r3m has joined #ruby
rvalue has quit [Ping timeout: 256 seconds]
desnudopenguino has joined #ruby
rvalue has joined #ruby
Vonter has quit [Ping timeout: 246 seconds]
desnudopenguino has quit [Read error: Connection reset by peer]
Vonter has joined #ruby
oneeyedalien has joined #ruby
<rapha> havenwood: still no result for `(0..10**27).reduce { 10 * _1 + 9 }` :P
<rapha> lol and thank god ... imagine if pry had gotten to try and print that to the terminal
eddof13 has quit [Quit: eddof13]
victori has quit [Ping timeout: 240 seconds]
oneeyedalien has quit [Quit: Leaving]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
cek has joined #ruby
desnudopenguino has joined #ruby
wyclif has quit [Ping timeout: 256 seconds]
jenrzzz_ has joined #ruby
eddof13 has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
eddof13 has quit [Quit: eddof13]
wyclif has joined #ruby
eddof13 has joined #ruby
JordiGH has quit [Remote host closed the connection]
jenrzzz_ has joined #ruby
walez_ has joined #ruby
eddof13 has quit [Client Quit]
wyclif has quit [Ping timeout: 246 seconds]
jenrzzz_ has quit [Ping timeout: 256 seconds]
jenrzzz_ has joined #ruby
wyclif has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
wyclif has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
user71 has quit [Quit: Leaving]
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
dviola has joined #ruby
user71 has joined #ruby
walez_ has quit [Quit: Leaving]
wyclif has joined #ruby
wyclif has quit [Ping timeout: 268 seconds]
jenrzzz_ has quit [Ping timeout: 260 seconds]
user71 has quit [Quit: Leaving]
wyclif has joined #ruby
wyclif has quit [Ping timeout: 246 seconds]
dviola has quit [Quit: WeeChat 4.2.1]
wyclif has joined #ruby
_ht has quit [Remote host closed the connection]
wyclif has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
wyclif has joined #ruby
wyclif has quit [Ping timeout: 268 seconds]
wyclif has joined #ruby
jenrzzz_ has joined #ruby
Linux_Kerio has quit [Ping timeout: 268 seconds]
wyclif has quit [Ping timeout: 252 seconds]
Linux_Kerio has joined #ruby
joast has quit [Quit: Leaving.]
cek has quit [Quit: Connection closed for inactivity]
Linux_Kerio has quit [Ping timeout: 252 seconds]
jenrzzz_ has quit [Ping timeout: 260 seconds]
wyclif has joined #ruby
wyclif has quit [Ping timeout: 255 seconds]
eddof13 has joined #ruby
wyclif has joined #ruby
wyclif has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 246 seconds]
highrate has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
wyclif has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
wyclif has quit [Ping timeout: 255 seconds]
graywolf has quit [Quit: WeeChat 4.0.4]
infinityfye has quit [Ping timeout: 260 seconds]
infinityfye has joined #ruby
wyclif has joined #ruby
wyclif has quit [Ping timeout: 260 seconds]
eddof13 has quit [Quit: eddof13]
wyclif has joined #ruby
eddof13 has joined #ruby