nim-wiki/GSoC-2014-Ideas.md

284 lines
13 KiB
Markdown
Raw Normal View History

2014-02-10 20:48:10 +00:00
# Introduction
2014-02-11 21:02:54 +00:00
Below is a list of project ideas for [GSoC](https://www.google-melange.com/gsoc/homepage/google/gsoc2014) 2014. All these projects require familiarity with the Nimrod programming, or at minimum, experience with similar programming languages such as C, C#, Java, Python, etc.
2014-02-10 20:48:10 +00:00
2014-02-13 00:26:36 +00:00
We encourage you to join the #nimrod IRC channel on Freenode to discuss these projects with the community and our mentors. You may also join our [Forum](http://forum.nimrod-lang.org) to ask questions there.
The following list of projects are just some ideas that the community and the developers have come up with. You will be contributing to a programming language so there is a lot of flexibility when it comes to the projects that you can work on, this list is certainly not comprehensive so we are happy to hear any suggestions that you may have.
2014-02-11 19:57:35 +00:00
2014-02-10 20:48:10 +00:00
# Projects
## Nimrod Compiler
#### Add support for full coroutines
2014-02-12 23:43:10 +00:00
2014-02-13 00:00:20 +00:00
**Desirable skills:** Knowledge of coroutines
2014-02-12 23:59:19 +00:00
2014-02-12 23:43:10 +00:00
**Description:**
2014-02-12 23:54:35 +00:00
Many programming languages, in particular Lua, offer coroutines as a way to provide light-weight collaborative tasking. Nimrod supports "closure iterators" which are comparable to Python's generators to accomplish the same. However closure iterators are much more limited as they cannot capture the call stack completely. The best example to see the limitations of Nimrod's current way is that iterators cannot be recursive.
2014-02-12 23:43:10 +00:00
Here is a sketch of a possible implementation, but there are lots of other possibilities to implement full coroutines for Nimrod:
* Implement the necessary stack switching via inline assembler.
* The GC needs to support conservative marking of multiple stacks.
2014-02-10 23:00:20 +00:00
* In particular the write barrier in the GC which does the 'isOnStack' check needs to be changed.
* Using a bloom filter for quick testing whether an address belongs to some stack is likely to pay off.
* Creating a coroutine needs to register a new stack to the GC.
* Deleting a coroutine needs to unregister the stack to the GC.
* Builtin 'yld' must save the current stack pointer so that the GC knows which part of the stack is really in use.
2014-02-11 21:57:35 +00:00
**Difficulty:** Hard
2014-02-11 21:42:57 +00:00
**Mentor:** Araq ([@Araq](http://github.com/Araq))
2014-02-12 01:24:30 +00:00
___
#### Add a code generator for OpenCL
2014-02-12 23:57:41 +00:00
**Desirable skills:** Good OpenCL knowledge, knowledge of the compiler internals, basics of type theory.
2014-02-13 00:03:04 +00:00
**Description:**
Nimrod currently supports C, C++, Objective C and JavaScript code generation. However to run efficiently on GPUs an OpenCL backend is required. The easy way to do this is to copy OpenCL's low level mode of operation with its different ``private``, ``local``, ``global`` storage and simply provide a nimrodic syntax for OpenCL. So apart from syntactic sugar users get all of Nimrod's meta programming advantages plus good integration into Nimrod's infrastructure.
2014-02-11 21:57:35 +00:00
**Difficulty:** Hard
**Mentor:** Araq ([@Araq](http://github.com/Araq))
2014-02-12 10:52:43 +00:00
___
#### Make Nimrod a viable research platform for Garbage Collection algorithms
2014-02-12 23:57:41 +00:00
**Desirable skills:** Familiarity with the various GC approaches and algorithms, knowledge of the compiler codegen modules.
2014-02-12 10:52:43 +00:00
2014-02-12 10:54:57 +00:00
Most of the popular garbage collected languages of today require a separately distributed run-time environment, providing only a predetermined set of garbage collection algorithms. This leaves little room for experimentation with various approaches and condemns GC researchers to develop and test their algorithms on specialized platforms such as the [Jikes RVM](http://jikesrvm.org/) that have limited practical significance.
2014-02-12 10:52:43 +00:00
In contrast, in Nimrod, the garbage collection algorithm is chosen at compile-time and embedded in the resulting stand-alone native executable. This enables the users to pick a GC algorithm that's most suitable to their project and allows for a proliferation of GC algorithms, developed by independent groups and individuals, without requiring any modifications to be made to the standard Nimrod distribution.
2014-02-12 10:56:04 +00:00
The Nimrod code generator and type system can provide various GC roots marking strategies, various kinds of write/read barriers and all necessary static type information (e.g. static cycle analysis) and a GC implementation will consist only of a single Nimrod module (supplied as a command-line parameter) that
2014-02-12 10:52:43 +00:00
provides configuration for the code generator and implements the logic of the garbage collection algorithm. This module will be compiled as C code with the rest of the program and it could be easily debugged using standard C/C++ debugging and profiling tools.
2014-02-12 10:56:46 +00:00
**Tasks:**
2014-02-12 10:52:43 +00:00
* Add support for precise stack marking
* Add support for read barriers and polish the support for Levanoni/Petrank style of write barriers
* Implement the infrastructure for picking a user-supplied GC module
**Bonus points:** Implement simple forms of variety of GC algorithms as a proof-of-concept
**Difficulty:** Medium to Hard
**Mentor:** zahary ([@zah](http://github.com/zah))
2014-02-10 23:03:46 +00:00
2014-02-12 01:24:30 +00:00
___
#### Fix/Expand Nimrod's "Compiler as a Service" features
2014-02-12 23:57:41 +00:00
**Desirable skills:** Command line argument parsing, good knowledge of compiler internals and theory.
2014-02-11 21:13:34 +00:00
2014-02-11 21:12:54 +00:00
**Description:**
2014-02-11 02:15:15 +00:00
* Fix https://github.com/Araq/Nimrod/issues/804, which makes `idetools` unusable.
2014-02-11 21:09:18 +00:00
* Provide commands to execute macros. Allow IDEs to quickly get the code macros generate with different inputs.
* Allow the compiler to either track more than one project at a time, or not track any project at all.
2014-02-10 23:03:46 +00:00
2014-02-11 21:10:07 +00:00
**Bonus points:** Implement "Compiler as a Service" support to major IDEs/text editors such as Light Table, Sublime Text, or Visual Studio.
2014-02-11 21:09:18 +00:00
2014-02-12 10:52:43 +00:00
**Difficulty:** Medium to Hard
2014-02-11 21:57:35 +00:00
2014-02-11 21:42:57 +00:00
**Mentor:** zahary ([@zah](http://github.com/zah))
2014-02-12 01:24:30 +00:00
___
#### Allow bootstrap-time integration of the Nimrod executable with the standard library
2014-02-12 23:57:41 +00:00
**Desirable skills:** Knowledge of file system api's, knowledge of compiler internals and theory.
2014-02-11 21:13:34 +00:00
2014-02-11 21:12:54 +00:00
**Description**:
2014-02-11 21:14:43 +00:00
* Allow the nimrod bootstrap process to integrate the nimrod standard library source code and other associated resources into the nimrod binary, to be used by the nimrod binary when compiling source code. The included library modules should be overridable, either by a switch passed to the nimrod executable, or by placing an actual library file in a pre-determined path.
2014-02-10 23:03:46 +00:00
2014-02-12 10:52:43 +00:00
**Difficulty:** Medium
2014-02-11 21:57:35 +00:00
2014-02-11 21:48:55 +00:00
**Mentor:** zahary ([@zah](http://github.com/zah))
2014-02-10 20:48:10 +00:00
2014-02-12 01:24:30 +00:00
2014-02-10 20:48:10 +00:00
## Standard Library
2014-02-11 21:20:03 +00:00
#### Implement a YAML parser library
2014-02-12 23:57:41 +00:00
**Desirable skills:** Ability to write efficient parsers.
2014-02-11 21:20:03 +00:00
**Description**:
The Nimrod standard library currently lacks a YAML parsing module. This task requires you to read the YAML specification and to create a module which will be able to parse YAML data into an AST. Subsequently the parser can be used to create a high-level API to access the data.
2014-02-11 21:57:35 +00:00
**Difficulty:** Medium
2014-02-12 16:32:32 +00:00
**Mentor:** Araq ([@Araq](http://github.com/Araq)), dom96 ([@dom96](http://github.com/dom96))
2014-02-11 18:50:07 +00:00
2014-02-12 01:24:30 +00:00
___
#### Enhance the filesystem monitoring module "fsmonitor.nim"
2014-02-12 23:57:41 +00:00
**Desirable skills:** Knowledge of the Microsoft Windows api.
2014-02-11 21:13:34 +00:00
2014-02-11 21:12:54 +00:00
**Description**:
2014-02-11 18:50:07 +00:00
* Allow the fsmonitor module to work on Microsoft Windows by using native api's to gather information about changes in monitored files and directories.
* Revise the fsmonitor module api to decouple Unix/Linux file handle paradigms (such as using the poll method in in the sockets module) from the api, allowing easier implementations of multiple native backends.
2014-02-10 22:35:56 +00:00
* Integrate the fsmonitor module's polling mechanism into the new asynchronous io modules.
2014-02-10 22:25:41 +00:00
2014-02-11 21:57:35 +00:00
**Difficulty:** Easy
2014-02-11 21:48:55 +00:00
**Mentor:** dom96 ([@dom96](http://github.com/dom96))
2014-02-12 01:24:30 +00:00
___
#### Add a cross-platform stat()-like procedure to the operating system module "os.nim"
2014-02-12 23:57:41 +00:00
**Desirable skills:** Knowledge of file system api's for Linux, MacOSX, or Microsoft Windows.
2014-02-11 21:13:34 +00:00
2014-02-11 21:12:54 +00:00
**Description:**
2014-02-11 21:57:35 +00:00
* Implement a procedure which uses native stat-like calls on Linux, Mac, Windows, and other operating systems to gather detailed information about specific file system objects. Allow the bypassing of symlinks
and hardlinks, where possible.
**Difficulty:** Easy
2014-02-10 22:35:56 +00:00
2014-02-11 21:49:58 +00:00
**Mentor:** dom96 ([@dom96](http://github.com/dom96))
2014-02-12 01:24:30 +00:00
___
#### Enhance and expand standard library documentation
2014-02-12 23:57:41 +00:00
**Desirable skills:** Basic writing and documentation skills, web design and infrastructure setup.
2014-02-11 21:13:34 +00:00
2014-02-11 21:12:54 +00:00
**Description**:
* Ensure that documentation exists for all public methods and modules.
* Create and design new CSS and HTML layouts for the documentation, to better fit with the main website.
* Add search capabilities to the online documentation.
2014-02-12 16:08:36 +00:00
* Add code examples to all modules and to a procedures (where appropriate).
2014-02-11 18:50:07 +00:00
2014-02-11 21:57:35 +00:00
**Difficulty:** Medium
2014-02-12 16:36:48 +00:00
**Mentor:** zahary ([@zah](http://github.com/zah))
2014-02-11 21:48:55 +00:00
2014-02-12 01:24:30 +00:00
___
2014-02-12 16:32:32 +00:00
#### Add documentation to the Nimrod compiler internals
2014-02-12 23:57:41 +00:00
**Desirable skills:** Basic writing and documentation skills.
2014-02-11 21:13:34 +00:00
2014-02-11 21:12:54 +00:00
**Description:**
2014-02-12 16:32:32 +00:00
* Add comments to the compiler internals, documenting the various mechanisms and mechanics the compiler uses to analyze and transform nimrod code to the code of the specified backend.
2014-02-10 23:04:29 +00:00
2014-02-11 21:57:35 +00:00
**Difficulty:** Medium
2014-02-12 16:32:32 +00:00
**Mentor:** Araq ([@Araq](http://github.com/Araq)), zahary ([@zah](http://github.com/zah))
2014-02-11 21:42:57 +00:00
2014-02-12 01:24:30 +00:00
___
#### Improve times module
2014-02-12 23:57:41 +00:00
**Desirable skills:** Knowledge of date time representations, native time api's.
2014-02-11 21:13:34 +00:00
2014-02-11 21:12:54 +00:00
**Description**:
2014-02-11 00:18:18 +00:00
* Fix limitations to do with time intervals, specifically subtracting a TTimeInterval from a TTimeInfo.
* Provide a ``$`` for TTimeInterval. Goal is to be able to get timing info like "5 minutes ago".
2014-02-11 21:57:35 +00:00
**Difficulty:** Easy
2014-02-11 21:48:55 +00:00
**Mentor:** dom96 ([@dom96](http://github.com/dom96))
2014-02-12 01:24:30 +00:00
___
#### Add an implementation of the ISAAC psuedorandom number generator
2014-02-12 23:57:41 +00:00
**Desirable skills:** Pseudo-Random number generation theory, C programming.
2014-02-11 21:13:34 +00:00
2014-02-11 21:12:54 +00:00
**Description:**
* Create a pure-nimrod implementation of the [[ISAAC Random Number Generator|http://burtleburtle.net/bob/rand/isaacafa.html]] .
2014-02-11 21:57:35 +00:00
**Difficulty:** Medium
2014-02-12 16:36:48 +00:00
**Mentor:** Araq ([@Araq](http://github.com/Araq))
2014-02-11 21:48:55 +00:00
2014-02-12 01:24:30 +00:00
___
#### Wrap and test the Qt framework
2014-02-12 23:57:41 +00:00
**Desirable skills:** Knowledge of C++. Experience with the Qt framework is desirable.
2014-02-11 18:16:09 +00:00
2014-02-11 21:29:02 +00:00
**Description**:
* Wrap the [Qt framework](http://qt-project.org/) with the help of the c2nim tool, or otherwise.
* Write tests which use the wrapper.
**Bonus points:** Write high-level bindings which provide an idiomatic Nimrod API on top of the wrapper.
2014-02-11 21:57:35 +00:00
**Difficulty:** Medium
2014-02-12 16:36:48 +00:00
**Mentor:** Araq ([@Araq](http://github.com/Araq)), zahary ([@zah](http://github.com/zah))
2014-02-12 01:24:30 +00:00
___
2014-02-11 21:29:02 +00:00
#### Wrap and test GTK3
2014-02-12 23:57:41 +00:00
**Desirable skills:** Knowledge of C. Experience with the GTK+ is desirable.
2014-02-11 21:29:02 +00:00
**Description**:
* Wrap GTK3 with the help of the c2nim tool, or otherwise.
* Write tests which use the wrapper.
**Bonus Points:** Write high-level bindings which provide an idiomatic Nimrod API on top of the wrapper.
2014-02-11 00:19:05 +00:00
2014-02-11 21:57:35 +00:00
**Difficulty:** Medium
2014-02-12 16:32:32 +00:00
**Mentor:** dom96 ([@dom96](http://github.com/dom96)), Araq ([@Araq](http://github.com/Araq))
2014-02-11 21:48:55 +00:00
2014-02-10 22:10:31 +00:00
## Tools & Infrastructure
2014-02-12 16:32:32 +00:00
#### Nimbuild
2014-02-12 23:57:41 +00:00
**Desirable skills**: JSON parsing, modular program construction, inter-process communication.
2014-02-11 21:13:34 +00:00
2014-02-11 21:12:54 +00:00
**Description**:
2014-02-12 16:32:32 +00:00
* Reduce the number of assumptions the Nimrod builder makes about its host system, in order to reduce configuration restrictions. Assumptions include location and usage of external tools, such as git.
* Implement benchmark tests in the builder and generate graphs showing the time taken to perform those benchmarks on the Nimbuild site. This can include bootstrap times, and test times too.
* Generate images showing the status of the build to be shown in Nimrod's Github repo and/or Nimrod's website.
* Improve the download tables on Nimbuild's homepage and generate embeddable download tables for the Nimrod website.
2014-02-10 22:49:58 +00:00
2014-02-11 21:57:35 +00:00
**Difficulty:** Medium
2014-02-11 21:48:55 +00:00
**Mentor:** dom96 ([@dom96](http://github.com/dom96))
2014-02-12 23:14:06 +00:00
___
2014-02-12 16:32:32 +00:00
#### Babel
2014-02-12 23:57:41 +00:00
**Desirable skills**: Knowledge of Git and other version control systems.
2014-02-12 16:32:32 +00:00
**Description**:
Babel is the Nimrod package manager. It is currently very basic and some important features are still missing. Babel packages are stored in user-controlled repositories with support for Git and Mercurial currently present.
**Possible tasks:**
* Add support for other VCS' alongside Git and Mercurial.
* Create a website which tracks packages similar to hackage, npm, the [DUB registry](http://code.dlang.org/) etc.
* Add support for the removal of packages.
* Automate the package submission process.
* Expand the babel tester to test more dependency scenarios.
2014-02-12 19:17:07 +00:00
**Difficulty:** Medium
2014-02-12 16:32:32 +00:00
**Mentor:** dom96 ([@dom96](http://github.com/dom96))
2014-02-12 01:24:30 +00:00
___
#### Implement re2nim, a lexer generator for nimrod
2014-02-12 23:43:10 +00:00
**Description:**
2014-02-10 22:49:58 +00:00
* Model it after re2c or the Ragel state machine generator
2014-02-12 23:13:06 +00:00
* Alternatively model it after Flex.
2014-02-10 22:49:58 +00:00
2014-02-12 23:57:41 +00:00
**Desirable skills**: Knowledge of lexer generators. How to translate regexes into DFAs and how to optimize the resulting automatons.
2014-02-12 23:13:06 +00:00
**Difficulty:** Medium to Hard
**Mentor:** zahary ([@zah](http://github.com/zah))
2014-02-12 01:24:30 +00:00
___
#### Implement a Nimrod backend for the Ragel state machine generator
2014-02-12 23:43:10 +00:00
**Description:**
* Ragel is a widely used state machine generator which supports C, C++ etc. But not Nimrod. So let's change that.
2014-02-10 22:49:58 +00:00
* http://www.complang.org/ragel/
2014-02-12 23:13:06 +00:00
2014-02-12 23:57:41 +00:00
**Desirable skills**: Knowledge of Ragel's internals.
2014-02-12 23:13:06 +00:00
**Difficulty:** Medium
2014-02-13 00:12:27 +00:00
**Mentor:** zahary ([@zah](http://github.com/zah))
# Template
2014-02-13 00:26:36 +00:00
The following is a rough template that each proposal shall use.
2014-02-13 00:12:27 +00:00
#### Short description
**Desirable skills:** list of desirable skills
**Description:**
Description of the tasks involved.
**Difficulty:** Easy/Medium/Hard
**Mentor:** Potential mentor(s)
___