I feel like in a lot of ways, most languages are great candidates for this, for lots of different reasons!
- Rust: Great choice because it produces a small, very well optimised binary. If you just care about the output binary being small and non-memory intensive, then this is probably a good call.
Buuuuut, Rust’s compilation can be pretty resource intensive, so if you’re actually developing on limited hardware:
- C (or curveball option, Hare): produces a small, well optimised binary, with faster compilation. But less framework type things to help you on your way to apis/servers/etc.
Then there’s the fact that it’s a home server, so always on, meaning you actually have generous resources in some ways, because any available CPU is kinda just there to use so:
- Python: has a runtime and can be pretty heavy CPU wise, but lots of frameworks, and in all honesty, would wind up being a lot faster to put stuff together in than Rust or C. Probably a great default option until you hit resource issues.
And then why not go whole hog into the world of experimental languages:
- Roc: Doesn’t have versions yet, so super new, but should produce a pretty small binary and give you higher level ergonomics than something like Rust or C, especially if you’re into FP.
And then we’re forgetting about:
- Haskell: Haskell is the only true programming language, and any time there’s a selection of programming languages, picking the one that isn’t Haskell is the wrong choice. Just ask anyone who programs in Haskell.
But that doesn’t factor in:
- Javascript: Sooner or later, everything is just javascript anyway, why even try to resit?
Plus:
- Assembly: Can you even trust that it’s well optimised unless you’re writing the assembly yourself?
Edit: My actual serious answer is that Rust + Rocket would be great fun if you’re interested in learning something new, and you’d get very optimised code. If you just want it to use less memory that java and don’t want to spend too much time learning new things then python is probably fine and very quick to learn. Go is a nice halfway point.
This is such a good attitude! I cut all meat out of my diet a long time ago, and when I mention it, people often say something like “I’d love to but I couldn’t commit to never having meat again”.
You don’t have to! It’s amazing if you do, but you’re still gonna make a sizable impact on the cause you care about if you reduce your intake.
It’s odd that people don’t have this with other issues, the idea of “reducing purchases of disposable plastic” or “buying fairtrade more” make total sense to people, but food is still often cashed out in these “all or nothing” terms.