Bootstrap implementation of the Chord programming language
- Rust 98.2%
- scala 1.5%
- Just 0.3%
| assets | Initial Commit | |
| chboot-lex | Update some tokens | |
| chboot-parse | Better trivia removal | |
| src | Split lexer into subcrate | |
| .gitattributes | Gitattributes | |
| .gitignore | Initial Commit | |
| Cargo.lock | Ditch Chumsky (again) (gah i cant makeup my mind) | |
| Cargo.toml | Parser struct | |
| example.ch | Switch to "def" for top-level functions | |
| justfile | Split lexer into subcrate | |
| license.md | Initial Commit | |
| readme.md | Switch to "def" for top-level functions | |
| rustfmt.toml | Initial Commit | |
Chord is a functional-first programming language, with algebraic effects and no garbage collector. It is inspired by Rust, Scala, Koka, and the ML family.
with chord.log.Log
def main() {
let nth <- 10
let fib <- fib(0, 1, nth)
printFib(nth, fib)
}
def fib(prev: Nat, current: Nat, target: Nat): Nat ->
case target
| 0 -> current
| _ -> become fib(current, prev + current, target - 1)
def printFib(nth: Nat, fib: Nat) ->
Log.print(f"Fib of {nth} is {fib}")
On LLMs and AI
Chord has a zero-AI policy in all official spaces. This includes (but is not limited to) code, issues, and pull requests. Attempts to circumvent this policy will result in a ban.
Exceptions may be provided for using translation tools in conversations. If you do, we recommend attaching the original text written in your native language, alongside the translated version. Use dedicated translation tools, rather than chatbots.