Giter Site home page Giter Site logo

luerl's Introduction

Luerl - an implementation of Lua in Erlang

An experimental implementation of Lua 5.2 written solely in pure Erlang.

Some things which are known not to be implemented or work properly:

- label and goto

- tail-call optimisation in return

- only limited standard libraries

- proper handling of __metatable

- ...

There are some simple interface functions in luerl.erl:

- luerl:eval(String) evaluates the Lua code in String. Returns the return values of the evaluation.

- luerl:dofile(FileName) reads in and runs the Lua code in the file and returns the values of the evaluation. Equivalent to doing luerl:eval("dofile('FileName')").

and some more basic interface functions:

- luerl:ps(String) parses the string and returns a chunk code.

- luerl:init() initialises the system and returns an initial state.

- luerl:do(String, State) evaluates the chunk in String with the current state and returns the values and a new state.

- luerl:gc(State) runs the (experimental) garbage collector on a state and returns the new state.

N.B. This interface is subject to change!

Currently implemented functions in the libraries:

_G
_VERSION
assert
collectgarbage
dofile
eprint
error
getmetatable
ipairs
next
pairs
print
rawequal
rawget
rawlen
rawset
select
setmetatable
tonumber
tostring
type

math.abs
math.acos
math.asin
math.atan
math.atan2
math.ceil
math.cos
math.cosh
math.deg
math.exp
math.floor
math.log
math.max
math.min
math.pi
math.pow
math.rad
math.sin
math.sinh
math.sqrt
math.tan
math.tanh

os.difftime
os.getenv
os.time

string.byte
string.char
string.len
string.lower
string.rep
string.reverse
string.upper

table.concat
table.pack
table.unpack

luerl's People

Contributors

rvirding avatar

Stargazers

Dmitry Demeshchuk avatar

Watchers

Dmitry Demeshchuk avatar James Cloos avatar

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.