Live data from Hacker News

Happy Birthday, Ruby

github.com

31–40 of 239 posts

Re: Happy Birthday, Ruby

#31
post #16

Ruby is the very least favorite of all the programming languages I've had to use regularly over my career. Its syntax strongly favors cuteness over familiarity. Wherever Ruby can diverge from expectations to give you a pointless little tickle of whimsical inventiveness instead, it seems to do so. Visually it looks like an unwanted love child of Pascal and Python. There's no clear rhyme or reason to the use of sigils…

Whimsical inventiveness is the one thing that keeps me enjoying the art of programming.

There's a tension in programming between being verbosity and ingenuity. More flexible languages and programmers general favor ingenuity, while rigid ones favor verbosity. When people complain about the "magic" in Rails, it's usually because it's a pattern that is new to them, and they would have preferred an older pattern even if it was a more verbose one. Which is fine, but it is a preference amidst a large spectrum of tradeoffs. Unfortunately, many people tend to not see most tradeoffs in software engineering and try to come up with as many reasons as possible for why their way is right and the other way is trivial, stupid, cute, or useless.

Re: Happy Birthday, Ruby

#32
post #16

Ruby is the very least favorite of all the programming languages I've had to use regularly over my career. Its syntax strongly favors cuteness over familiarity. Wherever Ruby can diverge from expectations to give you a pointless little tickle of whimsical inventiveness instead, it seems to do so. Visually it looks like an unwanted love child of Pascal and Python. There's no clear rhyme or reason to the use of sigils…

> Ruby is the very least favorite of all the programming languages I've had to use regularly over my career. > Its syntax strongly favors cuteness over familiarity How do you define regular? I use both Ruby and JS almost daily, and have previously used Java and python for several years. I find ruby a joy to use and have no issues with 'familiarity'

If I used Ruby daily, I'd probably be used to it. Right now it's something I have to touch 2-3 times a week to implement specific features in a fairly large Rails codebase, and it always feels jarring to make the switch from the familiar JS/C++/Obj-C spheres of syntactic overlap.

Re: Happy Birthday, Ruby

#33

Earlier quoted context omitted.

> Its syntax strongly favors cuteness over familiarity. Funny, I recently made a stack switch from Ruby to Python, and I had the exact opposite impression. Ruby coding style/syntax tends to favor convention over configuration (at least in terms of Rails setup), while Python to me seems less so. Ruby also seems to me a bit more consistent across it's versions. One of the biggest gripes I've had about Python so far is…

> having two distinctly different types of strings You must be talking about Python 2, the deprecated version for 12 years now, with support ending next year. Because last time I checked, current, modern Python only has one type of string.

Try passing a std::string in from C/C++ code. It treats it as a byte string, which you have to prepend with 'b', and Python 3 will not do any nice casting under the hood back and forth between the two types.

Sure, I am picking out one particular use case, but it isn't uncommon to wrap C code in python scripts to mung data going in and out of it.

You are right though. String manipulation does appear to be easier than Python 2's implementation.

Re: Happy Birthday, Ruby

#34
post #16

Ruby is the very least favorite of all the programming languages I've had to use regularly over my career. Its syntax strongly favors cuteness over familiarity. Wherever Ruby can diverge from expectations to give you a pointless little tickle of whimsical inventiveness instead, it seems to do so. Visually it looks like an unwanted love child of Pascal and Python. There's no clear rhyme or reason to the use of sigils…

Whimsical inventiveness is the one thing that keeps me enjoying the art of programming. There's a tension in programming between being verbosity and ingenuity. More flexible languages and programmers general favor ingenuity, while rigid ones favor verbosity. When people complain about the "magic" in Rails, it's usually because it's a pattern that is new to them, and they would have preferred an older pattern even if…

> "Whimsical inventiveness is the one thing that keeps me enjoying the art of programming."

A personality difference then. Reading clever code does nothing for me. I'm much happier digging around hulking layered codebases that may look ugly but do something valuable for the user.

I agree that the cuteness of a programming language is just a matter of taste and habit. I'm not going to pretend my criticism was anything deeper than an expression of why I personally dislike having to work in Ruby.

Re: Happy Birthday, Ruby

#35
post #3

> Ruby isn't the most beautiful language out there Huh, I sure think it is. I wonder what the author thinks the competition might be? Ruby has its issues for sure, but aesthetics ain't one of them - far and away my favourite out of any major language.

The author of this piece is Dave Thomas, who also wrote:

"I came across Ruby in 1998 because I was an avid reader of comp.lang.misc (ask your parents). I downloaded it, compiled it, and fell in love. As with any time you fall in love, it’s difficult to explain why. It just worked the way I work, and it had enough depth to keep me interested.

"Fast forward 15 years. All that time I’d been looking for something new that gave me the same feeling. Then I came across Elixir, a language by José Valim, that puts a humane, Ruby-like syntax on the Erlang VM."

So while he loves Ruby he's mostly moved on to Elixir, which he loves partly because of how it builds on the ideas in Ruby.

Re: Happy Birthday, Ruby

#37
post #8

After 25 years it seems Ruby is in gradual decline these days? You will find one ruby related post at HN after reading 500 of Javascript and/or Python posts here for example.

I agree with the other poster who says it's mature, not in decline (so maybe that's boring to the crowd that likes to always hop to the latest tech). Basically most of the kinks have been fixed and desired features have been added, and now it's about gradual improvements and adding new functionality as it comes. Students also commonly learn Python and Javascript in college and are probably more active on social media…

> It used to get accused of scaling poorly, but tell that to Github, Gitlab, and other large-scale sites with millions of users.

I've worked on one such large-scale enterprise-level web app, and it really does scale poorly in some areas, specifically database management. ActiveRecord tends to get extremely expensive when db's take on large amounts of records and complex relationships start forming between those large tables. You need VERY good software engineering practices and understanding of which choices will utterly kill you down the line in terms of performance when using this ORM, and it's hard to see those consequences at the outset due to the fact that Rails code is so easy to pick up and understand.

Re: Happy Birthday, Ruby

#38
post #3

> Ruby isn't the most beautiful language out there Huh, I sure think it is. I wonder what the author thinks the competition might be? Ruby has its issues for sure, but aesthetics ain't one of them - far and away my favourite out of any major language.

I'm not sure what language would be more beautiful than ruby, to be honest, and it's not even my favorite language to use. Let's do a mini code challenge in the thread -- implement fizzbuzz in the most beautiful way you can, in the most beautiful language you know:

One liner side-channel attacks free/Java:

  public static void main(String[] a) {
    for(int n=0; n++>> 31 ^1 | -n%5 >>> 30&2 ^ 2]);
  }

Re: Happy Birthday, Ruby

#39

I'm currently working on a Ruby project, and I love the language so much! It's elegant, fast enough for me, and the ecosystem rocks. It seems that, after Ruby borrowed from many previous languages, a lot of rubyisms went into Rust (the nice functional-style enumerations, the awesome package manager inspired by Bundler). And I'm thrilled the best of the Ruby world found its way into other languages. A future where the…

Check out Crystal - Its statically typed, compiled, and a near one to one implementation of Ruby. https://crystal-lang.org

Re: Happy Birthday, Ruby

#40
Great writeup! I agree that Ruby is a remarkable language. One that changed my perspective about what a language could be while at the same time combining some of my absolute favorite ideas from Perl, Smalltalk, and Scheme into a syntax far cleaner and more satisfying than almost any other language I've worked with.

Dave Thomas's Programming Ruby was a fixture on my office desk for a decade. One of the best programming books I've ever read, with a fantastic reference section (built from Ruby's own excellent baked-in docs), my copy is well worn, and I still find reasons to dig it off the shelf from time to time.

I can't give enough Kudos to Matz, Dave, and the rest of the Ruby community for bringing this language into my life. The community they've built is truly amazing, and the language has endured even as it's grown with far fewer bumps and jolts as compared to other similar languages over the same time period.

In summary, quite simply amazing! Happy Birthday, Ruby!

Post reply on HN