jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
toshiba__ has quit [Ping timeout: 268 seconds]
wand has joined #ruby
some14u has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
finsternis has quit [Read error: Connection reset by peer]
Rounin has quit [Ping timeout: 268 seconds]
moldorcoder7 has quit [Ping timeout: 260 seconds]
sachot has left #ruby [#ruby]
pvalenta has quit [Ping timeout: 248 seconds]
pvalenta has joined #ruby
nirvdrum has joined #ruby
nirvdrum has quit [Ping timeout: 260 seconds]
Tron has joined #ruby
nirvdrum has joined #ruby
nirvdrum has quit [Read error: Connection reset by peer]
nirvdrum has joined #ruby
nirvdrum has quit [Ping timeout: 248 seconds]
nirvdrum has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
John_Ivan has quit [Ping timeout: 260 seconds]
D_A_N has quit [Quit: leaving]
grokify has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
grokify has quit [Ping timeout: 246 seconds]
nirvdrum has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
nirvdrum has quit [Client Quit]
<sam113101> how do I specify the precision with bigdecimal?
nirvdrum has joined #ruby
dviola has joined #ruby
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
nirvdrum has quit [Ping timeout: 250 seconds]
nirvdrum has joined #ruby
ur5us has joined #ruby
nirvdrum has quit [Ping timeout: 252 seconds]
nirvdrum has joined #ruby
sagax has joined #ruby
nirvdrum has quit [Ping timeout: 250 seconds]
sagax has quit [*.net *.split]
Sankalp has quit [*.net *.split]
rvalue has quit [*.net *.split]
sixecho has quit [*.net *.split]
Thanzex3 has quit [*.net *.split]
mahlon has quit [*.net *.split]
ralu1 has quit [*.net *.split]
Fridtjof has quit [*.net *.split]
cyj123 has quit [*.net *.split]
integral has quit [*.net *.split]
Exa has quit [*.net *.split]
olspookishmagus has quit [*.net *.split]
dcx has quit [*.net *.split]
con3 has quit [*.net *.split]
asio has quit [*.net *.split]
asio_ has joined #ruby
olspookishmagus has joined #ruby
ralu1 has joined #ruby
Thanzex3 has joined #ruby
mahlon has joined #ruby
cyj123 has joined #ruby
integral has joined #ruby
integral has quit [Changing host]
integral has joined #ruby
con3 has joined #ruby
rvalue has joined #ruby
Fridtjof has joined #ruby
Exa has joined #ruby
nirvdrum has joined #ruby
dcx has joined #ruby
Sankalp has joined #ruby
<sam113101> does the ruby standard library have graphs?
sixecho has joined #ruby
nirvdrum has quit [Ping timeout: 248 seconds]
sagax has joined #ruby
grokify has joined #ruby
nirvdrum has joined #ruby
grokify has quit [Ping timeout: 248 seconds]
Sankalp has quit [Ping timeout: 264 seconds]
croot has joined #ruby
Sankalp has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
nirvdrum has joined #ruby
nirvdrum has quit [Client Quit]
cartdrige has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
cartdrige has joined #ruby
dionysus69 has joined #ruby
gonix has joined #ruby
feep[work] has joined #ruby
feep[work] has left #ruby [#ruby]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
teclator has joined #ruby
teclator_ has joined #ruby
croot has quit [Quit: ZZZzzz…]
teclator has quit [Client Quit]
soknte5 has joined #ruby
gonix has quit [Ping timeout: 268 seconds]
ur5us has quit [Ping timeout: 248 seconds]
grokify has joined #ruby
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
TomyWork has joined #ruby
croot has joined #ruby
Thanzex3 has quit [Ping timeout: 264 seconds]
sagax has quit [Remote host closed the connection]
teclator_ is now known as teclator
ur5us has joined #ruby
Thanzex32 has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
croot has quit [Quit: ZZZzzz…]
otisolsen70 has joined #ruby
otisolsen70 has quit [Remote host closed the connection]
otisolsen70 has joined #ruby
gr33n7001 has joined #ruby
gr33n7007h has quit [Killed (mercury.libera.chat (Nickname regained by services))]
gr33n7001 is now known as gr33n7007h
ur5us has quit [Ping timeout: 250 seconds]
Guest2735 has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]
grokify has quit [Remote host closed the connection]
jpn has joined #ruby
grokify has joined #ruby
walez has joined #ruby
walez has quit [Ping timeout: 248 seconds]
soknte5 has quit [Ping timeout: 260 seconds]
moldorcoder7 has joined #ruby
<sam113101> why can't we index a range?
szkl has joined #ruby
teclator has quit [Ping timeout: 252 seconds]
<leftylink> I expect indexing into something to be a constant-time operation as it is for arrays and hashes, but we cannot index into a range in constant time. for example
<leftylink> pandabot: rb (Struct.new(:a) { def succ; self.class.new(a.even? ? a / 2 : a * 3 + 1) end }.new(819)..).take(5)
<pandabot> [#<struct a=819>, #<struct a=2458>, #<struct a=1229>, #<struct a=3688>, #<struct a=1844>] - https://carc.in/#/r/dwc3
<leftylink> you cannot index into that range in constant time. it will take time proportional to the index desired
<leftylink> so I wouldn't want to be deceived by having an indexing operator and thinking it's a constant time operation, when it cannot be one
crux73 has joined #ruby
teclator has joined #ruby
cartdrige has quit [Ping timeout: 268 seconds]
<leftylink> pandabot: rb Struct.new(:a) { def succ; self.class.new(a.even? ? a / 2 : a * 3 + 1) end }.new(819)..
<pandabot> #<struct a=819>.. - https://carc.in/#/r/dwcg
crux73 has quit [Ping timeout: 252 seconds]
cartdrige has joined #ruby
<gr33n7007h> i didn't even know you can index arrays with ArithmeticSequences.
<gr33n7007h> e.g [*0..100][50.step(0, -2)] => [50, 48, 46 ...]
<gr33n7007h> pretty cool!
<gr33n7007h> only works with Array#[] and Array#slice afaict
jpn has quit [Ping timeout: 268 seconds]
some14u has joined #ruby
mikecmpbll has joined #ruby
jpn has joined #ruby
some14u has quit [Quit: Textual IRC Client: www.textualapp.com]
John_Ivan has joined #ruby
walez has joined #ruby
totoro has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
jpn has quit [Ping timeout: 248 seconds]
gr33n7007h has quit [Quit: WeeChat 3.7]
crux73 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
totoro has joined #ruby
totoro has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
jpn has quit [Ping timeout: 268 seconds]
walez has quit [Ping timeout: 248 seconds]
D_A_N has joined #ruby
D_A_N_ has joined #ruby
jpn has joined #ruby
svdasein_ has joined #ruby
totoro has joined #ruby
<svdasein_> Here is a new web site to help you find gems for your projects. It's power search heuristics and the ranking and scoring are user-adjustable. It's a step up from bestgems.org: http://gemdex.org/
jpn has quit [Ping timeout: 264 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
drainpipe has joined #ruby
jpn has joined #ruby
jetchisel has joined #ruby
walez has joined #ruby
jetchisel has quit [Client Quit]
D_A_N has quit [Quit: leaving]
D_A_N_ has quit [Quit: leaving]
D_A_N has joined #ruby
niv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
niv has joined #ruby
drainpipe has quit [Quit: WeeChat 3.6]
walez has quit [Quit: Leaving]
finsternis has joined #ruby
Guimauve has joined #ruby
supay has joined #ruby
Guimauve has quit [Quit: what do a cigarette and a hamster have in common? they're both harmless until you put them in your mouth and light them on fire. ]
drainpipe has joined #ruby
<sam113101> is there no longer a Singleton module?
onyx_ has joined #ruby
onyx has joined #ruby
<adam12> sam113101: What makes you say that?
<Vaevictus> sam113101: looks like it's still in at least 3.1.2
<Vaevictus> granted... if you know enough to know when you should use Singleton, you probably know enough to roll your own in about 3 seconds anyway, right?
arahael has quit [Ping timeout: 246 seconds]
reset has quit [Quit: reset]
<adam12> Generally you can get away with just assigning an instance to a constant.
<adam12> There are better patterns than the Singleton module, imho.
<adam12> If you have Jeremy Evans book, he covers a few in it IIRC.
markong has joined #ruby
toshiba__ has joined #ruby
crux73 has quit [Ping timeout: 268 seconds]
crux73 has joined #ruby
cartdrige has joined #ruby
toshiba__ has quit [Ping timeout: 268 seconds]
arahael has joined #ruby
crux73 has quit [Ping timeout: 268 seconds]
_ht has joined #ruby
eron has joined #ruby
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 250 seconds]
desnudopenguino1 is now known as desnudopenguino
crux73 has joined #ruby
cartdrige has quit [Ping timeout: 264 seconds]
mekhami has joined #ruby
<mekhami> hey ya'll, i'm having some trouble getting a ruby project (that i have no experience with) working with an M1 macbook. You can see the vast output of my CI system here: https://gist.github.com/mekhami/986fd0df5ac9b9b207262fa7647d68c6
<mekhami> I don't understand what the problem is here at all really.
<mekhami> undefined method `stidio` for Puma::Events:Class (NoMethodError) this seems to be the root of pretty much all of it?
cartdrige has joined #ruby
<adam12> mekhami: Share your Gemfile and Gemfile.lock in a gist.
crux73 has quit [Ping timeout: 250 seconds]
toshiba__ has joined #ruby
<adam12> mekhami: I wouldn't be surprised if Puma 6 has breaking changes, and you've been caught by it.
<adam12> mekhami: Is your Gemfile.lock commited to source control? or did you just generate it.
<mekhami> it's committed
<adam12> mekhami: Has the Puma version changed at all in the lock file? I see it using 6.0, but since it was only released 3 days ago, I'm skeptical.
<adam12> In the short term, you could try restricting the Puma version in teh Gemfile to one of the 5.x series. gem 'puma', '~> 5.6', '>= 5.6.5'
cartdrige has quit [Ping timeout: 248 seconds]
<adam12> That method for-sure exists on 5.6.5. http://gemdocs.org/gems/puma/5.6.5/Puma/Events.html#stdio-class_method
crux73 has joined #ruby
<adam12> bbiab. lunch.
toshiba__ has quit [Ping timeout: 264 seconds]
cartdrige has joined #ruby
crux73 has quit [Ping timeout: 268 seconds]
eron has quit [Quit: Client closed]
crux73 has joined #ruby
<mekhami> adam12: that seems to have definitely improved things! I'm getting another similarly obtuse set of errors around tilt now. It does not give me any information on what could be wrong though. i'll get the file in a second.
dionysus69 has quit [Ping timeout: 268 seconds]
cartdrige has quit [Ping timeout: 268 seconds]
toshiba__ has joined #ruby
crux73 has quit [Ping timeout: 250 seconds]
<mekhami> A lot of this 'undefined method `id` for nil:NilClass which seems to come from the tilt library.
<mekhami> tilt hasn't had a release in months so i'm not seeing it be the issue
<mekhami> (God i hate browser based testing so much.)
dionysus69 has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
jetchisel has joined #ruby
<adam12> mekhami: That's an unfortunate error. I'm not sure it's going to be as easy to fix.
grokify has joined #ruby
<adam12> mekhami: Did you recently upgrade the haml gem? Maybe it's related........
<adam12> mekhami: You'd need to know _what_ is nil. I don't think you'll get that from the current stacktrace.
jpn has joined #ruby
<adam12> mekhami: Maybe go through `git logs Gemfile.lock` and see if the haml version changed. Again, it's using a 6.x lineage that is fairly recent.
Tron has quit [Quit: Leaving]
<mekhami> okay I'll look in that direction. it's only 22 failing tests now which is helpful.
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
eddof13 has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
Guimauve has joined #ruby
grokify has quit [Ping timeout: 264 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Sheilong has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
gonix has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
crux73 has joined #ruby
gonix has quit [Ping timeout: 268 seconds]
toshiba__ has quit [Ping timeout: 252 seconds]
cartdrige has joined #ruby
crux73 has quit [Ping timeout: 252 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
crux73 has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
cartdrige has quit [Ping timeout: 246 seconds]
eddof13 has joined #ruby
toshiba__ has joined #ruby
Sankalp has quit [Ping timeout: 268 seconds]
crux73 has quit [Ping timeout: 248 seconds]
jpn has joined #ruby
cartdrige has joined #ruby
toshiba__ has quit [Ping timeout: 252 seconds]
jetchisel has joined #ruby
Sankalp has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
crux73 has joined #ruby
hellstabber has joined #ruby
cartdrige has quit [Ping timeout: 250 seconds]
polishdub has quit [Remote host closed the connection]
NightMonkey has quit [Quit: ZNC - http://znc.in]
Guimauve3 has joined #ruby
Guimauve has quit [Killed (NickServ (GHOST command used by Guimauve3))]
Guimauve3 is now known as Guimauve
Sankalp has quit [Ping timeout: 250 seconds]
Sankalp has joined #ruby
NightMonkey has joined #ruby
jpn has joined #ruby
rapha has joined #ruby
hellstabber has quit [Quit: Textual IRC Client: www.textualapp.com]
<rapha> evening (UGT) all!
<rapha> anyone feel like golfing me?
hellstabber has joined #ruby
Guimauve has quit [Quit: Client closed]
markong has quit [Ping timeout: 252 seconds]
<adam12> rapha: morning!
<rapha> :)
hellstabber has quit [Quit: Updating details, brb]
hellstabber has joined #ruby
grokify has joined #ruby
splud has quit [Ping timeout: 252 seconds]
grokify has quit [Ping timeout: 248 seconds]
jpn has quit [Ping timeout: 268 seconds]
TomyWork has quit [Remote host closed the connection]
splud has joined #ruby
splud has quit [Ping timeout: 250 seconds]
polishdub has joined #ruby
jpn has joined #ruby
splud has joined #ruby
ur5us has joined #ruby
toshiba__ has joined #ruby
crux73 has quit [Ping timeout: 250 seconds]
toshiba__ has quit [Remote host closed the connection]
cartdrige has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
_ht has quit [Remote host closed the connection]
Sankalp has quit [Ping timeout: 252 seconds]
yxhuvud has quit [Read error: Connection reset by peer]
eron has joined #ruby
yxhuvud has joined #ruby
markong has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Sankalp has joined #ruby
jpn has joined #ruby
otisolsen70 has quit [Quit: Leaving]
grokify has joined #ruby
grokify has quit [Ping timeout: 250 seconds]
grokify has joined #ruby
nirvdrum has joined #ruby
grokify has quit [Remote host closed the connection]
supay has quit [Quit: Connection closed for inactivity]
grokify has joined #ruby
grokify has quit [Ping timeout: 246 seconds]
darkstardevx has joined #ruby
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #ruby
darkstardevx has quit [Remote host closed the connection]
darkstardevx has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
gonix has joined #ruby
<John_Ivan> hmm. strange.
<John_Ivan> would anyone know why calling ruby from bash on a script would cause it to not recognize installed dependency gems?
gonix has quit [Ping timeout: 260 seconds]
<adam12> John_Ivan: there are env variables set for where gems are stored. In the bash script, you might not have those env vars set.
<adam12> John_Ivan: This is especially true for things like rbenv, rvm, etc.
<John_Ivan> but it's just calling `ruby`. shouldn't `ruby` know where they are?
<John_Ivan> why is it that if I open a terminal (which is still bash) and call ruby directly, it works.
<John_Ivan> but when it's in a .sh script, it doesn't.
<sam113101> they're different environments
<John_Ivan> I.. see.
<leftylink> ;q
jpn has joined #ruby
<adam12> John_Ivan: `gem env` inside your shell, and see what GEM_HOME is set to. Then try running it from the script, and see if the value is different.
<John_Ivan> ok
<John_Ivan> yeah.... it's different.
<John_Ivan> shell: GEM PATHS:
<John_Ivan> - C:/Users/rijndael-box-unix/.local/share/gem/ruby/3.1.0
<John_Ivan> - C:/Ruby31-x64/lib/ruby/gems/3.1.0
<John_Ivan> script: GEM PATHS:
<John_Ivan> - /usr/share/gems
<John_Ivan> - /home/rijndael-box-unix/.gem/ruby/2.6.0
<John_Ivan> - /usr/local/share/gems
jpn has quit [Ping timeout: 252 seconds]
<John_Ivan> how do I get to change it?
dionysus69 has quit [Ping timeout: 248 seconds]
drainpipe has quit [Ping timeout: 248 seconds]
<John_Ivan> export PATH="$PATH:/cygdrive/c/Ruby31-x64/lib/ruby/gems/3.1.0"
<John_Ivan> I tried that. didn't work.
<John_Ivan> wait..
jpn has joined #ruby
<John_Ivan> ok. now it worked. but whoa...
<John_Ivan> ok! I solved it. thanks adam12.
<John_Ivan> first problem: it was using ruby from my cygwin environment /bin
<John_Ivan> second problem: it thought gems were in ~/
<John_Ivan> solution:
<John_Ivan> export GEM_PATH="/cygdrive/c/Ruby31-x64/lib/ruby/gems/3.1.0"
<John_Ivan> RUBY_PATH="/cygdrive/c/Ruby31-x64/bin"
<John_Ivan> and
<John_Ivan> $RUBY_PATH/ruby <my_script>
crux73 has joined #ruby
hellstabber has quit [Quit: Connection closed for inactivity]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cartdrige has quit [Ping timeout: 248 seconds]
<John_Ivan> yes! I am happy now.
jpn has quit [Ping timeout: 260 seconds]
toshiba__ has joined #ruby
crux73 has quit [Ping timeout: 250 seconds]
nirvdrum has quit [Quit: nirvdrum]
reset has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 252 seconds]
eron has quit [Quit: Client closed]
jpn has joined #ruby
gonix has joined #ruby
jpn has quit [Ping timeout: 250 seconds]
<rapha> sam113101: okay, that went crazy impressive real quick. i was expecting more people to respond and the number of characters to slowly drop. you just basically hole-in-one'd it o_O
<rapha> <3-ing the def x= notation; TIL!
Thanzex32 has quit [Read error: Connection reset by peer]
Thanzex32 has joined #ruby
eddof13 has joined #ruby
drainpipe has joined #ruby
drainpipe has quit [Ping timeout: 252 seconds]
soknte5 has joined #ruby
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eddof13 has joined #ruby
gonix has quit [Ping timeout: 260 seconds]
eddof13 has quit [Client Quit]
Rounin has quit [Ping timeout: 250 seconds]
jpn has joined #ruby
grokify has joined #ruby
jpn has quit [Ping timeout: 250 seconds]
drainpipe has joined #ruby
markong has quit [Ping timeout: 250 seconds]
drainpipe has quit [Ping timeout: 248 seconds]