crespire has quit [Killed (NickServ (GHOST command used by crespire1))]
crespire1 has joined #ruby
teclator has joined #ruby
grenierm has quit [Quit: Client closed]
otisolsen70 has quit [Quit: Leaving]
donofrio has joined #ruby
<ox1eef_>
The lib/, bin/, etc layout works great for libraries. But I think it has its limits when you are distributing a "program". And for that I usually add libexec/ libdata/, and share/ in addition to lib/ & bin/.
<adam12>
johnjaye: I don't have a specific example because it's been so long since I read them, but more specifically, there's only a few that I felt deviated from what's an Array, whats a Hash, etc.
<adam12>
Which is fine, but we really only needed one of those (it was the Pickaxe from ~ 2003 or Matz's original book)
<adam12>
Polished Ruby took an interesting approach to talk about performance optimizations, some useful patterns (the Plugin one that Sequel uses), and some other pieces. Ruby under a Microscope did deep dive into internals, which was nice. etc.
<johnjaye>
oh i see it now.
<adam12>
Refactoring Ruby was a nice rewrite of the original Refactoring book (which used Java).
<johnjaye>
very confusing. i don't think either the topic list or the one at ruby-lang mentions this boook
<johnjaye>
The Ruby Programming Language: Everything You Need to Know
<johnjaye>
even though it's written by matz himself...
<adam12>
It might be too out of date? I'll be honest I've never read it, and I own a lot of Ruby books. I feel like it was pre Ruby 1.8.. which even then was pickaxe era.
<adam12>
I wonder how much of it still holds true.
<johnjaye>
there are "eras" in ruby?
<adam12>
Oh, nevermind. I looked at the cover and it is a 1.8 and 1.9 book.
<johnjaye>
what happened in 1.8
<adam12>
1.8 to 1.9 was a huge change, IIRC.
<adam12>
A lot of people stayed on 1.8.6 or whatever for _ages_. In some ways it was Ruby's Python 2->3 (tho we kind of have our own with keyword separation).
<johnjaye>
i was going to mention that. this google result tells me that 1.9 broke rails
<johnjaye>
but doesn't say how
<adam12>
1.8 used Matz's runtime, which was an interpreter.
<johnjaye>
at least in the python2->3 thing there was an obvious justification, i.e. unicode
<adam12>
1.9 shipped with YARV I think, which converted to bytecode and then executed in a virtual machine.
<johnjaye>
an interpreter is not the same as a bytecoded machine?
<adam12>
johnjaye: No. The original one just did a single pass I believe, running it as it evaluated.
<adam12>
johnjaye: 1.9 introduced a multiple pass with parse with a VM (IIRC it's stack based).
<adam12>
So 1.9 would create an AST, transate late that to bytecode, then evaluate.
<johnjaye>
oh ok
teclator has quit [Ping timeout: 268 seconds]
reset has quit [Quit: reset]
_ht has joined #ruby
smp_ has joined #ruby
smp has quit [Ping timeout: 265 seconds]
smp_ is now known as smp
gemmaro has quit [Remote host closed the connection]
moldorcoder7 has joined #ruby
<bhaak>
1.9 did also introduce the unicode support.
<bhaak>
back in the day I though that the 1.8 to 1.9 transition was poorly handled but then I didn't know that 10 years after that, python2 vs python3 would still be a thing!
<bhaak>
FWIW, python2 was only EOL on January 1st 2020!
moldorcoder7 has quit [Ping timeout: 260 seconds]
<joto>
I feel like I am writing the following code a bit too much like I used to in bloated languages. Is there a more concise way to do it in Ruby?
<joto>
if regio.nil? && school.nil?
<joto>
true
<joto>
end
<joto>
else
<joto>
false
<Doc_X>
true if if regio.nil? && school.nil?; false
<Doc_X>
s/if if/if
<joto>
cool, I haven't seend that ; syntax before
<Doc_X>
you can do that on two lines, but using ';' means you can do it on a single line.
<joto>
ah right. I'll keep it in mind as to not spam this channel :)
<weaksauc_>
joto regio.nil? && school.nil? returns true and false by itself
<joto>
oh right!
<joto>
awesome :-)
walez_ has joined #ruby
AlexBrownSobinec has quit [Quit: Connection closed for inactivity]