[Screeninvader] Janosh - Embedded Lua Support

Amir Hassan amir at viel-zu.org
Fri Mar 13 14:39:50 CET 2015


Janosh now supports lua scripting. step by step most shell script code
will be replaced with lua code.

This is awesome for following reasons:
- performance
- code maintainability
- easy access to web frameworks and websockets!

Phaer and Zerocity are already investigating web frameworks.

Following short example should give you a slight idea. make it exectuable
and run it to increment the volume by 5 percent. At the moment there isn't
documentation because the implementation still is in motion. check out
https://github.com/kallaballa/Janosh/blob/master/JanoshAPI.lua for a look
under the hood.

<code>
#!/lounge/bin/janosh -f

local soundObj = Janosh:get("/sound/.");
print("volume:" .. soundObj.volume);
Janosh:trigger("/sound/volume",soundObj.volume+5)
</code>

greets,
amir



More information about the Screeninvader mailing list