Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Description

lua9 is a custom version of the lua interpreter including bindings to some plan9 libraries. The supported libraries are:

  • libdraw
  • libplumb
  • lib9 (very partial support)

Disclaimer: This is work in progress and is sure to contain bugs.

Installation

Make sure to have git9 installed first.

Install the lua 5.4 port for plan9 by staalmannen.

% git/clone git://github.com/staalmannen/lua
% cd lua
% mk install

Install lua9:

% git/clone git://github.com/telephil9/lua9
% cd lua9
% mk install

The binary is installed as /bin/ape/lua9.

Usage

Refer to the documentation and to the samples. Most notably look at the demo script.

Minimal example that simply paints the window black:

#!/bin/ape/lua9

function eresized()
  draw.draw(screen, screen.r, display.black, nil, g.ZP)
end

draw.init("sample")
event.init(event.KEYBOARD)
eresized()
while true do
  local e, ev = event.event()
  if e == event.KEYBOARD then
    if ev.kbdc == key.DEL then
      os.exit()
    end
  end
end

Credits

License

MIT

About

lua interpreter with some plan9 library modules

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.