> > Matz is clever so we can all feel a little smarter, too. > (OK, I just made that up) I liked it :).
Happy Birthday, Ruby
41–50 of 239 posts
Re: Happy Birthday, Ruby
#42Earlier quoted context omitted.
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
#43Ruby 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…
Programming languages are different from normal languages because they have different goals, different users and different requirements. The result in of this forced unification in Rails is something that resembles English, if you squint really hard, but in order to do so, it uses a massive amount of non-intuitive assumptions (sorry: conventions) that I as a programmer somehow should know. This makes debugging unnecessary hard. Also, when developing new features I'm constant guessing whether I should this or that form. The only way to find out is trying things out. This is fun as a hobby, but irritating when you're on the clock.
The idea that a programing language can be unified with a normal language is offensive to me both as a programmer and as a writer. They only benefit is that people who are not programmers can dabble around and still make something useful. Which isn't nothing, but not for someone who programs professionally.
Re: Happy Birthday, Ruby
#44Matz himself said something similar about Emacs / Lisp [1]:
> Emacs made me realize anything can be changed by a programmer...Emacs taught me freedom for software...Emacs has changed my life
[1] http://ergoemacs.org/emacs/Matz_Ruby_how_emacs_changed_my_li...
Re: Happy Birthday, Ruby
#45After that, I moved to Groovy, which seemed like a nice middle ground between Ruby and Java, or as I called it at the time: Java as it should have been.
I don't hear much about Ruby and Groovy lately, and while I focused more on front-end development, my back-end work rolled back into Java, which, I admit, has gotten slightly less painful with Java 8. At least in some ways; in other ways, it's just become an even bigger mess where some parts are sensible while other parts are dragging the weight of decades of poor choices with them.
I hear Kotlin is nice, though.
My Ruby skills have gotten a bit stale, sadly. The last thing I did with it was in 2013 I think, when I ran into trouble with Ruby's handling of unicode.
Re: Happy Birthday, Ruby
#46Earlier quoted context omitted.
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…
Re: Happy Birthday, Ruby
#47Earlier quoted context omitted.
> 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…
Re: Happy Birthday, Ruby
#48Ruby 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…
Sigils in Ruby actually do have strong and clear meanings. And the difference between symbols and strings is a useful distinction. And contrary to your statement, Ruby's stdlib is far more complete and more internally consistent than what you get from Perl or Python, so I'm not sure what your beef is with that.
It's fair not to like particular decisions a language has made, but from what you say, I'm not getting the sense that you understand the decisions Ruby has made well enough to criticize them effectively. Again, it seems like your experience was colored heavily by Rails, and fair enough if that's the case. But stick to criticizing the actual source of your problems.
Re: Happy Birthday, Ruby
#49I'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…
Wouldn't Crystal fit the bill for a fast compiled language explicitly designed to emulate Ruby's syntax? (I don't have any significant Ruby or Crystal experience, so if there are reasons why that doesn't fit the bill, I'm sorry)
Re: Happy Birthday, Ruby
#50Ruby 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…
I wholeheartedly agree. My main gripe is that people insist Ruby is 'easy', because it 'looks just like English'. Yeah, well, it doesn't. Programming languages are different from normal languages because they have different goals, different users and different requirements. The result in of this forced unification in Rails is something that resembles English, if you squint really hard, but in order to do so, it uses…