Live data from Hacker News

Ruby 3.4 Highlights

blog.sinjakli.co.uk

21–30 of 86 posts

Re: Ruby 3.4 Highlights

#21

The default block parameter name seems small, but I feel like I'm gonna use it all the time, especially when I'm in the Rails console just trying to debug data

I constantly run into situations where I need to nest an iterator computation, and things like "it" get confusing.

I'm all for adding language features to avoid boilerplate, and it's clearly useful. I just want to call out that anonymous typing can be polarizing in large codebases and maybe only use it sparingly.

Re: Ruby 3.4 Highlights

#22

Is ruby used outside of web dev (i.e., Ruby on Rails)? it seems like a nice cute language but I almost never hear about it.

I think it's quite sad that Ruby is so associated with Rails. Ruby is one of my favorite languages and last time that I touched a Rails code was in 2017. Even in web dev Rails is not the only thing in Ruby, there's also Sinatra which is an elegant micro-framework for building HTTP APIs, similar to Flask. Some projects that I remember that uses Ruby that are not related to web dev: Homebrew, Metasploit, Vagrant and Je…

Congratulations on getting Matz to tweet about your post.

Re: Ruby 3.4 Highlights

#24

I happen to be reading the latest edition of the pickaxe book, as I'll soon be using Ruby at work (first experience) and this 'it' update sounds so much better than the _1 described in the book. I remember thinking it clashed a bit with the idea of trying to make the code read like natural language.

Did you know you were going to use Ruby before Applying? Just wondering.

Re: Ruby 3.4 Highlights

#26

Is ruby used outside of web dev (i.e., Ruby on Rails)? it seems like a nice cute language but I almost never hear about it.

I think it's quite sad that Ruby is so associated with Rails. Ruby is one of my favorite languages and last time that I touched a Rails code was in 2017. Even in web dev Rails is not the only thing in Ruby, there's also Sinatra which is an elegant micro-framework for building HTTP APIs, similar to Flask. Some projects that I remember that uses Ruby that are not related to web dev: Homebrew, Metasploit, Vagrant and Je…

Some other examples: DragonRuby, and Chef (which I prefer over ansible).

Re: Ruby 3.4 Highlights

#27

I happen to be reading the latest edition of the pickaxe book, as I'll soon be using Ruby at work (first experience) and this 'it' update sounds so much better than the _1 described in the book. I remember thinking it clashed a bit with the idea of trying to make the code read like natural language.

_1 is also a bit of a footgun. It becomes an array of all block params IF the block has an arity > 1 AND no other block param (e.g. _2) is referenced anywhere within the block.

It's an unusually half-baked feature by Ruby's standards. I think there was some hesitation about the name "it" initially, because "it" is an essential method name in rspec, and is used within blocks there.

Re: Ruby 3.4 Highlights

#28
post #18
post #16

Earlier quoted context omitted.

Yup, I wrote smartcard reader programs in it. Some of them talk to a http server using async-http. It can be used for anything that Perl or Python is good at, well maybe except data science because Python really shines there. And irb is massively useful for everyday tasks.

I wish I could reach for Kotlin as a kind of "Ruby with typing out of the box" but the lack of a good REPL is a real dealbreaker.

You'll get Ruby with typings soon when rbs-inline is finalized

Re: Ruby 3.4 Highlights

#29

Is ruby used outside of web dev (i.e., Ruby on Rails)? it seems like a nice cute language but I almost never hear about it.

Oh yes, Ruby is my go to language to use when I need to glue things together or when I want to automate tasks on my computer. It's such a pleasant language to use!

I think the reason it's not talked about a lot is mainly because Rails overshadowing it and because there aren't so much hype or controversies around it.

Re: Ruby 3.4 Highlights

#30
post #24

I happen to be reading the latest edition of the pickaxe book, as I'll soon be using Ruby at work (first experience) and this 'it' update sounds so much better than the _1 described in the book. I remember thinking it clashed a bit with the idea of trying to make the code read like natural language.

Did you know you were going to use Ruby before Applying? Just wondering.

Yup. I don't mind switching languages, I've done it a few times and I enjoy learning new things.

The market for ruby seems to have good salaries and job satisfaction despite being smallish, so it didn't seem like a bad area to get some experience in.

Why, is there any issue with the choice I'm not aware of?

Post reply on HN