ccanassa
Joined 15 years ago
Joined 15 years ago
https://github.com/entomorph/reverse-engineering
I started the project when ChatGPT 4 was first released, using it as a way to explore what LLMs could actually do. I also find working on it very relaxing, there is something cool about uncovering secrets hidden in code for more than twenty years.
In Django, you can change a single field in a model, and that update automatically cascades through to database migrations, validations, admin panels, and even user-facing forms in the HTML.
Django works perfectly with green threads. It’s a superior model to async and avoids the whole function-coloring mess. I’ve seen Django setups outperform Go-based services running under similar conditions.
JavaScript is a terrible language and should only be used when there’s absolutely no alternative, such as in browsers.
Python libraries are much more stable and reliable.
I’ve been building web apps since the ’90s, and I never understood the appeal of PHP. It was always a terrible language, and there were usually better alternatives available.
I’m not even talking about large codebases. It struggles to generate a valid ~400 LOC TypeScript file when that requires above-average type system knowledge. Try asking it to write a new-style decorator (added in 2023), and it mostly just hallucinates or falls back to the old syntax.
This is a language/research project. I want to explore what a combination of a purely functional language and a very advanced compiler is capable of generating in terms of JS.
One novel idea (AFAIK) is adding a borrow checker. Other languages targeting the browser have added borrow checkers, but that's been driven by WASM. In Beni, lists are immutable, but instead of being implemented using tries, they use regular JS arrays with in-place mutations. The borrow checker guarantees that ownership isn't shared and that it's safe to update them. One concern I have is that this could cause DX issues due to borrow checker errors. I don't think that's going to be an issue given that the language is functional, but it's still an open question.
The "Platforms" concept is an idea I borrowed from Roc, which also inspired many of Beni's design decisions. In Beni, you can't call JS directly, just like in Elm. Platforms wrap the JS ecosystem in a safe way so that it can be consumed by Beni. There's currently no way to install third-party JS libraries. I believe the NPM ecosystem is broken: even small libraries pull in hundreds of indirect dependencies. With AI, new CVEs are being found every week, and keeping `npm audit` clean has become a daily struggle.
The irony is that updating dependencies to fix these mostly harmless CVEs just increases the risk of supply chain attacks. My idea for Beni is to make it "batteries included" so that people need fewer third-party dependencies. For everything else, I think the correct approach is to vendor the code you need.