How-to QuickStart with LUA Programming on Mac OS X 10.10 Josemite

September 30th, 2015 by Duchateaux

Lua QuickStart for Mac OS X

The Unix BSD Tutorial Shows You Step-by-Step How-to Install and Getting-Started with LUA via the Homebrew Package Manager on Mac OS X 10.10 Josemite.

Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics.

Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

LUA QuickStart for Mac OS X 10.10 Josemite - Featured
  1. Open a Shell Terminal emulator window
    Applications > Utilities > Terminal
    (Press “Enter” to Execute Commands)

    LUA QuickStart on Mac OS X 10.10 Josemite - Open Terminal
  2. How-to Install HomeBrew for Mac OS X 10.10 Yosemite:

    HomeBrew Installation

  3. Installing LUA on Mac by Homebrew

    sudo su
    brew install lua

    Test installation:

    which lua
  4. Executing LUA Hello-World Example

    mkdir ~/Documents/lua
    cd ~/Documents/lua
    nano hello.lua


    Print("Hello World!")

    Ctrl+x to Save & Exit from nano editor :)
    To Run the LUA Hello-World script:

    lua hello.lua

    You’ll be Greeted with an: “Hello World!”

Share on Tumblr

Tags: , , , , , , , , , , , , , , , , , , , ,

Comments are disabled