NyCodesNY/NyLang — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small systems programming language and compiler called NyLang. I want it to feel like a simple C style language for low level programs, with functions, int, string, bool, void, if and else, while loops, for loops, pointers, address of, dereference, pointer arithmetic, and basic heap memory through System.Alloc and System.Free.

The compiler should be written from scratch in C++ and build with CMake. It should read a .ny file and produce a native executable directly, without calling gcc, nasm, ld, or other outside assembler tools. Please include a lexer, parser, typed AST, a simple SSA inspired intermediate representation, code generation for x86 64, and binary writers for Linux ELF64 and Windows PE32+. I also want a flag to target Windows from Linux, and a dump IR option for debugging.

Add a few example NyLang programs, like hello world, pointers, and dynamic allocation, plus a clear README with build and usage instructions.

Want more depth? Deep Reverse