Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nixpulvis/lambash
A λ-calculus shell (because I love writing shells).
https://github.com/nixpulvis/lambash
Last synced: 21 days ago
JSON representation
A λ-calculus shell (because I love writing shells).
- Host: GitHub
- URL: https://github.com/nixpulvis/lambash
- Owner: nixpulvis
- Created: 2019-06-01T17:48:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-02T04:23:44.000Z (almost 5 years ago)
- Last Synced: 2024-05-22T22:32:27.749Z (6 months ago)
- Language: Rust
- Size: 34.2 KB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - lambash - λ-calculus shell. (Lambda Calculus / Libraries)
README
# `lambash`
Run the shell with `cargo run`.
```
\f.((\x.x) date) -R -u f-p (λf.(((((λx.x) date) -R) -u) f))
-> (λf.(((date -R) -u) f))
-η ((date -R) -u)
Fri, 11 Oct 2019 22:28:09 +0000
```### λ Normalization
```sh
(\x.x) 1
-p ((λx.x) 1)
-> 1
-η 1\x.f x
-p (λx.(f x))
-> (λx.(f x))
-η f
```A POSIX-like shell written for and using lambda calculus and it's derivatives.
```sh
# Application (foreground call).
(λx.x) echo 1
1
(\x.y) 2
y: command not found# Abstraction (background call).
\.ping localhost# TODO
λx.x
λx.y```
### Next Steps
```
# This is a comment.# Definition (syntactic)
id := \x.x# Assignment (semantic)
ipi = \x.x 3.1415# Equality
1 ≡ 1
λx.x ≡ λx.x
ipi ≡ id 3.1415
ipi ≢ 3.1415# Primitives
### Boolean
true = true
true ≠ false### Number
0
1.0
3.1415
271e-2### Character
'f'
‘β’### String
"foo"
“Γον”### Void / Null
null = void### None () / Tuple
()
(1, 2)### Array
[]
[1, 2]# POSIX
### Path (all unbound variables will be treated as a path)
foo.rb
./folder/file.ext
/somewhere/else
https://nixpulvis.com### Operations
write foo.rb 3.1415
()read foo.rb
3.1415execp cat foo.rb
3.1415
```