This has to be like my first topic or something, maybe even my first post, I'm not sure.
Anyway recently I wanted to design a networking API, but the problem was I couldn't run a top level coroutine, after talking to people and disputing with them on IRC for the last few days and being told it was very difficult or impossible I devised a way to launch functions at top level, by basically messing around with the shell and bios, getting them to quit and then launch my own code.
There is a lot of possibilities with this, and the full power could probably only be realised in the hands of an Advanced/Pro Lua Coder, but here is my attempt at some community contribution. I only started learning Lua a few weeks to a month ago. So I welcome any advice or input.
I've not made any test code for this, but it should all work how I've described it. It should let you spawn whatever top level programs you want to.
The example I have loads the shell per normal, but does not start rednet for redstone input. Just to show that it works.
You're welcome to use the code how you like, but I ask that you keep my credit on it.
You should use this as your startup file, it might work not as startup file, but I never tested it that way.
http://pastebin.com/2SQAzrWi
Enjoy, and please let me know what you think.
Edit: Re-uploaded to Pastebin via my account so I can start pushing updates and fixes.