Hacker News new | ask | show | jobs
by efields 72 days ago
Interesting that all the patterns Rails adopted for humans to write better code can't easily be funneled into the LLM doing the job now. Seems like it should be.

Is it types? Are types the answer? Is it rust?

2 comments

I think the issue with Rails, as a long time developer in that ecosystem, is that much of the default assumptions are a) not common (not so far off-piste that a human can't get used to them, but outside the center of the bell curve), and b) not explicit. So it's very common to do things like install a plugin that has across-the-repo effects but that is only documented in e.g. the config directory and the bundle. Unlike, say, NPM, when you install a new package where you explicitly have to e.g. import it everywhere you want to use it.

As time has gone on Rails has gotten better about this, but it still means that "your rails" and "my rails" are different enough that AI could easily get confused.

As you say, the other aspect is the intense dynamism which works against AI, which again prefers to have everything explicit and reasonable about from the text.

So I ended up going back to Javascript after a brief 12 year digression into Ruby. I still love Ruby but it's just not the right language for the current environment and team structures - typescript is "worse is better" in the right ways that it's a much better choice for both frontend/backend being the same and better type systems.

Sorry, but what’s “install a plugin” in rails? That’s not a thing; not even a thing someone who’s ever worked on a rails app would say by mistake.
How certain are you about that? https://guides.rubyonrails.org/v2.3/plugins.html

Back in the very early days you would have used script/plugin install (svn url)

Here's one of my mirror repositories migrated from SVN into git. https://github.com/jaggederest/acts_as_voteable

Types are great. No nulls are great. Exhaustive switches are great. Derive macros and Serde are great. Detailed errors are great.

However Rust has one serious problem, BUILDS. It’s slow and it takes up a ton of space and memory. You will be working around this on any sizeable codebase. Using cargo check to ration your compiles, a dedicated build box, etc. Now imagine you're using it for a web application with compiled maud templates... you're potentially waiting minutes to see your changes.

If we accept that over half of the people building with rust are using agents (I'm sure this is much higher in reality), then you should also accept that there is a ton of time and resources spent on building / compiling. Optimizing this should probably be a top priority. They need someone who will be fanatical about shaving time and memory use from the build process.

Sounds like OCaml has the answer then. It has the equivalent of all the great things you described in Rust, plus compile speeds similar to or better than Go. Agents should be able to blaze through changes with it.
Sounds like I should check in on rust in a year or so.
Yeah. I'm going through an exercise right now with a large codebase where I'm split some of it up into crates so that iterating on specific parts incurs less build overhead. Literally changing my architecture... which annoyed me a bit, but it does make sense.