Google Summer of Code 2018

This is work in progress for the upcoming GSoC 2018

Google Summer of Code 2018

Eta has been accepted for GSoC 2018 to work with students and help them work on interesting projects to make the Eta ecosystem better. We have provided a list of project ideas on this page to provide some inspiration for students to come up with their own ideas or use the existing ones.

Students are expected to go through the ideas and be able to analyze the idea and be able to explain all the different parts of the codebase that must be modified in order to implement the idea.

Note: Students can submit one or more proposals. But only one will be selected.

Ideas List

Performance Dashboard

On every commit to the master branch of the Eta repository, benchmarks are run to see how each change to the compiler is affecting the performance of compiled programs. The goal of this project is to generate a simple web application that allows you to travel through time and compare performance of various benchmarks.

Performance Dashboard
Resources
Mentors

Better Type Error Messages

The error messages produced by Eta can be a bit hard to read and figure out if one is not familiar with how the typechecking process works in the compiler. What we would like is for type error messages to directly give users suggestions on what the most probable mistake was in their code. This will yield a significant boost in developer productivity and make it easier for beginners to troubleshoot type errors. The goal of this project is to re-structure the typechecker in the Eta compiler to support the new error reporting mechanism mentioned above and design a heuristic for generating good suggestions to the user.

Type Error Messages

Eta on Android

The bytecode generated by Eta is compatible with Java 7 so using Eta on Android should be possible. Currently, working with Eta on Android requires a lot of manual steps and requires coordination among different build tools. This project aims to make it easy to do Android development in Eta. This project consists of the following components:

Eta on Android
Gradle Plugin Support
Framework
Resources
Mentors

Gradle Plugin Support

The existing Eta Gradle Plugin should be extended to support the Android development workflow and packaging code into an APK.

High Performance Web Server with Fibers

Eta has experimental support for Fibers, a lightweight threading mechanism that lets the developer have control over when to yield the thread. A good test of their effectiveness is to write a non-trivial application - a web server.

Web Server with Fibers
Haskell Warp Re-Implementation
Resources
Mentors

Haskell Warp Reimplementation

Haskell already has a web server implementation called warp. The goal of this project is to re-implement Warp using Fibers. It requires that the student first implement non-blocking I/O support for Fibers and then proceed to the web server implementation.

Reproducible Builds

Given the same source files, Eta does not produce the same classfiles every time those source files are provided as input. Internally, the compiler assigns a unique integer to every program entity and that integer can change every time you build your program due to various source of non-determinism. Thus, the hash of the output classfiles will change across rebuilds of the same source files, which can mean that it can cause re-builds to be inefficient in systems like Bazel.

Reproducible Builds
Non-determinism
Resources
Mentors

Non-determism

The goal of this project is to investigate all the source of non-determinism. A lot of this work has already been done in GHC 8, so it boils down to analyzing those changes individually and incorporating them into the Eta codebase without changing the existing compilation behavior.

Invoke Dynamic Support

Eta produces classfiles that are Java 7 compatible so that we leave open the option of running on Android in the future. At the same time, the newer JVM versions have incorporated support for a new bytecode instruction called invokedynamic that effectively allows you to define custom method dispatch behavior while allowing the JVM's Just-In Time compiler (JIT) to optimize it as it normally would.

Invoke Dynamic
Benefits of Invoke Dynamic
Resources
Mentors

Benefits of Invoke Dynamic

  • Fast implementation of PAPs (partial application or curried functions).
  • Improve performance of lazy evaluation by optimizing out volatile reads on thunks.
  • Reduce generated code size by deferring code generation of thunks and closures to runtime.

Vert.x Support

Vert.x is a popular framework for building asynchronous/reactive applications on the JVM. Integration to this library will provide access to a whole host of asynchronous libraries in the Vert.x ecosystem. The goal of this project is to adapt Eta's Fibers (see above) to support fibered, non-blocking API bindings to Vert.x libraries.

Vertx Support

Purity & Nullability Analysis

When binding to Java libraries using Eta's Foreign Function Interface (FFI) mechanism, the user needs to know the Java library well enough to decide whether the object in question is pure or impure (requires a pure or monadic return type) and to decide whether to wrap the return type in a Maybe, indicating that the result may be null. If the user fails to do either of these correctly, and doesn't go with the worst-case option of making the return type monadic and wrapped in a Maybe, strange bugs can ensue.

The goal of this project is to develop a tool that can take a Java library as input and classify each method and field's purity and nullability, so that we can feed that data into an FFI generator to automate highly precise bindings for Java libraries.

Purity and Nullability
Resources
Mentors

Application Process

Read the student guide of GSoC. The application process is as follows:

  1. Pick some ideas from the Ideas List that interested you or think of your own.
  2. Join the Google Group and start discussions about the ideas from (1) and solicit feedback from the community.
  3. Contribute at least one code patch to any of the Eta repositories. Check the issues labelled with help-wanted and low-hanging-fruit to start with easy issues.
  4. Develop your application according to the template below. Put it in a shareable location like Google Docs or GitHub Gist and share your application for early review.
  5. Be sure to submit your application atleast a day before the deadline [March 27, 2018 at 1600 hours UTC].

Application Template

  1. Contact Information: Name, email address, github username, address.
  2. What do you like about functional programming? What do you dislike about functional programming?
  3. Educational background: Degree plan, school, major, research area, publications etc.
  4. Mention links to all successfully merged pull requests to Eta-related open-source projects and also any other open-source projects.
  5. What are your plans for the summer outside of GSoC? Mention vacations, classes, and internships.
  6. Propose the project you would like to work on for the summer.
    • Must include a timeline with specific milestones (preferably weekly/biweekly)
    • Mention the resources you will be using including libraries, frameworks, and algorithms.
    • Mention which aspects of the project you will figure out on the go.
  7. If you are unable to reach your milestone for a given week, how will you handle the backlog to ensure that you finish the project for the summer?
  8. How do you handle burn-out?
  9. (Optional) Provide contact information for any people who understand the coding side of you.
  10. (Optional) We believe in diversity and we would like to encourage more women to participate in open-source projects. How do you propose we accomplish this?

Quick links to students

We’ve curated resources to help you get started faster with Eta depending on your needs.

Cheatsheet

Eta Cheatsheets

A quick reference for Eta.

Learn More
Tour of Eta

Tour of Eta

Learn functional programming the easy way.

Learn More
Java Interop

Interacting with Java

Learn how Eta handles different Java elements.

Learn More
Getting Started

Getting started with Eta

Read up Eta's background, installation process.

Learn More