Comment on What software stack would you have chosen for Lemmy?

<- View Parent
foo@withachanceof.com ⁨1⁩ ⁨year⁩ ago

For something like Lemmy I’m confident it would just fall over (or require a much higher hosting burden). There’s way too much data to render and retrieve in a system like Lemmy, the caching systems for JSON shuck (hello jbuilder caching objects instead of json)

Well, it seems to work well enough for Mastodon. I’d also point out that there are websites far larger than Lemmy using Rails at scale (Shopify and GitHub being the primary examples). It scales quite well.

Ruby performance is awful

Without benchmarks, this is a subjective statement. Ruby 3 is quite speedy now, at least I find it to be. I think this “Ruby is slow!” stereotype is left over from before Ruby 1.9 when YARV was introduced. Is it as fast as a native language? No and it never will be, nor will any other interpreted language. But this idea that Ruby is somehow the slowest possible interpreted language has not been true for a very long time now.

there’s no mitigating factor to allow efficient blocking on IO bound requests (like coroutines or fibers)

I’m not entirely sure what you mean by this, but Ruby introduced fibers a while ago.

Ruby used a non-compacting garbage collector so it’s subject to heap fragmentation and wasting memory

Not true anymore. Ruby has had a compacting GC for a while now.

there’s no static typing (or even type hinting),

You can use RBS (built into Ruby) or Sorbet (third-party Shopify project) for this if you want. Or don’t, I personally prefer Ruby’s duck typing. I don’t think a language using someone’s preferred type system makes it “terrible” just because it’s not what someone likes. Other people are perfectly happy with it.

the Ruby ecosystem is built on Rails alone at this point (few if any libraries to make use of)

Ruby being a one-stop-shop for Rails has been a criticism of it for years. I’m not sure how that’s a knock against Rails or Ruby though. I personally write all sorts of non-Rails things with Ruby as I love the syntax and greatly enjoy writing Ruby code over that of, say, Python. To each their own though. There’s Sinatra, Jekyll, Fluentd, Chef, etc. all written in Ruby.

the principle of “developer happiness” results in the need for tools like Rubocop to “resolve” invented problems WRT “how do you style X in a particular context” (among other things),

I personally love the configurability that Rubocop provides. Some people like the “one true way” of formatting for languages like Go (which also for some reason thinks single letter variable names everywhere is a great idea), but other linters like Eslint for JavaScript have the same level of configurability as Rubocop. Alternatively, just don’t use them. Rubocop is not something you need to use to use Rails.

and to top it off the framework makes doing the wrong thing easy and the right thing harder (Rails apps are so prone to N + 1 database queries).

Drop in gem that will automatically solve 99% of N+1 issues: github.com/clio/jit_preloader

It’s also a ridiculously hard thing to hire for because basically nobody teaches Ruby or Rails. There’s a very limited pool of Rails experts.

Again, subjective statement here. My company has no problem hiring Rails devs. Granted, we operate on the idea that any good engineer can get up to speed with a framework in a reasonable amount of time. I don’t believe in the “you are only worth the frameworks that you know” idea. Give me three months and I’m confident I could be proficient & competent with any web framework. Those are the people I want to hire. Not the person that’s going to be afraid to jump into something new because they’ve never worked with it before.

source
Sort:hotnewtop