luau-lang/luau — reverse-engineered prompt
Reverse engineered prompt
Build me a small, fast embeddable scripting language inspired by Lua 5.1, written in C++, with a gradual type system. I want people to be able to embed it in their own apps, but also use it directly from the terminal.
Please include a simple REPL tool that can run snippets and input files in a sandbox, plus a separate analyzer tool that checks scripts for type errors and lint warnings. The language should support normal Lua style code, optional type annotations, type inference, modules through require, and a safe runtime where scripts don’t accidentally mess with shared globals or built in libraries.
Set it up so it can be built on macOS, Linux, and Windows with CMake, and include basic tests for the compiler, analyzer, bytecode, and virtual machine behavior. Add clear README instructions for building, running a script, running the analyzer, and embedding the runtime from a C++ host app. Look up current docs online if you need to.
Want more depth? Deep Reverse