Live data from Hacker News

Do I not like Ruby anymore? (2024)

sgt.hootr.club

61–70 of 184 posts

Re: Do I not like Ruby anymore? (2024)

#61

Earlier quoted context omitted.

LSP (Language Server Protocol) was the final nail in the coffin of Emacs for me. VSCode was "good enough" for pretty much every language with LSP at that point, I did't even bother with Jetbrains ides outside of work after that. And when Obsidian replaced org-mode for me, I deleted my .emacs directory from my dotfiles repository.

> LSP (Language Server Protocol) was the final nail in the coffin of Emacs for me. It was the opposite for me. Emacs + LSP + many other common conveniences all bind together so beautifully and efficiently that I can't imagine using any other IDE at this point.

And I have to say that the whole trope of "Emacs may be able to do anything but you have to configure a lot to get it to work" has has got to be pure exaggeration at this point with things like eglot. I had the most painless experience setting up LSP for Java (among many others).

Re: Do I not like Ruby anymore? (2024)

#63
post #55

I'm a python developer, and a big fan of the features with gradual typing etc. This article really highlights for me though, how python has very much changed from the language it was even 5 years ago. Initially, the celebrated feature of python was that it allowed easy and fast development for newcomers. There was a joke a long the lines, "I learned python, it was a great weekend". As much as I like python's type sys…

Personally, I would absolutely not mind it if Python made type annotations required.

I use pyright with typeCheckingMode: strict and enforce that via checks in CI. You still have the Any/type: ignore escape hatches when necessary. I haven't written fully dynamic Python in years.

Re: Do I not like Ruby anymore? (2024)

#64

I was a full-time Rubyist for a long time. I started the UK's first dedicated Ruby on Rails consultancy in 2006 before Rails was even v1.0 (IIRC the first apps I shipped back then were 0.8.6). I stuck around through the hype chain, and then started to help one employer break up a RoR monolith into micro services and adopt Java and Go (this was a mistake - we should have crafted the monolith better). I've built 4 star…

Ruby feels like a luxury manual hand saw. It fits in the hand perfectly. But it would not be my first choice for every project.

Languages like C#, Java, C++, Scala, Kotlin, and Python in 2025 feel like industrial computerized bandsaws with twenty different settings and controls. Some more complicated than others. They can be tuned to crank out a factories needs but you could spend days just fussing with a single setting that isn't right.

That being said, modern Python to me feels like the least thought out of these. It has been incrementally changed from one language to another, while being forced to keep many of the worst parts of both. To be honest, I think they should keep up the "breaking backwards compatibility" trend and make Python 4 an optionally-compiled, statically-typed language more like Go, but with more expressivity than Go.

I suppose F# is already like my ideal Python 4. It's possible to run as a script or compiled binary. It's a nice clean syntax, and the type system is a joy to use.

A valid F# program can be a single line script or dozens of configuration files. This let's the developer use it for quick and dirty work, then progressively tweak settings to run in a more industrial scale setting.

Re: Do I not like Ruby anymore? (2024)

#65
post #50

> Python is not my favorite programming language. In fact, allow me to drop the euphemism and express my pure, unadulterated thoughts about it: I never liked Python, I see it as a huge red flag and I think the world would be a better place if we all decided to finally move on from it. Why do people make hating a tool their entire personality? I have noticed this same thing with languages like Go ("oh no Go still bad"…

You left out this part:

> The reasons behind this choice of employment are very much unrelated to the technology stack.

Programming language isn't the only factor for employment. People don't always get to just change jobs when an aspect isn't ideal for them.

On top of that, python is ubiquitous in some sectors. It's not as easy to avoid as a lot of other languages.

Re: Do I not like Ruby anymore? (2024)

#66

I'm a python developer, and a big fan of the features with gradual typing etc. This article really highlights for me though, how python has very much changed from the language it was even 5 years ago. Initially, the celebrated feature of python was that it allowed easy and fast development for newcomers. There was a joke a long the lines, "I learned python, it was a great weekend". As much as I like python's type sys…

All due respect but Typer looks like the kind of library that you want to use after your CLI has enough args that you wouldn't be able to get away with the sort of "Hello World" simplicity that you pine for. Nobody's stopping you from manually parsing a couple of arguments. I still do it all the time and it's OK. If anything the magic of gradual typing is that you get to use it as necessity arises.

Typer is very convenient. I don't believe anyone manually parses arguments manually in Python where we have argparse in the standard library, and Typer is a step forward from that.

Re: Do I not like Ruby anymore? (2024)

#67
post #11

Back when autocompletion and stuff were only available in Visual Studio/Xcode/Other bug IDEs, I was forced to use Ruby and fell in love with it. It didn't matter what I used as my editor was Sublime. But when VSCode came and language features became democratized, I never touched a type-less language again. Why should someone opt for a language with absolutely no features where one can have autocompletion, typecheckin…

This was always true, to be honest. Statically typed languages have always been better. Free IDEs such as Eclipse have been available for a long time. Good JVM languages such as Scala have been available for a long time. If only the Ruby ecosystem had adopted Scala instead of Ruby, with cutesy books and eccentric underscored personalities, history might have been different.

I’m honestly still stunned at the self-implosion of the Scala community… can’t think of any other language that threw away such quite unexpected success at an industry level. Apart from the toxic community, not trying to challenge Python for supremacy in the scientific computing/data analysis space seems like the major mistake, given it was for a time the lingua franca of data infra (Spark, Scalding etc).

Re: Do I not like Ruby anymore? (2024)

#68

It's the never ending "end"s that bother me about Ruby. class Mess def chaos(x) if x > 0 [1,2,3].each do |i| case i when 1 if i.odd? puts "odd" else puts "even" end when 2 begin puts "trying" rescue puts "failed" end else puts "other" end end else puts "negative" end end end Clear away all those ends and the program logic pops out. Much fresher! class Mess: def chaos(self, x): if x > 0: for i in [1, 2, 3]: match i: c…

I'll leave aside the unnecessary test for parity as contrived for the example.

This is a question of style; it's possible to write ruby the way you have but with experience you definitely wouldn't.

e.g.

Why wrap the iterator in an if..else..end block? You could replace that with a one line guard statement at the top of the method. No end required.

Why use begin..rescue..end in the middle of your example? Just replace that with a single rescue at the end of the method. Again, no end statement required.

This is like nesting 20 if..else blocks in python and then complaining you don't have a monitor big enough to view it without scrolling. You just wouldn't do it that way.

My hope is that with the new ruby parser rubocop will be more agressive about automatically refactoring examples like this away.

Re: Do I not like Ruby anymore? (2024)

#69

Ruby has a unified interface for select/map/reduce over all containers. They do lazy calculations if specified. You can chain expressions simply by appending them at the end without scrolling to the back of the expression. That is objectively better than lisp and python. Sure, you can always rewrite to match that style with macros in lisp and generators in python, but they weren't meant to be used that way. Sad thing…

Lisp was absolutely meant to be used that way.

Re: Do I not like Ruby anymore? (2024)

#70
post #50

> Python is not my favorite programming language. In fact, allow me to drop the euphemism and express my pure, unadulterated thoughts about it: I never liked Python, I see it as a huge red flag and I think the world would be a better place if we all decided to finally move on from it. Why do people make hating a tool their entire personality? I have noticed this same thing with languages like Go ("oh no Go still bad"…

> It would be like hating a screwdriver.

I hate Philips screwdrivers (but love JIS).

Post reply on HN