Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aionescu/dynasty
A lazy functional language that compiles to JavaScript
https://github.com/aionescu/dynasty
alt-js haskell javascript language laziness
Last synced: 11 days ago
JSON representation
A lazy functional language that compiles to JavaScript
- Host: GitHub
- URL: https://github.com/aionescu/dynasty
- Owner: aionescu
- License: gpl-3.0
- Created: 2020-12-28T23:54:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-26T16:29:19.000Z (12 months ago)
- Last Synced: 2024-11-18T01:39:12.624Z (25 days ago)
- Topics: alt-js, haskell, javascript, language, laziness
- Language: Haskell
- Homepage:
- Size: 368 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
- programming-languages - Dynasty - Interpreted, dynamically-typed, lazily evaluated, purely functional programming language. (Functional)
README
dynasty
Dynasty is a dynamically-typed, lazily evaluated, purely functional programming language that compiles to JavaScript.
## Examples
You can find some Dynasty programs in the [examples](examples) folder.
The most interesting ones are the [Brainfuck interpreter](examples/bf) and the [Calculator web app](examples/calc).
The standard library and runtime code can be found in the [core](core) folder.
## Building & running the compiler
### Prerequisites
* GHC (>= 9.6)
* cabal (>= 3.8)(Both can be installed via [ghcup](https://www.haskell.org/ghcup/))
To compile Dynasty programs, use the following command:
```sh
cabal run . --
```The first invocation may take a while, since it will also build the compiler's dependencies.
By default, the compiler outputs a file named `main.js`. You can include it in a `` tag inside an HTML document to load it in the browser, or run it directly using a JS runtime like [Node.js](https://nodejs.org/), [Deno](https://deno.land/), or [Bun](https://bun.sh/).
## VS Code Extension
To install the VS Code extension, run `./dynasty-vscode/install.sh`.
## License
This repository is licensed under the GNU General Public License v3.
For more details, see [the license file](LICENSE.txt).