Live data from Hacker News

Ruby 3.2.0 is from another dimension

tomaszs2.medium.com

201–210 of 341 posts

Re: Ruby 3.2.0 is from another dimension

#201

Earlier quoted context omitted.

> It's slower than Ruby That’s like saying that Dodge Neon is Slower than Mazda Miata. Both are bottom of the barrel compared to any compiled language.

> Both are bottom of the barrel compared to any compiled language. Scripting languages and compiled languages are used for different things. And you're right, both are slow as hell and speed doesn't really matter for scripting, but when all else is equal, it matters, a lil...

JavaScript is a scripting language but wipes the floor with either (like 25 and more times faster) and can be used to actually do something other than being a glue.

Re: Ruby 3.2.0 is from another dimension

#202
post #96
post #20

> because it indicates very precisely where the end is likely to be missing Which means the `end` keyword can be elimilated all together :D

Ah, automatic "end" insertion, like JavaScript's automatic semicolon insertion?

this would be close to making whitespace in Ruby significant, which would be unpleasant. Ruby already gives you plenty of options to write code without an 'end' keyword.

Re: Ruby 3.2.0 is from another dimension

#203

Ruby is my favorite language, and often it is a joy to use because of its combined attributes of brevity, expressive power, and feature consistency. It's disappointing that there are so many more jobs for another popular language - one that lacks the elegance and consistency but which has a larger ecosystem. As far as I know, the only well known reason for a company to choose Ruby is if they want Rails (and obviously…

I recently started a new job that uses RoR and I'm blown away by how different it is. Coming from Java, I'm still always struggling to get basic things done but it's really cool how Rails has features for things that would otherwise require manual code.

Re: Ruby 3.2.0 is from another dimension

#204

Ruby is my favorite language, and often it is a joy to use because of its combined attributes of brevity, expressive power, and feature consistency. It's disappointing that there are so many more jobs for another popular language - one that lacks the elegance and consistency but which has a larger ecosystem. As far as I know, the only well known reason for a company to choose Ruby is if they want Rails (and obviously…

You are obviously referring to Python and so I would like to note a few things. (I have nothing against Ruby) > Ruby ... its combined attributes of brevity, expressive power, and feature consistency. > [Python] lacks the elegance and consistency First I would argue Python is very consistent in its design, it aims to only have one obvious way to do things and so it's easy to guess how apis will work. It also aims for…

> Ultimately I think that's why Python has gained more traction than Ruby, it's an "easer" language to follow and start with. Ruby is probably a more fun and intellectually stimulating language to work with though.

May be now, but for a long time when RoR first came out, many people pick python instead of Ruby because scalability. Maybe a lot has improved with Ruby, and with introduction of Crystal, that may not be an issue any more.

Re: Ruby 3.2.0 is from another dimension

#205
post #46

Earlier quoted context omitted.

You are obviously referring to Python and so I would like to note a few things. (I have nothing against Ruby) > Ruby ... its combined attributes of brevity, expressive power, and feature consistency. > [Python] lacks the elegance and consistency First I would argue Python is very consistent in its design, it aims to only have one obvious way to do things and so it's easy to guess how apis will work. It also aims for…

I explored this topic a while ago on my blog [0] In essence, I don't think it has anything to do with elegance, syntax, or "easiness". It's more about timing + origin + corporate adoption: * Python was created in Europe, Ruby was created in Japan - when Ruby gained more recognition in English-speaking world (~2004), Python has already been present and used worldwide for a decade * Ruby was created as a personal, hobb…

I agree with the timing and origin. I think corporate backing was just luck.

Google used Python very early, but other languages became more prominent in 2005, culminating in the creation of Go, after which GvR left.

Indeed people talked a lot about Google "supporting" Python, but the support was pretty minimal (50% job for GvR, where you cannot really do much).

Python has way better marketing though the PSF though. They understood that you can create a circus around the language that is completely removed from engineering, fundamentals and actual core development. If Ruby had been as shameless, it might be #1 today.

Re: Ruby 3.2.0 is from another dimension

#206
post #193

Earlier quoted context omitted.

I'd agree that __len__ is a fairly trivial example, but it is used for truthiness in Python too. It seems like a reasonable choice to mark these blessed methods that the language is using deeply as part of the runtime in a special way but I'll happily concede that it could have been X.len() instead. `sorted`, `list`, `set`, are more interesting cases where they all work with the underlying __iter__ protocol. You don'…

Language design is a hard problem. You have to make so many compromises to get it to the point where it works for a large variety of use cases that the degree of ugliness is almost directly proportional to the breadth of application and adoption. The only languages that manage to stay clean are the ones that nobody uses. I don't think that's avoidable. Mistakes made early on have a habit of compounding over time and…

On that we very much agree.

I think it's definitely worth considering what could / can be done better, but people often argue deeply about things that aren't really a massive deal. You've pointed out examples that are much more interesting than "should __len__() have been called len()".

Certainly makes one appreciate Guido's stewardship in keeping the language fairly clean but applicable to large number of use cases for so long!

Re: Ruby 3.2.0 is from another dimension

#207

Ruby is my favorite language, and often it is a joy to use because of its combined attributes of brevity, expressive power, and feature consistency. It's disappointing that there are so many more jobs for another popular language - one that lacks the elegance and consistency but which has a larger ecosystem. As far as I know, the only well known reason for a company to choose Ruby is if they want Rails (and obviously…

I chose python over ruby eons ago because, for whatever reason, ruby reminded me of perl (not a good thing). Something about the syntax turned me off. Rust has similar problems for me.

That's a surprise for me. I find Perl pretty unreadable, but sometimes I have to squint to tell Ruby from Python--and I code in both!

Re: Ruby 3.2.0 is from another dimension

#208
post #41

Earlier quoted context omitted.

Same trick as perl5 changed to recently. Not related to re2 at all.

Yes, but there is an interesting clarification here. RE2 has used the "caching" approach documented in the Ruby bug ticket linked for quite some time (since its birth?): https://github.com/google/re2/blob/954656f47fe8fb505d4818da1... It is mentioned only briefly in Cox's article on regex matching in the wild. Look for the word "bitstate": https://swtch.com/~rsc/regexp/regexp3.html I didn't know Perl had implemented t…

One of the authors mirrored the paper: https://fservant.github.io/papers/DavisServantLee-SelectiveM...

Re: Ruby 3.2.0 is from another dimension

#209

Ruby is my favorite language, and often it is a joy to use because of its combined attributes of brevity, expressive power, and feature consistency. It's disappointing that there are so many more jobs for another popular language - one that lacks the elegance and consistency but which has a larger ecosystem. As far as I know, the only well known reason for a company to choose Ruby is if they want Rails (and obviously…

"comparatively-unpleasant language"

This smugness is insufferable to me. What are you talking about?

Re: Ruby 3.2.0 is from another dimension

#210
post #128

Earlier quoted context omitted.

I guarantee the language is not the limiting factor in a web scaling problem.

Not in the vast majority of practical use-cases anyway. There'll obviously always be the exceptions like Twitter having to migrate off Ruby (Well rails) because scaling is just too hard. But those are exceptions.

My direct experience with combating scaling issues in Rails applications always comes back to Rails itself. (ab)uses of Active record, specifically. And sometimes they're very hard to detangle. After well over a decade of doing this sort of work I'm simply not interested in seeing yet another Rails mess.
Post reply on HN