Posted 27 May 2012 - 08:43 AM
This is not finished (and unlikely to be), over 2500 lines long, very slow, and incredibly pointless. I just decided to post it here since it was obvious it wasn't going to be finished - the intention was to add debugging features that can't be done in normal CC Lua because of the lack of the debug library. But it's a Lua interpreter in Lua. (HAYO!)
Code: http://pastebin.com/3wLkBV40
Run it, and… you enter Luaception level 1, and get returned to another shell that's exactly the same as the one you were just in but a lot slower, because it's being interpreted.
It runs adventure fine, but can't run itself - it seems there might be a limit on the length of string a pattern will match, or something (it stops tokenizing itself at around the point where the BIOS code is)
Do whatever you want with this, if you can understand the code! Some ideas:
* Some sort of debugging interface, to debug the code running in it. This has full access to that code and can affect things like the string metatable and local variables, unlike normal Lua.
* Find and fix the bug that stops it from tokenizing itself, so you can have more levels of Luaception.
Code: http://pastebin.com/3wLkBV40
Run it, and… you enter Luaception level 1, and get returned to another shell that's exactly the same as the one you were just in but a lot slower, because it's being interpreted.
It runs adventure fine, but can't run itself - it seems there might be a limit on the length of string a pattern will match, or something (it stops tokenizing itself at around the point where the BIOS code is)
Do whatever you want with this, if you can understand the code! Some ideas:
* Some sort of debugging interface, to debug the code running in it. This has full access to that code and can affect things like the string metatable and local variables, unlike normal Lua.
* Find and fix the bug that stops it from tokenizing itself, so you can have more levels of Luaception.