A collection of links to awesome roc things.
- Repository roc-lang/roc
- Examples roc-lang/examples
- Tutorial roc-lang.org/tutorial
- Documentation roc-lang.org/docs
- Unnoficial VSCode Extension raqystyle/roc-vscode-unofficial
- Unnocifial Tree-Sitter Grammar faldor20/tree-sitter-roc
Official Guide - Building From Source
Enter nix shell nix develop
Build roc cli && language server cargo build -p roc_cli --release && cargo build -p roc_lang_srv --release
- agu-z/roc-pg: PostgreSQL
- Hasnep/roc-math: Math and constants
- Hasnep/roc-html: HTML
- Hasnep/roc-svg: SVGs
- Hasnep/roc-datetimes: Dates and times
- imclerran/Roc-IsoDate: ISO-8601 Datetimes
- JanCVanB/roc-random forked: Random number generation
- lukewilliamboswell/roc-json: JSON
- lukewilliamboswell/roc-parser: Parser
- lukewilliamboswell/roc-ansi TUI, Colors and Helpers
- mulias/roc-array2d 2D Arrays
- shritesh/roc-image: Image library with PNG export.
- Subtlesplendor/roc-data: Useful types like Stack, Queue, Bag
- jwoudenberg/rvn: A serialization format based on Roc syntax.
Work In Progress
- 🚧 roc-lang/unicode: Unicode
- 🚧 Subtlesplendor/roc-parser: Port of Elm's Parser library
- 🚧 KilianVounckx/roc_regex: Regex
- roc-lang/basic-webserver: Webservers
- roc-lang/basic-cli: CLI apps
- lukewilliamboswell/roc-wasm4: WASM-4 Games 🕹️
- bhansconnect/roc-fuzz: Fuzzing
- roc-lang/static-site-gen: Static websites
Work In Progress
- 🚧 lukewilliamboswell/roc-gui: GUI apps
- 🚧 roc-lang/virtual-DOM: Virtual DOM with SSR
- 🚧 ostcar/roc-wasi-platform: WASI
- 🚧 vendrinc/roc-esbuild: esbuild plugin for loading
.roc
files.
Other languages & Embedding Examples 🗺
- 🚧 alexpyattaev/roc-plugin-example: [Rust] A plugin example for a bevy game
- lukewilliamboswell/roc-zig-platform: [Zig] Example platform with bundle script for URL packages using Zig cross-compilation
- Python
- Ruby
- Swift UI
- NodeJs
- Java
Glue Generation for a platform with roc glue path/to/spec path/to/generated/glue/destination path/to/platform/main.roc
RustGlue.roc: Bindings to Rust
- faldor20/tree-sitter-roc: Tree-sitter grammar
- Hasnep/setup-roc: Github action to install Roc
- Hasnep/bundle-roc-library: Github action to bundle packages
- vendrinc/roc-npm: NPM package to install roc
- dkuku/asdf-roc: ASDF package for managing Roc versions
- JRMurr/roc2nix: Nix library for building Apps & Platforms
- roc-lang docker: Dockerfiles for roc
- ostcar/roc-wasm-platform: WASM modules
- bhansconnect/roc-microbit: Microbit embedded processor
- JanCVanB/roc-plotters: Drawing with Plotters
- lukewilliamboswell/roc-tui: Terminal UI platform
- lukewilliamboswell/roc-graphics-mach: Graphics platform using hexops/mach-core
- lukewilliamboswell/roc-cgi-server: CGI HTTP server using basic-cli apps
- lukewilliamboswell/roc-serverless: HTTP handlers for WASM workers
Plans roc-lang.org/plans
Task as Builtin Design Proposal
- Upgrades
Task
to a builtin unlockingTask.map2
, enables concurrent task execution, improves error messages Introducesthis part of the proposal is no longer plannedStored
ability which unlocks; performance, ergonomics, and the ability to test simulated Tasks without actually running their effects
- Enables platform-agnostic packages which can chain Tasks; all modules become platform-agnostic
- Guarantees that for a Roc module to perform effects it must declare a module parameter
- Unlocks simulating effects in tests using
expect-sim
- Unlocks recording effects
roc run --record-fx
which can be used in tests or replay - Enables sandboxing and polyfilling effects for improved interoperability and security
Chaining Syntax and Variation: Chaining with Types
- Make syntax for I/O in Roc easier to learn for beginners and nicer to read for experienced Roc programmers
- Improve error messages and permit I/O inside if statements and guards
- Introduce a
!
postfix operator for chainingTask
s, e.g.url = File.readUtf8! path
instead of currenturl <- File.readUtf8 path |> Task.await
- Introduce a restricted HKP, but only for the new builtin abilities
if File.exists! path then
when File.type! path is
when foo is
Blah if File.exists! path -> …
AndThen implements
andThen : t a, (a -> t b) -> t b
where t implements AndThen
Map2 implements
map2 : t a, t b, (a, b -> c) -> t c
where t implements Map2
- isaacvando/gob: Compiler for a stack-based language
- Hasnep/brainroc: Interpreter for BF
- bhansconnect/monkey-roc: Interpreter for 🐵🤘🏼 Monkey lang
- shritesh/raytrace.roc: Implementing Ray Tracing in One Weekend
- WhileTruu/counter-roc-swiftui-app: SwiftUI counter app
- Billzabob/roc-lox: Interpreter for Lox programming language