Skip to content

peersuasive/luce-live-coding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Luce Live Coding

See what you code live

This is really just a naive approach taking the MainComponent from the Document of the main class and pushing it to another Document. Still, it does the job.

Further development would be smarter. If there's a need for it.

Requirements

Install

link luce-live/lluceLive somewhere in PATH

~ $ sudo ln -s $SRC/luce-live/lluceLive /usr/local/bin/

Usage

Open a terminal and start the watcher:

~/src/killer_app/src $ lluceLive main.lua classes/*

It'll start the LLive server and watch changes in main.lua and classes/*

Better use vim or emacs for this.

Adapt to your needs.

Tracking changes in included classes

Not really optimised yet,

require needs to be overriden.

Add this at the beginning of main.lua and classes:

local require, _require = require, _require
if(LUCE_LIVE_CODING)then
    print( componentName )
    _require = _require and _require or require
    local function safe_require(p)
        package.loaded[p] = nil
        if ( pcall(_require,p) ) then
            return _require(p)
        end
    end
    require = safe_require
end

See lTox for a full example.

Roadmap

  • improve error message, show a console with colours, etc.
  • track newly added classes on the fly
  • be more portable, at least OS X, at best Windows
  • live coding on iOS, Android...
  • ...

About

Luce Live Coding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published