Google Summer of Code 2016 Wrap Up

We were very happy to participate again in Google Summer of Code (GSoC), our third year, and specially to have been able to mentor eight fine students that successfully completed their projects. We thank them, and Google, for this contribution to our R&D work.

Here is a brief highlight of this year's projects:


Next Generation of the LuaRocks test suite - Robert Karasek

LuaRocks is the package manager for Lua modules. Its test suite was implemented as a big shell script that performed only black-box testing and ran only on Linux. The goal for this GSoC project was to port the test suite to Lua, improving its portability and allowing more types of tests so we could raise our coverage numbers.

Robert ported the test suite to Lua using Busted, a Lua unit testing tool. His efforts improved not only our coverage, but most importantly, the portability of our tests: his new test suite, now merged into mainline LuaRocks, runs under continuous integration on both Linux, macOS and Windows. This was an extremely welcome addition, bringing much greater confidence to LuaRocks developers on avoiding portability regressions. Robert improved the checks in existing tests and wrote many new ones, including a new mock-server for testing the client API for uploading packages to the luarocks.org repository.



Typed Lua Typechecker - Tomasz Dyczek

Typed Lua is an optional type system that provides static type checking for the Lua language. Typed Lua extends the syntax of Lua 5.3 to introduce optional type annotations, and performs local type inference to detect more precise types for unannotated expressions.

During GSoC 2016, Tomasz implemented the core of Typed Lua in Haskell. Tomasz's implementation parses code written in a syntax close to the abstract syntax of Typed Lua and then type checks the generated AST. Besides providing a great support for testing and reasoning about new features before introducing them to Typed Lua, Tomasz's Haskell typechecker can be also used to validate tests to be included in Typed Lua's test suite.



Classes and Generics for Typed Lua - Kevin Clancy

During GSoC 2016, Kevin worked on the implementation of a class system for Typed Lua. He also added parametric polymorphism (generics) to Typed Lua, not only for classes, but also for existing Typed Lua types such as its functions and tables.

Kevin's work currently lives in its own branch, but will me merged in the main branch ASAP. Meanwhile, Kevin has written a detailed post explaining all the features that have been implemented



Improving Error Reporting in PEG Parsers - Matthew Allen Go

LPegLabel is an extension of LPeg, a pattern matching tool for Lua, based on Parsing Expression Grammars (PEGs). LPegLabel supports labeled failures, a facility that improves error reporting and recovery for PEG-based parsers.

The goal of this project was to use LPegLabel to write parsers with good error reporting. These parsers could then be used by the Lua community and also serve as a guide for LPegLabel users. Because LPegLabel is a young tool, another important expected contribution was to improve the tool's usability.

Matthew achieved both goals during GSoC 2016. First, he developed a Lua parser for Lua 5.3 based on LPegLabel. After GSoC 2016, Matthew's work has been incorporated into the new release of lua-parser (1.0.0), which is already available to the Lua community.

Matthew also contributed to LPegLabel's usability by improving its API and documentation.



Improving elasticsearch-lua tests and build - Dhaval Kapil

Elasticsearch is a distributed and scalable search engine written in Java that, besides the transport protocol (Java to Java), offers a REST API accessed through JSON. During GSoC 2015, Dhaval implemented elasticsearch-lua, an initial client for the Lua language following a model similar to other existing clients, such as the clients written in Python and PHP.

During GSoC 2016, Dhaval worked on improving elasticsearch-lua. Apart from adding a test suite to elasticsearch-lua and making it robust, he also documented the entire codebase and updated the current client to be compatible with a newer version of Elasticsearch.

Dhaval exceeded our expectations by also creating a new library called luaver. This work was motivated by having to frequently switch between different versions of Lua while developing the test suite.

A full blog post about Dhaval's project during GSoC 2016 can be found here.



Admin Center and Elasticsearch integration for Sailor - Nikhil Ramesh

Sailor is a web framework written in the Lua programming language and structured in a model-view-controller (MVC) architecture. Like other web development frameworks, such as Ruby on Rails and Django, it is designed to make the development process faster by making some assumptions and conventions (over configuration) and encouraging principles like DRY (Don't Repeat Yourself).

During GSoC 2016, Nikhil Ramesh focused on extending the Sailor framework by adding new features to it. The first feature he worked on was an Admin Center, which is initially being used as a web interface for editing the configuration of an application and accessing auto generation of scaffolding pages. Another part of his work consisted of integrating Sailor and elasticsearch-lua to facilitate Elasticsearch indexes to be stored as Sailor Models.

Nikhil's work is currently pending as a Pull Request, to be merged as soon as possible.



Extending the online tutorial of Céu with Emscripten and SDL - Margarit Vicentiu

Céu is a programming language that targets the development of reactive applications such as video games and embedded systems. Its compiler generates output in plain C to integrate easily with the the underlying platform (e.g. Arduino, SDL). For this project, we wanted to integrate Céu with Emscripten to also run applications in a web browser.

Vicentiu started with the online tutorial of Céu, which is a server-side application: the user types Céu code in a text area and hits the send button; the server receives the code, executes it, and sends the output back to the user. During the summer, Vicentiu made most of the examples compile with Emscripten and run in real-time in the user screen.

Our next goal is to make the graphical examples with user interactions also work in the browser, and Vicentiu plans to continue contributing to the project to achieve this goal.



An automatic generator of WSDL documents for LuaSOAP - Victor Dias

LuaSOAP is a library to ease the use of SOAP, the Simple Object Access Protocol. WSDL is an XML format for describing network services; it is used to describe operations, messages and types offered by Web Services.

This summer Victor extended LuaSOAP's support of WSDL by developing a software layer that helps automatic generation of WSDL documents. This new layer eases the description of most WSDL "bureaucracy" (types, operations, ports, messages...) with no counterpart in a dynamic language like Lua. He also improved the test suite and the documentation.

Victor's work will be integrated into LuaSOAP's next version.