00:00
easbarbosa has quit [Remote host closed the connection]
00:08
jetchisel has quit [Ping timeout: 265 seconds]
00:11
jetchisel has joined #ruby
00:21
bandithijo has joined #ruby
00:34
jetchisel has quit [Ping timeout: 252 seconds]
01:07
nirix has joined #ruby
01:10
cer-0 has joined #ruby
01:28
<
rg1 >
at the time it was a toss up between ruby and python. i picked ruby and no regrets :)
01:43
<
aesthetikx >
rg1 that is a scary thought, imagine what could have been
01:43
<
aesthetikx >
you could have been if
__self__ == __main__ing
01:44
<
aesthetikx >
midnight could have been false
01:44
<
aesthetikx >
you could have been explicitly passing self to every single function declaration for no reason
01:45
<
aesthetikx >
whitespace could have been ...
*shudder*
01:46
<
rg1 >
python is actually the hot language right now where as ruby has receded, by my estimations.
01:49
<
aesthetikx >
but at least we don't have false midnight
01:49
<
rg1 >
i hope it turns around in the near future i think ruby is too tangled to rails.
01:49
ur5us has quit [Ping timeout: 255 seconds]
01:49
<
rg1 >
what's false midnight?
01:51
ua__ has quit [Ping timeout: 250 seconds]
01:52
<
aesthetikx >
in python, (something like, I don't know the specifics) all datetimes are 'truthy', except for midnight, which is falsy
01:52
<
rg1 >
cool i see thanks
01:52
ua__ has joined #ruby
01:52
<
aesthetikx >
til that
01:52
<
aesthetikx >
>> "some123string"[/\d/]
01:52
<
rg1 >
yeah i think rubys model of truth/false is pretty good
01:53
chonkbit has joined #ruby
01:53
<
rg1 >
easy to remember
02:02
ua__ has quit [Ping timeout: 268 seconds]
02:03
chonkbit has quit [Ping timeout: 255 seconds]
02:14
ur5us has joined #ruby
02:15
ua__ has joined #ruby
02:19
Rounin has quit [Ping timeout: 268 seconds]
02:37
goepsilongo has quit [Quit: Konversation terminated!]
02:39
michigan has quit [Quit: Connection closed for inactivity]
02:40
jetchisel has joined #ruby
02:40
ua__ has quit [Ping timeout: 255 seconds]
02:54
ua__ has joined #ruby
02:54
theme has joined #ruby
02:58
theme has left #ruby [Leaving]
03:54
bandithijo has quit [Ping timeout: 268 seconds]
03:55
bandithijo has joined #ruby
04:16
gfawcett has quit [Read error: Connection reset by peer]
04:17
gfawcett has joined #ruby
04:37
shokohsc has quit [Read error: Connection reset by peer]
04:39
shokohsc has joined #ruby
05:17
ur5us has quit [Ping timeout: 240 seconds]
05:43
cer-0 has quit [Ping timeout: 268 seconds]
05:56
mrkz_c has quit [Quit: Connection closed for inactivity]
06:52
sagax has joined #ruby
06:56
teclator has joined #ruby
07:07
michigan has joined #ruby
07:16
Furai has quit [Quit: WeeChat 3.2]
07:20
Furai has joined #ruby
07:21
ur5us has joined #ruby
07:25
ruby[bot] has quit [Remote host closed the connection]
07:25
ruby[bot] has joined #ruby
07:35
_ht has joined #ruby
08:02
jetchisel has quit [Ping timeout: 258 seconds]
08:03
jetchisel has joined #ruby
08:26
nirix has quit [Quit: Connection closed for inactivity]
08:40
ur5us has quit [Ping timeout: 246 seconds]
08:48
jetchisel has quit [Ping timeout: 240 seconds]
08:51
jetchisel has joined #ruby
09:13
goldfish has joined #ruby
09:35
goldfish has quit [Ping timeout: 265 seconds]
09:47
michigan has quit [Quit: Connection closed for inactivity]
09:53
avitova has joined #ruby
09:54
Bounga has joined #ruby
10:24
Rounin has joined #ruby
11:04
bandithijo has quit [Ping timeout: 255 seconds]
11:11
michigan has joined #ruby
11:18
avitova has quit [Ping timeout: 255 seconds]
11:55
bandithijo has joined #ruby
11:56
nirix has joined #ruby
11:58
nemesit has joined #ruby
12:00
avitova has joined #ruby
12:13
avitova has quit [Remote host closed the connection]
13:21
reset has quit [Quit: reset]
13:24
cer-0 has joined #ruby
14:17
finsternis has quit [Remote host closed the connection]
14:26
goldfish has joined #ruby
14:28
goldfish has quit [Read error: Connection reset by peer]
14:30
CalimeroTeknik has joined #ruby
14:40
nirix has quit [Quit: Connection closed for inactivity]
14:42
reset has joined #ruby
14:45
ua__ has quit [Ping timeout: 258 seconds]
14:59
ua__ has joined #ruby
15:03
drincruz_ has joined #ruby
15:04
bandithijo has quit [Quit: WeeChat 3.2-rc1]
15:06
drincruz has quit [Ping timeout: 265 seconds]
15:09
drincruz has joined #ruby
15:12
drincruz_ has quit [Ping timeout: 268 seconds]
15:21
Bounga has quit [Ping timeout: 256 seconds]
15:24
bandithijo has joined #ruby
15:35
bandithijo has quit [Ping timeout: 246 seconds]
15:36
mrkz_c has joined #ruby
16:31
orbyt has joined #ruby
17:31
shokohsc has quit [Ping timeout: 255 seconds]
17:34
shokohsc has joined #ruby
18:12
nemesit has quit [Read error: Connection reset by peer]
18:26
integral_ is now known as integral
18:34
legit has joined #ruby
18:37
easbarbosa has joined #ruby
19:07
michigan has quit [Quit: Connection closed for inactivity]
19:12
orbyt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:16
cer-0 has quit [Ping timeout: 258 seconds]
19:24
jacktar has quit [Remote host closed the connection]
19:24
jacktar has joined #ruby
19:39
finsternis has joined #ruby
19:58
motherr has joined #ruby
20:23
michigan has joined #ruby
20:25
<
michigan >
Not sure if this qualifies as on topic, but isn't it best practice to always end a .rb file with a newline?
20:26
<
newton >
iirc it's a universal best practice
20:26
<
weaksauce >
michigan it seems to be yes
20:26
<
newton >
but I don't think you
_have_ to
20:26
<
weaksauce >
my linter just got angry at me for not doing that
20:27
<
michigan >
Yep, got the same answer in #openbsd now too
20:27
<
michigan >
<buinb> It's not best practice, it's the unix definition of a text file
20:27
<
newton >
git diff's also tell you when you're missing a newline at end of file
20:28
<
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.
20:28
<
newton >
what editor do you use? e.g. my vim automatically adds them, I think vscode can be configured to do so too
20:29
<
michigan >
I use vim too, but none of its fancy features :-)
20:30
<
newton >
the thoughtbot article says vim does it out of the box
20:31
<
michigan >
Any way to let the Rails authors know of this? Should I just email David Heinemeier and hope he reads it?
20:31
<
weaksauce >
michigan what rails files don't have it
20:32
<
weaksauce >
i'm looking at the source of rails and they seem to be there for the few i checked
20:32
<
michigan >
Almost all the files I've edited
20:33
_ht has quit [Remote host closed the connection]
20:33
<
michigan >
Maybe the source is a different thing, but most generated files and stuff in config/
20:33
<
newton >
old or new app?
20:34
<
weaksauce >
i'm looking at a rails 6 app and it's all there in config for things i've never touched
20:34
<
newton >
michigan, are you adding an entire blank line at the end of the file?
20:40
<
michigan >
weaksauce: Gemfile for one
20:41
<
michigan >
application.html.erb
20:41
<
michigan >
locales/en.yml
20:41
<
newton >
michigan, if you do oc -d <file> do you see a \n at the end
20:42
<
michigan >
routes.rb
20:42
<
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
20:43
<
michigan >
Yeah but you said your vim configuration added it in?
20:43
<
weaksauce >
i'm not using vim here
20:44
<
michigan >
I'm looking at git log --patch, plus I know for sure most files end without.
20:46
<
michigan >
Anyway this is trivial. Time to do something productive, have a great day y'all!
20:49
<
newton >
pretty sure the confusion is that vim doesn't display an actual blank line at the file like vscode does
20:50
<
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
20:50
<
weaksauce >
actually looking at wc -l does that skip the final line?
20:50
<
weaksauce >
because it's showing 56 lines in the gemfile and bat also shows 56 lines
20:52
<
weaksauce >
and there is no newline there
20:54
<
newton >
there is, github just doesn't show a literal newline
20:54
<
leftylink >
note that we are only asking for a file to end in one newline, not two consecutive ones.
20:54
<
leftylink >
big difference.
20:55
<
leftylink >
hmm personally I like the red or white but it's fine
21:01
ur5us has joined #ruby
21:03
jacktar has quit [Ping timeout: 244 seconds]
21:04
jacktar has joined #ruby
21:09
drincruz_ has joined #ruby
21:11
drincruz has quit [Ping timeout: 252 seconds]
21:11
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
21:20
<
rg1 >
surprised by ('2021-07-01'..'2021-08-20').to_a - i thought it knew it was dealing with a date.
21:21
nemesit has joined #ruby
21:25
llua has joined #ruby
21:26
llua has quit [Client Quit]
21:28
llua has joined #ruby
21:31
niv has joined #ruby
21:31
orbyt has joined #ruby
21:32
<
leftylink >
it'd be totally dependent on the String#succ
21:32
<
leftylink >
&ri String#succ
21:32
orbyt has quit [Client Quit]
21:32
pandabot has joined #ruby
21:32
<
leftylink >
pandabot: ri String#succ
21:33
<
leftylink >
succ certainly does have some interesting behaviours...
21:33
<
leftylink >
pandabot: rb ('<<koala>>'..).take(3)
21:35
bandithijo has joined #ruby
21:36
<
leftylink >
of courese, Date.new(2021,7, 1) can act correctly in a range
21:36
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
21:38
llua has joined #ruby
21:39
drincruz has joined #ruby
21:39
drincruz_ has quit [Read error: Connection reset by peer]
21:51
niv has quit [Read error: Connection reset by peer]
21:51
cybniv has joined #ruby
21:53
<
rg1 >
(Date.civil(2021, 7, 1)..Date.civil(2021, 8, 20)).map(&:iso8601) works it's just wordy
22:27
bandithijo has quit [Ping timeout: 258 seconds]
22:29
xyhuvud has quit [Ping timeout: 255 seconds]
22:29
yxhuvud has joined #ruby
22:34
drincruz has quit [Ping timeout: 256 seconds]
22:53
michigan has quit [Quit: Connection closed for inactivity]
22:55
jacktar has quit [Ping timeout: 244 seconds]
22:55
jacktar has joined #ruby
23:03
ur5us has quit [Ping timeout: 255 seconds]
23:04
ur5us has joined #ruby
23:07
michigan has joined #ruby
23:08
lad has joined #ruby
23:09
darkxploit has quit [Quit: darkxploit]
23:17
drincruz has joined #ruby
23:45
llua has quit [Quit: <Rudolph> shell code is what greycat reads to kids when he tucks them in]
23:47
llua has joined #ruby
23:49
niv has joined #ruby
23:50
niv has quit [Client Quit]
23:50
niv has joined #ruby
23:51
niv has quit [Client Quit]
23:51
niv has joined #ruby
23:54
lad has quit [Remote host closed the connection]