Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andreas/glee
Toy language inspired by Joy
https://github.com/andreas/glee
Last synced: 3 months ago
JSON representation
Toy language inspired by Joy
- Host: GitHub
- URL: https://github.com/andreas/glee
- Owner: andreas
- License: mit
- Created: 2013-02-13T09:41:02.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2016-08-12T08:18:17.000Z (over 8 years ago)
- Last Synced: 2023-04-11T15:38:24.279Z (almost 2 years ago)
- Language: OCaml
- Size: 3.91 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Glee is a toy language inspired by [Joy](http://en.wikipedia.org/wiki/Joy_%28programming_language%29). Unlike Joy, Glee has integers and booleans. See `example.glee` for an example of Glee code. It's primitive combinators are:
* `k`, where `[B] [A] k == A`
* `cake`, where `[B] [A] cake == [[B] A] [A [B]]`
* `choose`, where `true [B] [A] choose == [B]` and `false [B] [A] choose == [A]`
* `uncons`, where `[A B] uncons == [A] [B]`
* Arithmetic operators: `+`, `-`, `*`, `/`
* Boolean operators: `&&`, `not`All other words are derived from these. The base is inspired by an article [The Theory of Concatenative Combinators](http://tunes.org/~iepos/joy.html) by Brent Kerby.
## Running
Running Glee requires OCaml and [Menhir](http://gallium.inria.fr/~fpottier/menhir/).
Clone the repository:
git clone https://github.com/andreas/glee
Compile the sources:
cd glee
makeThis produces an executable `glee`. To run Glee:
./glee
This will put you in an interactive console. You can optionally specify an input file to run before going into interactive mode:
./glee example.glee
## Copyright
Copyright (c) 2012 Andreas Garnæs. See [LICENSE](LICENSE) for details.