frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Do I not like Ruby anymore? (2024)

https://sgt.hootr.club/molten-matter/maybe-i-like-python-now/
47•Vedor•2h ago

Comments

melvinroest•1h ago
This post reminds me of something.

During my first Introduction to Programming course at university, I was taught Java. One thing that I found very troubling is that it wasn't easy, or possible in many cases, to change the programming language. Sure, you can write new functions or methods or classes, but I can't change the keyword for an if-statement. I also remember the TA saying "why would you want that?" I caught myself thinking "if we can program a computer, then why can't we program a language?"

15 years later, I still have this issue a bit, except I made my peace with it. It is what it is. There are some exceptions though! Such as: Lisp, Smalltalk and similar languages. It's in part why I have worked for a company that professionally programmed in Pharo (a Smalltalk descendant [2]). I remember hacking a very crude way for runtime type checking in Pharo [1], just for fun.

I'm not a Ruby programmer, all I know is that Ruby has some things that are identical to Smalltalk. But my question to the author would be: if you long for things like keyword arguments, type hints and namespaces why don't you program it in the Ruby language yourself?

Or is that really hard, like most other languages?

[1] https://youtu.be/FeFrt-kdvms?si=vlFPIkGuVceztVuW&t=2678

[2] Fun fact, I learned about Lisp, Smalltalk and Pharo through HN! So I know most of you know but I suspect some don't.

lmm•57m ago
The language is the easy part. Getting tool support for your language change is the hard part. Getting the library ecosystem to adopt it is even harder.

I think that's why extremely flexible languages have seen limited adoption - if your language is more of a language construction kit where everyone can implement their own functionality, everyone has to implement their own tool support (or, more likely, live without any) and there's a limit to how far you can go with that. The best languages find the sweet spot where they give you enough flexibility to implement most reasonable programs, but are still constrained enough that tools can understand and work with all possible code.

dale_glass•56m ago
Too much change isn't good though. There's value in consistent basics. I've seen people doing things like:

    #define BEGIN {
    #define END }
because they liked Pascal, and that way lies madness.
zelphirkalt•48m ago
Lets not equate silly and possibly dysfunctional string substitution macros with macros in higher level languages, which let you inspect and act according to the structure of the AST.
Ygg2•9m ago
> that way lies madness.

Flashbacks to scala operator PTSD.

No. I don't want to use ++<>^^%% operator! I am not a number! I'm a man!

zelphirkalt•51m ago
> I also remember the TA saying "why would you want that?"

Is a typical response of someone without the background and without the imagination. It may well be, that doing Java-only for too long robs one of both. An alternative response could have been: "What a fascinating idea! How would you apply that? / What would you do with that?"

I am happy for you, that you found the exceptions and that your picture of the computer programming world is not as incomplete and bleak as that of the TA back then.

sfn42•13m ago
So your suggestion to the TA is to ask literally the exact same question but slightly different?
fuckaj•56m ago
Likes Lisp Ruby and Typescript, interesting tastes (in a good way... nuanced)
manuelfcreis•54m ago
I fully agree to the points here, even as a full time ruby lover. Jumping around different languages over the past 10 years really shows staleness in Ruby as a language, even if the ecosystem tries to keep up.

The ergonomics of ruby still have me very much liking the language as it fits how I think, but there are a lot of good developments in the usual neighbors, and I see myself picking up both Python and JS ever more for small projects.

khoury•22m ago
Ruby fully typed would be awesome imo, but I know that goes against a lot of the fundamentals in the language. I just like the syntax and expressiveness of it, but coming from typescript, its just such a bad DX having to work in a large Ruby codebase.
dudeinjapan•52m ago
I still like Ruby. 15+ years in, I find myself in the camp of not wanting it to change. 25 year old me would have been totally jazzed about the addition of namespaces in Ruby 3.5/4.0. 40 year old me wants namespaces to get off my Ruby lawn.
zelphirkalt•25m ago
Doesn't Ruby essentially already have namespaces, in terms of having modules? If one has proper modules, why would one ever need an alternative, weaker, concept for referring to things?
Manfred•14m ago
To make sure code loaded from gems doesn’t shadow the namespace of the application.
sushibowl•46m ago
I'm sort of the inverse of this author: I have always liked Python and disliked Ruby. It's true though that python has changed a lot, and it's a mixed bag IMHO. I think every language feature python has added can have a reasonable argument made for its existence, however collectively it kind of makes the language burgeon under the weight of its own complexity. "one way to do it" really hasn't been a hard goal for the language for a while.

I'm really charmed by ML style languages nowadays. I think python has built a lot of kludges to compensate for the fact that functions, assignments, loops, and conditionals are not expressions. You get comprehensions, lambdas, conditional expressions, the walrus operator... most statements have an expression equivalent now.

it seems like, initially, Guido was of the opinion that in most cases you should just write the statement and not try "to cram everything in-line," so to speak. However it can't be denied that there are cases where the in-line version just looks nice. On the other hand now you have a statement and an expression that is slightly different syntactically but equivalent semantically, and you have to learn both. Rust avoids this nicely by just making everything an expression, but you do get some semicolon-related awkwardness as a result.

zelphirkalt•27m ago
I feel similar about "weight" in Python. Some people can really overdo it with the type annotations, wanting to annotate every little variable inside any procedure, even if as a human it is quite easy to infer its type and for the type checker the type is already clear. It adds so much clutter and at the end of the day I think: "Why aren't you just writing Java instead?" and that's probably where that notion originates from.

I used to be like that. When I did Java. I used to think to myself: "Oh neat! Everything has its place. interfaces, abstract classes, classes, methods, anonymous classes, ... everything fits neatly together."

That was before I learned more Python and realized: "Hey wait a moment, things that require me to write elaborate classes in Java are just a little bit of syntax in Python. For example decorators!" And slowly switched to Python.

Now it seems many Java-ers have come to Python, but without changing their mindset. Collectively they make it harder to enjoy using Python, because at workspaces they will mandate the most extreme views towards type annotations, turning Python into a Java dialect in some regards. But without the speed of Java. I have had feedback for a take-home assignment from an application process, where someone in all seriousness complained about me not using type annotations for what amounted to a single page of code(, and for using explanatory comments, when I was not given any guarantees of being able to talk with someone about the code - lol, the audacity).

Part of the problem is how people learn programming. Many people learn it at university, by using Java, and now think everything must work like Java. I mean, Java is honest about types, but it can also be annoying. Has gotten better though. But that message has not arrived yet at what I call the "Java-er mindset" when it comes to writing type annotations. In general languages or their type checkers have become quite good at inferring types.

pmkary•41m ago
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, typechecking, deep data type exploration, jumping to definitions and implementations? I really think it's a bad choice of Ruby not to care for types. And well we now have Crystal which again makes me question why Ruby? And it’s a shame no language is as beautiful as Ruby, not in features choices, design elegance, balance, beauty of the syntax, joy of programming mindset, not even in the name and logo. I wished Matz rethinked this part.
javaunsafe2019•19m ago
Fully agree. Had to work in the past with ruby. Loved it but type errors during runtime where a thing and therefore I would never use ruby in production again.

I use kotlin nowadays…

wewewedxfgdf•41m ago
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:
                        case 1:
                            if i % 2 == 1:
                                print("odd")
                            else:
                                print("even")
                        case 2:
                            try:
                                print("trying")
                            except:
                                print("failed")
                        case _:
                            print("other")
            else:
                print("negative")
PaulRobinson•33m ago
I mean, that's a horrific piece of Ruby that doesn't do much, and you've not indented it properly.

Of course you can get all this down to a single line with ; demarcation.

And your `.each` could use `{ ... }` syntax, just like C or Java or... you know, everything else.

But sure, whitespace is better, or whatever it is you prefer.

PaulRobinson•37m ago
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 startups as hands-on CTO with Ruby and Rails. It fed and housed me for many years.

In the last 5-7 years I've had to go in other directions. Clojure, Python, Java, even back to C and taking a look at Rust and Zig. I'm now in a role where I don't code so much, but I can see Ruby's problems - performance, the surprises, the fact it allows idiots to do idiotic things (nobody under the age of 40 should be legally allowed to monkey patch a base class or engage in meta programming).

And yet when I want to do something for me, for fun, perhaps advent of code, or a quick mock-up of something that's rolling around in my head, I reach for Ruby. Not elixir which has better runtimes, or C or Zig or Rust which has better performance, not something statically typed which leads to fewer bugs, not Python which has a huge data science community to it...

A few weeks ago I was listening to the DHH episode of the Lex Fridman podcast [0], where DHH talks about Ruby as a "luxury programming language". This matches my own experience.

When I need something to be fast, it's either because I'm dealing with a low-latency problem (and some of my side projects are very latency sensitive - 5ms can make the difference between success and failure), or because I can't afford the luxury of Ruby and Rails and the developer ergonomics.

Ruby makes things fun for the programmer. That's the point. It's beautiful to work with, even if it doesn't do all the things that all the coding books and blogs insist I should be ashamed to not have in my language.

I was slightly embarrassed to be a Ruby and RoR advocate for a while because of the brogrammer BS that emerged around both ecosystems in the 2010s. I then became very embarrassed because it wasn't as cool as a systems language like Rust or Go, or as intellectually deep as Haskell, or as hot on the ML bandwagon as Python.

But I think I don't care anymore. I'm just going to accept it for what it is, and lean into. Life's too short for "shoulds" - I'm just going to like what I like. And I like Ruby.

[0] https://www.youtube.com/watch?v=vagyIcmIGOQ

schappim•28m ago
What looks like stagnation to Steen is actually [1] Matz’s remarkable foresight that provided stability and developer happiness.

Steen’s not wrong that Python evolved and Ruby moved slower, but he’s wrong to call Ruby stagnant or irrelevant. Just think what we've enjoyed in recent times: YJIT and MJIT massively improved runtime performance, ractors, the various type system efforts (RBS/Sorbet etc) that give gradual typing without cluttering the language etc.

Ruby’s priorities (ergonomics, DSLs, stability) are different[2] from Python’s (standardisation, academia/data). It’s a matter of taste and domain, not superiority.

[1] I'm stealing a point DHH made on Lex's podcast. https://www.youtube.com/watch?v=vagyIcmIGOQ

[2] I'm once again parroting DHH/Matz

brainzap•7m ago
I feel the samw, happy that Python is improving and getting more good tooling
IshKebab•4m ago
Yeah Python with uv and Pyright is downright tolerable. As long as you don't care at all about performance anyway (and can guarantee that you never will in future).

RPM 6.0.0 BETA1 Release Notes (Draft)

https://rpm.org/releases/6.0.0
2•gjvc•2m ago•0 comments

Ramses Exchange Fire

https://en.wikipedia.org/wiki/Ramses_Exchange_fire
2•mns06•3m ago•1 comments

Show HN: I built a blog generator that learns your preferences

https://www.blogyak.com
2•mondov•5m ago•1 comments

Inside CPython's attribute lookup

https://antocuni.eu/2025/08/25/inside-cpythons-attribute-lookup/
1•antocuni•6m ago•0 comments

Intel says Trump deal has risks for shareholders, international sales

https://www.cnbc.com/2025/08/25/intel-trump-deal-risks-stock.html
1•panrobo•7m ago•0 comments

Professional Gaming Tools and Guides

2•autumn6653•12m ago•1 comments

Mississippi legal challenge: we will need to geoblock Mississippi IPs

https://dw-news.dreamwidth.org/44429.html
2•healsdata•13m ago•0 comments

Animals Top – bilingual animal and plant encyclopedia (CN/EN)

https://m.i133.com
1•qianniao•14m ago•1 comments

How long does it take for a German Shepherd puppy to be potty trained?

https://www.mypetshops.com/article/how-long-does-it-take-for-a-german-shepherd-puppy-to-be-potty-...
1•houjuejue•16m ago•1 comments

Timetotest.tech – Meet the First AI QA CO-Pilot

1•VincentPresh•21m ago•0 comments

Free for Open Source

https://github.com/cloudcommunity/Free-for-Open-Source
2•3form•25m ago•0 comments

Rv: The Ruby Swiss army knife

https://github.com/spinel-coop/rv
3•ingve•26m ago•0 comments

The 'KPop Demon Hunters' Success Story Could Be a Turning Point for Cinema

https://gizmodo.com/the-kpop-demon-hunters-success-story-could-be-a-turning-point-for-cinema-2000...
2•fcpguru•28m ago•0 comments

The State of MCP Security

https://www.pynt.io/blog/llm-security-blogs/state-of-mcp-security
2•nonvibecoding•31m ago•0 comments

Doing events? Introducing you the world first AI agent for event management

https://www.envelope.so/
2•sonyhong•36m ago•1 comments

Wolf Rock Lighthouse maintenance visit and tour [video]

https://www.youtube.com/watch?v=m81KWrfJED0
2•bschne•39m ago•0 comments

AWS Machine Learning Engineer (Associate) Exam

https://bukola.info/blog/2025-08-08-on-aws-machine-learning-associate-exam
2•mu0n•39m ago•0 comments

PRC-Nexus Espionage Campaign Hijacks Web Traffic to Target Diplomats

https://cloud.google.com/blog/topics/threat-intelligence/prc-nexus-espionage-targets-diplomats
1•shscs911•42m ago•0 comments

Show HN: Maia – Open-source framework for testing AI systems before deployment

https://www.maiaframework.com/
1•radoslaw-sz•43m ago•0 comments

Launch and Scale AI Applications in Minutes

https://www.hyperpodai.com
1•ollayf•45m ago•1 comments

The website address has been modified

https://www.symbolcopy.com/
1•JIE007•48m ago•0 comments

Biotechs Turn to Digital Coins, Crypto to Boost Stock Prices

https://www.bloomberg.com/news/articles/2025-08-25/biotechs-turn-to-digital-coins-crypto-to-boost...
2•thm•48m ago•0 comments

Just launched a new project: sqlmap.online (currently in beta)

2•microphp•51m ago•0 comments

Faircamp: A static site generator for audio producers

https://simonrepp.com/faircamp/
2•trueduke•52m ago•0 comments

Show HN: AI-32: Crawl URLs and Ask AI About the Content

https://apify.com/onescales/ai-32
1•onescales•53m ago•0 comments

Linux is 34 years old today

https://www.tomshardware.com/software/linux/linux-is-34-years-old-today-linus-torvalds-meekly-ann...
3•benkan•53m ago•1 comments

Fans loved her new album. The thing was, she hadn't released one

https://www.bbc.com/news/articles/clydz8d03dvo
2•benkan•55m ago•0 comments

Understand the Temporary Allocator; Understand Arenas

https://zylinski.se/posts/temporary-allocator-your-first-arena/
1•todsacerdoti•55m ago•0 comments

Most air cleaning devices have not been tested on people

https://theconversation.com/most-air-cleaning-devices-have-not-been-tested-on-people-and-little-i...
2•benkan•55m ago•0 comments

You can just open-source things

https://world.hey.com/joaoqalves/you-can-just-open-source-things-2c1e2b77
2•joaoqalves•1h ago•2 comments