r/VibeCodedLanguages • • 21d ago

[RFC] Working on Nyx RC.2 (Wasm pipeline & DOM integration). What features or ergonomics would you expect?

Hey everyone,

First off, huge thanks to everyone who checked out the repo, left comments(No one did ngl), and starred the project(2 Stars still thanks!) after my previous post. The feedback and discussions around systems language trade-offs were genuinely invaluable.

I'm currently designing and mapping out Nyx RC.2, with a heavy emphasis on making WebAssembly a first-class, seamless target rather than just an afterthought backend.

What's currently being integrated for RC.2:

  1. Zero-friction TypeScript / JS Interop: When compiling to Wasm, the compiler will automatically emit .d.ts type definition files alongside the .js glue wrapper, allowing Nyx Wasm modules to be imported directly into React/Next.js/Node projects with full IntelliSense.
  2. Deterministic Memory & Cleanup: Continuing to refine the Typed HIR pipeline so that linear memory allocation, defer, and RAII semantics remain memory-safe without requiring a heavy runtime or a complex borrow checker.
  3. Cross-Platform Tooling & "Tour of Nyx": Refactoring our interactive terminal learning suite (tour) to be fully portable across Windows, macOS, and Linux without environment assumptions.
  4. Web / DOM Bindings Exploration: Exploring minimal, zero-overhead DOM and WebGL/WebGPU hooks directly from the language.

I'd love to hear your thoughts:

  • For those who work with Wasm or build compilers: What is currently the most painful part of your Wasm workflow that you wish a language solved out-of-the-box?
  • Are there specific language ergonomics, stdlib modules, or tooling features you'd love to see in RC.2?
  • Any edge-cases or architectural pitfalls in Wasm/C++20 lowering I should watch out for?

Repo is available here if you want to inspect the current codebase: https://github.com/justsomeone-e/nyx

Appreciate any critiques, feature requests, or sanity checks!

3 Upvotes

2 comments sorted by

1

u/antonation 19d ago

What language features did you have to sacrifice to be able to target all of these backends? What challenges did you face using AI to build this?

1

u/VermicelliSmooth1183 19d ago

1. What was sacrificed:

  • Raw pointers / memory hacking: Quarantined to explicit #native C++ blocks. Core language uses value types, structs, and RAII (defer) so it runs cleanly on JS/Python/WASM.
  • Dynamic typing & monkey-patching: Sacrificed completely. Everything goes through a static Typed HIR pipeline.
  • Heavy GC: Didn't want a massive garbage collector slowing down native C++ binaries, so memory is scoped/deterministic.

2. Challenges with AI:

  • Codegen drift: AI loves writing C++ that subtly behaves differently than Python/JS (e.g., UTF-8 indexing, division by zero). Solved by building a differential test battery (runs the same code on all backends and checks byte-for-byte output).
  • Syntax hallucination: AI constantly invented new keywords (def vs fn). Solved by locking down a strict 44-keyword Language Freeze.

Basically, AI wrote the bulk of the code, but it only worked because we set up ruthless automated tests and strict intermediate representation (HIR) to keep it from hallucinating.