LabLua in Google Summer of Code 2021

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



Closures in Pallene

A picture of Srijan

Pallene is a typed companion language to Lua. It's syntax is similar to Lua, but with type annotations which allow it to be compiled into much more efficient code. In this project, we added nested functions and closures to the Pallene. This powerful feature will allow programmers to create many kinds of programs in Pallene which were not possible before. The journey we went through to solve this challenge is documented in Srijan's blog: Part 1, Part 2.

The Code

The code written for this GSOC has already been merged into the main Pallene repository on Github. A list of the merged pull-requests can be found here.

The Student

Srijan Paul is a CS undergrad. He likes functional programming, PL theory, distributed systems and game development.

Mentors

Hugo Gualandi

Lua scripted watchpoints in LLDB

A picture of Shichu

LLDB is a powerful debugger under LLVM project. LLDB breakpoints and watchpoints are scriptable with Python callbacks when they get hit. Breakpoints can also accept Lua callbacks while watchpoints did not support Lua callbacks before the project.

The project adds support for Lua scripted watchpoints, making watchpoints accept Lua callbacks as well. The project also improved the the documentation of scripting parts in LLDB. We also extended the liblldb to make it available as a Lua module, so that all features of LLDB are visible to the standalone Lua interpreter. This enables Lua users to create customized debugging utilities with the power of LLDB.

To be specific, we have added necessary glue functions that connect LLDB with the embedded Lua interpreter, so that it may support Lua scripted watchpoints. We also translated Python code to Lua in LLDB scripting documentation, and used a new Sphinx plugin sphinx_tabs to make code blocks switchable between Python and Lua. For the extension part of the project, we supplemented SWIG typemaps for Lua and wrote a test suite for Lua LLDB module to make liblldb visible to Lua.

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 the student.

The Student

Shichu Yang

Mentors

Pedro Tammela, Jonas Devilieghere

Typed API for LuaRocks

A picture of Deepak LuaRocks is the package manager for Lua. It is developed in Lua and consists of various modules that are required by the primary CLI programme "luarocks." The goal of this project was to break down Luarocks into more manageable chunks, extracting portions of it into libraries. We also provided typed APIs for LuaRocks modules, using Teal, a typed dialect of Lua. This allows users of these APIs to take advantage of compile-time type-checking for error detection. Breaking LuaRocks into stand-alone modules was challenging because we needed to decide like which parts of LuaRocks should go into which stand-alone module and taking care so that any code should not have multiple copies in different stand-alone modules. We also added CI (continuous integration) in all the repositories. A full version of this blog post can be found on this link

The Code

A page describing all the modules created for this GSOC can be found on this link.

The Student

Deepak Singh Rathore.

Mentors

Hisham Muhammad

A Lua library for Freechains-P2P

The Student

Micah Kendall

Mentors

Francisco Sant'Anna