Immutable definitions and documentation updates
This commit is contained in:
27
README.md
27
README.md
@ -2,19 +2,20 @@
|
||||
|
||||
## Introduction
|
||||
|
||||
tricu (pronounced "tree-shoe") is a purely functional interpreted language implemented in Haskell. [I'm](https://eversole.co) developing tricu to further research the possibilities offered by the various forms of [Tree Calculi](https://github.com/barry-jay-personal/typed_tree_calculus/blob/main/typed_program_analysis.pdf).
|
||||
tricu (pronounced "tree-shoe") is a purely functional interpreted language implemented in Haskell. It is fundamentally based on the application of [Tree Calculus](https://github.com/barry-jay-personal/typed_tree_calculus/blob/main/typed_program_analysis.pdf) terms, but minimal syntax sugar is included to provide a useful programming tool.
|
||||
|
||||
tricu offers minimal syntax sugar yet manages to provide a complete, intuitive, and familiar programming environment. There is great power in simplicity. tricu offers:
|
||||
tricu is the word for "tree" in Lojban: `(x1) is a tree of species/cultivar (x2)`.
|
||||
|
||||
1. `t` operator behaving by the rules of Tree Calculus
|
||||
1. Function definitions/assignments
|
||||
1. Lambda abstractions eliminated to Tree Calculus forms
|
||||
1. List, Number, and String literals
|
||||
1. Parentheses for grouping function application
|
||||
## Features
|
||||
|
||||
These features move us cleanly out of the [turing tarpit](https://en.wikipedia.org/wiki/Turing_tarpit) territory that you may find yourself in if you try working only with the `t` operator.
|
||||
|
||||
tricu is the word for "tree" in Lojban: `(x1) is a tree of species/cultivar (x2)`. This project was named "sapling" until I discovered the name is already being used for other (completely unrelated) programming language development projects.
|
||||
- Tree Calculus operator: `t`
|
||||
- Assignments: `x = t t`
|
||||
- Lambda abstraction syntax: `id = (\a : a)`
|
||||
- List, Number, and String literals: `[(2) ("Hello")]`
|
||||
- Function application: `not (not false)`
|
||||
- Higher order/first-class functions: `map (\a : lconcat a "!") [("Hello")]`
|
||||
- Intensionality blurs the distinction between functions and data (see REPL examples)
|
||||
- Immutability
|
||||
|
||||
## REPL examples
|
||||
|
||||
@ -26,7 +27,7 @@ tricu > "Hello, world!"
|
||||
tricu < id (head (map (\i : lconcat i " world!") [("Hello, ")]))
|
||||
tricu > "Hello, world!"
|
||||
|
||||
tricu < -- Intensionality! We can inspect the structure of a function.
|
||||
tricu < -- Intensionality! We can inspect the structure of a function or data.
|
||||
tricu < triage = (\a b c : t (t a b) c)
|
||||
tricu < test = triage "Leaf" (\z : "Stem") (\a b : "Fork")
|
||||
tricu < test (t t)
|
||||
@ -41,7 +42,9 @@ tricu > 12
|
||||
|
||||
## Installation and Use
|
||||
|
||||
You can easily build and/or run this project using [Nix](https://nixos.org/download/).
|
||||
[Releases are available for Linux.](https://git.eversole.co/James/tricu/releases)
|
||||
|
||||
Or you can easily build and/or run this project using [Nix](https://nixos.org/download/).
|
||||
|
||||
- Quick Start (REPL):
|
||||
- `nix run git+https://git.eversole.co/James/tricu`
|
||||
|
Reference in New Issue
Block a user