Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 3.88 KB

README.md

File metadata and controls

49 lines (35 loc) · 3.88 KB

The Roc logo, an origami bird

Roc is a work in progress programming language that aims to include various great features seen in other languages and compilers. In order for Roc to have mainstream use in the industry, one of its main focus is running fast and dynamically, which means Roc compiles to machine Code. The future use case for this language is to be able to build high-quality servers, command-line applications, graphical native desktop UI, along with other classes of applications.

Current Progress

Progress toward this performance target is already well underway. Roc already employs unboxed data structures and closures, monomorphizes polymorphic code, and employs LLVM as a compiler backend. These optimizations, particularly unboxed closures and monomorphization, can be found in a number of system-level languages (such as C++ and Rust), but not in any mainstream garbage-collected language. Roc closures, in particular, have the advantage of being as ergonomic as garbage-collected language closures (where they are often boxed), but with the performance of systems language closures (which are typically unboxed, but have more complicated types). As a result of these optimizations, Roc code already compiles to the same machine instructions as similar code written in one of these systems languages. We compare the LLVM instructions generated by Roc's compiler with the compilers for these systems languages on a regular basis to see if we're generating identical instructions. However, there are some circumstances where Roc has a higher runtime overhead than languages like as C, C++, Zig, and Rust. Automated memory management, which Roc implements with automatic reference counting, is the most expensive. Static reference count improvements like as elision and reuse (due to Morphic and Perceus) help, but there is still significant runtime overhead.

Contributing

If you're interested in getting involved, check out CONTRIBUTING.md! Also for more questions and discussions please use the Zulip chat is also the best place to get help with good first issues. If you're interested in substantial implementation- or research-heavy projects related to Roc, check out Roc Project Ideas!

Work in progress!

Roc is not ready for a 0.1 release yet, but we do have:

Sponsors

We are very grateful to our sponsors NoRedInk, rwx, and Tweede golf.

NoRedInk logo      rwx logo      tweede golf logo

If you or your employer would like to sponsor Roc's development, please DM Richard Feldman on Zulip!