lowne / xCodea

a live execution environment for large Codea projects
12 stars 1 forks source link

xCodea

A live coding environment for large Codea projects.

Why

xCodea lets you seamlessly switch working on your Codea project from your iPad to your laptop/desktop (and back), to take advantage of

And most importantly:

Setup

Assuming your computer's IP is 192.168.1.10, you will keep your projects in a folder named CodeaProjects (this folder is generally referred to as projectsRoot) and you'll work on a Codea project called MyCoolGame:

Command line

GUI

Grab the .dmg file from the latest release. Usual caveats apply for Gatekeeper (right-click, open) and firewall (the server requires inbound connections, eh?) It'll ask for your projectsRoot at first launch, type it in. Then Project->New Project->MyCoolGame, then Start server.

on the iPad (both GUI and cmdline)

Running the server

[ TODO command line options etc]

Connection and syncing

When xCodea on the iPad connects to the xCodea server any changes (files or dependencies that were updated, added or removed from either side) are synced. In practice almost always you'll have been working on your project on the iPad while away from the computer. When you connect to xCodea it'll sync these changes back to the computer. In case of changes from both sides on the same file, the iPad version wins by default, overwriting the file on your computer.

You can disconnect (stop xCodea, quit Codea altogether, put the iPad to sleep, take the iPad on a long trip) whenever you want; the next time xCodea connects it'll sync any intervening changes and restart the project. There's no need to ever stop and restart the server unless you want to work on a different project (to stop the command line server, press ctrl-C in its terminal window).

Live coding

Whenever a project file is changed on disk (i.e. on save) its contents are sent to the client.

Moreover the server watches for a special eval.luac file in your projectsRoot folder. As soon as this file is created, the server sends its contents to be evaluated inside xCodea's sandbox, then deletes the file.

Finally, if you're using LDT (or some other Eclipse-based IDE) xCodea monitors the .buildpath file for your project to detect dependency changes (when a change occurs the project is automatically restarted).

Taking advantage of xCodea

Acknowledgements

xCodea was inspired by, and strives to improve upon, the excellent LiveCodea, which begot AirCode in Codea itself, whose limitations xCodea attempts to overcome. Some ideas were taken from the also excellent AirCodea

Todo