Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xixixao/Shem
The compiler of the programming language Shem
https://github.com/xixixao/Shem
Last synced: 9 days ago
JSON representation
The compiler of the programming language Shem
- Host: GitHub
- URL: https://github.com/xixixao/Shem
- Owner: xixixao
- License: mit
- Created: 2015-09-12T22:35:19.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-08-29T09:19:33.000Z (about 4 years ago)
- Last Synced: 2024-08-02T12:21:58.062Z (3 months ago)
- Language: CoffeeScript
- Size: 1.58 MB
- Stars: 392
- Watchers: 21
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shem
Shem is a new compiled-to-JS, statically typed, pure-by-default functional programming language. The semantics are based on [Haskell](https://www.haskell.org/) but the language evaluates strictly in a similar way to [PureScript](http://purescript.org/). The syntax is S-expressions-based, allowing for a full-blown LISP-like macro system. Shem's prelude includes a full-featured, highly-polymorphic collections library backed by [ImmutableJS](http://facebook.github.io/immutable-js).
The language has been designed for the use within its custom built IDE, [Golem](https://github.com/xixixao/Golem) available at [http://xixixao.github.io/Golem](http://xixixao.github.io/Golem), inspired by [Bret Victor](http://worrydream.com/).
![A screenshot of the Golem IDE showing the source and debugging of a binary search function](http://shem.io/img/screen-shot-binarysearch.png)
![A screenshot of the Golem IDE with a running animation](http://shem.io/img/screen-shot-star.png)
**Here Be Lions**
## Use without Golem
Clone this repo, go to the folder, then
```bash
npm install
npm run build
```To run a single file
```bash
echo '_ (.log (global "console") "Hello world!")' > test.shem
bin/shem test.shem
```To compile a single file to JavaScript
```
bin/shem -c test.shem
```To run a module
```bash
mkdir test-modules
echo 'message "Hello, hello, world!"' > test-modules/Hello.shem
echo '[message] (req ./Hello) _ (.log (global "console") message)' > test-modules/index.shem
bin/shem test-modules
```To compile a module
```bash
bin/shem -o test-modules-out-dir -c test-modules
```## Demo
https://www.youtube.com/watch?v=HnZipJOan54 (for now)
> *I am providing code in this repository to you under an open source license. Because this is my personal repository, the license you receive to my code is from me and not from my employer (Facebook).*