GithubHelp home page GithubHelp logo

summersnail2014 / luaposix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luaposix/luaposix

0.0 1.0 0.0 2.88 MB

Lua bindings for POSIX APIs

Home Page: luaposix.github.com/luaposix

License: MIT License

luaposix's Introduction

luaposix

By the luaposix project

travis-ci status Stories in Ready

luaposix is a POSIX binding, including curses, for Lua 5.1 and 5.2; like most libraries it simply binds to C APIs on the underlying system, so it won't work on non-POSIX systems. However, it does try to detect the level of POSIX conformance of the underlying system and bind only available APIs.

luaposix is released under the MIT license, like Lua (see COPYING; it's basically the same as the BSD license). There is no warranty.

Please report bugs and make suggestions by opening an issue on the github tracker.

Installation

The simplest way to install luaposix is with LuaRocks. To install the latest release (recommended):

luarocks --server=http://rocks.moonscript.org install luaposix

To install current git master (for testing):

luarocks install https://raw.github.com/luaposix/luaposix/release/luaposix-git-1.rockspec

With Lua 5.1, luaposix requires the bitop library from http://bitop.luajit.org/ (On Lua 5.2 it will work whether bitop is installed or not.)

To install without LuaRocks, check out the sources from the repository and run the following commands:

cd luaposix
./bootstrap
./configure --prefix=INSTALLATION-ROOT-DIRECTORY
make all check install

Dependencies are listed in the dependencies entry of the file rockspec.conf. You will also need Autoconf and Automake.

See INSTALL for configure instructions and configure --help for details of available command-line switches.

Use

The library is split into two modules. The basic POSIX APIs are in posix and the curses APIs in curses.

HTML documentation can be generated with LDoc by running make doc or viewed online at http://luaposix.github.com/luaposix/.

The authoritative online POSIX reference is at http://www.opengroup.org/onlinepubs/007904875/toc.htm.

Example code

See the example program tree.lua, along with the tests in tests-*.lua.

For a complete application, see the lua branch of GNU Zile.

Bugs reports & patches

Bug reports and patches are most welcome. Please use the github issue tracker (see URL at top). There is no strict coding style, but please bear in mind the following points when writing new code:

  1. Follow existing code. There are a lot of useful patterns and avoided traps there.

  2. 8-character indentation using TABs. Not my favourite either, but better than reformatting the code and losing much of the ability to follow the version control history.

  3. No non-POSIX APIs; no platform-specific code. When wrapping APIs introduced in POSIX 2001 or later, add an appropriate #if. If your platform isn't quite POSIX, you may find a gnulib module to bridge the gap. If absolutely necessary, use autoconf feature tests.

  4. Thin wrappers: although some existing code contradicts this, wrap POSIX APIs in the simplest way possible. If necessary, more convenient wrappers can be added in Lua (posix.lua).

luaposix's People

Contributors

rrthomas avatar gvvaughan avatar ncopa avatar avnik avatar zevv avatar timn avatar likema avatar ittner avatar craigbarnes avatar sam-github avatar hishamhm avatar fperrad avatar granpc avatar jdegges avatar waffle-iron avatar dottedmag avatar zserge avatar stevedonovan avatar keen13 avatar whilp avatar themroc avatar aeron005 avatar nmcveity avatar

Watchers

 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.