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
[0x1eef_] has joined #ruby
[0x1eef] has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 252 seconds]
Artea has joined #ruby
rvalue has quit [Ping timeout: 268 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 240 seconds]
rvalue has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
Artea has quit [Ping timeout: 255 seconds]
fercell has quit [Read error: Connection reset by peer]
fercell has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 252 seconds]
spine-o-saurus has joined #ruby
<spine-o-saurus> hay when i run ruby -n -e 'puts $_' file1 how do i get the previous line stored in a varible to compare against the current line??
Vonter has quit [Ping timeout: 260 seconds]
Vonter has joined #ruby
Sobinec has joined #ruby
Artea has joined #ruby
spine-o-saurus has quit [Quit: sublimated]
jenrzzz has quit [Ping timeout: 255 seconds]
Sobinec has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
subzff has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
grenierm has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
_ht has joined #ruby
subzff has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
CrazyEddy has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
tarel2 has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
user71 has joined #ruby
ccapndave has joined #ruby
ccapndave has quit [Client Quit]
user71 has quit [Remote host closed the connection]
user71 has joined #ruby
Axenntio has joined #ruby
jenrzzz has joined #ruby
jenrzzz_ has joined #ruby
Aminda has quit [Ping timeout: 260 seconds]
Aminda has joined #ruby
osc4rpt has quit [Ping timeout: 252 seconds]
osc4rpt has joined #ruby
osc4rpt has quit [Ping timeout: 240 seconds]
Vonter has quit [Ping timeout: 256 seconds]
Vonter has joined #ruby
osc4rpt has joined #ruby
<havenwood> rapha: haha: #/|\ ^._.^ /|\-*-shaREABle-cONStaNt_vaLUe:LITEral;🦇;fRozEN_StRING-Literal:tRUE-*-/|\ ^._.^ /|\#
<havenwood> .map{it.hex.chr}*''
<havenwood> I guess `it` doesn't actually save over `_1` at all
<havenwood> I still like it
<havenwood> ish
c10l5 has quit [Remote host closed the connection]
<havenwood> spine-, well, if they come back: ARGF.each_line.each_cons(2) do |line, next_line|
c10l5 has joined #ruby
jenrzzz_ has quit [Ping timeout: 256 seconds]
monr0e has joined #ruby
jenrzzz_ has joined #ruby
user71 has quit [Quit: Leaving]
Artea has quit [Ping timeout: 252 seconds]
jas-maelstrom has quit [Ping timeout: 255 seconds]
infinityfye has joined #ruby
infinityfye has left #ruby [#ruby]
agrosant has joined #ruby
monr0e_ has joined #ruby
grenierm has quit [Quit: Client closed]
monr0e has quit [Ping timeout: 255 seconds]
monr0e_ is now known as monr0e
jenrzzz_ has quit [Ping timeout: 264 seconds]
agrosant has quit [Ping timeout: 264 seconds]
jas-maelstrom has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 252 seconds]
tarel2 has quit [Quit: Client closed]
agrosant has joined #ruby
Artea has joined #ruby
jenrzzz_ has joined #ruby
Sobinec has joined #ruby
wyclif has joined #ruby
wyclif has quit [Client Quit]
MomosOrDeath53 has joined #ruby
MomosOrDeath5 has quit [Ping timeout: 252 seconds]
MomosOrDeath53 is now known as MomosOrDeath5
ccapndave has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
user71 has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 256 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
donofrio has quit [Read error: Connection reset by peer]
jenrzzz_ has quit [Ping timeout: 264 seconds]
user71 has quit [Quit: Leaving]
Vonter has quit [Ping timeout: 256 seconds]
jenrzzz_ has joined #ruby
Vonter has joined #ruby
jenrzzz_ has quit [Ping timeout: 240 seconds]
jenrzzz_ has joined #ruby
graywolf has joined #ruby
agrosant has quit [Ping timeout: 264 seconds]
ccapndave has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
Artea has quit [Ping timeout: 268 seconds]
user71 has joined #ruby
gaussianblue has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
agrosant has joined #ruby
<monr0e> So chatgpt is a surprisingly useful tool when used properly. Any opinions on this suggestion? https://chat.openai.com/share/2614b694-f524-4f0c-ab51-2cba6f511d16
<monr0e> context: I need a global configuration and don't understand ruby well enough yet to choose between a class and module
agrosant has quit [Ping timeout: 264 seconds]
jenrzzz_ has quit [Ping timeout: 252 seconds]
<adam12> monr0e: The first example is essentially a Singleton. This can be good or bad, depending on your point of view (and the use case).
<monr0e> It's a similar structure to web.config in asp - it's where anything that needs to be a global configuration value is put
<adam12> monr0e: A decent compromise might be to use the second example, but assign it to a constant. ie. CONFIG = AppConfig.new(...). It's still a singleton, but you can also initialize instances of it and provide it to places you might need it (ie. testing with different config values).
jenrzzz_ has joined #ruby
<monr0e> makes it easier to do things like tell a specific page to use a specific code-behind
<monr0e> hmmm
<adam12> All of these are fine, but if you aren't familiar with the Singleton pattern it's worth looking up the benefits/drawbacks of using the pattern.
<monr0e> frankly the nomenclature is... rather foreign to me. My only objective today is to get a single page rendered
<adam12> Ruby can/will warn if you re-assign a constant, so that's a _minor_ drawback of the singleton pattern in the first example.
<adam12> Well, Singleton pattern is a common CS expression. It comes from the "gang of four" book Design Patterns: Elements of Reusable Object-Oriented Software
<monr0e> I did some further looking about, and the idea of using a module seems more appropriate, since I can use `require_relative`
<adam12> You can use `require_relative` for both/all. There's no difference there.
<monr0e> Oh, I should look that up. The vast majority of what I learned about OOP came from a head-first book
<adam12> At this point, any of the examples will work, so just choose the one you like the most.
<adam12> Singletons have drawbacks. They are convenient but people over-use them. Just be mindful of that and you should be OK.
<monr0e> Oh, the other consideration is that nothing in the config should be changeable programmatically. I should look into how ruby handles protected objects
<adam12> In that case, just go with the module/Singleton.
agrosant has joined #ruby
osc4rpt has quit [Ping timeout: 256 seconds]
jenrzzz_ has quit [Ping timeout: 268 seconds]
agrosant has quit [Ping timeout: 264 seconds]
donofrio has joined #ruby
osc4rpt has joined #ruby
jenrzzz_ has joined #ruby
graywolf has quit [Quit: WeeChat 4.0.4]
agrosant has joined #ruby
agrosant has quit [Ping timeout: 264 seconds]
gr33n7007h has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
desnudopenguino1 has joined #ruby
justache is now known as fotastache
desnudopenguino has quit [Ping timeout: 252 seconds]
desnudopenguino1 is now known as desnudopenguino
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
jenrzzz_ has joined #ruby
Artea has joined #ruby
jenrzzz_ has quit [Ping timeout: 240 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
fdan has joined #ruby
donofrio has quit [Ping timeout: 268 seconds]
jenrzzz_ has quit [Ping timeout: 256 seconds]
donofrio has joined #ruby
jenrzzz_ has joined #ruby
donofrio has quit [Ping timeout: 268 seconds]
jenrzzz_ has quit [Ping timeout: 246 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 246 seconds]
jenrzzz_ has joined #ruby
donofrio has joined #ruby
donofrio_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
donofrio has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
Axenntio has quit [Quit: Axenntio]
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
fdan has quit [Quit: Client closed]
fotastache has quit [Quit: ZNC 1.8.2 - https://znc.in]
jenrzzz_ has quit [Ping timeout: 268 seconds]
MomosOrDeath53 has joined #ruby
jenrzzz_ has joined #ruby
rvalue has quit [Quit: ZNC - https://znc.in]
rvalue has joined #ruby
MomosOrDeath5 has quit [Ping timeout: 260 seconds]
MomosOrDeath53 is now known as MomosOrDeath5
jenrzzz_ has quit [Ping timeout: 272 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
<monr0e> Hurray, I have successfully rendered a page!
xuochi has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
oneeyedalien has joined #ruby
desnudopenguino1 has joined #ruby
jenrzzz_ has joined #ruby
desnudopenguino has quit [Ping timeout: 268 seconds]
desnudopenguino1 is now known as desnudopenguino
oneeyedalien has quit [Quit: Leaving]
jhass has quit [Remote host closed the connection]
jenrzzz_ has quit [Ping timeout: 256 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
Vonter has quit [Ping timeout: 256 seconds]
jenrzzz_ has joined #ruby
Vonter has joined #ruby
Vonter has quit [Quit: WeeChat 4.2.1]
jenrzzz_ has quit [Ping timeout: 268 seconds]
jenrzzz_ has joined #ruby
Sobinec has quit [Ping timeout: 255 seconds]
<adam12> monr0e: Nice!
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
Artea has quit [Ping timeout: 240 seconds]
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
jhass has joined #ruby
jhass_ has joined #ruby
jhass has quit [Remote host closed the connection]
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
jhass_ is now known as jhass
jenrzzz_ has quit [Ping timeout: 272 seconds]
gaussianblue has quit [Quit: leaving]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 260 seconds]
jenrzzz_ has joined #ruby
donofrio_ has quit [Read error: Connection reset by peer]
donofrio_ has joined #ruby
joako has quit [Quit: quit]
user71 has quit [Quit: Leaving]
<rapha> havenwood: thanks. that frozen-string-literal-comment is now part of a big fintech product. also, doesn't "it" only work with 3.4.0?
monr0e has quit [Remote host closed the connection]
monr0e has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
cek has joined #ruby
jenrzzz_ has joined #ruby
evaloop has joined #ruby
joako has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
szkl has quit [Quit: Connection closed for inactivity]
evaloop has left #ruby [Leaving]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 268 seconds]
_ht has quit [Remote host closed the connection]
Artea has joined #ruby
CRISPR has joined #ruby
raptelan has joined #ruby
jenrzzz_ has joined #ruby
jenrzzz_ has quit [Ping timeout: 272 seconds]
jenrzzz_ has joined #ruby
<raptelan> I have been trying all day to get Ruby on MacOS to work. But gems keep failing to build with the same C error, on every version of Ruby I've tried between 2.7.2 and 3.3.0. Any ideas? https://dpaste.com/864K2DLCP
<raptelan> I can build the gem successfully using the built-in Ruby 2.6.10 that came with MacOS. In the past, this same gem was built with the same ruby versions that I'm trying now - not sure what changed.
<raptelan> I have a Ruby 2.7.7 instance set up with rbenv, which shows posix-spawn 0.3.15 as being installed. But I cannot now use that Ruby version to rebuild it - it hits the same error. That gem hasn't changed since 2020.
<weaksauce> try the flag in the second comment
<raptelan> Hmm, I'm using an M1, same hardware as when it worked before. But I'll try that.
<weaksauce> i'm not sure maybe some compiler got updated?
<raptelan> weaksauce: Well, that worked!?!
<weaksauce> raptelan sweet!
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
xuochi has quit [Quit: leaving]
monr0e has quit [Remote host closed the connection]
jenrzzz_ has quit [Ping timeout: 268 seconds]
CRISPR has quit [Ping timeout: 260 seconds]
germ has quit [Ping timeout: 255 seconds]
germ has joined #ruby
jenrzzz_ has joined #ruby