Lua Workshop

Lua Workshop

A hands-on workshop to help you learn Lua programming language syntax and semantics

Lua is a simple, powerful, efficient, embeddable scripting language. It is widely used in the industry and is a leading scripting language for C projects. This workshop will introduce participants to the Lua programming language, its syntax and semantics. Lab exercises help in quickly understanding the language constructs.

##Who should attend the workshop?

  1. Operations engineers
  2. Developers
  3. Game developers
  4. Network operations practitioners
  5. Programming language enthusiasts

##Why you should attend this workshop?

  1. Lua is the preferred choice for scripting interface when working on C projects.
  2. Gaming industry also uses Lua extensively for scripting.
  3. System administrators and network operations practitioners who want to troubleshoot networks and analyze protocols will find the Wireshark Lua plugin interface very useful.
  4. Programming language enthusiasts can add another simple, yet powerful scripting language to your knowledge.

At the end of the workshop, you will have learnt the Lua programming language, and understood its use cases with examples.

Pre-requisites for attending this workshop:

Familiarity with any programming language is good to get started with Lua.

  1. You must install install Lua on your laptop before coming to the workshop. If you are on any GNU/Linux distribution, you can use the package manager to install Lua. For the use case examples, you should install Wireshark (GUI) and awesome window manager.

  2. If you are on any other operating system, use a Virtual Machine to run any *nix distribution, and install the above mentioned packages. The official Wireshark downloads are available at https://www.wireshark.org/#download.

About the instructor:

Shakthi Kannan is a Free Software enthusiast who blogs at shakthimaan.com. He is an avid promoter of Free/Libre and Open Source Software, and has been organizing technical workshops in India for more than a decade. He holds a Masters degree in Information Technology from Rochester Institute of Technology.
Shakthi conducted the tutorial version of this workshop at Rootconf 2019 More than 50 participants attended the tutorial, and rated the content, usefulness of the session, and Shakthi Kannan’s teaching style very highly.

##Workshop details:
Date: Saturday, 5 October
Time: 10:00 AM to 5:40 PM
Venue: HasGeek, 2699, 19th Main, HAL 2nd stage, Indiranagar, Bangalore - 560008

Hosted by

Rootconf is a community-funded platform for activities and discussions on the following topics: Site Reliability Engineering (SRE). Infrastructure costs, including Cloud Costs - and optimization. Security - including Cloud Security. more

Shakthi Kannan

@shakthimaan

Lua Workshop

Submitted Jul 4, 2019

Lua is a simple, powerful, efficient, embeddable scripting language. It is widely used in the industry and is a leading scripting language for C projects. This workshop introduces the participants to the Lua programming language, its syntax and semantics. Lab exercises help in quickly understanding the language constructs. We will then explore three Lua use cases. Firstly, the Wireshark protocol analyzer is useful for troubleshooting network problems, and analyzing communication protocols. Using the Wireshark Lua API one can implement packet dissectors for custom protocols. Secondly, the Nginx web server functionality can be scripted using Lua, and we will demonstrate the same. Finally, Awesome is a tiling window manager written in C and can be extended using Lua. We shall learn how to configure and customize the window manager.

The workshop is useful for both developers and operations engineers. If you are working on a C project that you would like to extend and provide a scripting interface, then Lua is a preferred choice. The gaming industry uses Lua extensively for scripting, and game developers will benefit from learning the same. A system administrator or network operations person who would like to troubleshoot networks and analyze protocols will find the Wireshark Lua plugin interface very useful. As a programming language enthusiast, you will add another simple, yet powerful scripting language to your knowledge. At the end of the workshop, you will have learnt the Lua programming language, and understood its use cases with examples. More about Lua can be found at its web site.

https://www.lua.org

Outline

Lua

We will begin with the Lua programming language syntax and semantics. Hands-on exercises will be provided to the participants to assist in learning the language.

  • Environment
  • Syntax
  • Variables
  • Data Types
  • Operators
  • Loops
  • Conditionals
  • Functions
  • Strings
  • Arrays
  • Iterators
  • Tables
  • Modules
  • Coroutines
  • Files
  • Error handling

Use Cases

We will be going through three use cases for Lua.

  • Wireshark Lua plugin

Wireshark (https://www.wireshark.org/) is a Free (Libre) and Open Source protocol analyzer used for troubleshooting networks, and analysis of communication protocols. The Lua programming language support has been included in Wireshark for scripting, prototyping and packet dissection. We will learn how to use Lua to do protocol dissection on packet captures with Wireshark.

  • Lua with Nginx

The OpenResty (http://openresty.org/en/) release has Lua support with Nginx that allows you to extend the C functionality of the web server, and also do scripting. We shall demonstrate few examples of the same.

  • Awesome window manager and Lua

The Awesome (https://awesomewm.org/) is a tiling window manager that can boost your productivity. It is small, fast and highly extensible using the Lua programming language, and we will learn how to configure the same.

Requirements

You need to have Lua installed on your laptop. If you are on any GNU/Linux distribution, you can the package manager to install Lua. For the use case examples, you need to install Wireshark (GUI), awesome window manager and OpenResty (http://openresty.org/).

If you are on any other operating system, use a Virtual Machine to run any *nix distribution, and install the above mentioned packages. The official Wireshark downloads are available at https://www.wireshark.org/#download.

Familiarity with any programming language is good to get started with Lua.

Speaker bio

Shakthi Kannan is a Free Software enthusiast who blogs at shakthimaan.com. He is an avid promoter of Free/Libre and Open Source Software, and has been organizing technical workshops in India for more than a decade. He holds a Masters degree in Information Technology from Rochester Institute of Technology.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

Rootconf is a community-funded platform for activities and discussions on the following topics: Site Reliability Engineering (SRE). Infrastructure costs, including Cloud Costs - and optimization. Security - including Cloud Security. more