havenwood changed the topic of #ruby to: Ruby 3.4.4, 3.3.8, 3.5.0-preview1 https://www.ruby-lang.org | Log https://libera.irclog.whitequark.org/ruby
cappy has joined #ruby
wbooze has quit [Ping timeout: 244 seconds]
pastelowl has quit [Quit: WeeChat 4.6.3]
wbooze has joined #ruby
fercell has quit [Quit: ZNC - https://znc.in]
fercell has joined #ruby
pastelowl has joined #ruby
o0x1eef has quit [Ping timeout: 248 seconds]
sarna has joined #ruby
donofrio has joined #ruby
PauloEE has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest68 has joined #ruby
Guest68 has quit [Ping timeout: 248 seconds]
brw has quit [Remote host closed the connection]
brw has joined #ruby
cappy has quit [Quit: Leaving]
Vonter has joined #ruby
ih8u has quit [Quit: ih8u]
ih8u has joined #ruby
brw has quit [Remote host closed the connection]
brw has joined #ruby
ih8u has quit [Client Quit]
brw has quit [Remote host closed the connection]
ih8u has joined #ruby
brw has joined #ruby
brw has quit [Remote host closed the connection]
Linux_Kerio has joined #ruby
brw has joined #ruby
dviola has quit [Read error: Connection reset by peer]
diego has joined #ruby
diego is now known as Guest3158
Guest3158 has quit [Quit: WeeChat 4.6.3]
brw has quit [Quit: The Lounge - https://thelounge.chat]
dviola has joined #ruby
dviola has quit [Ping timeout: 272 seconds]
diego has joined #ruby
diego is now known as Guest5641
grenierm has joined #ruby
jmcantrell has quit [Ping timeout: 276 seconds]
infinityfye has joined #ruby
fantazo has joined #ruby
<nakilon> I bet no one in my company knows regexes
schne1der has joined #ruby
<testone> it happens to be true for a lot of 'tech' places :D
fantazo has quit [Quit: leaving]
fantazo has joined #ruby
brw has joined #ruby
brw has quit [Client Quit]
sleetdro| has quit [Quit: ZNC 1.8.2+deb2ubuntu0.1 - https://znc.in]
sleetdrop has joined #ruby
brw has joined #ruby
pastelowl has quit [Ping timeout: 248 seconds]
R2robot has quit [Quit: Pull the lever, Kronk. Wrong leverrrrrrr!]
pastelowl has joined #ruby
R2robot has joined #ruby
brw has quit [Quit: The Lounge - https://thelounge.chat]
brw has joined #ruby
dionysus69 has joined #ruby
brw has quit [Quit: The Lounge - https://thelounge.chat]
brw has joined #ruby
TomyWork has joined #ruby
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
Linux_Kerio has quit [Ping timeout: 260 seconds]
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 276 seconds]
ih8u2 is now known as ih8u
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 252 seconds]
ih8u2 is now known as ih8u
o0x1eef has joined #ruby
oznek_ has joined #ruby
oznek has quit [Ping timeout: 260 seconds]
oznek__ has joined #ruby
oznek_ has quit [Ping timeout: 252 seconds]
ih8u has quit [Ping timeout: 260 seconds]
ih8u2 has joined #ruby
ih8u2 is now known as ih8u
oznek_ has joined #ruby
ih8u2 has joined #ruby
oznek__ has quit [Ping timeout: 272 seconds]
ih8u has quit [Ping timeout: 248 seconds]
ih8u2 is now known as ih8u
ih8u2 has joined #ruby
ih8u has quit [Ping timeout: 244 seconds]
ih8u2 is now known as ih8u
dionysus69 has quit [Ping timeout: 248 seconds]
rovanion has joined #ruby
ih8u2 has joined #ruby
<rovanion> Is there something like Clojure's threading macro in Ruby? I.e. (-> 1 inc dec) is equivalent to (dec (inc 1)).
ih8u has quit [Ping timeout: 276 seconds]
ih8u2 is now known as ih8u
grenierm has quit [Ping timeout: 272 seconds]
o0ox1eef has joined #ruby
ih8u2 has joined #ruby
o0x1eef has quit [Ping timeout: 260 seconds]
schne1der has quit [Ping timeout: 260 seconds]
ih8u has quit [Ping timeout: 252 seconds]
ih8u2 is now known as ih8u
<rovanion> Is there a version of the .then method which only continues into the block if the object is non-nil?
<ikonia> I've got a variable that I want to debug in someone else ruby, what I'd like to do is at the time of execution write the 'current' output of that variable to a file so I can see what it thinks that parameter looks like when it's being executed, I believe I can do a file.open but how do I do a file.open and output that variable into it ?
brw has quit [Remote host closed the connection]
<o0ox1eef> rovanion: foo&.then { }
<o0ox1eef> ikonia: File.binwrite "debug.txt", variable but there are better ways to debug :)
<ikonia> o0ox1eef: educate me :)
<o0ox1eef> For example: you could use 'binding.irb' to start an IRB session in the context of your variable, inspect the variable, print the variable to a file, and so on. And then type 'exit' to continue running your code as usual. This is a method of debugging that Pry made popular. Also worth a look if you're not familiar with it: https://github.com/pry/pry
<ikonia> o0ox1eef: the complexity is that this ruby is part of a library that's being consumed only by a puppet module, so it can't be executed 'as is' it has to be executed as part of a puppet manifest, which is why I thought output to a file maybe easier as I'll trap it as it executes
<ikonia> I'll rephrase that I'm not aware of a way it could be run outside of the puppet class
<ikonia> I'm sure it maybe possible
<o0ox1eef> It works, but I would personally see if I can make the debug environment more flexible and powerful. Writing to a file is super basic for a high level language like Ruby.
<rovanion> Thank you o0ox1eef!
<ikonia> yeah, I"m not sure how I can build a true debugging environment because of how this is used, it's not just executing ruby, the high level test maybe enough to prove if I'm correct that this variable is the problem and it's not being set correctly
<ikonia> I'd welcome any thoughts on how to do it better though
<o0ox1eef> Did you try 'binding.irb' ? What happens ?
<o0ox1eef> It is part of core Ruby for a while now
blacknova has joined #ruby
<ikonia> not yet, looking into it now
<o0ox1eef> Even if your environment is headless, there's solutions for that (eg pry-remote) although it doesn't operate as smoothly as a regular session.
<ikonia> the bit I'm not sure on yet, is how to make the environment aware of the puppet process thzt launches the environment, I'm readg though
dionysus69 has joined #ruby
oznek_ has quit [Quit: Leaving]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
dionysus70 is now known as dionysus69
szkl has joined #ruby
ua__ has joined #ruby
ua_ has quit [Ping timeout: 260 seconds]
GreenResponse has joined #ruby
dionysus70 has joined #ruby
dionysus70 has quit [Ping timeout: 260 seconds]
P-Nut has joined #ruby
<P-Nut> Afternoon all. I'm using debian 12 and trying to get the latest ruby installed (3.4.4), but following the rvm install instructions the latest it will install is 3.0.0.
<P-Nut> I know I've missed something, but can't work out what I need to do to get 3.4.4 installled.
<P-Nut> Can anyone help me?
o0ox1eef has quit [Quit: Quit]
Linux_Kerio has joined #ruby
<wbooze> don't use the system ruby
<wbooze> don't install packages from debian for ruby
<wbooze> install ruby via a different method like rbenv or so
<wbooze> where you can install different versions
<wbooze> the same holds for julia and python
<wbooze> even ghc/haskell etc
<wbooze> otherwise you're not only stuck with those system versions but also you'll get errors/crossing with installed libs
<adam12> P-Nut: Don't use rvm. Prefer rbenv, ruby-install/chruby, or my favourite, mise. rvm has not kept up with the times.
o0x1eef has joined #ruby
<wbooze> never heard mise
<P-Nut> Brilliant, I'll try mise. It seems like it's getting the most new attention. Thanks again!
<adam12> wbooze: It's cool. Manages many things, also runs tasks, and does direnv stuff.
o0x1eef has quit [Quit: Quit]
P-Nut has quit [Quit: Leaving]
o0x1eef has joined #ruby
blacknova has quit [Quit: Connection closed for inactivity]
<ih8u> P-Nut: best to stick with the classics
<ih8u> rbenv
nakilon has quit [Remote host closed the connection]
mange has quit [Quit: Zzz...]
weaksauce has quit [Ping timeout: 260 seconds]
user71 has joined #ruby
tronexte has quit [Ping timeout: 268 seconds]
tronexte has joined #ruby
schne1der has joined #ruby
cappy has joined #ruby
PauloEE has joined #ruby
PauloEE has quit [Changing host]
PauloEE has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]
Vonter has quit [Ping timeout: 276 seconds]
Vonter has joined #ruby
jmcantrell has joined #ruby
dionysus69 has quit [Quit: dionysus69]
brokkoli_origin has quit [Ping timeout: 248 seconds]
szkl has joined #ruby
brokkoli_origin has joined #ruby
gr33n7007h has quit [Ping timeout: 276 seconds]
gr33n7007h has joined #ruby
nyoki has joined #ruby
cappy has quit [Quit: Leaving]
schne1der has quit [Quit: schne1der]
schne1der has joined #ruby
fantazo has quit [Quit: Lost terminal]
weaksauce has joined #ruby
jmcantrell has quit [Ping timeout: 272 seconds]
Vonter has quit [Ping timeout: 276 seconds]
Guest5641 has left #ruby [WeeChat 4.6.3]
dviola has joined #ruby
schne1der has quit [Ping timeout: 268 seconds]
teardown has quit [Ping timeout: 244 seconds]
hololeap has joined #ruby
wbooze has quit [Remote host closed the connection]
<hololeap> I'm looking at reviving a project from 10 years ago. I tried running it with the original Gemfile.lock, but some of those old versions are incompatible with ruby 3
<nyoki> Have you tried running it with the version of ruby from that time? Did you specify a Ruby version in your Gemfile?
inline has quit [Ping timeout: 244 seconds]
<hololeap> I'd like to bump to recent versions, but I'm worried that it is going to be a nightmare because of API changes over the years, and wonder if anyone can recommend anything to help spot issues like this in the code
<hololeap> nyoki: I haven't. ruby isn't pinned in the Gemfile, but it seems it was runnung with ruby-2.2
<hololeap> the earliest version my distro has is ruby-3.2
<hololeap> plus it gets more complicated since it was using a version of pg which no longer compiles with modern postgresql
<hololeap> is there some kind of static analysis tool that can spot problems before you actually run the code
<hololeap> or am I looking at a full rewrite
<o0x1eef> Nah I wouldn't imagine it is a rewrite. Probably a few problems to solve, some code to update.
<hololeap> I will give it a shot
<o0x1eef> We're here if you run into any blockers
inline has joined #ruby
inline has quit [Quit: Leaving]
weaksauce_ has joined #ruby
weaksauce has quit [Ping timeout: 272 seconds]
<havenwood> ikonia: +1 binding.irb
Linux_Kerio has quit [Ping timeout: 276 seconds]
inline has joined #ruby
schne1der has joined #ruby
<adam12> hololeap: 2.7 to 3.0 is the biggest leap. Look into what Github/Shopify/etc did to handle the kwarg switch (which was the worst part of this, imho)
<adam12> hololeap: If you can get it running on 2.7, start tracking warnings. Fix all the warnings, then move into the 3.x range.
<adam12> hololeap: You could look to see if there is a tool for the kwarg split. Maybe part of rubocop. But I haven't heard of any.
<adam12> hololeap: I'd just get it running for now - which would probably be running inside an era-accurate Docker container or VM.
<hololeap> my biggest hurdle rn is upgrading from activerecord-4.x
<hololeap> but yeah I'm trying to get an era-accurate VM set up
TomyWork has quit [Quit: Leaving]
inline has quit [Quit: Leaving]
infinityfye has quit [Read error: Connection reset by peer]
user71 has quit [Quit: Leaving]
schne1der has quit [Ping timeout: 248 seconds]
wbooze has joined #ruby
pastelowl has quit [Quit: WeeChat 4.6.3]
jmcantrell has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
GreenResponse has quit [Quit: Leaving]
dionysus69 has joined #ruby
cappy has joined #ruby
inline has joined #ruby
pastelowl has joined #ruby
wbooze has quit [Quit: Leaving]
smp has quit [Ping timeout: 260 seconds]
smp has joined #ruby
wbooze has joined #ruby
pastelowl has quit [Quit: WeeChat 4.6.3]
cappy has quit [Quit: Leaving]
pastelowl has joined #ruby