Live data from Hacker News

Ruby: A great language for shell scripts

lucasoshiro.github.io

131–140 of 368 posts

Re: Ruby: A great language for shell scripts

#132
post #129

Ruby's a great language- I've always enjoyed its ergonomics and clarity. But its editor tooling hasn't kept up with its one-time competitor, Python. I've mostly been in the Python ecosystem for the past few years and the LSP investment from Microsoft has really shown. Rich Python support in VSCode is seamless and simple. Coming back to Ruby after that caught me off guard - it feels like I'm writing syntax-highlighted…

It got a lot better recently. You should take a second look.

Re: Ruby: A great language for shell scripts

#133
post #108
post #9

I sometimes wonder why we don't see ruby used for shell stuff more often. It inherited most of the good stuff for shell scripting from Perl, and Perl took a lot of it's syntax from sh and sed and awk, so almost anything you can do in shell script you can do in ruby, but with an option of making it gradually less terse and more readable, while having sane variables and data handling from the start. Also ruby is great…

> I sometimes wonder why we don't see ruby used for shell stuff more often. The reason we don't see Ruby used more for shell stuff is because Python won this particular war. It's already installed on basically every Linux distribution out there, and this simple fact outweighs all other language considerations for probably >95% of people who are writing shell scripts in something that isn't Bash. Personally, I don't m…

> It's already installed on basically every Linux distribution out there,

PEP 668 pretty much negates this though. To do anything you need a python environment set up per script/project w/e

Re: Ruby: A great language for shell scripts

#134
post #129

Ruby's a great language- I've always enjoyed its ergonomics and clarity. But its editor tooling hasn't kept up with its one-time competitor, Python. I've mostly been in the Python ecosystem for the past few years and the LSP investment from Microsoft has really shown. Rich Python support in VSCode is seamless and simple. Coming back to Ruby after that caught me off guard - it feels like I'm writing syntax-highlighted…

It got a lot better recently. You should take a second look.

I mean, I was trying to set up editor support for a Ruby script last week. So unless it was improved really recently, it's not where I'd like it to be.

Re: Ruby: A great language for shell scripts

#135
post #129

Ruby's a great language- I've always enjoyed its ergonomics and clarity. But its editor tooling hasn't kept up with its one-time competitor, Python. I've mostly been in the Python ecosystem for the past few years and the LSP investment from Microsoft has really shown. Rich Python support in VSCode is seamless and simple. Coming back to Ruby after that caught me off guard - it feels like I'm writing syntax-highlighted…

It got a lot better recently. You should take a second look.

I tried last month and it was still a mess. The old Ruby extension used to work fine and the new LSP one from Shopify doesn't want to work for whatever reason.

Re: Ruby: A great language for shell scripts

#136
post #129

Ruby's a great language- I've always enjoyed its ergonomics and clarity. But its editor tooling hasn't kept up with its one-time competitor, Python. I've mostly been in the Python ecosystem for the past few years and the LSP investment from Microsoft has really shown. Rich Python support in VSCode is seamless and simple. Coming back to Ruby after that caught me off guard - it feels like I'm writing syntax-highlighted…

The “editor tooling” in Jetbrains’ Rubymine is fabulous.

Re: Ruby: A great language for shell scripts

#138
post #77

Earlier quoted context omitted.

Ruby is unsuitable for large projects for the same reason python is, but it also lacks the huge ecosystem and labor pool that python has. When I'm interviewing and a company tells me ruby is the main language, I end the call.

“X is unsuitable for large projects” when there are many readily discovered existence proofs to the contrary (including but not limited to $1B+ businesses, massive communities, deep thoughtful and disciplined engineering spokespeople, etc.) strikes me as a common trope here on HN. (Which is not to say X is flawless even at scale or a clear best fit along all axes. That is true for no X that I know of.)

Despite ruby, not because of it.

Re: Ruby: A great language for shell scripts

#139
post #129

Ruby's a great language- I've always enjoyed its ergonomics and clarity. But its editor tooling hasn't kept up with its one-time competitor, Python. I've mostly been in the Python ecosystem for the past few years and the LSP investment from Microsoft has really shown. Rich Python support in VSCode is seamless and simple. Coming back to Ruby after that caught me off guard - it feels like I'm writing syntax-highlighted…

The “editor tooling” in Jetbrains’ Rubymine is fabulous.

That's true, I've heard good things! I don't use Jetbrains products, but I'm glad they work well here.

Re: Ruby: A great language for shell scripts

#140
post #96

Earlier quoted context omitted.

> ... maybe extract those files to required files, add gems, whatever. CPAN is the killer feature of Perl. It just works. First off, most of the time I don't need a CPAN module for doing shell scripting in perl. Perl itself is rich enough with the file manipulations that are needed for any script of less than 100 lines. My experiences with Ruby and installing gems have been less pleasant. Different implementations of…

Does anyone under age 50 or so even know Perl?

I'm not even 40 and I remember it well enough.
Post reply on HN