This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Bluemanduck's profile picture

CraftOS internal documentation?

Started by Bluemanduck, 09 March 2015 - 07:03 PM
Bluemanduck #1
Posted 09 March 2015 - 08:03 PM
Hi! I'm a big fan of the mod, and I have been curious for a while how CraftOS works as an operating system. I've been able to glean some tidbits from the wiki, but I would like to know more about how it handles memory, how it interprets/compiles LUA, etc. With coroutines and the parallel API, is it actually using multiple threads or is it only mimicking the behavior?

Instead of hoping someone will answer such questions personally, I was hoping there was some more in-depth documentation than the Wiki somewhere that I could read. If anyone has a link I would be grateful. Thanks!
Lyqyd #2
Posted 09 March 2015 - 08:13 PM
You'd want to look into the LuaJ documentation, as that is the piece that actually handles the specifics of Lua execution. As it happens, coroutines in LuaJ are actual threads.
Lignum #3
Posted 09 March 2015 - 08:16 PM
Well, nobody has really written anything about the internals as far as I know. You should probably take a look at the bios and ComputerCraft's source code if you want to know how a particular thing works.
Bluemanduck #4
Posted 09 March 2015 - 09:13 PM
bummer! well, diving into the source code sounds like a fun project in its own right.
KingofGamesYami #5
Posted 09 March 2015 - 11:14 PM
To help you out, here's a github repo with the lua files. It includes all the APIs and default programs.
Bluemanduck #6
Posted 09 March 2015 - 11:36 PM
Fantastic! Thanks a bunch. It felt like a travesty to use this mod so often and not understand the implementation.