Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ascandone/kestrel-lang
🦅 A pure, strongly typed functional language that compiles to js
https://github.com/ascandone/kestrel-lang
compiler functional-programming javascript typechecker
Last synced: 3 months ago
JSON representation
🦅 A pure, strongly typed functional language that compiles to js
- Host: GitHub
- URL: https://github.com/ascandone/kestrel-lang
- Owner: ascandone
- License: mit
- Created: 2024-01-14T10:35:26.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-06-21T20:06:50.000Z (5 months ago)
- Last Synced: 2024-07-13T01:37:34.380Z (4 months ago)
- Topics: compiler, functional-programming, javascript, typechecker
- Language: TypeScript
- Homepage:
- Size: 1.17 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kestrel lang 🦅
[![npm](https://badgen.net/npm/v/kestrel-lang)](https://www.npmjs.com/package/kestrel-lang)
[![CI](https://github.com/ascandone/kestrel-lang/actions/workflows/ci.yml/badge.svg)](https://github.com/ascandone/kestrel-lang/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/ascandone/kestrel-lang/graph/badge.svg?token=rHjOLSg3xg)](https://codecov.io/gh/ascandone/kestrel-lang)Kestrel is a pure, strongly typed functional language that compiles to js.
```rust
// Type is inferred as `Fn(Int) -> String`
pub let fizz_buzz = fn n {
match (n % 3, n % 5) {
(0, 0) => "FizzBuzz",
(0, _) => "Fizz",
(_, 0) => "Buzz",
_ => String.from_int(n),
}
}
```Take a look at the [language tour](https://github.com/ascandone/kestrel-lang/blob/main/language-tour.md) to learn more. You can find some examples by looking at the standard library [implementation](https://github.com/ascandone/kestrel_core/tree/main/src)
### Get started
> You can try kestrel without installing it on the [online playground](https://kestrel-playground.vercel.app/).
Install the `kestrel` cli using npm:
```bash
npm install -g kestrel-lang
```Lsp integration is available as a [vscode extension](https://marketplace.visualstudio.com/items?itemName=ascandone.kestrel-vscode).