NewsCrawler.org

Roc 0.1.0 released: first numbered version of the Elm-inspired language

Roc is a programming language whose designer began work on it in 2018 as an Elm-inspired language for “the long tail of use cases.” Version 0.1.0 is the first numbered release, and the author says the types in the standard library still look much as they did in the 2018 sketches. Roc aims to approach the speed of Rust and C++ without fully matching it, because it uses automatic memory management and stricter memory safety.

The post cites a compression library, roc-deflate, with a median slowdown of 2.6% compared with C's libdeflate on an M1 MacBook Pro and 8.9% on a Ryzen 3900X. It also reports build times for community projects using roc check, roc build --opt=dev and roc test. One village example was left out as an outlier, with cold-run median build times of 1s, 3.5s and 7.5s on an M5 MacBook Pro.

In Roc, effectful functions[1] must have names ending in !, and the compiler allows them to be called only from other effectful functions. Pure functions[2] are evaluated at compile time when they depend on no runtime inputs, so a regex with a syntax error is reported even by roc check. The post also lists community projects, including a web framework, native GUI platforms for macOS and Windows, a 3D game engine and screenwriting software.

Repository Roc github.com

Roc is a fast, friendly functional programming language inspired by Elm, aimed at general use beyond user interfaces.

Stars: 6,200Forks: 430License: UPL-1.0Updated:

Read the original rtfeldman.comDiscussion

Discussion

Commenters mostly welcomed the release and compared Roc with Elm, Elixir and Rust, praising its speed and memory safety. One asked how effectful functions would interact with async code and whether they would spread through a whole codebase, and another asked whether compile-time evaluation has a time limit. The developer of the screenwriting software Bliss Writer said Roc is pleasant to use and that naive code tends to run fast.

Primary sources and details

Sources

Published: First seen: Читать по-русски

Open as a page