Live data from Hacker News

Do I not like Ruby anymore? (2024)

sgt.hootr.club

31–40 of 184 posts

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

#32
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…

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.

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

#33

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.

In your camp, waving a flag. I love ruby's simplicity when it comes to rapidly prototyping something, and find the wails about production type errors puzzling.

Only thing I've come near that gave me as much joy was Elixir, and I simply didn't have time to pick it up more than the most generic basics.

my mind just likes a.any? {|x| x.someCondition? }

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

#34

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…

There is metaprogramming support in Java, but it's not as inviting and friendly as hygienic macros or Ruby patching. The obvious example is reflection, with which you can do a lot of bizarre things, some of which are useful sometimes. Another is annotations, which is heavily used by libraries in a way similar to how macros are used in certain Lisp like languages.

https://www.baeldung.com/java-reflection

https://www.baeldung.com/java-annotation-processing-builder

Then you've got the byte code itself, and there be dragons: https://aphyr.com/posts/341-hexing-the-technical-interview>

While you rarely see byte code shenanigans in Java code bases, it's how some other languages on the JVM achieve things like runtime metaprogramming.

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

#35
Typescript is a workaround. It exists because web apps got more complex and browsers only support JavaScript. So developers need to stick to JavaScript, but they need typing, therefore TypeScript has been implemented. It’s an exception where it made sense to do so. For all other languages: if you use some dynamic language and you need typing, either wait until the language supports types natively (PHP‘s approach) or „just“ change the language. The additional complexity of an additional typing layer is huge. The complexity of TypeScript - and in general JavaScript‘s ecosystem - is incredibly huge. The biggest issue we have in software development is not that a language isn’t elegant, or you can’t write some some in 3 instead of 15 lines… the biggest problem is complexity. Developers too often forget about that. They focus on things that don’t matter. Ruby vs Python? It doesn’t make a real difference for web apps. If you want a language and ecosystem with low complexity try Go. It’s not perfect. It’s not elegant. Or PHP, which has a lot of drawbacks, but overall less complexity. I don’t say Go or PHP are the best languages out there, but you should try them to get a picture - to decide for yourself what’s important and what not.

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

#36
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…

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.

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

#37

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 th…

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 originat…

I am not an experienced programmer, but I liked python because of the dynamic typing, but tbh no type hints are a nightmare (as I used to use python). These days I gravitate towards using type hints unless I am using an ipynb because it looks clean, but it can be a little much, it can look quite ugly. Not every usecase needs type hints is what I've learned.

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

#38
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 about ruby is how they failed to do typing. I love python's typing module. I think it is the single best thing about python and I wouldn't touch python with a pole if it didn't have that module.

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

#39
post #21

Earlier quoted context omitted.

> 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 comp…

So your suggestion to the TA is to ask literally the exact same question but slightly different?

One question is encouraging, the other is discouraging. That matters a lot in an educational setting.

And they aren't the exact same question.

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

#40

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…

[dead]
Post reply on HN