Source

Greyhound Lua /

Filename Size Date modified Message
lua
misc
samples
1.4 KB
75 B
154 B
543 B
1.2 KB
28.6 KB
6.3 KB
5.9 KB
5.1 KB
43.3 KB
826.6 KB

Greyhound Lua

Author: Ross Light
Copyright: Copyright © 2010, Ross Light
Version: 2011-01-08
Homepage:http://hg.zombiezen.org/greyhound-lua

About Greyhound Lua

Greyhound Lua is a distribution of Lua intended to be used for the FIRST Robotics Competition. Teams can use this to write their robot code in Lua, a simple, lightweight programming language.

Greyhound Lua is in no way endorsed or sponsored by US FIRST.

Features

  • Lua is simple to learn and easy to maintain.
  • Greyhound Lua lets you reload code without restarting.
  • Greyhound Lua provides access to the WPILib.
  • You don't need to use WindRiver once the base code is installed.
  • Inclusion of the bitop library.

Getting Started

The Greyhound Lua Wiki is the best place for up-to-date documentation and resources for Greyhound Lua. You can also find examples of code in the samples directory.

Technical Overview

Greyhound Lua is a packaging of a patched Lua 5.1.4 interpreter (found in the lua subdirectory). All access to the WPILib is generated by a SWIG interface, which is found at wpilib.i. When the robot is started, it calls upon the LuaRobot class to set up the environment, which creates a Lua state and runs the file lua/boot.lua. From there, all responsibility is given to the boot.lua script, which is referred to as the bootloader.

Major Differences from standard Lua

  • No dynamic loading of C code. vxWorks does have the capability for it, but we haven't seen a need to introduce the complexity. The loadlib family of functions remain, but they will give an error. This restriction may be lifted eventually.
  • The bitop library is bundled with this project (as bit.c).
  • Some functions from os are removed, namely:
    • os.execute
    • os.exit
    • os.setlocale

Licensing

A brief overview of licensing terms:

If you redistribute Greyhound Lua and add other libraries, please include their licensing information here.

Lua License

Copyright © 1994–2008 Lua.org, PUC-Rio.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bitop

Copyright © 2008-2009 Mike Pall. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Greyhound Lua

Copyright © 2010 Ross Light

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.