havenwood changed the topic of #ruby to: Ruby 3.4.3, 3.3.8 https://www.ruby-lang.org | Log https://libera.irclog.whitequark.org/ruby
cappy has quit [Quit: Leaving]
entropie has quit [Quit: ""]
entropie has joined #ruby
johnjaye has joined #ruby
brokkoli_originl has quit [Ping timeout: 244 seconds]
wbooze has quit [Read error: Connection reset by peer]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
jmcantrell has quit [Ping timeout: 272 seconds]
jmcantrell has joined #ruby
brokkoli_origin has joined #ruby
jmcantrell has quit [Ping timeout: 252 seconds]
jmcantrell has joined #ruby
jmcantrell has quit [Ping timeout: 245 seconds]
jmcantrell has joined #ruby
jmcgnh has quit [Ping timeout: 268 seconds]
jmcgnh has joined #ruby
jmcantrell has quit [Ping timeout: 276 seconds]
jmcantrell has joined #ruby
brw has quit [Quit: The Lounge - https://thelounge.chat]
brw has joined #ruby
schne1der has joined #ruby
Exa has quit [Quit: see ya!]
wbooze has joined #ruby
wbooze has quit [Quit: Leaving]
Exa has joined #ruby
Vonter has quit [Ping timeout: 248 seconds]
Vonter has joined #ruby
jmcantrell has quit [Ping timeout: 248 seconds]
Vonter has quit [Ping timeout: 248 seconds]
wbooze has joined #ruby
Vonter has joined #ruby
Vonter has quit [Ping timeout: 252 seconds]
Vonter has joined #ruby
mynameisdebian has joined #ruby
<mynameisdebian> I am setting up a development VM. I spent hours today getting RVM configured correctly (or so I thought) on Debian 12. Followed the directions on the RVM website to the T. Apparently those directions don't work exactly with Debian so I had to do some extra stuff. Now when I try to do a "gem install <pkg>" it tells me "OpenSSL is not available. Install OpenSSL and rebuild Ruby (preferred) or use non-HTTPS sources".
<mynameisdebian> Does anyone know how I can resolve this?
<mynameisdebian> I don't get why setting up Ruby is the most difficult part of programming with Ruby.
<o0x1eef> Do you need to use multiple Rubies?
<o0x1eef> Might be easier to use apt-get
<mynameisdebian> The problem is Debian has this weird built-in ruby that in my experience never works right and never works the way ruby normally does, so using Ruby requires me to be an expert in the way Debian does things and causes me all sorts of problems.
<o0x1eef> That makes sense. Sorry to hear you're facing these challenges. Did you look into ruby-build, and ruby-install ? AFAIK they're more modern alternatives that are actively maintained. You'd usually pair them with chruby, or rbenv. Might be more successful.
<mynameisdebian> no, damn, that just sounds like so much to learn and redo everything. I feel like I'm not going to get a single bit of programming in in the 7 hours I have before bed.
<mynameisdebian> thanks for the advice, I'll look into those
<o0x1eef> Sorry I can't be of more help. I don't have much RVM knowledge. But more often than not I see those other tools being used instead.
<mynameisdebian> no worries, thank you
Axenntio has joined #ruby
<Axenntio> >> [1, 2, 3].sum
<ruby[bot]> Axenntio: # => 6 (https://carc.in/#/r/hxym)
TomyWork has joined #ruby
<mynameisdebian> o0x1eef, I went with asdf and it worked perfectly. Not sure if that's useful or welcome information to you. Thank you for your help!
<o0x1eef> That's great! \o/
CRISPR has joined #ruby
patrick has quit [Ping timeout: 252 seconds]
patrick_ is now known as patrick
CRISPR has quit [Ping timeout: 244 seconds]
patrick_ has joined #ruby
patrick has joined #ruby
patrick has quit [Changing host]
patrick_ is now known as patrick
patrick_ has joined #ruby
Axenntio has quit [Quit: Axenntio]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
gemmaro_ has quit [Ping timeout: 276 seconds]
gemmaro_ has joined #ruby
andy-turner has joined #ruby
dionysus69 has joined #ruby
<dionysus69> I have a subtle question and I decided to address the Ruby Jedi Council itself, it's coming from rails but can also apply to any scope of ruby code organization.
<dionysus69> Let's say I have a `User` class and I have a service objects to deal with business logic. I have noticed people define Service objects like `Users::SomeServiceObject`, but I hate this. Even though, technically it's easy on the brain, if `Users` is plural, you assume it's concern or Service object namespace. is there anything wrong with this pattern instead?
<dionysus69> ```
<dionysus69> class SomeServiceObject
<dionysus69> ```
<dionysus69> def run ...
<dionysus69> I personally see this as way more elegant, any service operation that thematically belongs to User, is under a User class namespace. My question/concern is, how does it affect the memory usage, garbage collection, if there is no difference, that's what I want to hear <3 thanks in advance!
<dionysus69> class User
GreenResponse has joined #ruby
Axenntio has joined #ruby
o0x1eef has quit [Ping timeout: 244 seconds]
o0x1eef has joined #ruby
otisolsen70 has joined #ruby
wbooze has quit [Quit: Leaving]
wbooze has joined #ruby
wbooze has quit [Max SendQ exceeded]
wbooze has joined #ruby
wbooze has quit [Max SendQ exceeded]
mynameisdebian has quit [Ping timeout: 276 seconds]
wbooze has joined #ruby
user71 has joined #ruby
Axenntio has quit [Quit: Axenntio]
nakilon has joined #ruby
nakilon has quit [Changing host]
nakilon has joined #ruby
cappy has joined #ruby
<nakilon> hi guys, hopefully this bnc will last longer
<nakilon> why does this ERB thing put empty lines between items? https://gist.github.com/Nakilon/a5458c0c6d06b012b8c192502e28a1c2
<nakilon> the "%<>" arg should solve this according to the example https://docs.ruby-lang.org/en/2.3.0/ERB.html#class-ERB-label-Plain+Text
<adam12> I wish I knew how people ended up on RVM all the time.
<adam12> dionysus69: Take a look at active_record-associated_object, which is a similar kind of take on this. https://github.com/kaspth/active_record-associated_object
Fridtjof has quit [Quit: ZNC - http://znc.in]
<havenwood> nakilon: Change your `0, "%<>"` to just `trim_mode: '>'`.
<havenwood> (Safe was removed, and kwarg args are preferred these days.) Another option is to set `trim_mode: '-'` and use `-%>` to trim where you like.
<havenwood> adam12: I discussed formally deprecating it with the current maintainer but he isn't game yet.
<adam12> havenwood: I had someone spend days trying to get RVM working.
<adam12> (someone I know personally)
<adam12> It wasn't necessarily RVM, it was psych/libyaml and some other dependency issues.
cappy has left #ruby [Leaving]
<havenwood> We can remove it from ruby-lang.org pages at least. Some shopify folk are keen to deemphasize it too.
<adam12> but those are solved AFAIK with ruby-builder.
<adam12> Yeah. I talked to Andy about this I believe. I wish ruby-core had something blessed by them and we could de-emphasis the rest.
<nakilon> havenwood: thanks! it worked
<nakilon> spending two days on BNC wasn't useless
<havenwood> adam12: Some folk like that ruby-build hardcodes openssl, since it *just works*, but it bothers me since I've seen folk update OpenSSL after a vulnerability and rebuild Ruby *assuming* it does something when they really need to update the `ruby-build` tool. Can't win em all!
<havenwood> For example, 3.4.3 ships with openssl 3.0.16 and ignores your system OpenSSL. https://github.com/rbenv/ruby-build/blob/master/share/ruby-build/3.4.3
<nakilon> adam12: my coworkers love to struggle with it inside Rubymine; once they do 'bundle install' it goes crazy and stops seeing any gems; for all three of my buddies
<havenwood> I'm happy using chruby. Simple enough to keep 100% of it in my head, understanding exactly what it does.
<adam12> havenwood: That seems like it could maybe be fixed with a bit more tooling - a check for openssl version, perhaps.
<havenwood> adam12: Emitting a warning at least would save some folk.
<adam12> I think mise is the best tool for me, currently. I'd almost dare say that we should just encourage people to use mise.
<nakilon> what is mise
<adam12> It's a bit more nuts-bolts but it's not single purpose, documentation is great, etc. But really, I'd love ruby to have it's own micro tool that every other one could just wrap, maybe.
<havenwood> adam12: Mise does just wrap ruby-build (iir) by default, so still need to fix ruby-build.
<adam12> nakilon: asdf written in Rust (if you're familiar with asdf). https://mise.jdx.dev
Fridtjof has joined #ruby
<adam12> havenwood: Yes it does (also iirc)
<havenwood> adam12: Sam Giddens is working on yet another installer in Golang. I ported chruby to Golang back before Golang had the ability to clear an env var. >.> Does work well but haven't found a compelling reason to swap from real chruby.
<havenwood> adam12: Speaking of Rust, did you see the Brew rewrite in Rust? 🤣
<havenwood> Not from the brew team, but https://github.com/alexykn/sps
<nakilon> why would you need to rewrite anything from ruby to rist?
<nakilon> *rust
<havenwood> nakilon: Speed and correctness, typically.
<adam12> havenwood: I didn't. Neat.
<nakilon> keep things written in good syntax and open to hot edits
<adam12> havenwood: There's uru? which I think is written in Go.
patrick has quit [Ping timeout: 252 seconds]
patrick_ is now known as patrick
<havenwood> adam12: Yeah, I've seen a few Windows folk using it but not in recent years.
<nakilon> I can't remember or imagine brew or ruby manager to be slow
<adam12> A ruby version manager in Ruby would likely be a bad idea unless it's in mruby, but I think the hill would be too steep to climb. Golang or Rust.
<adam12> I'd personally prefer Golang but ruby-core already has Rust so that would be a good choice I guess.
<havenwood> adam12: I think mruby should just be considered separately, and I'm the one who added mruby support to ruby-install. >.> It needs its own dedicated system to properly handle mgems imho.
<adam12> havenwood: I agree - for this I meant, a ruby version manager in mruby.
<havenwood> adam12: Rust is a joy for CLIs, so makes sense to me.
<dionysus69> Thanks adam12, I will check it out :)
<adam12> I actually considered it, ages ago.
<havenwood> adam12: ooooh
<nakilon> I am coding in ruby, I am using ruby manager, why would I want my ruby manager to become written in a language I'm not using?
<adam12> nakilon: Bootstrapping.
<nakilon> huh?
<havenwood> nakilon: If you're on a system that doesn't have Ruby installed.
<nakilon> also how much the rust app will weight
<dionysus69> I mean, is it easier to install rust than ruby? : D
<dionysus69> most systems come with ruby built in
<adam12> The point would be that you don't install rust or go. You download a single binary and then run that to manage your rubies.
<havenwood> dionysus69: I've run into quite a few that don't have Ruby installed by default, but easily available by package manager.
<adam12> Relying on system ruby is a trap. Hence why homebrew ships their own.
<adam12> System ruby is for system packages.
<nakilon> if we assume we are able to install ruby via one command, then we should be able to install chruby/rbenv/whatever with one command too
<dionysus69> havenwood: I guess, since I use debian based systems in dev/prod, I ignore this :|
<adam12> nakilon: The point is to have one blessed option, make it incredibly prominent on the homepage, and make it super easy to install/use.
<adam12> dionysus69: I ran CentOS 7 machines up until a year or two ago, and they were still running Ruby 2.0.0. Good enough for some simple scripting, but only that.
<dionysus69> dunno I use ASDF, I didn't like change to go because now I need to install go first and then asdf, the idea of tool like asdf is to install go, with asdf :D
<adam12> That should not be necessary. Is it?
<nakilon> can't we have an 'apt install' to install our 'blessed ruby manager' written in ruby? like a rbenv with any improvements you think it needs
<adam12> Should just be downloading asdf and placing it in /usr/local/bin or ~/.local/bin or something.
<dionysus69> not 100%, with the new version I think you have to. You can use legacy way to install but that goes to max version 16 if I am not mistaken
<adam12> nakilon: Sure, but how do you control that experience?
<nakilon> if you say downloading the tool to PATH manually instead of using OS package manager is a good idea, homebrew already does it; does it do it badly?
<adam12> nakilon: Same issue. That version of Ruby in Homebrew is _for homebrew_.
<adam12> For vagrant or anything else they distribute.
<adam12> And what about platforms that aren't MAc?
patrick_ has joined #ruby
patrick has joined #ruby
patrick has quit [Changing host]
patrick_ is now known as patrick
patrick has quit [Killed (tantalum.libera.chat (Nickname regained by services))]
<nakilon> I don't really care what version is there and how they run it
patrick_ has joined #ruby
<adam12> dionysus69: That's bizarre. Should just be a single executable to download. No go toolchain required.
<nakilon> how is that worse than if it was in rust? the only difference would be I won't be able to glance through the code anymore
<adam12> I think you're considering the wrong tradeoffs.
<adam12> s/wrong/different
<nakilon> to know exactly what it does I would spend time to figure out the github tag (ASSUMING it is matching with the version of the binary I've downloaded, but how can I know?)
<adam12> I'm considering ease of use for new developers, and a better overall experience. You're considering your ability to (maybe) review source code.
<nakilon> isn't brew easy to use?
<adam12> It's single platform.
<nakilon> it's self-contained and prints nice output
<adam12> And not everyone might be using brew.
<adam12> They might be using pkgsrc.
<adam12> or macports.
<dionysus69> thanks for adam12 https://github.com/kaspth/active_record-associated_object this is amazing, this is so much better than service object architecture lmfo! and for die-hard rails purists this is a killer, no need for app/services dir at all <3
<nakilon> I don't need brew on windows, I'm fine with installing via double click; i.e. I don't see a need of having a single package manager for every OS, and again, how does rust solve this problem? I believe brew works on linux too for years already
<adam12> dionysus69: It's nice. I've been using it.
<adam12> nakilon: Well this isn't optimizing for you. It's optimzing for the new developers we should hope to encourage to try and use Ruby.
<dionysus69> this can easily replace service objects right? or interactions, or repositories or whatever other shit people like to call these :D
<adam12> nakilon: And new developers have a plethora of easier languages to install.
<adam12> dionysus69: Yep.
<dionysus69> amazing, I will start pushing on this one :P
<nakilon> how is rust easier to install than ruby? is there anything to simplify?
otisolsen70 has quit [Quit: Leaving]
<nakilon> do you just dislike the fact that homebrew is downloading the ruby implicitly? the newcomer won't even know it
<nakilon> just make ruby compilable
<nakilon> that would be my goal then
eddof13 has joined #ruby
eddof13 has quit [Quit: eddof13]
<nakilon> I wish Thread::Backtrace::Location had the defined_class like TracePoint has
<nakilon> I need to merge them
<nakilon> I imagine there can be two methods with the same name but from different classes on the same line in backtrace
eddof13 has joined #ruby
<nakilon> also I wonder how do I distinguish between class and instance methods in TracePoint; the defined_class in both cases is of class Class, but to_s is either #<Class:Net::HTTP> or Net::HTTP for the 'start' method, because there are two of them
<o0x1eef> That's for you nakilon :)
<nakilon> o0x1eef: thanks! you figured it out
<o0x1eef> Yw!
<nakilon> what would I do without #ruby
<o0x1eef> :)
dionysus69 has quit [Ping timeout: 252 seconds]
<o0x1eef> Indeed :D
msv has quit [Ping timeout: 252 seconds]
svm has joined #ruby
svm has quit [Remote host closed the connection]
svm has joined #ruby
<sam113101> what's the site that's like programming exercises? can't remember
<sam113101> found it I think
andy-turner has quit [Quit: Leaving]
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
<nakilon> o0x1eef: I almost made what I wanted https://i.imgur.com/4VMS7SY.png I'm lazy to handle 'yield', gonna use without it for now; now only need to visualize
<nakilon> the net/http example is boring though; I had to 3.times{} it to get higher numbers; need smth more complex or recursive; I'll have some example after I use it in practice
<nakilon> I hate frozen literals; the line of code "path = +path" looks stupid
<nakilon> nvm, changed it with the following thingy: prefixes.reduce(path){ |path, prefix| path.delete_prefix prefix }
<nakilon> ERB seems to hate multiline code
<nakilon> or rather multiline literals
<nakilon> TIL: you need at least Ruby 3.1 to concatenate strings https://github.com/DannyBen/gtx/blob/d343876c69249cb5aeef136a3e2153beb529b541/gtx.gemspec#L15
slothbee is now known as slothby
mynameisdebian has joined #ruby
jmcantrell has joined #ruby
dorian has quit [Remote host closed the connection]
dorian has joined #ruby
eddof13 has quit [Quit: eddof13]
user71 has quit [Quit: Leaving]
rvalue- has joined #ruby
rvalue has quit [Ping timeout: 252 seconds]
rvalue- is now known as rvalue
schne1der has quit [Ping timeout: 244 seconds]
eddof13 has joined #ruby
nmollerup has quit [Quit: Leaving]
eddof13 has quit [Quit: eddof13]
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
mms has quit [Remote host closed the connection]
mms has joined #ruby
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
<kjetilho> I really hate such gratuituous obsolescence
<havenwood> On the other hand, there are limited resources and Ruby 3.3 is the latest Ruby that's fully supported. https://www.ruby-lang.org/en/downloads/branches/
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
GreenResponse has quit [Quit: Leaving]
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
cappy has joined #ruby
weaksauce has joined #ruby
gemmaro_ has quit [Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in]
gemmaro_ has joined #ruby
mms has quit [Ping timeout: 245 seconds]
<adam12> sam113101: Exercism is the one I'm assuming you're looking for.
entropie has quit [Quit: ""]
entropie has joined #ruby
cappy has quit [Quit: Leaving]
svm is now known as msv
smp has quit [Ping timeout: 252 seconds]
smp has joined #ruby