All Projects → telephil9 → lua9

telephil9 / lua9

Licence: MIT License
lua interpreter with some plan9 library modules

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to lua9

barebones9
Barebones amd64 kernel built using 9front
Stars: ✭ 23 (+35.29%)
Mutual labels:  plan9, 9front
vdir
a visual directory browser for plan9
Stars: ✭ 66 (+288.24%)
Mutual labels:  plan9, 9front
reinstead
RE:INSTEAD - Lightweight INSTEAD metaparser-only player
Stars: ✭ 15 (-11.76%)
Mutual labels:  plan9, 9front
gopher
A gopher browser for plan9
Stars: ✭ 33 (+94.12%)
Mutual labels:  plan9, 9front
mq
message queue
Stars: ✭ 14 (-17.65%)
Mutual labels:  plan9, 9front
cpu
cpu command in Go, inspired by the Plan 9 cpu command
Stars: ✭ 135 (+694.12%)
Mutual labels:  plan9
91menu
A Plan9-inspired, mouse-oriented, graphical menu, which works with the standard input.
Stars: ✭ 15 (-11.76%)
Mutual labels:  plan9
torgo
A UNIX-like Non-GNU command line toolkit
Stars: ✭ 44 (+158.82%)
Mutual labels:  plan9
enhanced-plan9
google summer code
Stars: ✭ 13 (-23.53%)
Mutual labels:  plan9
ghfs
9p GitHub filesystem written in Go for use with Plan 9/p9p
Stars: ✭ 66 (+288.24%)
Mutual labels:  plan9

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].