mcguidarelli/trix ? reverse-engineered prompt
Reverse engineered prompt
Build me an embeddable C++23 stack based scripting engine that works as a single header library. I want it to feel like a tiny PostScript or Forth style language, where values go on a stack and words consume them. It should support basic math, strings, arrays, dictionaries, variables, procedures, recursion, lazy sequences, and a simple REPL style way to print results.
Please also include the more advanced stuff from the README, like transactional save and restore of the whole VM, a small actor system with mailbox based message passing and supervisor restarts, and logic programming with unification and backtracking. Safety matters a lot, so type errors and numeric overflow should raise catchable errors instead of silently doing the wrong thing.
Make it easy to embed in a C++ app, keep it header only if possible, and include a few examples and tests so I can see how to use it. If you need to look up any current C++23 details or best practices online, go ahead.
Are you gonna build this?
make sure you review the code using coderabbit