My lasted project I'm currently developing is a Java application that emulates computercraft, and turns your lua programs into standalone java applications for you to distribute across any real life OSes that support Java! (Any suggestions for a name would be welcome! - currently thinking about "Standalone")
How I plan for this to work is to have your own downloadable and executable jar file, then for you to be able to load your Lua program into it via loading it from a file or supplying a download/Pastebin link. You can then choose for it to behave like a normal computer, where you are able to download more files and store them in the computer just like in CCEmu and CC in Minecraft, or you can lock the application into booting this program up on startup and not being able to exit it (like a real application). Control-T (not in the locked application computers), Control-R and Control-S will all work, and I will re-create all CC APIs, and add more to them if I feel like it.
I also plan to exclude all peripherals from this application - meaning no disk drives, printers, or turtles (or any associated APIs), but I will implement Rednet. Each open instance of your Lua program in this application will be assigned an ID when it opens its Rednet modem, and will be able to communicate to all other instances of your application that exist and have Rednet open, using that Application's ID. I've been looking around for solutions to this and I found a useful technology called AMQP (Automatic Message Queuing Protocol, or something :P/>). I used this in Python to develop a simple chat program (like Skype with no voice calling) - and there seems to be a Java implementation of the library. I'll need to set up a server, and I will see if there is any free hosting around that can do it - I don't particularly want to host it myself :P/> (suggestions for hosting services are very welcome!). If anyone has any better suggestions, PLEASE leave a comment. I'll probably implement this Rednet system in the second version.
I was also thinking to add some form of download center, so people are able to post their lua applications to me, and any people with the application can see all posted applications and download ones to their computer (like an app store). I was thinking to host this on Dropbox, but again - I welcome any better suggestions!
If you have anything more you would like to see in this, please drop me a PM or leave comment below! I welcome more suggestions!
I currently have nothing for you to download, which is why this is in General and not Programs.
If I've derped anything up in this post, please tell me!
Added/Removed Features in APIs
Spoiler
Ok, so looking though the CC API documentation, I will not be implementing many functions/APIs due to the lack of peripheral implementation (this is not an emulator, but a tool to allow you to turn your lua apps into standalone applications).Bit API - I will fully implement this
Colors API - Fully implement
Coroutine API - Will fully implement
Disk API - Not implementing at all (due to no peripherals)
FS API - Fully implement
GPS API - Nope
Help API - Who actually uses this? If many people do, I will implement, but currently I can't be bothered
HTTP API - Fully
IO API - Fully
Math API - Fully
OS API - Fully, with added os.exitApp(), which will quit the Java app, and removal of os.getComputerID(), as the ID will be used in Rednet only
Paint Utils - Fully
Parallels - Definitely, but I have no idea how (must look though it - help would be appreciated!)
Printer API - Nope
Rednet API - Everything, but the rednet.open(side) will not need to take a side parameter (same with rednet.close), and addition of rednet.getID() for getting the application's ID. I may also implement Rednet channels (something major CC doesn't have)…
Redstone API - Nope
Shell API - Everything
String API - Everything
Table API - Everything
Term API - Everything, with adding term.getCharAtPos(x, y), term.getCursorBlink(), and removal of redirect and restore (due to no peripherals)
Text Utils API - Everything
Turtle API - Nope
Vector API - Nope (due to no GPS API)
Progress:
Completed so far:
- Terminal window can draw text from calls made in Java
- Terminal window is able to be drawn to from Lua files
- LuaJ can execute Lua files
- FS, IO, OS, Math, String, Coroutine, and Table Libraries Implemented in Java (easy to transfer into Lua)
Need to do:
- Complete the rest of the libraries
- Add libraries into Lua
- Complete file system sandbox
- Download Center
- Loading of files into the application
- Startup program locking
- Probably more