havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.3, 3.0.5, 2.7.7, 3.2.0-rc1: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://libera.irclog.whitequark.org/ruby/
leftylink has quit [Remote host closed the connection]
pandabot has quit [Remote host closed the connection]
leftylink has joined #ruby
pandabot has joined #ruby
darkstardevx has quit [Read error: Connection reset by peer]
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
perrierjouet has joined #ruby
caedmon has joined #ruby
desnudopenguino has quit [Ping timeout: 260 seconds]
desnudopenguino1 has joined #ruby
caedmon has quit [Remote host closed the connection]
desnudopenguino1 is now known as desnudopenguino
RougeR has quit [Quit: Leaving]
<ox1eef_> isene: Glad to hear that !
caedmon has joined #ruby
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
caedmon has quit [Quit: caedmon]
caedmon has joined #ruby
cryptkeeper has joined #ruby
caedmon has quit [Client Quit]
caedmon has joined #ruby
caedmon has quit [Quit: caedmon]
caedmon has joined #ruby
caedmon has quit [Ping timeout: 272 seconds]
caedmon has joined #ruby
Pixi` has quit [Ping timeout: 260 seconds]
Pixi has joined #ruby
caedmon has quit [Remote host closed the connection]
ur5us_ has joined #ruby
caedmon has joined #ruby
eddof13 has joined #ruby
aeris has quit [Ping timeout: 255 seconds]
aeris has joined #ruby
Rounin has quit [Ping timeout: 255 seconds]
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
caedmon has quit [Ping timeout: 272 seconds]
caedmon has joined #ruby
aeris has quit [Ping timeout: 255 seconds]
aeris has joined #ruby
caedmon has quit [Ping timeout: 272 seconds]
caedmon has joined #ruby
caedmon has quit [Ping timeout: 272 seconds]
caedmon has joined #ruby
aeris has quit [Remote host closed the connection]
cyj123 has quit [Ping timeout: 252 seconds]
aeris has joined #ruby
cyj123 has joined #ruby
caedmon has quit [Ping timeout: 252 seconds]
ur5us_ has quit [Quit: Leaving]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
konsolebox has joined #ruby
<ox1eef_> I'm new to strongly-typed languages in general, and TypeScript is the first I've used seriously. It drives me nuts to be honest, but it got a lot easier when I switched from using emacs to vs code. The inline errors vs code contextualizes make it much easier to address type errors.
<ox1eef_> If TypeScript is anything to go by, I can't say I'm psyched by rbs / sorbet, though.
<zaben[m]1> The good thing about RBS is that it is completely optional and is mainly there to serve as hints for the developer
<ox1eef_> Yeah, it will be interesting to see how it plays out.
<madprops> any tops on how to improve this code? https://github.com/madprops/crux/blob/main/crux
<madprops> tips
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
desnudopenguino has quit [Ping timeout: 255 seconds]
moldorcoder7 has quit [Ping timeout: 255 seconds]
<ox1eef_> madprops: Replace 'for x in y' with 'y.each'. Remove 'then' from 'if expr then'. Those are standard Rubyisms. Replace path_arg + "/**/*" with File.join(path_arg, "**", "*"). Verify ARGV[0] is not nil, and print a helpful message that explains an argument is required. That's all I can think of at a glance.
axisys has joined #ruby
<madprops> ox1eef_, thanks. why is each better than for?
<ox1eef_> Not neccessarily better, but it's rare that'd you see it being used. 'each' is standard, and if I remember right, for even uses it under the hood.
<madprops> ok cool. applied the changes
<madprops> now only thing i need is to exit gracefully on ctrl+c
<madprops> if i ctrl+c while at gets, it crashes
<madprops> i mean it shows a traceback
<ox1eef_> trap("SIGINT") { ... }
<madprops> yeah that worked
konsolebox has quit [Quit: Leaving]
darkstardevx has joined #ruby
cartdrige has joined #ruby
crax23 has quit [Ping timeout: 272 seconds]
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
otisolsen70 has joined #ruby
cxl has quit [Quit: bye]
perrierjouet has quit [Quit: WeeChat 3.7.1]
cxl has joined #ruby
teclator has joined #ruby
axsuul has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
konsolebox has joined #ruby
FullMetalStacker has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 252 seconds]
axsuul has quit [Quit: 👋]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
axsuul has joined #ruby
jvalleroy has joined #ruby
cartdrige has joined #ruby
crax23 has quit [Ping timeout: 272 seconds]
konsolebox has quit [Quit: Leaving]
axsuul_ has quit [Quit: 👋]
FullMetalStacker has quit [Remote host closed the connection]
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Remote host closed the connection]
FullMetalStacker has joined #ruby
FullMetalStacker has quit [Client Quit]
crax23 has joined #ruby
Y05hito__ has joined #ruby
cartdrige has quit [Ping timeout: 265 seconds]
crax23 has quit [Ping timeout: 252 seconds]
crax23 has joined #ruby
moldorcoder7 has joined #ruby
Y05hito__ has quit [Ping timeout: 255 seconds]
crax23 has quit [Ping timeout: 255 seconds]
cartdrige has joined #ruby
teclator has joined #ruby
hightower2 has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
_ht has joined #ruby
__ht has joined #ruby
_ht has quit [Ping timeout: 272 seconds]
__ht is now known as _ht
__ht has joined #ruby
_ht has quit [Ping timeout: 268 seconds]
__ht is now known as _ht
dionysus69 has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
gcd has joined #ruby
cartdrige has quit [Ping timeout: 268 seconds]
cartdrige has joined #ruby
cartdrige has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Ping timeout: 252 seconds]
John_Ivan has quit [Read error: Connection reset by peer]
John_Ivan has joined #ruby
perrierjouet has joined #ruby
kaivai has joined #ruby
kaivai has quit [Changing host]
<havenwood> madprops: `each` is better than `for` for scoping reasons. the `for` implementation is just a "fun" toy. https://gist.github.com/havenwood/119a52503f93dc146a5ea9c4d97c122c
cartdrige has joined #ruby
crax23 has joined #ruby
teclator has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
cxl has quit [Ping timeout: 255 seconds]
cxl has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Ping timeout: 255 seconds]
_aeris_ is now known as aeris
Michaela has quit [Remote host closed the connection]
Aminda has joined #ruby
Rounin has joined #ruby
Rounin has joined #ruby
Rounin has quit [Changing host]
__ht has joined #ruby
_ht has quit [Ping timeout: 272 seconds]
__ht is now known as _ht
swaggboi has joined #ruby
cartdrige has joined #ruby
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 268 seconds]
cartdrige has quit [Ping timeout: 272 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
willfish has joined #ruby
cartdrige has joined #ruby
Y05hito__ has quit [Ping timeout: 256 seconds]
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 268 seconds]
cartdrige has joined #ruby
crax23 has quit [Ping timeout: 252 seconds]
caedmon has joined #ruby
caedmon has quit [Ping timeout: 252 seconds]
tumdum has joined #ruby
c10l has quit [Quit: Ping timeout (120 seconds)]
c10l has joined #ruby
moo- has joined #ruby
moo has quit [Ping timeout: 268 seconds]
caedmon has joined #ruby
moldorcoder7 has quit [Ping timeout: 272 seconds]
moldorcoder7 has joined #ruby
c10l has quit [Quit: See ya! o/]
caedmon has quit [Ping timeout: 255 seconds]
c10l has joined #ruby
Pixi__ has joined #ruby
Pixi has quit [Ping timeout: 252 seconds]
victori has quit [Ping timeout: 268 seconds]
r3m has quit [Quit: WeeChat 3.8-dev]
r3m has joined #ruby
caedmon has joined #ruby
desnudopenguino has joined #ruby
caedmon has quit [Ping timeout: 252 seconds]
caedmon has joined #ruby
cartdrige has quit [Ping timeout: 252 seconds]
caedmon has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
moo- is now known as moo
cxl has quit [Quit: bye]
victori has joined #ruby
cxl has joined #ruby
tomtmym has quit [Quit: Gone.]
c10l has quit [Ping timeout: 255 seconds]
dionysus69 has quit [Ping timeout: 272 seconds]
willfish has quit [Ping timeout: 272 seconds]
cartdrige has joined #ruby
teclator has joined #ruby
c10l has joined #ruby
c10l has quit [Quit: See ya! o/]
Rounin has quit [Remote host closed the connection]
c10l has joined #ruby
_ht has quit [Quit: _ht]
desnudopenguino has quit [Ping timeout: 252 seconds]
caedmon has joined #ruby
ollysmith has quit [Quit: ZNC 1.8.2+deb3+b3 - https://znc.in]
ollysmith has joined #ruby
ollysmith has quit [Client Quit]
ollysmith has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 268 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
caedmon has quit [Quit: caedmon]
caedmon1 has joined #ruby
caedmon1 is now known as caedmon
FullMetalStacker has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]
FullMetalStacker has quit [Client Quit]
c10l has quit [Ping timeout: 252 seconds]
c10l has joined #ruby
<madprops> havenwood, what do you mean for scoping reasons, the variable scope is different?
caedmon has quit [Ping timeout: 272 seconds]
<weaksauce> madprops each creates a new scope while for doesn't
<madprops> so for creates a global var i assume
<weaksauce> `[1,2].each do |i| p i end` only has i in the scope of the do end block
<madprops> "global"
<madprops> what's the point of needing "do" ?
<weaksauce> where for i in [1,2] creates a new i variable or overwrites it and leaves it as 2 when the block ends
<madprops> i see
<weaksauce> do end or { } creates a new block and a new scope
<weaksauce> for is built into the language like while whereas do end is passing in a block to a function
<weaksauce> and a block is an anonymous function basically
caedmon has joined #ruby
caedmon has quit [Ping timeout: 260 seconds]
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp- is now known as Sankalp
Rounin has joined #ruby
otisolsen70 has quit [Quit: Leaving]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 252 seconds]
cartdrige has joined #ruby
Y05hito__ has quit [Ping timeout: 252 seconds]
hightower3 has joined #ruby
hightower2 has quit [Ping timeout: 272 seconds]