Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vanajmoorthy/speechylang
🌶️ A small LISP style programming language that transpiles to JavaScript.
https://github.com/vanajmoorthy/speechylang
babel javascript lisp programming-language transpiler
Last synced: 2 months ago
JSON representation
🌶️ A small LISP style programming language that transpiles to JavaScript.
- Host: GitHub
- URL: https://github.com/vanajmoorthy/speechylang
- Owner: vanajmoorthy
- Created: 2020-01-23T22:59:58.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T14:04:00.000Z (about 2 years ago)
- Last Synced: 2024-05-28T20:47:34.991Z (8 months ago)
- Topics: babel, javascript, lisp, programming-language, transpiler
- Language: JavaScript
- Homepage:
- Size: 203 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Speechy 🌶️
#### Speechy is a small LISP style programming language what uses Babel as an AST and transpiles to JavaScript.
### *Installation*
You can install Speech from npm using the command
`npm install speechylang` or `npm install speechylang -g`
You also have to have [node.js](https://www.npmjs.com/) installed first
You can start the REPL by using the command `speechy` and run speechy files using `speechy run path/to/file/example.spy`
(Keep in mind that speechy files use the .spy extension).
### *Basic Overview*
The syntax is **super** simple.
Speechy uses a prefix based LISP style syntax in the following manner:
`(add 2 3 (multiply 4 5))`
This code will multiple 4 and 5 and add the result of that operation (20) to 2 and 3, ultimately evaluating to 25.
Speechy also supports defining variables using the keyword "let".
`(let x 2)`
This is the same as saying let x = 2 in Javascript.
### *Standard Library*
The Speechy standard library is incredibly small at the moment and consist of the following functions.
* add: `(add 2 3 4)`
* subtract: `(subtract 2 3 4)`
* multiply: `(multiple 2 3 4)`
* modulo: `(modulo 2 10)`
* log: `(log "hello, world!")`
* pi: `(pi)`
* max: `(max 2 3 4)`
* min: `min(2 3 4)`
* percentage: `(percentage 5 100)`Contact me at [email protected] or file an issue if you notice anything wrong.