Thoughts

mental health break ,./'"**^^$_---
I've started semi-seriously brainstorming a new project. Zig's comptime ideas would be really cool with JS on the web.
I'm imagining a Zig -> JS compiler. It would be written in JS and would require a complete implementation of Zig's comptime engine. Zig's "comptime engine" roughly speaking, is implemented in the 40,000 line Sema.zig. So there's a small chance that this actually happens. I guess it could be interesting to write a JS backend for the existing Zig compiler, but that's not what I'm imagining. I'm imagining something that would also be useful as an independent implementation of Zig, on the theory that implementation would be possible by deferring much of the complexity in behavior to JS. Also it would be really fricking funny benchmarking it against Zig itself. Like 8,000 times slower or something.
Link 3:12 p.m. Mar 04, 2025 UTC-5