Ideas' List - Google Summer of Code 2015



LuaRocks add-ons system

Brief explanation

LuaRocks is a package manager for Lua modules. Since version 1.0, the format of the package specification file (rockspec) was unchanged, in the name of compatibility. For the next major release of LuaRocks, we intend to make a backward-compatible revision to the format. However, instead of guessing which features will be needed in the forthcoming years, the idea is to make the format extensible through add-ons, as discussed in this Lua Workshop 2014 talk.

There are two sides to making an application extensible: defining hooks to the application where extensions will plug into, and defining a public API, which is the parts of the application that the extensions will see/access.

This includes major design work, and the student is not expected to do this alone: the design part will be discussed with the mentor and the LuaRocks community at large through the LuaRocks mailing list. The coding part, of course, is up to the student.

The best way to evaluate new APIs is to put them to work: the second phase of the project will be to write some add-ons, to exercise the new features. Two features that are often requested by the community are support for running tests and generating documentation files: these would make great add-ons.

Expected results

Knowledge prerequisites

Skill level

Medium

Mentor

Hisham Muhammad



Port Lua Test Suite to NetBSD Kernel

Brief explanation

The NetBSD Operating System has a kernel-level Lua interpreter version for scripting its kernel. For example, it allows users to filter packets using Lua scripts.

The main difference between kernel Lua and regular user-level Lua is that kernel Lua doesn't have support for standard libraries that depend on operating system (e.g., io and os) and for floating-point numbers. The purpose of this project is to port the Lua Test Suite to NetBSD kernel. That is, to adapt scripts from Lua test suite and develop a NetBSD loadable kernel module containing the C portion of Lua test suite.

Expected results

Knowledge prerequisites

Skill level

Medium

Mentor

Lourival Vieira Neto



Elasticsearch Lua client (elasticsearch-lua)

Brief explanation

Elasticsearch is a distributed and scalable search engine. It is written in Java and, besides the transport protocol (Java to Java), it offers a very complete REST API accessed through JSON

Elasticsearch clients for different scripting languages such as Python, PHP and Perl have already been developed. However, a client for Lua is still not available.

This project aims to create a complete Lua client to access Elasticsearch.

Expected results

Knowledge prerequisites

Skill level

Medium

Mentor

Pablo Musa



Switch Typed Lua from optional typing to gradual typing

Brief explanation

Typed Lua is an optional type system for Lua, and its main goal is to provide static type checking for Lua. To do that, 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. Even though the compiler warns the programmer about type errors, it always removes the type annotations to generate Lua code that runs in unmodified Lua implementations, and this code does not insert any run-time checks that ensure safety between dynamically typed and statically typed code.

Expected results

The aim of this project is to make the Typed Lua compiler insert run-time checks in the gradual typing style. These run-time checks are assertions that inspect the interaction between dynamically typed and statically typed code to guarantee that dynamically typed code does not violate statically typed code. We also expect an evaluation of these run-time checks to identify what is the overhead that they introduce in the execution of the generated code.

Knowledge prerequisites

Lua and Type Systems

Skill level

Hard

Mentor

André Murbach Maidl



Adapt CGILua SAPI launcher to explore all WSAPI features.

Brief explanation

CGILua is a tool for creating dynamic Web pages and manipulating input data from Web forms. One of advantages of CGILua is its abstraction of the underlying Web server. CGILua can be used with a variety of Web servers and, for each server, with different launchers. A launcher is responsible for the interaction of CGILua and the Web server, for example using ISAPI on IIS or mod_lua on Apache. The reference implementation of CGILua launchers is Kepler.

WSAPI is an API that abstracts the web server from Lua web applications. WSAPI provides a set of helper libraries that help with request processing and output buffering.

Actually CGILua has an implementation of an abstract underlying server which is almost the same of WSAPI itself. This project proposes a reimplementation of this layer (called SAPI) to explore WSAPI fully. This should improve the performance and simpify maintenance.

Expected results

Knowledge prerequisites

Advanced Lua programming is mandatory, since both tools (CGILua and WSAPI) are not naive software. A good understanding of the Lua environment concept is particularly necessary in this project.

Web programming experience can be very helpful especially to understand the context of use of these tools.

Skill level

Medium

Mentor

Tomás Guisasola



Add support for WSDL generation to LuaSOAP

Brief explanation

LuaSOAP is a library to ease the use of SOAP. LuaSOAP provides a very simple API that convert Lua tables to and from XML documents. It also offers a simple way to invoke remote Web Services without having to deal directly with SOAP messages. In fact, LuaSOAP also provides a simple way to offer Web Services -- the server side -- but it lacks support for WSDL generation of the offered services.

WSDL is an XML format for describing network services. It is used to describe operations and messages -- with its types -- offered by Web Services. Since Lua code does not include type information, automatic generation has to be based on some kind of hand-made declarative information.

Expected results

Knowledge prerequisites

Lua programming; client-server web architecture; SOAP and WSDL specifications.

Skill level

Medium

Mentor

Tomás Guisasola



Add support for prepared statements in LuaSQL

Brief explanation

LuaSQL is a generic interface from Lua to a DBMS. It aims at portability over performance, but it allows extensions to suit the particularities of each DBMS.

The inclusion of support for prepared statements in LuaSQL has been discussed thoroughly some time ago, but since each DBMS offers very different APIs there is no standard that could be defined to assure portability between them. Anyway the demand persists.

This project proposes the addition of a minimal API that would allow each driver to implement prepared statements according to its DBMS restrictions.

Expected results

Knowledge prerequisites

C, Lua and C API for Lua:

Skill level

Hard

Mentor

Tomás Guisasola



Multi-CPU usage in VLC

Brief explanation:

VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVD, Audio CD, VCD, and various streaming protocols. Lua scripts can be added to VLC for tasks such as playlist construction and service discovery. Such tasks may involve a lot of parsing and communication and could benefit from using multiple CPUs when available. The purpose of this project is to include support for multi-CPU usage in VLC, using luaproc, a library that allows programmers to create multiple independent execution flows of Lua code that can run inparallel, communicating only via message-passing.

Expected results:

Multi-CPU support in VLC.

Knowledge prerequisite:

C, Lua

Skill level:

Medium

Mentor:

Alexandre Skyrme



Multi-CPU usage in wireshark

Brief explanation:

The wireshark network protocol analyser allows programmers to use Lua to write dissectors, post-dissectors and taps. Dissectors are protocol analysers, while post-dissectors are executed after all others dissectors, and taps are used to collect information after packet dissection. Protocol dissection can involve time constraints, and it would be nice to benefit from multi-CPU processing power in dissector script. The purpose of this project is to include support for multi-CPU usage in wireshark, using luaproc, a library that allows programmers to create multiple independent execution flows of Lua code that can run inparallel, communicating only via message-passing.

Expected results:

We expect the support for Multi-CPU usage in wireshark.

Knowledge prerequisite:

C, Lua

Skill level:

Medium

Mentor:

Alexandre Skyrme



Add support for left recursion to LPeg

Brief explanation

Parsing Expression Grammars (PEGs) are an expressive formalism for designing and implementing top-down parsers with local backtracking. A frequently missed feature of PEGs is left recursion, which is commonly used in Context-Free Grammars (CFGs) to encode left-associative operations.

There is a formal extension to the PEGs formalism that allows the use of left-recursive rules in a PEG grammar and that was implemented by some PEG-based tools, such as LPegLJ and IronMeta.

The aim of this project is to create a fork of LPeg, an implementation of PEGs for Lua based on a virtual parsing machine.

Knowledge prerequisites

C, Lua and Parsing Expression Grammars

Skill level

Hard

Mentor

Sérgio Medeiros



Develop a binary serialization format with support for dynamically types values and an RPC protocol for dynamically typed invocations based on this format.

Brief explanation

Most RMI protocols available today are either focused on inefficient representation formats for typing information (e.g. GIOP/IIOP (CORBA), Hessian, Google Protocol Buffers) or on invocations where the typing information are predefined and static, therefore are absent on the data sent through the wire (e.g. SOAP, JSON, Burlap).

Few protocols are designed to work efficiently with typed data. Invocations with typed data work well with the RPC model because it allows the identification of deployment problems (mismatch interfaces) and facilitate the dynamic evolution of distributed systems. A protocol for dynamically typed RPC should be based on a efficient serialization format for typed data, that is, information about how the data should be interpreted.

The goal of this project is to design and implement a serialization binary serialization format with the following requirements:

Expected results

Knowledge prerequisites

Skill level

Hard

Mentor

Renato Maia



Develop a library for Lua that allows Lua programs to access features provided by the platform's underlying operating system (OS) kernel, such as process control, network access, file system, event notification, etc.

Brief explanation

Standard Lua distribution is based mostly on standard ANSI C libraries only. Therefore, many functionalities provided by modern platforms (like process control, file system operations, network communication, kernel event notification, etc.) are only available through third-party libraries that are developed independently and might not integrate.

The project has three main goals:

A prototype for the proposed library is available here.

Expected results

A set of Lua libraries implemented at least in one major operating system platform. The library shall provide support for:

The implementation shall also be flexible enough to facilitate the portability for other platforms.

Knowledge prerequisites

Skill level

Hard

Mentor

Renato Maia



Port an SDL-based C++ open source game to Céu

About Céu

Céu is a programming language that targets system-level development of reactive systems.

For a little introduction about the language, please watch the video in our front page:
http://ceu-lang.org/

Céu appeared last year on "StrangeLoop" and the "Future Programming Workshop":
http://www.future-programming.org/program.html

Brief explanation

Port to Céu an existing C++ open source game of considerable size (30-50k lines of code).

Here are some possible projects to look for:

Expected results

Knowledge prerequisites

(Previous experience with Céu is of course not required.)

Linux, Mac or Windows?

The current distribution of Céu is only available for Linux.
A student using another operating system is also welcome, as long as she/he has the skills to build the development environment by her/himself.
The compiler of Céu depends on gcc, lua-5.1, and lua-lpeg.

Recommendations

Last year LabLua had over 15 submissions for only 4 slots.
(Note that we will only know the number of slots for this year after the students submit the proposals.)

It is highly recommended that the student installs Céu, compiles some examples, possibly making something very simple from scratch (or changing some existing example).
For us, this is important to see if the student will be able to keep track of the project.
For the student, this initial experience is important to ensure that the expectations with the project match the reality.

If the student has participated in other open source projects, it is also recommended that she/he tell us about that experience

Skill level

Medium

Mentor

Francisco Sant'Anna