adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.2, 2.7.4, 2.6.8: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
easbarbosa has quit [Remote host closed the connection]
jetchisel has quit [Ping timeout: 265 seconds]
jetchisel has joined #ruby
bandithijo has joined #ruby
jetchisel has quit [Ping timeout: 252 seconds]
nirix has joined #ruby
cer-0 has joined #ruby
<rg1> at the time it was a toss up between ruby and python. i picked ruby and no regrets :)
<aesthetikx> rg1 that is a scary thought, imagine what could have been
<aesthetikx> you could have been if __self__ == __main__ing
<aesthetikx> midnight could have been false
<aesthetikx> you could have been explicitly passing self to every single function declaration for no reason
<aesthetikx> whitespace could have been ... *shudder*
<rg1> python is actually the hot language right now where as ruby has receded, by my estimations.
<aesthetikx> true
<aesthetikx> but at least we don't have false midnight
<rg1> i hope it turns around in the near future i think ruby is too tangled to rails.
ur5us has quit [Ping timeout: 255 seconds]
<rg1> what's false midnight?
ua__ has quit [Ping timeout: 250 seconds]
<aesthetikx> in python, (something like, I don't know the specifics) all datetimes are 'truthy', except for midnight, which is falsy
<rg1> cool i see thanks
ua__ has joined #ruby
<aesthetikx> til that
<aesthetikx> >> "some123string"[/\d/]
<rg1> yeah i think rubys model of truth/false is pretty good
chonkbit has joined #ruby
<rg1> easy to remember
ua__ has quit [Ping timeout: 268 seconds]
chonkbit has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
ua__ has joined #ruby
Rounin has quit [Ping timeout: 268 seconds]
goepsilongo has quit [Quit: Konversation terminated!]
michigan has quit [Quit: Connection closed for inactivity]
jetchisel has joined #ruby
ua__ has quit [Ping timeout: 255 seconds]
ua__ has joined #ruby
theme has joined #ruby
theme has left #ruby [Leaving]
bandithijo has quit [Ping timeout: 268 seconds]
bandithijo has joined #ruby
gfawcett has quit [Read error: Connection reset by peer]
gfawcett has joined #ruby
shokohsc has quit [Read error: Connection reset by peer]
shokohsc has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
cer-0 has quit [Ping timeout: 268 seconds]
mrkz_c has quit [Quit: Connection closed for inactivity]
sagax has joined #ruby
teclator has joined #ruby
michigan has joined #ruby
Furai has quit [Quit: WeeChat 3.2]
Furai has joined #ruby
ur5us has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
_ht has joined #ruby
jetchisel has quit [Ping timeout: 258 seconds]
jetchisel has joined #ruby
nirix has quit [Quit: Connection closed for inactivity]
ur5us has quit [Ping timeout: 246 seconds]
jetchisel has quit [Ping timeout: 240 seconds]
jetchisel has joined #ruby
goldfish has joined #ruby
goldfish has quit [Ping timeout: 265 seconds]
michigan has quit [Quit: Connection closed for inactivity]
avitova has joined #ruby
Bounga has joined #ruby
Rounin has joined #ruby
bandithijo has quit [Ping timeout: 255 seconds]
michigan has joined #ruby
avitova has quit [Ping timeout: 255 seconds]
bandithijo has joined #ruby
nirix has joined #ruby
nemesit has joined #ruby
avitova has joined #ruby
avitova has quit [Remote host closed the connection]
reset has quit [Quit: reset]
cer-0 has joined #ruby
finsternis has quit [Remote host closed the connection]
goldfish has joined #ruby
goldfish has quit [Read error: Connection reset by peer]
CalimeroTeknik has joined #ruby
nirix has quit [Quit: Connection closed for inactivity]
reset has joined #ruby
ua__ has quit [Ping timeout: 258 seconds]
ua__ has joined #ruby
drincruz_ has joined #ruby
bandithijo has quit [Quit: WeeChat 3.2-rc1]
drincruz has quit [Ping timeout: 265 seconds]
drincruz has joined #ruby
drincruz_ has quit [Ping timeout: 268 seconds]
Bounga has quit [Ping timeout: 256 seconds]
bandithijo has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
bandithijo has quit [Ping timeout: 246 seconds]
mrkz_c has joined #ruby
orbyt has joined #ruby
shokohsc has quit [Ping timeout: 255 seconds]
shokohsc has joined #ruby
nemesit has quit [Read error: Connection reset by peer]
integral_ is now known as integral
legit has joined #ruby
easbarbosa has joined #ruby
michigan has quit [Quit: Connection closed for inactivity]
orbyt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cer-0 has quit [Ping timeout: 258 seconds]
jacktar has quit [Remote host closed the connection]
jacktar has joined #ruby
finsternis has joined #ruby
motherr has joined #ruby
michigan has joined #ruby
<michigan> Not sure if this qualifies as on topic, but isn't it best practice to always end a .rb file with a newline?
<newton> iirc it's a universal best practice
<weaksauce> michigan it seems to be yes
<newton> but I don't think you _have_ to
<weaksauce> my linter just got angry at me for not doing that
<michigan> Yep, got the same answer in #openbsd now too
<michigan> <buinb> It's not best practice, it's the unix definition of a text file
<newton> git diff's also tell you when you're missing a newline at end of file
<michigan> Nice
<michigan> Well, most of Rails' files don't end with a newline. I always add one in by habit before I check it into Git.
<newton> what editor do you use? e.g. my vim automatically adds them, I think vscode can be configured to do so too
<michigan> I use vim too, but none of its fancy features :-)
<newton> the thoughtbot article says vim does it out of the box
<michigan> Any way to let the Rails authors know of this? Should I just email David Heinemeier and hope he reads it?
<weaksauce> michigan what rails files don't have it
<weaksauce> i'm looking at the source of rails and they seem to be there for the few i checked
<michigan> Almost all the files I've edited
_ht has quit [Remote host closed the connection]
<michigan> Maybe the source is a different thing, but most generated files and stuff in config/
<newton> old or new app?
<weaksauce> i'm looking at a rails 6 app and it's all there in config for things i've never touched
<newton> michigan, are you adding an entire blank line at the end of the file?
<michigan> weaksauce: Gemfile for one
<michigan> application.html.erb
<michigan> locales/en.yml
<newton> michigan, if you do oc -d <file> do you see a \n at the end
<michigan> routes.rb
<newton> vim isn't going to show a whole line at the end of the file, it's adding a \n on the last line
<weaksauce> michigan just did a brand new app and the gemfile https://i.imgur.com/t2tRVyH.png
<michigan> Yeah but you said your vim configuration added it in?
<weaksauce> i'm not using vim here
<michigan> I'm looking at git log --patch, plus I know for sure most files end without.
<michigan> Anyway this is trivial. Time to do something productive, have a great day y'all!
<newton> pretty sure the confusion is that vim doesn't display an actual blank line at the file like vscode does
<newton> if you :set listchars=eol:$ (and maybe :set list if you don't see $'s right away) you'll see the last line of the Gemfile is ending with an eol
<weaksauce> hmm
<weaksauce> actually looking at wc -l does that skip the final line?
<weaksauce> because it's showing 56 lines in the gemfile and bat also shows 56 lines
<weaksauce> and there is no newline there
<newton> there is, github just doesn't show a literal newline
<leftylink> note that we are only asking for a file to end in one newline, not two consecutive ones.
<leftylink> big difference.
<leftylink> hmm personally I like the red or white but it's fine
ur5us has joined #ruby
jacktar has quit [Ping timeout: 244 seconds]
jacktar has joined #ruby
drincruz_ has joined #ruby
drincruz has quit [Ping timeout: 252 seconds]
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
<rg1> surprised by ('2021-07-01'..'2021-08-20').to_a - i thought it knew it was dealing with a date.
nemesit has joined #ruby
llua has joined #ruby
llua has quit [Client Quit]
llua has joined #ruby
niv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
niv has joined #ruby
orbyt has joined #ruby
<leftylink> it'd be totally dependent on the String#succ
<leftylink> &ri String#succ
orbyt has quit [Client Quit]
pandabot has joined #ruby
<leftylink> pandabot: ri String#succ
<leftylink> succ certainly does have some interesting behaviours...
<leftylink> pandabot: rb ('<<koala>>'..).take(3)
<pandabot> ["<<koala>>", "<<koalb>>", "<<koalc>>"] - https://carc.in/#/r/blwi
bandithijo has joined #ruby
<leftylink> of courese, Date.new(2021,7, 1) can act correctly in a range
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
llua has joined #ruby
drincruz has joined #ruby
drincruz_ has quit [Read error: Connection reset by peer]
niv has quit [Read error: Connection reset by peer]
cybniv has joined #ruby
<rg1> (Date.civil(2021, 7, 1)..Date.civil(2021, 8, 20)).map(&:iso8601) works it's just wordy
bandithijo has quit [Ping timeout: 258 seconds]
xyhuvud has quit [Ping timeout: 255 seconds]
yxhuvud has joined #ruby
drincruz has quit [Ping timeout: 256 seconds]
michigan has quit [Quit: Connection closed for inactivity]
jacktar has quit [Ping timeout: 244 seconds]
jacktar has joined #ruby
ur5us has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
michigan has joined #ruby
lad has joined #ruby
darkxploit has quit [Quit: darkxploit]
drincruz has joined #ruby
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
llua has joined #ruby
cybniv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
niv has quit [Client Quit]
niv has joined #ruby
lad has quit [Remote host closed the connection]