Skip to content

Commit

Permalink
Improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinborner committed Jul 28, 2024
1 parent 6ad85ef commit 9ae3983
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/wiki_src/coding/data-structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ the list.

Strings are just a list of binary encoded bytes. You may use
[`std/List`](/std/List.bruijn.html) in combination with
[`std/Number/Binary`](/std/Number/Binary.bruijn.html) to interact with
[`std/Number/Binary`](/std/Number_Binary.bruijn.html) to interact with
them.

Example:
Expand Down
38 changes: 27 additions & 11 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<p align="center">

<img width="200" src="https://raw.githubusercontent.com/marvinborner/bruijn/main/docs/res/logo.png" alt="Bruijn logo"/>

</p>

> A purely functional programming language based on lambda calculus and
Expand All @@ -13,20 +15,34 @@ Code](https://rosettacode.org/wiki/Category:Bruijn).

## Features

- **De Bruijn indices** eliminate the complexity of α-equivalence and
α-conversion
- **Call-by-need** reduction with great time/memory complexity by using
the RKNL abstract machine (similar to
[calm](https://github.com/marvinborner/calm/))
- **Syntactic sugar** for unary/binary/ternary numerals and
binary-encoded strings and chars
- Substantial **standard library** with 700+ useful functions (see
`std/`)
- **No primitive functions** - every function is implemented in Bruijn
itself
- Highly space-efficient compilation to **binary lambda calculus (BLC)**
additionally to normal interpretation and REPL
- 1:1 correspondence to lambda calculus (e.g. space-efficient
compilation to **binary lambda calculus (BLC)**)
- **de Bruijn indices** instead of named variables
- Lazy evaluation by default (**call-by-need** reduction)
- **Syntactic sugar** makes writing terms simpler (e.g. numbers,
strings, chars, meta terms)
- **Mixfix** and **prefix** operators
- **Recursion** can be implemented using combinators such as Y, Z or ω
- Substantial **standard library** featuring many useful functions (see
`std/`)

## Why

- By having a very small core (the reducer), bruijn is safe, consistent,
and (potentially) proven to be correct!
- Since it doesn’t have builtin functions, bruijn is independent of
hardware internals and could easily be run on almost any architecture.
- Compiled binary lambda calculus is incredibly expressive and tiny.
Read the articles by [Jart](https://justine.lol/lambda/#why) and
[Tromp](https://tromp.github.io/cl/cl.html).
- Exploring different encodings of data as function abstractions is
really fascinating.
- Naming parameters of functions is annoying. De Bruijn indices are a
universal reference independent of the function and can actually help
readability!
- Really, just for fun.

## Wiki

Expand Down

0 comments on commit 9ae3983

Please sign in to comment.