Earlier quoted context omitted.
> There are organisational scaling issues that you may hit with a language like Ruby that strongly typed languages like Java can solve. Such as?
This also interested me. I'd guess that the idea parent is trying to convey is that for a given size of a Ruby codebase the engineering organization needs to be structured like successful cases like Github, Shopify or whatever, but I'd be interested in the technical aspect to this. I agree with this idea when reasoning about microservices, but this is the first time I've seen it applied to the choice of language. It'…
Ruby 3.2’s YJIT is Production-Ready
291–300 of 304 posts
Re: Ruby 3.2’s YJIT is Production-Ready
#292Earlier quoted context omitted.
The problem to me of naming types is that a lot of the time there is no meaningful name to give, and so it becomes noise. When there is a meaningful name to give, in Ruby you might define a module, and include it and use that as an interface: module HelloWorld def hello raise "Not implemented" end end class Foo include HelloWorld end Foo.new.hello # Raises an exception Foo.new.kind_of?(HelloWorld) # Returns true (And…
> The problem to me of naming types is that a lot of the time there is no meaningful name to give, and so it becomes noise. Do you have examples? That's not my experience. Of course, we may simply be working on very different types of code :)
But e.g consider basically almost any case with abstract member functions / methods. While that happens in Ruby (or the equivalent: Leaving a method which raises an exception unless overridden) it's far less common.
Typically you'll instead implement defaults in a module if there is lots of functionality that a client might want for itself). These are generally fine to name, and type check by the module name.
But when that is not* the case (any class consisting mostly of abstract methods), a Ruby implementation would be more likely to instead expect the presence of a single method and embed the default functionality in the calling class. That's the kind of scenarios where you end up with the kind of long, contrived class names people tend to mock Java for in particular.
But going further, a Ruby implementation will instead often take an argument that is expected to support "to_proc" or a block argument, so that you can provide a lambda/closure to do what you'd otherwise put in an "adapter" or "shim" class.
Conversely, any time where you demand (whether in a static language by type annotiations or in a dynamic one by checking for the class) an object of a very specific class and only call one or a few methods on it, you're sidestepping this problem by avoiding the creation of a more precise interface that'd clutter up the code. You don't create and name interfaces that encompass the specific operations needed by each method because it'd be a total mess.
Re: Ruby 3.2’s YJIT is Production-Ready
#293Earlier quoted context omitted.
> The remedy for bad benchmarks is good benchmarks, not no benchmarks. The comment you replied to just said Oracle allows running benchmarks internally, though.
Sure. How likely is it that someone running bechmarks internally - who is unlikely to be a benchmarking expert - is going to do a better job than a dedicated benchmarking project like TechEmpower that has a whole lot of people looking and contributing?
Re: Ruby 3.2’s YJIT is Production-Ready
#294Earlier quoted context omitted.
OT(ish) but a t3.medium on ec2 with 2v cores and ~4gb of mem is $33 a month ondemand. $20/mo on ri, and $10/mo spot. I'm mostly done with Heroku. With one kinda big app left, all other envs, and projects are now just on aws without the tax of heroku. And I was a big heroku fan, but their recent decisions made me shop around. I do miss the price $$ of metal in a dc, but not the price :clock: of metal.
Have you considered fly.io?
Re: Ruby 3.2’s YJIT is Production-Ready
#295Python have a 99% compatible jit implementation called PyPy and nobody much know about it. It was production ready since 5 years ago but ignored by mainstream. It is 400% faster than vanilla python on average and Guido and MS is working on for a few percent gain instead of promoting it or eventually making it default. PyPy.org
pypy is pretty well publicised and known about in the python community. Lots of popular libraries specifically call out compatibility etc. For quite a while it used to have some terrible performance if you ever reached out to C libraries in a hot loop. It's still a bit iffy on the C / FFI front, though the performance issues are much improved It's certainly good enough for production use, with careful evaluation.
Re: Ruby 3.2’s YJIT is Production-Ready
#296This is awesome. I am impressed. I recently wrote a toy compiler for x86_64. I use an external assembler. My dream is to write a JIT compiler runtime. https://GitHub.com/samsquire/compiler My understanding is that you generate machine code and then mprotect the code to be executable then jump to the void * as a function pointer to execute generated instructions. What I would like to understand more is tracing compile…
Re: Ruby 3.2’s YJIT is Production-Ready
#297I thought Shopify wanted to migrate to TruffleRuby which would likely give them at least a 2x speedup?
Tragically, one of the principals behind TruffleRuby (and researcher at Shopify) was Chris Eaton and he passed away a few months ago. I'm not sure where this leaves TruffleRuby itself, or plans to implement it at Shopify. (Rest in peace, Chris, and may your memory be a blessing to those who knew you)
Re: Ruby 3.2’s YJIT is Production-Ready
#298Earlier quoted context omitted.
> The problem to me of naming types is that a lot of the time there is no meaningful name to give, and so it becomes noise. Do you have examples? That's not my experience. Of course, we may simply be working on very different types of code :)
It's hard to give a neat example, because it really changes how you write code and it's been a long time since I had to suffer through much static code. But e.g consider basically almost any case with abstract member functions / methods. While that happens in Ruby (or the equivalent: Leaving a method which raises an exception unless overridden) it's far less common. Typically you'll instead implement defaults in a mo…
A few common examples for which I rely upon static typing: - I have a proof that operation X is complete, because I have a protocol to follow; - this string is a Matrix room id (and not a Matrix user id or a Matrix server id, also strings); - this time is in milliseconds.
Sounds like very different use cases :)
Re: Ruby 3.2’s YJIT is Production-Ready
#299Is there a name for this syndrome? The same thing happened at Github. Ruby and Rails are slow enough in production that they dedicate a specialized, long-running internal team to it. This team doesn't contribute directly to the product. They hire core Ruby and Rails maintainers, also not to contribute to the product, just to try to help improve their slow software. It's a dream job that shouldn't exist. If you tell m…
Can you give some examples of companies that "scaled" without dedicating at least some engineering work to improving their runtime?
Re: Ruby 3.2’s YJIT is Production-Ready
#300Earlier quoted context omitted.
> Oracle goal here is to make a good enterprise ready DB solution Maybe. Or maybe it's to soak naive clients for all they're worth. The remedy for bad benchmarks is good benchmarks, not no benchmarks. > Just look at the « independent and fair review » that Top Gear made about Tesla. What about it? It was accurate and informative (unless you think Tesla lied about their range stats). The good points about electric car…
It was later shown that the whole part were the Tesla goes out of power was staged. The car did inform them it would run out of battery on the way. They made a segment about it and failed to inform the viewer that they had ignored several warnings given by the car before reaching the « oh no we are out of battery in the middle of nowhere » point. This is not what I would qualify as a « fair review ». There are no « f…