synt7x/knightjit — reverse-engineered prompt

Reverse engineered prompt

Build me a small but fast command line interpreter for the Knight programming language in C. I want it to be correct first, but noticeably faster than a simple interpreter by using a register based virtual machine, and if it fits, let it optionally enable JIT compilation on supported builds.

It should build with make on a normal system with gcc or clang, automatically grab anything needed for the build, and produce a runnable knight binary. Please include tests so I can check that language behavior stays correct. Keep the standard Knight behavior by default, but if the project supports it, also allow an optional non strict mode where command line arguments can be used as an extension.

Please make the project feel clean and usable from the terminal, and add a short README section that explains how to build it, run a Knight program, and run the tests. If anything about the language behavior is unclear, look up the current Knight docs online and match them.

Want more depth? Deep Reverse