LabLua in Google Summer of Code 2024

We were very happy to participate again in Google Summer of Code (GSoC)! This is the 9th time we had the opportunity to collaborate with students from all around the world on interesting projects. These are the highlights from the 2024 edition.



Adapt LuaSQL drivers to Lua 5.4

A picture of Chaitanya

LuaSQL is a library that bridges Lua with various database management systems (DBMS), providing a consistent API for interacting with databases such as MySQL, PostgreSQL, SQLite, and others. With the release of Lua 5.4, the LuaSQL drivers required updates to maintain compatibility and take advantage of the new features introduced in this version. The project involved several key tasks:

In conclusion, the LuaSQL drivers have been successfully updated to be fully compatible with Lua 5.4, incorporating new features and enhancements that improve performance, resource management, and maintainability, ensuring a smooth transition for users to the latest Lua version. An updated version of LuaSQL, incorporating all the mentioned updates, will soon be released.

The Code

The results of this GSOC are summarized in this page. It includes a link to code repository, as well as a list of the pull requests implemented by Chaitanya. Latest version of LuaSQL can be found on LuaRocks, with its updated documentation.

The Student

Chaitanya Deshmukh is an undergraduate student pursuing a degree in Electronics and Communication Engineering from India. He has a keen interest in software development, cloud native technologies, and database management. He is enthusiastic about building innovative solutions and staying updated with the latest trends in the tech industry.

Mentors

Tomás Guisasola

Improved debugging support for Pallene

A picture of Asif

Pallene is type inferred, ahead-of-time compiled companion language to Lua designed for performance. This is a space currently filled by LuaJIT and Lua C modules. Pallenes syntax is similar to Lua's allowing users to write high-performance code swiftly.

Pallene's debugging experience was hampered by how Lua stack traces display C stack frames, because Pallene compiles down to C. The Lua call stack does not store the line numbers for Lua-to-C calls and does not show C-to-C calls. To address the problem not only for Pallene but also for Lua C modules in general, we created a new library, Pallene Tracer. It provides mechanisms to enable function tracebacks, generating a proper stack-trace for all the C call-frames and their respective line numbers, without modifying the Lua virtual machine. Hence, over the summer time we worked on Pallene Tracer, its adoption in Pallene and finally its adoption into Lua C modules. You can learn more about this journey in Asif's blog.

The Code

For this project we created a Github repository for pallene-tracer. We also created pull requests code to integrate Pallene with Pallene Tracer.

The Student

Syed Naimul Hasan Asif (alias SD Asif Hossein) is an Electrical Engineering undergrad student from Bangladesh. He is passionate about low-level programming, programming languages, operating systems, deep learning and high-performance computing.

Mentors

Hugo Gualandi, Srijan Paul, Gabriel Ligneul

Lunatik binding for Netfilter

A picture of Shehar

Lunatik is a framework for scripting the Linux kernel with Lua. It is composed by the Lua interpreter modified to run in the kernel; a device driver (written in Lua =)) and a command line tool to load and run scripts and manage runtime environments from the user space; a C API to load and run scripts and manage runtime environments from the kernel; and Lua APIs for binding kernel facilities to Lua scripts.

The goal of this project was to enable lunatik users to write netfilter kernel modules, xtables (legacy) kernel and corresponding userspace extensions entirely in Lua.

The Code

The code is already merged in the Lunatik repository and a report containing Shehar's contributions can be found here.

The Student

Mohammad Shehar Yaar Tausif is a final year under-graduate student at Indian Institute of Technology (IIT), Kharagpur in India. He is an open-source enthusiast with contributions in multiple open-source projects. Shehar loves working on low-level stuff and is currently exploring Linux Kernel, Networking and Distributed Systems.

Mentors

Lourival Vieira Neto, Marcel Moura

Port LuaRocks to Teal

A picture of Victor

LuaRocks is a package manager for the Lua programming language. It allows developers to install, manage, and distribute Lua packages, which are collections of Lua modules that provide specific functionality. Our project converted the LuaRocks codebase from Lua to Teal, a statically typed dialect of Lua, to make the whole repository easier to read, understand, and improve.

The experience of working on a project with LabLua was amazing and my mentor made it truly one of a kind. I will never forget, not only the things I learned about Lua and Teal, but also all the general tips I received about writing proper code, testing and deploying it, etc. that I will for sure use in the future. I would recommend this experience to everyone considering to apply!

The Code

The code can be found in the pull request and maybe already in the master branch by the time you are reading this!

The Student

Victor Ilchev is a second year Computer Science student at TU Delft, born and raised in Bulgaria.

Mentors

Hisham Muhammad