Introduction to Lua Programming


Course Number: LUA-100
Duration: 2 days (13 hours)
Format: Live, hands-on

Lua Training Overview

Lua is a free, open-source programming language that is popular as an embedded plugin/extension language in different software products, In addition, Lua can also be used as a standalone language.

Lua is both powerful and easy to use with a reputation for being high performance, extremely portable, lightweight, and embeddable.

This Lua Programming training course teaches attendees how to write middle-sized standalone Lua programs and script software products where Lua is the embedded language. Students learn fundamental programming constructs in Lua, as well as concepts that are useful in other areas of software engineering.

Headcount Cap: Due to the intensive instructor interaction in this class, headcount is capped at 10 attendees per delivery.

Location and Pricing

Accelebrate offers instructor-led enterprise training for groups of 3 or more online or at your site. Most Accelebrate classes can be flexibly scheduled for your group, including delivery in half-day segments across a week or set of weeks. To receive a customized proposal and price quote for private corporate training on-site or online, please contact us.

In addition, some courses are available as live, instructor-led training from one of our partners.

Objectives

  • Program using Lua's basic syntax and semantics
  • Work with data types and data structures
  • Create tables
  • Work with conditionals
  • Incorporate error handling
  • Work with functions
  • Use modules and packages
  • Understand the building blocks of OOP in Lua

Prerequisites

All students must have familiarity with at least one other programming language. Having familiarity with other scripting languages is helpful, but not required.

Outline

Expand All | Collapse All

Introduction to Lua
  • A bit of history
  • Lua's goals, features and non-goals
  • Resources of Lua documentation and tutorials
  • Installing the Lua interpreter
  • Setting up and using LuaRocks
Basic Syntax and Semantics
  • Identifiers
  • Comments, block comments
  • Global variables and enforcing of strictness
  • Local variables
  • Standalone programs, program arguments
  • Compilation units, chunks, expressions, semicolons
Data Types and Data Structures
  • Basic types: nil, boolean, number, string
  • Object types: function, userdata, thread, table
  • References/objects vs. basic values
  • The importance of tables in Lua
Introduction to Tables and Their Versatility
  • Tables as an associative array
  • Tables as numeric arrays, sequences
Basic Control Structures
  • The if then elseif else end
  • The while loop
  • The repeat loop
  • The simple for loop
Error Handling
  • Return values vs exceptions
  • Converting a return value to an exception
  • Converting an exception to a return value
  • Error levels
Example Programs
  • Polynomial evaluation
  • Breadth first search
  • Additional exercises
More about Functions
  • Named arguments
  • Object-oriented calls
  • Closures
  • Currying
  • Tail calls
  • Multiple assignment and return
  • Varargs
Iterators and Co-Routines
  • The generic for loop
  • Stateless vs stateful iterators
  • Differences between iterators and co-routines
Metatables and Metamethods
  • The set example
  • The __tostring metamethod
  • Arithmetic metamethods
  • The __index, __newindex metamethods
  • The __len metamethod
Modules and Packages
  • Using modules
  • Creating modules
  • Organizing modules into packages
Object-oriented Programming
  • The building blocks of OOP in Lua
  • Examples
Discussion on more advanced language features
  • Weak tables
  • Finalizers
  • Compilation, eval, loading
Conclusion

Training Materials

All Lua training students receive comprehensive courseware.

Courseware by NobleProg® Ltd, 2004 - 2021 All Rights Reserved.

Software Requirements

  • Internet connection and a modern browser.


Learn faster

Our live, instructor-led lectures are far more effective than pre-recorded classes

Satisfaction guarantee

If your team is not 100% satisfied with your training, we do what's necessary to make it right

Learn online from anywhere

Whether you are at home or in the office, we make learning interactive and engaging

Multiple Payment Options

We accept check, ACH/EFT, major credit cards, and most purchase orders



Recent Training Locations

Alabama

Birmingham

Huntsville

Montgomery

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

Los Angeles

Oakland

Orange County

Sacramento

San Diego

San Francisco

San Jose

Colorado

Boulder

Colorado Springs

Denver

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Jacksonville

Miami

Orlando

Tampa

Georgia

Atlanta

Augusta

Savannah

Hawaii

Honolulu

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Cedar Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Frederick

Hagerstown

Massachusetts

Boston

Cambridge

Springfield

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Minneapolis

Saint Paul

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Las Vegas

Reno

New Jersey

Princeton

New Mexico

Albuquerque

New York

Albany

Buffalo

New York City

White Plains

North Carolina

Charlotte

Durham

Raleigh

Ohio

Akron

Canton

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Oklahoma City

Tulsa

Oregon

Portland

Pennsylvania

Philadelphia

Pittsburgh

Rhode Island

Providence

South Carolina

Charleston

Columbia

Greenville

Tennessee

Knoxville

Memphis

Nashville

Texas

Austin

Dallas

El Paso

Houston

San Antonio

Utah

Salt Lake City

Virginia

Alexandria

Arlington

Norfolk

Richmond

Washington

Seattle

Tacoma

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Calgary

Edmonton

British Columbia

Vancouver

Manitoba

Winnipeg

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan