havenwood changed the topic of #ruby to: Ruby 3.3.2, 3.2.4, 3.4.0-preview1 https://www.ruby-lang.org | Logs https://libera.irclog.whitequark.org/ruby
bhaak has joined #ruby
sagax has quit [Ping timeout: 246 seconds]
dostoyevsky2 has quit [Ping timeout: 260 seconds]
dostoyevsky2 has joined #ruby
nirix has quit []
nirix has joined #ruby
nirix has quit [Quit: ZNC 1.8.2+deb3.1 - https://znc.in]
nirix has joined #ruby
brokkoli_origin has quit [Ping timeout: 252 seconds]
brokkoli_origin has joined #ruby
wyclif has joined #ruby
gaussianblue has joined #ruby
grenierm has joined #ruby
patrick has quit [Ping timeout: 240 seconds]
patrick_ is now known as patrick
user71 has joined #ruby
wyclif has quit [Ping timeout: 264 seconds]
cappy has joined #ruby
wyclif has joined #ruby
fercell has joined #ruby
jaredce has joined #ruby
fercell has quit [Ping timeout: 255 seconds]
jaredce has quit [Ping timeout: 272 seconds]
jaredce has joined #ruby
Thanzex0 has quit [Ping timeout: 255 seconds]
cappy has quit [Quit: Leaving]
wyclif has quit [Ping timeout: 256 seconds]
FetidToot3 has quit [Read error: Connection reset by peer]
FetidToot3 has joined #ruby
wyclif has joined #ruby
fercell has joined #ruby
fercell has quit [Ping timeout: 255 seconds]
wyclif has quit [Ping timeout: 268 seconds]
Inline has quit [Quit: Leaving]
wyclif has joined #ruby
wyclif has quit [Ping timeout: 240 seconds]
Inline has joined #ruby
wyclif has joined #ruby
wyclif has quit [Ping timeout: 272 seconds]
wyclif has joined #ruby
wyclif has quit [Ping timeout: 240 seconds]
wyclif has joined #ruby
user71 has quit [Quit: Leaving]
petru has quit [Ping timeout: 260 seconds]
dostoyevsky2 has quit [Remote host closed the connection]
xdminsy has quit [Quit: Konversation terminated!]
xdminsy has joined #ruby
hightower2 has joined #ruby
Vonter has quit [Ping timeout: 256 seconds]
dostoyevsky2 has joined #ruby
Linux_Kerio has joined #ruby
Vonter has joined #ruby
petru has joined #ruby
gaussianblue has quit [Quit: leaving]
user71 has joined #ruby
desnudopenguino has quit [Ping timeout: 246 seconds]
wyclif has quit [Ping timeout: 268 seconds]
Vonter has quit [Ping timeout: 256 seconds]
Vonter has joined #ruby
Vonter has quit [Quit: WeeChat 4.3.1]
grenierm has quit [Ping timeout: 250 seconds]
Vonter has joined #ruby
wyclif has joined #ruby
wyclif has quit [Ping timeout: 264 seconds]
jaredce has quit [Ping timeout: 246 seconds]
wyclif has joined #ruby
wyclif has quit [Ping timeout: 264 seconds]
wyclif has joined #ruby
jaredce has joined #ruby
user71 has quit [Quit: Leaving]
wyclif has quit [Quit: leaving]
user71 has joined #ruby
<mooff> just discovered this reading ruby/benchmark/app_lc_fizzbuzz.rb
<mooff> the sample is great.. shows how to build up a virtual machine from Number, Add, Multiply, LessThan, (...) classes
Guest32 has joined #ruby
Guest32 has quit [Client Quit]
donofrio has joined #ruby
heinrich5991 has quit [Quit: quit.]
heinrich5991 has joined #ruby
gaussianblue has joined #ruby
donofrio_ has joined #ruby
brw has quit [Remote host closed the connection]
donofrio has quit [Ping timeout: 246 seconds]
brw has joined #ruby
Thanzex0 has joined #ruby
user71 has quit [Quit: Leaving]
donofrio_ has quit [Read error: Connection reset by peer]
donofrio_ has joined #ruby
brokkoli_origin has quit [Remote host closed the connection]
jaredce has quit [Ping timeout: 268 seconds]
desnudopenguino has joined #ruby
user71 has joined #ruby
brokkoli_origin has joined #ruby
sagax has joined #ruby
cappy has joined #ruby
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
Linux_Kerio has quit [Ping timeout: 252 seconds]
fercell has joined #ruby
<adam12> mooff: It's an awesome book.
fercell_ has joined #ruby
fercell has quit [Ping timeout: 255 seconds]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 268 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 268 seconds]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 264 seconds]
fercell_ has joined #ruby
hightower3 has joined #ruby
fercell has quit [Ping timeout: 272 seconds]
hightower2 has quit [Ping timeout: 260 seconds]
assembly has joined #ruby
fercell has joined #ruby
fercell_ has quit [Ping timeout: 255 seconds]
hightower4 has joined #ruby
fercell_ has joined #ruby
fercell has quit [Ping timeout: 272 seconds]
hightower3 has quit [Ping timeout: 246 seconds]
assembly has left #ruby [#ruby]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 268 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 268 seconds]
fercell_ has quit [Ping timeout: 252 seconds]
fercell has joined #ruby
fercell_ has joined #ruby
fercell has quit [Ping timeout: 256 seconds]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 256 seconds]
fercell_ has joined #ruby
Furai has quit [Quit: WeeChat 4.3.1]
fercell has quit [Ping timeout: 256 seconds]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 256 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 272 seconds]
Furai has joined #ruby
fercell has joined #ruby
fercell_ has quit [Ping timeout: 256 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 252 seconds]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 268 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 268 seconds]
brokkoli_origin has quit [Remote host closed the connection]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 268 seconds]
cappy has quit [Quit: Leaving]
brokkoli_origin has joined #ruby
___nick___ has quit [Ping timeout: 256 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 268 seconds]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 264 seconds]
brokkoli_origin has quit [Quit: (Leaving)]
fercell has quit [Ping timeout: 255 seconds]
fercell_ has joined #ruby
_0x1eef has quit [Quit: Reboot]
_0x1eef has joined #ruby
fercell has joined #ruby
fercell_ has quit [Ping timeout: 256 seconds]
<scottgy> I'm trying to set up a project in a different environment (kinda complicated to explain but involves docker). My head is kinda spinning with different install locations for packages
<scottgy> I have a situation where I can't run bundle exec rspec, in another setup for the same project I can
<scottgy> I've narrowed it down to the fact that in the situation where I can't run it I don't have bin/rspec in my install location
<scottgy> There are other differences which I'm finding confusing like one setup has everything instaled in /usr/local/rvm/gems but the other /usr/local/rvm/rubies
brokkoli_origin has joined #ruby
<scottgy> Can someone explain how I might have gotten into this different situation?
<scottgy> I've compared bundle env outputs and they're mostly the same
fercell_ has joined #ruby
fercell has quit [Ping timeout: 255 seconds]
<weaksauce> bundle exec wouldn't rely on bin/rspec
<scottgy> Actually, that's not really true, one says rvm isn't installed
<weaksauce> and bin/rspec should setup bundle
<scottgy> not sure what you mean by your last message
<scottgy> what do you mean setup bundle?
<weaksauce> as in it should setup the bundle as if it was bundle exec'ed
<weaksauce> using something like require 'bundler/setup' or something like that
<scottgy> hm ok
<weaksauce> it almost certainly has something to do with the docker thing
<weaksauce> not copying files over correctly maybe
<scottgy> Yes of course, there must've been some difference in how I set things up
<scottgy> So as a little more context, the one that's working is a dev container
<scottgy> The one that isn't I'm trying to get a remote interpreter set up with intellij
<scottgy> In that install I'm mounting my source. So something in my local env was maybe wonky at some time
<scottgy> I think I should try cloning again fresh
fercell has joined #ruby
fercell_ has quit [Ping timeout: 252 seconds]
<scottgy> weaksauce: what's the deal with the whole rubies vs gems directories though?
<scottgy> Like what would cause one setup to install and use everything in one place vs the other?
<weaksauce> i am not sure on that
<weaksauce> i don't use rvm
<scottgy> weaksauce: would you recommend something else?
<weaksauce> i personally use rbenv and it's nice
<weaksauce> asdf is another popular option
fercell_ has joined #ruby
<weaksauce> rvm seems to be more antiquated with more moving parts
fercell has quit [Ping timeout: 264 seconds]
<scottgy> Interesting
<scottgy> Yeah I'm not sure I want to switch now. It's pretty well set up in the project
<scottgy> I thought it was the most popular option though
<scottgy> Setup always seemed somewhat straightforward with the whole workflow. And that it can handle installing and specifying what version you want to use
<scottgy> But I don't have experience at all with the others
<weaksauce> i used rvm probably 10 years ago and i'm glad i got off it but maybe it's better now
<weaksauce> maybe 15 years ago actually
<scottgy> Hopefully it's gotten better since then lol
<weaksauce> yeah
<weaksauce> it still does too much... things like gemsets aren't needed anymore
<weaksauce> before bundler became defacto standard it filled a hole
fercell has joined #ruby
fercell_ has quit [Ping timeout: 264 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 264 seconds]
<scottgy> Also what's weird is if I go into the container and run bundle install, it acts like it hasn't run before
<weaksauce> what does the dockerfile look like?
fercell_ has quit [Ping timeout: 252 seconds]
<scottgy> Relevant bits are that I install rvm: RUN curl -sSL https://get.rvm.io | bash -s stable
<scottgy> RUN /bin/bash -l -c ". /etc/profile.d/rvm.sh && rvm install 2.6.2"
<scottgy> to install the ruby version
<scottgy> RUN /bin/bash -l -c ". /etc/profile.d/rvm.sh && gem install foreman bundler:2.4.22"
<scottgy> to install bundler
<scottgy> (foreman isn't relevant and can be removed here I just haven't gotten around to it)
<scottgy> That whole sourcing situation of rvm.sh is actually pretty annoying
<scottgy> I suspect that screws up a fair bit of things
<weaksauce> no bundle install step?
fercell has joined #ruby
<scottgy> That happens at runtime since I don't want to bake that into the image
<scottgy> Only really necessary once
<scottgy> I'm using a volume cache to persist across container runs
<scottgy> Possible getting myself into a little trouble that way. I already had issues with intellij when I was specifying a BUNDLE_PATH because it was trying to add it's own
<scottgy> Can you have multiple paths on bundle path?
<scottgy> I'm still not sure that's the root of the issue though. Because if I run bundle install from intellij it's fine across runs
<weaksauce> uh not sure
<weaksauce> i would think bundle path is for bundler itself
<scottgy> After running bundle install in the container manually now I'm able to run rspec
fercell_ has joined #ruby
fercell has quit [Ping timeout: 256 seconds]
<scottgy> Yeah and it's installing into gems instead of rubies
<scottgy> However it is that bundle install runs in intellij it isn't installing things in gems
fercell_ has quit [Ping timeout: 256 seconds]
fercell has joined #ruby
<scottgy> This is the command that intellij uses to run bundle install in the container:
gaussianblue has quit [Quit: leaving]
<scottgy> /usr/local/rvm/rubies/ruby-2.6.2/bin/ruby -x /usr/local/rvm/rubies/ruby-2.6.2/bin/bundle exec /usr/local/rvm/rubies/ruby-2.6.2/bin/ruby /usr/local/rvm/rubies/ruby-2.6.2/bin/bundle install
<scottgy> Ah when I run bundle install manually it uses /usr/local/rvm/gems/ruby-2.6.2/bin/bundle
<scottgy> As to why that ends up with different structures under those dirs though I don't understand
<scottgy> As in the former doesn't create a bin/rspec
fercell_ has joined #ruby
fercell has quit [Ping timeout: 252 seconds]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 272 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 268 seconds]
<weaksauce> if it's not in the gemfile it might not make it
<weaksauce> you could try and run bundler binstubs
<weaksauce> but 2.6.2 is really old
<scottgy> yeah for real
<scottgy> Trying to get over this initial hump so we can have a solid ground and start upgrading it
<scottgy> weaksauce | if it's not in the gemfile it might not make it
<scottgy> sorry what do you mean by this?
fercell has joined #ruby
fercell_ has quit [Ping timeout: 246 seconds]
bovis has joined #ruby
<weaksauce> the bin folder is for binstubs made by ruby
<weaksauce> er bundler
<scottgy> but what did you mean if "it" isn't in the gem file
<scottgy> gemfile
<scottgy> what would it be?
user71 has quit [Quit: Leaving]
<weaksauce> rspec?
<weaksauce> i have no clue what intellij does under the hood
<weaksauce> i use vscode and that also escapes my understanding
<weaksauce> albeit a bit less
fercell_ has joined #ruby
<bovis> This (https://bpa.st/3B4A) should *read* a large file line by line, keeping memory usage low. How can you *write* line-by-line, for example, to copy src.txt to dest.txt without loading dest.txt into memory while its being written to (keeping memory usage at a minimum)?
fercell has quit [Ping timeout: 268 seconds]
<weaksauce> bovis just append to the end of the file?
<weaksauce> it should be a stream that you just write to and flush periodically
fercell has joined #ruby
fercell_ has quit [Ping timeout: 264 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 256 seconds]
fercell_ has quit [Ping timeout: 255 seconds]
fercell has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
fercell_ has joined #ruby
fercell has quit [Ping timeout: 252 seconds]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 268 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 268 seconds]
<_0x1eef> IIRC IO.copy_stream is optimized for that: https://www.rubydoc.info/stdlib/core/IO.copy_stream
fercell has joined #ruby
fercell_ has quit [Ping timeout: 256 seconds]
<_0x1eef> (Specialized mechanisms, such as sendfile system call, may be used on appropriate situation.)
fercell_ has joined #ruby
fercell has quit [Ping timeout: 246 seconds]
hightower3 has joined #ruby
<leah2> til
hightower4 has quit [Ping timeout: 252 seconds]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 268 seconds]
fercell_ has joined #ruby
fercell has quit [Ping timeout: 264 seconds]
fercell has joined #ruby
fercell_ has quit [Ping timeout: 268 seconds]
fercell_ has joined #ruby
fercell_ has quit [K-Lined]
fercell has quit [K-Lined]
grenierm has joined #ruby
cappy has joined #ruby