Course Outline

Introduction to Lua for Government

  • A Brief History
  • Lua's Goals, Features, and Non-Goals
  • Resources for Lua Documentation and Tutorials for Government Use
  • Installing the Lua Interpreter for Government Systems
  • Setting Up and Using LuaRocks for Government Applications

Basic Syntax and Semantics for Government

  • Identifiers
  • Comments and Block Comments
  • Global Variables and Enforcing Strictness
  • Local Variables
  • Standalone Programs and Program Arguments for Government Applications
  • Compilation Units, Chunks, Expressions, and Semicolons

Data Types and Data Structures for Government Use

  • Basic Types: nil, boolean, number, string
  • Object Types: function, userdata, thread, table
  • References/Objects vs. Basic Values
  • The Importance of Tables in Lua for Government Applications

Introduction to Tables and Their Versatility for Government Use

  • Tables as an Associative Array
  • Tables as Numeric Arrays, Sequences

Basic Control Structures for Government

  • The if then elseif else end Structure
  • The while Loop
  • The repeat Loop
  • The Simple for Loop

Error Handling for Government Applications

  • Return Values vs. Exceptions
  • Converting a Return Value to an Exception
  • Converting an Exception to a Return Value
  • Error Levels

Example Programs for Government Use

  • Polynomial Evaluation
  • Breadth First Search
  • Additional Exercises for Government Practitioners

More About Functions for Government Applications

  • Named Arguments
  • Object-Oriented Calls
  • Closures
  • Currying
  • Tail Calls
  • Multiple Assignment and Return Values
  • Varargs

Iterators and Co-routines for Government Use

  • The Generic for Loop
  • Stateless vs. Stateful Iterators
  • Differences Between Iterators and Co-routines

Metatables and Metamethods for Government Applications

  • The Set Example
  • The __tostring Metamethod
  • Arithmetic Metamethods
  • The __index, __newindex Metamethods
  • The __len Metamethod

Modules and Packages for Government Use

  • Using Modules in Government Applications
  • Creating Modules for Government Systems
  • Organizing Modules into Packages for Government Use

Advanced Tables for Government Applications

  • Tables for Queues and Stacks
  • Tables Describing Graphs
  • Matrices as Tables
  • Linked Lists as Tables
  • String Buffers

Metatables Through Examples for Government Use

  • Proxies
  • Readonly
  • Memoization
  • Dynamic Programming with Memoization
  • The Fibonacci Example

Environments for Government Applications

  • Relationship Between Global Variables and Environments
  • Free Variables
  • The _ENV Table and the _G Table

More About Modules for Government Use

  • Different Approaches to Creating Modules for Government Systems
  • Modules that Change Behavior for Government Applications
  • Module Initialization and Arguments for Government Use
  • Using Environments to Implement Safe Modules for Government

Advanced Iterators and Co-routines for Government Applications

  • Producer, Consumer, Filter
  • Wrapping Co-routines to Get Iterators for Government Use
  • Stateless Iterator for Linked Lists in Government Systems

Contributing to the Ecosystem for Government Use

  • Uploading Packages to MoonRocks for Government Applications

Functional Paradigm in Lua for Government

  • The map Function
  • The reduce / fold Function

Object-Oriented Programming for Government Applications

  • Different Approaches to OOP for Government Use
  • Different Approaches to Inheritance for Government Systems
  • Examples of Object-Oriented Programming in Government Applications

A Walkthrough of the Lua Standard Libraries for Government Use

Compilation for Government Applications

  • Compilation
  • Eval
  • Relationship with the Environment for Government Systems
  • Binary Chunks for Government Use

Garbage Collection for Government Applications

  • Weak Tables
  • Finalizers, the __gc Meta-method for Government Use

Lua Bytecode and Virtual Machine for Government Systems

  • Generating Bytecode from Source Code for Government Applications
  • Reading and Analyzing Bytecode for Government Use
  • Quick Tour of the Source Code of the Lua VM for Government Practitioners

C Modules for Government Systems

  • Calling C from Lua for Government Applications
  • Search Path and Loading of C Modules for Government Use

Calling Lua from C for Government Applications

  • The Stack for Government Use
  • Error Handling in Government Systems
  • Continuations for Government Applications

Handling Lua Values and Types from C for Government Systems

  • Arrays
  • Strings
  • Userdata for Government Use
  • Metatables for Government Applications
  • Object-Oriented Calls in Government Systems
  • Light Userdata for Government Use

Memory Management for Government Applications

  • Allocators for Government Use
  • GC API for Government Systems

Threads in Lua for Government Applications

  • Co-routines vs. Threads for Government Use
  • Real Multi-threading and Lua States for Government Systems

Requirements

Familiarity with at least one additional programming language is required. Prior programming experience is essential. Additionally, knowledge of other scripting languages can facilitate a better understanding of Lua for government applications.
 21 Hours

Number of participants


Price per participant

Upcoming Courses

Related Categories