Update README to reflect completion of experiment

This commit is contained in:
2025-05-29 13:38:33 -05:00
parent 3717942589
commit 0474b7fd08

View File

@ -2,22 +2,28 @@
## Introduction ## Introduction
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 (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.
*tricu is under active development and you should expect breaking changes with every commit.* *This experiment has concluded. tricu will see no further development or bugfixes.*
tricu is the word for "tree" in Lojban: `(x1) is a tree of species/cultivar (x2)`. tricu is the word for "tree" in Lojban: `(x1) is a tree of species/cultivar (x2)`.
## Acknowledgements
Tree Calculus was discovered by [Barry Jay](https://github.com/barry-jay-personal/blog).
[treecalcul.us](https://treecalcul.us) is an excellent website with an intuitive Tree Calculus code playground created by [Johannes Bader](https://johannes-bader.com/) that introduced me to Tree Calculus.
## Features ## Features
- Tree Calculus operator: `t` - Tree Calculus **operator**: `t`
- Immutable definitions: `x = t t` - **Immutable definitions**: `x = t t`
- Lambda abstraction: `id = (a : a)` - **Lambda abstraction**: `id = (a : a)`
- List, Number, and String literals: `[(2) ("Hello")]` - **List, Number, and String** literals: `[(2) ("Hello")]`
- Function application: `not (not false)` - **Function application**: `not (not false)`
- Higher order/first-class functions: `map (a : append a "!") [("Hello")]` - **Higher order/first-class functions**: `map (a : append a "!") [("Hello")]`
- Intensionality blurs the distinction between functions and data (see REPL examples) - **Intensionality** blurs the distinction between functions and data (see REPL examples)
- Simple module system for code organization - **Content-addressed store**: save, version, tag, and recall your tricu terms.
## REPL examples ## REPL examples
@ -41,17 +47,32 @@ tricu < -- or calculate its size (/demos/size.tri)
tricu < size not? tricu < size not?
tricu > 12 tricu > 12
tricu < -- REPL Commands: tricu < !help
tricu < !definitions -- Lists all available definitions tricu version 0.20.0
tricu < !output -- Change output format (Tree, FSL, AST, etc.) Available commands:
tricu < !import -- Import definitions from a file !exit - Exit the REPL
tricu < !exit -- Exit the REPL !clear - Clear the screen
tricu < !clear -- ANSI screen clear !reset - Reset preferences for selected versions
tricu < !save -- Save all REPL definitions to a file that you can !import !help - Show tricu version and available commands
tricu < !reset -- Clear all REPL definitions !output - Change output format (tree|fsl|ast|ternary|ascii|decode)
tricu < !version -- Print tricu version !definitions - List all defined terms in the content store
!import - Import definitions from file (definitions are stored)
!watch - Watch a file for changes (definitions are stored)
!versions - Show all versions of a term by name
!select - Select a specific version of a term for subsequent lookups
!tag - Add or update a tag for a term by hash or name
``` ```
## Content Store
tricu uses a "content store" SQLite database that saves and versions your definitions persistently.
* **Persistent definitions:** Any term you define in the REPL is automatically saved.
* **Content-addressed:** Terms are stored based on a SHA256 hash of their content. This means identical terms are stored only once, even if they have different names.
* **Versioning and history:** If you redefine a name, the Content Store keeps a record of previous definitions associated with that name. You can explore the history of a term and access older versions.
* **Tagging:** You can assign tags to versions of your terms to organize and quickly switch between related function versions.
* **Querying:** The store allows you to search for terms by name, hash, or tags.
## Installation and Use ## Installation and Use
You can easily build and run this project using [Nix](https://nixos.org/download/). You can easily build and run this project using [Nix](https://nixos.org/download/).
@ -90,15 +111,3 @@ tricu decode [OPTIONS]
-f --file=FILE Optional input file path to attempt decoding. -f --file=FILE Optional input file path to attempt decoding.
Defaults to stdin. Defaults to stdin.
``` ```
## Collaborating
I am happy to accept issue reports, pull requests, or questions about tricu [via email](mailto:james@eversole.co).
If you want to collaborate but don't want to email back-and-forth, please reach out via email once to let me know and I will provision a git.eversole.co account for you.
## Acknowledgements
Tree Calculus was discovered by [Barry Jay](https://github.com/barry-jay-personal/blog).
[treecalcul.us](https://treecalcul.us) is an excellent website with an intuitive Tree Calculus code playground created by [Johannes Bader](https://johannes-bader.com/) that introduced me to Tree Calculus.