I added the syntax error detection in 3.2. I hope it’s helpful!
Ruby 3.2.0 is from another dimension
141–150 of 341 posts
Re: Ruby 3.2.0 is from another dimension
#142Ruby 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…
Re: Ruby 3.2.0 is from another dimension
#143Earlier quoted context omitted.
In what situation is python the worst possible choice, while ruby which is very similar to it is the best possible choice? Unless you're doing some clever ruby metaprogramming type stuff which is totally impossible in python.
> In what situation is python the worst possible choice, while ruby which is very similar to it is the best possible choice? in no particular order, on top of my mind (there are many more): - mixed environments when you can't compartmentalize Python in a container. Python package management is one of the best examples of "poor implementation" - mixed environments, when both Python 2.x and 3.x are present. Migration t…
Re: Ruby 3.2.0 is from another dimension
#144Earlier 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.
Re: Ruby 3.2.0 is from another dimension
#145Earlier quoted context omitted.
Also premature optimisation. I did image manipulation and statistical analysis of images using predominantly Ruby for my MSc thesis work 15 years ago, and it took rewriting a couple of dozen lines of code with RubyInline (to use C) to remove the bottlenecks. Using pure Ruby to prototype and rewriting just the maths heavy code to C when I knew it worked and knew where the bottlenecks were saved me massive amounts of t…
One funny anecdote (and unfair one) is that what Twitter wasn't able to do (rails scale), Mastodon did.
After all, sharding message distribution via federation (even if you hide the federation behind a veneer of a global userid -> shard mapping) was a well understood long before Twitter even launched (e-mail... reflectors...), so it was a rather embarrassing architectural decision to not even try to account for it. Heck, I co-founded a webmail provider in '99, and one of the first things we did was implement ways to map user ids to a distributed set of backends and support for migrating accounts between backends, because we knew it'd be necessary to be able to shard smtp servers, frontends, and storage separately. That wasn't in Ruby, but the architectural pattern is so obvious.
The language change may or may not have made sense for them at the time (after all Ruby was much slower then, and they by then had the size where a rewrite of core parts to cut hosting costs might have been worth it), but that they blamed their architectural failures on Rails was a cheap shot.
Re: Ruby 3.2.0 is from another dimension
#146Do these YJIT improvements come at the cost of significantly increased memory usage?
Yes, like all JITs by definition. The actual memory increase depends heavily on the app size so I could quote some figures but it would likely be irrelevant to you.
Re: Ruby 3.2.0 is from another dimension
#147Earlier quoted context omitted.
Before Ruby introduced filter_map: res = (1..10).select { |x| x != 5 }.map { |x| x ** 2 } With filter_map: res = (1..10).filter_map { |x| x ** 2 if x != 5 } In both cases, I think the Ruby solution is more readable. Python list comprehensions invert the subject (data) and the verb (action). You see what will be done before you see what the subject is. I would argue that showing the subject first allows easier code re…
The Python one looks fine to me, although I am a Pythonish person. It uses what people already know: the for something in somethings syntax of the for loop, and the if syntax. Also it's nice that this works in dictionaries, generators and lists. It also has the same narrative flow of Haskell's list comprehensions, which I think come from set theory: [x^2 | x As for your Ruby examples: I think you could argue that the…
Re: Ruby 3.2.0 is from another dimension
#148Re: Ruby 3.2.0 is from another dimension
#149Earlier quoted context omitted.
I disagree. Ruby has no more elegance or consistency than the other popular language, and it objectively has a much poorer selection of libraries.
Lack of libraries is noticeable - especially since I've worked with python for past years. However Ruby's syntax is way nicer. I can actually write what I think instead of having to translate my thoughts into python. Of course over time working with python has made my thoughts to conform into more pythonic way, but I still occasionally find myself thinking how something would have been way nicer to write in ruby inst…
Re: Ruby 3.2.0 is from another dimension
#150Ruby 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…
> Maybe like blockchain, once the AI/ML fantasy hype dies down Two minutes of silence for the poor sods who still thinks that AI/ML is pure hype. (Granted, there is hype. But there is much real stuff.) And, also, blockchain and ML/AI are nothing similar, except for Twitter bottom-feeders trying to milk each. AI/ML already has real applications with hundreds of millions of dollars actual value created. And just like C…
Hundreds of billions a year probably (and that may be low) if you count online advertising and large consumer facing sites in general. If you turned off the ML behind Facebook/Google/Netflix/Amazon then you'd be lucky to only lose 50% revenue based on my personal experience of adding ML on top of such products.