randallb.comRandall Bennett

← All projects

RBel

A programming language that keeps context, code, and configuration in one document.

An RBel document can explain a rule, define it in executable code, and put a runnable example beside it.

Download RBel for macOS · Build from source

Try RBel

Download and unzip the signed, notarized release for Apple silicon and Intel Macs. In Terminal, go to the folder containing the extracted rbel executable. You don’t need Nix or a repository checkout.

Download the RBel quickstart document and save it next to the executable. The example below is already in the file.

# Add a bonus

The score includes a two-point bonus.

```rbel code=score
(def score (points)
  (+ points 2))
```

Five points should become seven.

```rbel example=score-check
(score 5)
=> 7
```

Load the document and evaluate the expression from the example.

./rbel --eval-with quickstart.rbel.md '(score 5)'

The result is 7. Change the bonus from 2 to 3 and run the command again. It now prints 8, so update the expected result in the example to match.

Build from source

These instructions use Git and Nix with flakes enabled. They were verified on Apple silicon macOS.

git clone https://github.com/getworkloop/coworker-protocol.git
cd coworker-protocol
git checkout --detach 9490e3459f549682ba50de9b13bf793f2c9934bc

Save the same quickstart.rbel.md document at the root of the checkout, then run:

nix develop -c ./coworkers/bin/rbel --eval-with quickstart.rbel.md '(score 5)'

Related projects · Coworker Protocol · Coworker Runtime