Ideas List - Google Summer of Code 2016



Update 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-lua is a Lua library that allows Lua applications to easily comunicate with Elasticsearch clusters.

Currently, elasticsearch-lua is built on top of Elasticsearch 1.7 but does not implement all possible Elasticsearch features. Moreover, Elasticsearch is already in version 2.2 and many new features are available.

This project aims to implement the missing features from 1.7 and also add the new features from Elasticsearch 2.2.

Expected results

An updated Lua client to access the Elasticsearch REST API compatible with the latest version (currently 2.2).

Knowledge prerequisites

Skill level

Medium

Mentor

Pablo Musa



Elasticsearch and Sailor

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-lua is a Lua library that allows Lua applications to easily communicate with Elasticsearch clusters.

Sailor is a web framework in the Lua programming language. Like Lua, it is open sourced under the MIT License, which is extremely permissive. Sailor applications are structured in a model-view-controller (MVC) architecture.

This project aims the development of a search module that integrates elasticsearch-lua into Sailor.

Expected results

A search functionality that is easy to use and integrate to a website using Sailor. Internally, a new form.search method in the form module that exposes a search text input and a search model similar to the current database one.

Knowledge prerequisites

Skill level

Easy/Medium

Mentor

Pablo Musa



Improve elasticsearch-lua tests and build

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-lua is a Lua library that allows Lua applications to easily comunicate with Elasticsearch clusters.

Currently, elasticsearch-lua has small build automation, only 19 library tests and no code coverage.

This project aims to implement more robust build automation.

Expected results

An integration for code coverage, automated build tests (already working) and a large set of tests that cover most part of the code.

Knowledge prerequisites

Skill level

Easy

Mentor

Pablo Musa



Enhancements to LibScript, a cross-language scripting library

Brief explanation

LibScript is a library for cross-language scripting: it allows code written in one scripting language to call function written in a different language, and allows C programs to support various scripting languages via a single interface. LibScript currently supports Python, Ruby, Lua and Perl, and it only supports passing simple values as arguments (strings, numbers, booleans).

This project has two goals:

Expected results

Knowledge prerequisites

Skill level

Medium/advanced

Mentor

Hisham Muhammad



Next Generation of the LuaRocks test suite

Brief explanation

LuaRocks is the package manager for Lua modules. It has a test suite with about 80% coverage. However, the test suite is implemented as a big shell script that only does black-box testing: it calls luarocks as an external application. Further, it only checks for success and failure of the process, and not if it executed the expected actions, and it runs only on Linux.

The idea of this project is to port the test suite to Lua, using Busted. This will allow us to extend the test suite by writing smarter tests that check its behavior, write white-box tests of the internals, and also port the test suite to other platforms.

Expected results

Knowledge prerequisites

Skill level

Easy/Medium

Mentor

Hisham Muhammad



Implement core Typed Lua in Haskell

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.

The aim of this project is to implement core Typed Lua in Haskell, as a tool to test new features and reason about new typing rules for Typed Lua. Core Typed Lua limits control flow to if and while statements; it has explicit type annotations, explicit scope for variables, explicit method declarations, and explicit method calls.

Expected results

Knowledge prerequisites

Skill level

Advanced

Mentor

André Murbach Maidl



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

Brief explanation

Céu is a programming language that targets system-level development of reactive systems. The language is under development at the LabLua since 2011. For a little introduction about Céu, please watch the video in our front page. Céu appeared in Future Programming and Curry-On workshops.

Currently, the online tutorial of Céu executes a simulation at the server side:

http://ceu-lang.org/try.php

The tutorial works as follows:

  1. User reads about a new concept (`top/left` of the page).
  2. User reads an accompanying example (`top/right`) with an input (`bottom/right`).
  3. User clicks "Run" (`top/right`)
    1. Code is sent to the server.
    2. Server compiles and executes the code with the provided input.
    3. User gets an output (`bottom/left`).
  4. User changes the code and input to experiment with it (going to step 3).
  5. User advances in the tutorial.

The server-side approach does not provide a reactive and real-time experience, which are the ultimate objectives of the language. We want the online tutorial to offer a more interactive experience for learners of Céu. The client-side tutorial would work as follows:

  1. User reads about a new concept (`top/left` of the page).
  2. User sees an example (`top/right`) with an input (`bottom/right`).
  3. User clicks "Run" (`top/right`):
    1. Code is sent to the server.
    2. Server compiles the code with the provided input to Javascript and returns it to the client.
    3. User gets an output (`bottom/left`) interacts with the program in real time.
  4. User changes the code and input to experiment with it (going to step 3).
  5. User advances in the tutorial.

Tools

SDL is a C-based and cross-platform development library that provides access to audio, keyboard, mouse, joystick, and graphics hardware. Given that Céu interacts well with C, combining Céu and SDL is a viable option for building a visually-appealing interactive tutorial. Emscripten is an LLVM-to-JavaScript compiler. SDL has already been ported to Emscripten.

Putting it all together, we can build an interactive tutorial for Céu that runs in the browser at the client side.

The bulk of the project is to implement this synergy between C, Céu, SDL, and Emscripten. However, the project also involves other tools: Linux, Git, HTML and PHP.

Expected results

As an ultimate goal, we would like to build an incremental tutorial based on this video.

Prerequisites

We expect the applicants to know C well and to develop minimum familiarity with the important tools before the project kicks off.

For this reason, we will ask the applicants to perform two activities *before* the application period:

  1. Create a repository on *Github* and write a simple "Hello World" page using Emscripten and SDL.
  2. Install Céu and compile some existing SDL examples (without Emscripten).

Both activities should be simple, i.e., nothing more than following tutorials on the web.

How to apply

Skill level

Medium

Mentor

Francisco Sant'Anna



Develop I/O API for NetBSD Kernel Lua

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 develop kernel Lua libraries to provide I/O functionality to kernel scripts. This API should provide access both for file system and network. It should be implemented as NetBSD loadable kernel modules binding the kernel internal implementation for files and sockets user-level API.

Expected results

Knowledge prerequisites

C, Lua, OS (and some courage :) )

Skill level

Advanced

Mentor

Lourival Vieira Neto



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 simplify 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 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



Improving the Quality of Error Messages in PEG Parsers

Brief explanation

Parsing Expression Grammars (PEGs) are an expressive formalism for designing and implementing top-down parsers with local backtracking. An issue that users of PEG-based parsers face is poor reporting of syntax errors on the part of PEG-based parsers. Labeled failures are an extension to PEGs that aims to address this issue by annotating a PEG with labels corresponding to syntax errors, improving the quality of error messages generated by a PEG-based parser.

LPegLabel is an extension of the LPeg tool that provides an implementation of PEGs with labeled failures. Labels can be used to signal different kinds of errors and to specify which alternative in a labeled ordered choice should handle a given label.

The goal of this project is to rewrite the parsers of some Lua libraries, such as the module re from LPeg and lua-parser, by using LPegLabel. After this rewriting we should get parsers with better error messages.

Tools

Expected results

A marginal result would be the improvement of the LPegLabel tool based on the difficulties found during the project.

Prerequisites

We expect the applicants to know parsing well and to develop familiarity with LPeg and LPegLabel before the project starts.

For this reason, we may ask the applicants to perform some activities before the application period.

How to apply

Skill level

Medium

Mentor

Sérgio Medeiros



Assembler and Disassembler for Lua 5.3

Brief explanation

Lua is a dynamically typed programming language that runs by interpreting bytecode for a register-based machine. More precisely, Lua programs are interpreted indirectly from source code, that is, they are compiled to bytecode and then executed by the Lua Virtual Machine. This process is done during code execution and it is transparent to final users.

The aim of this project is to create a disassembler and an assembler for Lua 5.3. The disassembler should generate assembly code from either Lua code or bytecode, while the the assembler ought to generate Lua bytecode from assembly code. The assembly syntax should be expressive enough to encode all the instructions that are available at Lua VM.

Expected results

Knowledge prerequisites

Skill level

Easy

Mentor

André Murbach Maidl



Add class-based object-oriented programming to Typed Lua

Brief explanation

Typed Lua is a strict superset of Lua that provides optional type annotations, and compile-time type checking. More precisely, Typed Lua is implemented as a programming language that extends Lua syntax to add optional type annotations. The compiler uses static types to perform compile-time type checking, but also allows Lua code to coexist with Typed Lua code, and generate Lua code that runs in unmodified Lua implementations.

Expected results

Typed Lua intended use is as an application language, and we view that policies for organizing a program in modules and writing object-oriented programs should be part of the language and enforced by its optional type system. An application language is a programming language that helps programmers develop applications from scratch until these applications evolve to complex systems rather than just scripts. This project aims to add class-based object-oriented programming to Typed Lua through the definition of classes and interfaces, as a way to help Lua programmers better structure their code. The backend code generator should be a plugin, so the programmers can choose which OO style or library they want to use.

Knowledge prerequisites

Lua, Object-Oriented Programming, and Type Systems

Skill level

Hard

Mentor

Fabio Mascarenhas



Improve the HTTPS module of LuaSec

Brief explanation

LuaSec's HTTPS module was built on top of LuaSocket's HTTP and presents some problems due to limited integration.

The aim of this project is to improve HTTPS module, fixing the issues and adding some new features.

Expected results

Knowledge prerequisites

Skill level

Easy / Medium

Mentor

Bruno Silvestre