Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yurixander/tails
๐ ๏ธ An experimental functional systems programming language, written in Rust and powered by LLVM as a backend.
https://github.com/yurixander/tails
compiler language llvm
Last synced: about 1 month ago
JSON representation
๐ ๏ธ An experimental functional systems programming language, written in Rust and powered by LLVM as a backend.
- Host: GitHub
- URL: https://github.com/yurixander/tails
- Owner: yurixander
- License: other
- Created: 2023-10-31T18:31:11.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-01T05:35:46.000Z (10 months ago)
- Last Synced: 2024-04-20T23:54:10.696Z (9 months ago)
- Topics: compiler, language, llvm
- Language: Rust
- Homepage:
- Size: 1.98 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
An experimental functional systems programming language,
written in Rust, and powered by LLVM as a backend.
๐ฏ **Goal:** The intent is to create a programming language that balances simplicity and performance, focusing on functional programming paradigms and compile-time safety mechanisms. The language aims to facilitate explicit tracking of side effects and embrace a predictable coding environment. See the [principles](#principles) section for more information.
## Features
* Python-like, concise syntax (adhering to the [off-side rule](https://en.wikipedia.org/wiki/Off-side_rule))
* Functional programming paradigm
* Strong, static type system
* First-class functions
* Pattern matching
* Powerful type inference, based on [Hindley-Milner type system](https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system)
* [Parametric polymorphism via generics](https://en.wikipedia.org/wiki/Parametric_polymorphism)
* [Structural typing](https://en.wikipedia.org/wiki/Structural_type_system)
* [Closures](https://en.wikipedia.org/wiki/Closure_(computer_programming))## Principles
* โจ **Simplicity**: The language should be easy to learn but powerful enough for complex tasks. A simple syntax helps lower the barrier to entry.
* ๐ **Consistency & orthogonality**: Stick to one way of doing things. The language should use a few basic constructs that can be combined in many ways. This makes it easier to learn and use.
* ๐ฎ **Predictable, explicit, and deterministic semantics**: The type system should be straightforward and avoid surprises. No guessing gamesโyou should always know what the code is doing.
* โ **Opinionated**: Make the language so there's a 'right way' to do things. This ensures everyone writes code that looks and works similarly, making it easier to understand and collaborate.
* ๐ ๐ปโโ๏ธ **No meta-programming or reflection**: Avoid features like meta-programming and reflection. They're often misused and make the language harder to learn and less consistent.
* โก **Compile-time emphasis**: Do most heavy lifting, like error checking and memory management, when the code is compiled. This makes the executables faster and more reliable.
* โ๏ธ **Functional paradigm**: Use functional programming to simplify code and reduce errors. It minimizes side effects and makes the code easier to reason about.## Hello world example
> The `foreign` keyword lets you include functions and variables from other programming languages. You can put multiple such items in a foreign block to keep your code neat.
> The `unsafe` keyword is used for actions that have potential risks, like calling foreign functions or using pointers. This is much like Rust's `unsafe` keyword and helps you be explicit about the risky parts of your code.
> `nat` is a type that stands for unsigned integers, which are 32-bit by default. You can also use variations like `nat8`, `nat16`, and `nat64` for different bit sizes.
> The compiler doesn't automatically coerce types, so you can use `0::nat` to specify a literal's type. This is handy when the type you want doesn't match the compiler's default 32-bit numeric type.
## Building and running
### Prerequisites
* [Rust](https://www.rust-lang.org/tools/install)
* [LLVM 15](https://llvm.org/docs/GettingStarted.html)### Building
```bash
cargo build
```### Running tests
```bash
cargo test
```
Please feel free to reach out to me on LinkedIn for business inquiries.
Images generated with DALLยทE 3, and edited with Figma.
ยฉ 2023 Yurixander Ricardo