https://github.com/techno-coder/lexica
Reversible programming language
https://github.com/techno-coder/lexica
language lexica programming-language reversible-computation
Last synced: about 1 month ago
JSON representation
Reversible programming language
- Host: GitHub
- URL: https://github.com/techno-coder/lexica
- Owner: Techno-coder
- License: mit
- Created: 2019-05-10T07:53:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-07T11:24:38.000Z (over 5 years ago)
- Last Synced: 2025-03-18T17:07:58.695Z (about 1 month ago)
- Topics: language, lexica, programming-language, reversible-computation
- Language: Rust
- Homepage: https://technocoder.gitbook.io/lexica/
- Size: 614 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Lexica](https://technocoder.gitbook.io/lexica/)
A reversible programming language.```
fn fibonacci(n: u64) -> u64:
let ~first = 1
let ~second = 1let ~counter = 1
loop counter == 1 => counter == n:
let summation = first + second
first <=> second
second <=> summationdrop summation = second - first
counter += 1drop n = counter
second
```## Installation
```
cargo +nightly install --locked --git https://github.com/Techno-coder/lexica
```## Usage
```
lexica /main.lx
```## Commands
* `context` - Displays the compiler context state
* `basic ` - Displays the basic node lowering of a function
* `evaluate ` - Evaluates and returns the result of a zero arity function
* `cycle ` - Evaluates and reverses and returns the parameter values of a zero arity function## Influence
Lexica has been influenced by:
- [Rust](https://github.com/rust-lang/rust)
- [Arrow](https://etd.ohiolink.edu/!etd.send_file?accession=oberlin1443226400)
- [Nim](https://nim-lang.org)and many other languages.