Posted 11 December 2013 - 12:54 AM
So I have been using ComputerCraft for the better part of a year now, and i still love it. It is one of the most stable and fun mods out there. Over the course of my adventures I have come to a bit of a zen state with the LUA language, and ended up writing my own OS for my computers so that I could abstract away certain things that I found "non-portable" or didn't meet with my design requirements. Below is the top list of the stuff i built in.
- All Async (no blocking calls)
- Explicit event routing
- By having a single point that calls pullEvent() and routing to callbacks, can design code that shares the event queue in a friendly way and allow for multiple "processes" to run at the same time
- Connection Oriented networking
- Built a system for ephemeral ports and the ability for a "chain" of communication to be started
- This enable Client/Server communication models, rather than just peer-to-peer
- HAL/Driver Model
- I wrote a layer that abstracts the "peripheral id" and attach/detach logic from application code (makes code more portable from world to world so i could build generic services)
- Tracing/NetworkLogging
- Event tracing and logging on a Module level with pluggable listeners. I built a file based one and a network based on that spews all trace events out a network port.
- Inspection Console
- Basically a command line that lets you switch between different LUA environment tables and run a line of code or script. Useful for "debugging" state of code when something goes wrong.
- Parallel Persistent state machines
- when used correctly, allows for computers/turtles to survive a world restarts. I have written miners, tree farmers, a sorting system, and some basic construction bots, all that could survive a world restart intact and continue their duties.
- Pluggable Service Model
- Can write "services" that run in background. A couple examples that i have written are GPS Service (so my GPS turtle/computers can do more that just GPS), trace listeners, and a time service (enable me to track the in-game day beyond world restarts).
- Centralized Configuration/Metadata
- I built a well defined system to load Configuration data per computer/turtle and also provide shared/global configuration that can be shared.
My basic question is how best to feedback what i have learned and built to the community/mod authors? It is quite a chog of code and quite complex to use and setup (requires special directory layouts and SymLinks), so i am not sure what the best forum to get it reviewed/commented on.
Much Thanks,
Luke
- All Async (no blocking calls)
- Explicit event routing
- By having a single point that calls pullEvent() and routing to callbacks, can design code that shares the event queue in a friendly way and allow for multiple "processes" to run at the same time
- Connection Oriented networking
- Built a system for ephemeral ports and the ability for a "chain" of communication to be started
- This enable Client/Server communication models, rather than just peer-to-peer
- HAL/Driver Model
- I wrote a layer that abstracts the "peripheral id" and attach/detach logic from application code (makes code more portable from world to world so i could build generic services)
- Tracing/NetworkLogging
- Event tracing and logging on a Module level with pluggable listeners. I built a file based one and a network based on that spews all trace events out a network port.
- Inspection Console
- Basically a command line that lets you switch between different LUA environment tables and run a line of code or script. Useful for "debugging" state of code when something goes wrong.
- Parallel Persistent state machines
- when used correctly, allows for computers/turtles to survive a world restarts. I have written miners, tree farmers, a sorting system, and some basic construction bots, all that could survive a world restart intact and continue their duties.
- Pluggable Service Model
- Can write "services" that run in background. A couple examples that i have written are GPS Service (so my GPS turtle/computers can do more that just GPS), trace listeners, and a time service (enable me to track the in-game day beyond world restarts).
- Centralized Configuration/Metadata
- I built a well defined system to load Configuration data per computer/turtle and also provide shared/global configuration that can be shared.
My basic question is how best to feedback what i have learned and built to the community/mod authors? It is quite a chog of code and quite complex to use and setup (requires special directory layouts and SymLinks), so i am not sure what the best forum to get it reviewed/commented on.
Much Thanks,
Luke