Chuck Live Coding
About
ChucK Versioned Live Coding (lc) facilities live coding within ChucK by providing easy to use git versioning.
lc is
- Git versioning of ChucK
- Shortened commands
- Designed for terminal livecoding
Download
From github.
Requires
lc requires a current install ChucK.
Available free here.
lc has been tested on OS X 10.4, 10.5 and 10.6.
Manual
Setup
Install git on local host of versioned files. Git can be downloaded here.
$ cd project-folder $ git init
First time git users would be advised to read the Offical Git Tutorial
Use
As files are created they need to be added to the versioning
$ git add file-name
Also we need to start the ChucK VM
$ chuck --loop
For one window Chuck
$ chuck --loop &
lc
Run ChucK file
$ lc file-name.ck
This will add the file to ChucK and then report the git submission report.
To replace the running Chuck code
$ lc file-name.ck shred-id
Shred id can be established via
$ chuck ^
lc Development
Development hosted at https://github.com/scotthewitt/lc
File source below.
#!/bin/bash # File provides version interface via git for Chuck # no args error # 1 args add file and run git commit # 2 args replace shred with file and run git commit if [ -z "$1" ]; then #no args echo $0 please submit file or file and shred number to replace exit elif [ -z "$2" ]; then # single filename argh add file and do git commit FILE=$1 echo add $FILE chuck + $FILE git commit -a -m "live coding record" exit else FILE=$1 ID=$2 echo replace shred $2 with $FILE chuck = $ID $FILE git commit -a -m "live coding record" fi
Code checks for args and excutes appropriate section.
The git commit recorded could be altered if required, contained within ” “.