Coder Social home page Coder Social logo

lua9's Introduction

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

lua9 uses kvik's lu9 native port of lua.

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

The binary is installed as /bin/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/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

lua9's People

Contributors

telephil9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

lua9's Issues

Mk install - Error

After cloning repo, mk install returned following error:
"cpu% mk install
pcc -c -I. -D_C99_SNPRINTF_EXTENSION -D_PLAN9_SOURCE -D_POSIX_SOURCE -D_SUSV2_SOURCE -DLUA_POSIX -DENABLE_CJSON_GLOBAL -DPlan9 -DMAKE_LUA lua9.c
cpp: lua9.c:8 Could not find include file "lua.h"
pcc: 8c: cpp 4385: error
syntax error, last name: Fon
mk: pcc -c -I. ... : exit status=rc 4381: pcc 4383: 8c: cpp 4385: error"

Arch: 386, 9front.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.