Null-Basic will be a complete rewrite of the Lua programming language but will operate on-top of the ComputerCraft Lua console. To explain this further think of this, Microsoft visual C++ is still the C++ language but with more APIS, slightly changed functions, etc. Null-Basic will be the language Null-Void OS© will be written in. However, just because its designed to work with an OS doesn't mean you need that OS. That's right, Null-Basic is stand-alone (inside ComputerCraft) and needs no additional things to run! Null-Basic is meant to extend the Lua programming language, yet still change it completely!
Theory of Null-Basic©:
Spoiler
A null-basic program will consist of at least two-files, one in pure lua (even though null-basic is standalone I can't make it run itself, and running a program in ComputerCraft requires Lua) and another in Null-Basic (to see the schematic file for launching your program in null-basic look in the "Null-Basic Launcher" spoiler). The null-basic interpreter will read your program in binary (So your program will have to be compiled into binary via StrUtils(can't remember who made StrUtils, just look up string utils on the threads, credit will be given when I find out).Null-Basic Execution process:
1) Interpreter reads your file and decompiles it from binary then saves it to a temporary file.
2) The now in Decompiled code in the created temp file is executed via the interpreter.
3) After running your program the Null-Basic interpreter searches the temp dir for any temporary file and deletes them
Null-Basic launcher:
Spoiler
This code must remain the same in order to launch your file. However, when executing another Null-Basic program inside a Null-Basic program there will be a separate function.
if fs.exists(".Null_Basic/interpreter/intmain") == false then --If the Null-Basic interpreter doesn't exist then get it
if http then
fs.makeDir(".Null_Basic")
fs.makeDir(".Null_Basic/interpreter")
fs.makeDir(".Null_Basic/temp_dir")
shell.run("pastebin", "get", CODE_NOT_YET_CREATED, ".Null_Basic/interpreter/main")
else
error("Please acquire Null_Basic from its respective forum or connect to http")
end
end
os.loadAPI(".Null_Basic/interpreter/intmain") --Loads the interpreter
main.launch("PATH_TO_YOUR_PROGRAM") --launches and decompiles your program
Confirmed features:
Spoiler
-A Null-Basic compiler will be created
-Can still do the same things as Lua (probably more)
-Some Lua apis will remain the same (so far thats GPS, coroutine, vector, parallel, disk, math, bit, table, and keys)
-Loading an API will be like so
import(sAPIpath)
-You can still make your own APIS however they cannot be in Null-Basic, they will have to be in pure Lua
-A 'Standalone' interpret
-I will make a developer interface for Null-Basic (If anyone knows how to make Notepad++ plugins let me know that way we can have an external editor). But in the mean time I will make an in-game Null-Basic editor and compiler that features things such as a clickable GUI, high-lighting (maybe), etc. For example on something similar, take a look at the taco editor (http://www.computerc...__fromsearch__1).
sneak-peak:
Spoiler
Warning, code posted in this spoiler is usually untested and is only meant to give you guys an idea on whats this is going to be!Note: If you want to comment on this do not put any of the code in the comment, if you want to report a bug in my code (and need to put a piece of code in) then PM it to me. Acctually if your going to PM me an error you must give the whole section of code as this will change everyday!
http://pastebin.com/sR1cy5nm