Hacker News new | ask | show | jobs
by jonny383 2102 days ago
Imagine going all in on a Ruby project with this specialized library that literally changes the way you write Ruby and still thinking that's a good idea.

Keep Ruby as it is - slow and expressive. If you need to speed up, get faster hardware.

4 comments

> Keep Ruby as it is - slow and expressive.

Why not try to make Ruby faster without changing how expressive it is? I don't think this project does that by the way - it breaks Ruby semantics - but let's aspire to make Ruby faster.

> If you need to speed up, get faster hardware.

If your code is still too slow for your required per-request latency on a top-of-the-range Xeon and your individual requests have no useful parallelism and are not memory or IO bound... where do you go from there? Where are you getting faster hardware from?

Sometimes there is no faster hardware.

Ruby is getting a JIT in 3. So it's happening. I'm always supportive of small projects and this is no exception. Still, it is going to get crowded out by the generalized offerings of Ruby 3.

There may be some benefit to ultra specialized for this project to live in still but the audience is going to be quite niche.

> ...If you need to speed up, get faster hardware.

So if I need to speed up my Rails application on a AWS, GCP or Azure instance, you're telling me in order to increase performance, I need to upgrade to hardware that is able to take at least 4 to 6+ GB of RAM, to modern hardware on each of the servers I have to make it go faster?

Not only that it will still be slow, very expensive and an unnecessary waste of money (Given the absolutely huge cloud costs), it shows that it doesn't scale efficiently to save on costs at all. Oh dear.

This is like saying, "Can you please get a new laptop with 16GB RAM to let my hungry electron apps eat the RAM it wants?, 4GB RAM is not enough and literally causes starvation."

EDIT: To downvoters: Oh so the high overhead and heavy resources of a Rails app and upgrading your instances to new hardware and more RAM requirements is justified with the extremely high cloud infrastructure costs then? Explain your reasons if this is the case.

By the way, I don't want to see your gigantic operating costs if you're running Docker & Kubernetes on a multi-instance Rails stack.

You could use a few DigitalOcean VPS for your rails app server and pay a lot less than the on-demand pricing that the GCP/AWS/Azure folks will charge.
Faster hardware costs money. If this works well, and it stops being a PoC, why pay extra when you can simply add an annotation to a method, and your speed gain is free?
The thinking is that faster hardware is cheaper than developer time. E.g.: https://blog.codinghorror.com/hardware-is-cheap-programmers-...
You should really read that article. Just below the fold:

> Everything is fast for small n. When n gets large, that's when things start to go sideways. The above graph of an ancient Trash-80 clobbering a semi-modern DEC Alpha is a sobering reminder that the fastest hardware in the world can't save you from bad code.

> Imagine going all in

> "a basic proof of concept"