Live data from Hacker News

Do I not like Ruby anymore? (2024)

sgt.hootr.club

101–110 of 184 posts

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

#101

Earlier quoted context omitted.

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.

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.

But that's an implementation issue. Do you really want to say, work on a project where somebody renamed "if" to "wenn" because they thought writing code in German would be neat?

If you want to make a special use tool, you can write a function like custom_if(cond, then_callback, else_callback) in most languages.

Maybe I'm just getting old, but as time goes by I like it more and more when things are obvious and non-magical.

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

#102
post #56

Earlier quoted context omitted.

I find that the IPython REPL has downright amazing multiline support. I've always been envious of it when using GHCI. But even the standard Python REPL supports multiline paste just fine. So what exactly are you talking about? Rolling your own?

You can't copy a method from a class and then paste it in the REPL, it will complain about indentation. Workarounds: 1) copy whole class 2) remove indentation before copying

That's only a problem in the base python interpreter. IPython has handled this well for over 20 years.

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

#103
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"…

Eh, I wrote a lot of python back in the day, and it was pretty miserable experience back in the pre-2.6 era. If you had to use it for work, there was a pretty good chance you'd try to steer away from Python on your own time.

Modern python is a much better language across the board, even if the packaging/deployment story still needs some love

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

#104
post #84
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…

> it’s a shame no language is as beautiful as Ruby [...] I really think it's a bad choice of Ruby not to care for types Do you think Ruby could change something so fundamental as dynamic => static typing and still retain its beauty? The only static typing solution I've seen for Ruby is Sorbet, and it's... not beautiful.

Sorbet now supports inline RBS signatures, which I find a lot more readable. If you use VS code with Ruby LSP, the syntax highlighting is pretty great for the signatures too.

https://sorbet.org/docs/rbs-support

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

#105
post #74
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…

As someone coming from Ruby to TypeScript, I find types cumbersome, verbose, complex, and not of much use. I have been writing and reading TS for the past six months. What am I missing?

Some people prefer to find bugs after deployment, I suppose.

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

#106

Earlier quoted context omitted.

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.

But that's an implementation issue. Do you really want to say, work on a project where somebody renamed "if" to "wenn" because they thought writing code in German would be neat? If you want to make a special use tool, you can write a function like custom_if(cond, then_callback, else_callback) in most languages. Maybe I'm just getting old, but as time goes by I like it more and more when things are obvious and non-mag…

> Do you really want to say, work on a project where somebody renamed "if" to "wenn" because they thought writing code in German would be neat?

Ha, no, I wouldn't. Because to me it is important, that anyone can read the code, not just me or a German speaking developer. Just like I wouldn't translate "if" to Chinese. The point is, that this translation serves no purpose. Or rather its benefit, if any, is not sufficient to justify it being done and deviating from the standard. Macros can be useful and justified. But these string substitution macros ... Meh, rather rarely, I guess. Maybe for when you don't have "true" and "false" or something.

Some useful examples of macros are: Threading/pipelining, timing, function contracts. Things where the order of evaluation needs to change. Things one cannot easily do with functions alone. Your example of "custom_if" is actually a good one, depending on what "custom_if" does. If it needs its arguments to not be evaluated, unless an earlier argument meets some criteria, it would be a good candidate for a macro. Those things are not done using string substitution macros.

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

#107
post #74
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…

As someone coming from Ruby to TypeScript, I find types cumbersome, verbose, complex, and not of much use. I have been writing and reading TS for the past six months. What am I missing?

Types in TS can indeed become very complex (depending on their usage of course) and it might not be the best example of the benefits.

I personally think that simpler Rust is a better example of the benefits static typing (or maybe something like Gleam).

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

#108
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"…

Humans have a very strong tendency to identify with certain groups (while distancing from other groups).

This is just one such example and it's similar to how group dynamics with sport teams and politics work.

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

#109
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"…

I pretty much hate any screwdriver that's not a Robertson.

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

#110
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"…

Their entire personality, really? You got that from a single paragraph from a blog post?
Post reply on HN