About the regex speedup, it looks like Ruby 3.2 is now doing this https://swtch.com/~rsc/regexp/regexp1.html
According to their ticket https://bugs.ruby-lang.org/issues/19104 they are using memoization to defeat regular expression denial of service (ReDoS)
Ruby 3.2.0 is from another dimension
41–50 of 341 posts
Re: Ruby 3.2.0 is from another dimension
#42Ruby 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…
And that there, is the whole "Problem" of Ruby.
Ruby is a beauty. Rails isn't. It's nice, productive (for certain niches) and has a long track-record. But Rails is also often the root of problems such as maintainability, long-term-productiveness, hosting (performance, scaling), and lock-in.
There are far better solutions for simple CRUD-apps today than writing them all out in MVC code. And when you need complex business-logic (i.e no longer a simlpe CRUD app) the , the weird MVC (plus Concerns) that rails offers is simply not cutting it.
Yet Ruby is Rails, and Rails is Ruby. So when Rails looses its niche and usefulness, Ruby uses it's niche and usefulness. And that's a shame.
(I am a 12+years Ruby, former Rails, and now moving-to-Rust developer)
Re: Ruby 3.2.0 is from another dimension
#43Earlier 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…
Python gained traction because of Google (Google used it initially then Guido worked for them for a decade+, vs. Matz at Heroku/salesforce) and then because it's the easiest way to use ML libs. That's it. It's slower than Ruby, has worse package management and less consistent syntax but if you want to use Tensorflow, PyTorch, etc..., it's the default.
When Ruby and Rails started to make an appearance in European circles, around 2007, it hardly mattered when Python was already around.
Re: Ruby 3.2.0 is from another dimension
#44What's status of static typing checking ?
Sorbet[1] is currently the most robust tooling available. It has a few rough edges and limitations but it otherwise works great for 90% of use cases. [1]: https://sorbet.org
Re: Ruby 3.2.0 is from another dimension
#45Earlier quoted context omitted.
> the other comparatively-unpleasant language > one that lacks the elegance and consistency upvoted for perfectly concise description of that language. it is even more sad knowing that high quality alternatives for the most popular libraries exist, but inertia is simply too high. @work I've tried to introduce Ruby to my colleagues that are very bad at programming, but good at science. They ditched it with reasons lik…
the "too slow argument" is normally based on old internet opinions and benchmarks.. ruby today is pretty fast. In the company that I work, we do a lot of system programming using ruby, web development, etc.. It came to substitute perl around 2005, and we still using it successfully today. When we need something really, really fast, specially including parallel processing and etc, we just use jruby.
Ruby is not "pretty fast". The hardware you run it on is insanely, mind bogglingly, out of this world fast and so people don't notice the way that they used to.
...which is fine, you don't always need to be fast. Just be wary of misattribution.
Re: Ruby 3.2.0 is from another dimension
#46Ruby 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…
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, hobby project; Python was created while Guido worked in research institutions, and it helped Python gain recognition in academia environment
* Guido joined Google in 2005, boosting the adoption of Python; Ruby has never gained such a large corporate backing
Eventually I believe it was the combination of the latter 2 that pushed Python to top spot in popularity - scientists all over the world were familiar with Python, and with the rise of Data Science/ML (with Google being one of the main forces behind it), it became the most obvious choice for the new tools.
Re: Ruby 3.2.0 is from another dimension
#47Ruby 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…
> reason for a company to choose Ruby is if they want Rails And that there, is the whole "Problem" of Ruby. Ruby is a beauty. Rails isn't. It's nice, productive (for certain niches) and has a long track-record. But Rails is also often the root of problems such as maintainability, long-term-productiveness, hosting (performance, scaling), and lock-in. There are far better solutions for simple CRUD-apps today than writi…
Re: Ruby 3.2.0 is from another dimension
#48Ruby 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…
Python was just clear to read.
Ruby looked a bit cleverer but was not so simple. Coming from working on a large C++ code base, I decided Python was the one to do next. Simplicity, clarity and one obvious way to do things as a philosophy.
Re: Ruby 3.2.0 is from another dimension
#49Earlier 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 think the elegance here is "lacking" of parenthese in function call. Also block. Ruby code has no parenthese.
Re: Ruby 3.2.0 is from another dimension
#50Earlier quoted context omitted.
Python gained traction because of Google (Google used it initially then Guido worked for them for a decade+, vs. Matz at Heroku/salesforce) and then because it's the easiest way to use ML libs. That's it. It's slower than Ruby, has worse package management and less consistent syntax but if you want to use Tensorflow, PyTorch, etc..., it's the default.
Revisionist history. Python was huge before Google even existed.
I first started using Python slightly after that time and for years it was a pretty niche language that relatively few people used, especially compared to the other 'P' languages, Perl and PHP. I'd estimate 2001-2002 as when it would say it started to become a 'normal' language and I wouldn't say it really started taking off until around 2005ish.