Show HN: Tagless final DSL for deterministic TypeScript programs
mikesol.github.ioMy goal is to reimplemenet a hefty chunk of TypeScript in TypeScript using a DSL that resembles TypeScript. But instead of immediate execution, what you get is a serializable program represented as a directed acyclic graph that can be mutated à la Nim or Haxe via a query language.
I'm not quite sure why I'm doing this, but two thoughts emerge as I tinker:
1. It's fun to explore a "boil the ocean" task with an LLM. Writing a mini TypeScript in TypeScript forces you to confront lots of design choices during the build-out that improve the core but require small, substantive changes on the entire plugin ecosystem. sed can't handle this, but a model like Sonnet can. And as the foundation gets better, I get more bullish about one-shotting entire libraries as plugins. 2. I think that something like mvfm will eventually power arbitrary 0-trust distributed programs. For example, take the case of a vibe-coded app that is otherwise frontend-heavy but uses a LLM, Stripe, and a DB. Writing parts of the program in a serializable DSL allows automatic deployment of parts of it to other targets. It also allows an untrusted environment, like a browser, to execute logic that touches sensitive things like DBs and send the actual mutations to a lightweight proxy that checks its integrity against a set of known inputs.
If you're nerd-sniped, I'd love help (a) trying to break it; (b) improving the core; and/or (c) implementing more libs as plugins.
No comments yet.