Fetching the latest programs, projects, and workspace data.

We do functional programming together
Showing 5 of 6 projects. Click any project card for scope, mentors, and proposal studio.
Mentors: Student: Mariusz Jakoniuk
The recent efforts of the `scala-wasm` project have made it possible for Scala to use the WebAssembly Component Model binary format as a compilation target. Although, the implementation has not yet been finished, it is already possible for developers to run Scala code on Wasm runtimes. In order for the Scala language to succeed in the Wasm ecosystem, core libraries which rely on platform APIs must be ported to the Wasm/WASI platform. The goal of this project is to prototype porting the core parts of the Cats Effect and FS2 libraries to the Wasm/WASI platform. The CE runtime prototype will be single-threaded and based around `wasi:io/poll`. The end result is expected to be similar to the (now-replaced) single-threaded LLVM runtime which used a `libuv`-style event-loop. The FS2 porting effort is going to focus on `fs2-core` and the `network` and `file` APIs from `fs2-io`. As a part of this project, a standalone reimplementation of java.nio.file API will be developed as a separate library. Planned Deliverables: 1. A working prototype of Cats Effect's single-threaded runtime compiling and running on Wasm/WASI free of glue JavaScript code. This prototype will serve as a basis for an upstream implementation. 2. Prototype port of the core FS2 module and the fs2.io.file and io.network APIs. 3. A standalone library reimplementation of JDK file APIs for WASI. Initial scope of the implementation will be adjusted to the needs of the fs2.io.file port. 4 An extensive documentation of the project. 5. A report regarding implementation details and findings discovered over the course of the project which will help with further porting efforts of Scala compilers and other platform-dependent libraries. 6. Wasm test environment and CI created for this project can upstreamed to sbt-typelevel so that it can be used in other projects.
Mentors: Student: James You
Specialization is a compiler transformation that optimizes generic program code such that code using primitive types can execute without significant overhead. The @specialized annotation in the Scala 2 programming language allowed programmers to direct the compiler to create optimized generic data structures for each primitive type. @specialized is used significantly in the implementation of high-performance Scala 2 libraries, allowing for performance without the productivity of generics. This optimization trades performance at the cost of extra space, as generic code must be specialized for each of the primitive types, scaling exponentially on the number of type parameters. Since the Scala 3 programming language has evolved significantly from Scala 2, the @specialized annotation is no longer available. This proposal will prototype a new scheme of specialization for the Scala 3 compiler based on inline traits that avoids the performance pitfalls of the Scala 2 implementation, enabling the evolution of many high-performance Scala 2 libraries into Scala 3.
Mentors: Student: Jennifer Payne
The goal of this project is to create a more efficient immutable list in Scala. In order to do this, we intend to use block-based arrays, to improve cache locality and reduce pointer chasing. This approach will help to address performance issues with traditional linked lists.
Mentors: Student: L Denney
The goal of this project is to explore implementing a list-like datatype with enhanced performance. Immutable linked lists are a core datatype in functional programming languages, proving particularly useful in concurrent programs due to the immutability. The most common operations programmers use on an immutable list include random access, sequential accesses, appending, and copy/writes. Unfortunately, sequential access requires a pointer dereference for each node meaning O(n) time which can significantly impact performance. Iteration is necessary for the most popular functions including fold and map and because the datatype is immutable, many changes one may want to make to a list, excluding operations like prepending or removing an element from the head, require allocating a new list which takes O(n) time. This project will design and implement a new immutable linked list datatype with improved performance for the most common operations by leveraging memory/cache locality and mechanical sympathy to improve performance in concurrent programs within the Typelevel ecosystem. The new datatype implements a generalization of the traditional linked list, one where each node contains a constant number of elements rather than one. These nodes, which we call blocks, each contain an array and a pointer to the next block. Deliverables: -Outline direction and priorities for the new datatype based on existing alternatives and how to best integrate in to the greater Typelevel ecosystem (improve performance in concurrent programs by integrating it in to other datatypes ex. Typelevel fs2's Channel) -Research and design the new datatype -Implement the interface for the new datatype -Benchmark and compare theoretical asymptotic bounds against existing immutable linked list-like data structures -Proper documentation and tests
Mentors: Student: Shrey Pant
This project addresses the challenge of integrating computationally intensive Machine Learning inference into responsive Scala applications without compromising service latency. Currently, ML inference within Cats Effect applications can monopolize CPU resources, starving concurrent operations. The proposed solution develops a compiler that transforms standard ONNX machine learning models into optimized Cats Effect IO operations using Scala Native for high-performance numerical computation via mlpack C++ bindings. The project will deliver: (1) C bindings for mlpack with Scala Native integration, (2) a custom Intermediate Representation for ML operations, (3) an ONNX parser, (4) a core inference library that transforms ML models into Cats Effect IO actions with strategic yielding, (5) a functional MNIST digit recognition web service demo with benchmarking capabilities, and (6) comprehensive documentation and tests. This solution will enable seamless, efficient, and purely functional ML integration within the Typelevel ecosystem without degrading service responsiveness