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

September 30, 2015 | By Duchateaux | Filed in: Tutorial.

Lua Quick Start 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 Quick Start for Mac OS X 10.10 Josemite - Featured
  1. Open a Shell Terminal emulator window
    Applications > Utilities > Terminal
    (Press “Enter” to Execute Commands)

    LUA Quick Start 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!”

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