Live data from Hacker News

Happy Birthday, Ruby

github.com

121–130 of 239 posts

Re: Happy Birthday, Ruby

#121

> Ruby is the Katamari Damacy of programming languages love it.

Sounds like they're trying to borrow-and-modernize the "Lisp is like a ball of mud. Add more and it's still a ball of mud" metaphor.

Re: Happy Birthday, Ruby

#122
post #93
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…

Your complaints regarding ruby has been noted. It's not you favorite language and that's cool. Every language out there has pros and cons with different set of tradeoffs , you can't point at a language and objectively say X is better than Y. Ruby has its place and whilst you think Rails is "magic" the internet begs to differ. Of course any framework looks like "magic" if you don't bother digging into implementation d…

"Ruby has its place and whilst you think Rails is "magic" the internet begs to differ. Of course any framework looks like "magic" if you don't bother digging into implementation details of it. That is the whole point!"

I think most people including many Rails proponents would agree that Rails has a huge emphasis on "magic" compared to other frameworks. It's a feature. Convention over Configuration implies magic and that is one of Rails' most famous tenets.

Love it or hate it, magic is Rails' modus operandi

Re: Happy Birthday, Ruby

#123

Earlier quoted context omitted.

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)

So I do have a lot of Ruby experience, and I have used Crystal, and I've found that Crystal being Ruby-ish in syntax doesn't help with the fact that it isn't Ruby and doesn't work like Ruby. Nor does Rust, of course, though I do appreciate how Rust has liberally taken after Ruby in a lot of other ways. But I find Crystal mostly frustrating in many ways related to how it looks and presents itself. It wants to look lik…

> And I think that a typed Elixir would get my attention right quick.

Elixir _is_ statically typed, it just uses strong type inference so you rarely have to explicitly type things out.

A key difference between Crystal and Elixir is that Crystal tries to replicate ruby syntax in a more performant language, whereas Elixir tries to apply the sensibilities of Ruby and the Ruby community to the Erlang VM.

Re: Happy Birthday, Ruby

#124

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

> Try passing a std::string in from C/C++ code. It treats it as a byte string

Because that's exactly what it is? std::string is a bytes buffer, not actual text. There's no guarantee that the contents of std::string will be in any encoding, let alone a specific one.

Re: Happy Birthday, Ruby

#125

This should have " (2018)" in the title.

My first reaction was "2018 was only 10 days ago!" But then I clicked the link and saw the article is from February 2018, so Ruby is nearly 26 now.

unless you go by the actual release date of dec 1995..

Re: Happy Birthday, Ruby

#126
post #43
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…

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…

It sounds like you're confusing Ruby with Cucumber

Re: Happy Birthday, Ruby

#127
post #123

Earlier quoted context omitted.

So I do have a lot of Ruby experience, and I have used Crystal, and I've found that Crystal being Ruby-ish in syntax doesn't help with the fact that it isn't Ruby and doesn't work like Ruby. Nor does Rust, of course, though I do appreciate how Rust has liberally taken after Ruby in a lot of other ways. But I find Crystal mostly frustrating in many ways related to how it looks and presents itself. It wants to look lik…

> And I think that a typed Elixir would get my attention right quick. Elixir _is_ statically typed, it just uses strong type inference so you rarely have to explicitly type things out. A key difference between Crystal and Elixir is that Crystal tries to replicate ruby syntax in a more performant language, whereas Elixir tries to apply the sensibilities of Ruby and the Ruby community to the Erlang VM.

I was using "typed" as shorthand for "statically typed", but Elixir is not statically typed. Typespecs aren't static typing and IMO they get messy when you want to do more than specify primitives.

https://elixir-lang.org/getting-started/typespecs-and-behavi...

Re: Happy Birthday, Ruby

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

How long did you program in ruby? Since its an OO programming language the keywords are per object which makes things simple to understand. Ruby was the first language I really enjoyed and allowed for some really nice DSLs. Even Rust borrowed syntax from ruby (although more ugly IMO).

Re: Happy Birthday, Ruby

#129
post #91

Earlier quoted context omitted.

So, I'm old, and have done lots of stuff in lots of languages in frameworks. For about a dozen years, Rails was my go-to toolkit. I've written a couple dozen production applications with it. Unfortunately, Rails has really fallen out of favor lately. Even a Rails-specialty shop I worked for briefly has pivoted to using ASP.NET. I've played around in that stack, and found it lacking. (EF just doesn't compete as an ORM…

Do you have any experience with Django? I haven't used rails myself, but I'm told they are very similar in the "look at what I'm not doing" regard.

I've been using Django for the last three years and no, it's not Rails. It's a very light framework and you're almost on your own for many decisions. More like a router, a test framework, an ORM and templating language put together than a cohesive framework. Easy to end up with something totally different in every project you look at. On the other side all Rails projects look alike, which is much better when taking over from previous developers.

By the way, Django's inflexible templating language kills productivity (templatetags, as with Java 15 years ago) and the ORM is (how to say it kindly?) lacking in elegance. Django's Model.objects.get(pk=1) vs Rail's Model.find(1) is the least of the problems but I'm short on time now. Because (sarcasm on) we might get confused if we omit objects, what could Model.get possibly mean? (sarcasm off)

Everything in Python seems over engineered as if only very large projects are going to use it, and Django makes no exception. Still, I'll take Python and Django all the times over Java and any of its web frameworks. My personal rankings are:

Ruby/Rails > Elixir/Phoenix > Python/Django >>>> Java/* > JavaScript/* which doesn't have any serious server side framework. I have little direct PHP experience but I'd put it between Python and Java (I managed the developers on medium sized Zend project years ago.)

Re: Happy Birthday, Ruby

#130

Earlier quoted context omitted.

I'm curious, where does pluralization of table names bring runtime overhead? AFAIK, they are stored in the model and not generated every time they are needed.

It does bring cognitive overhead, when it's not explicit

But you’re writing an ActiveRecord migration. It’s explicit in the same way that echoing a string out is ‘puts’ instead of ‘print’ because this is Ruby and not Python.
Post reply on HN