this post was submitted on 03 Nov 2023
4 points (100.0% liked)

Zig Programming Language

160 readers
4 users here now

A lemm.ee community for Zig!

founded 1 year ago
MODERATORS
 

From the post:


Yes you heard that right, this game is written entirely in Typescript type annotations, which—if you didn’t know—are Turing complete.

So how the hell am I runnning it in the browser and rendering the game in Typescript types?

The basic rundown is that I created a type-level Typescript runtime, allowing Typescript types to be run outside of the Typescript compiler/language server.

This “runtime” is a custom VM implemented in Zig, which executes a custom bytecode format I compile Typescript code into.

top 1 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 1 year ago

This is crazy. Crazy nuts and also crazy cool.