wort
v0.1.8
Published
A JavaScript transpiler for the Wort programming language
Downloads
32
Maintainers
Readme
wort
A very simple concatenative programming language which compiles down to JavaScript.
Installation
You must have NodeJS and NPM to run the wort compiler.
npm install wort
Basic Usage
Wort transpiles .wort files to NodeJS modules.
wort hodor.wort
The transpiled file will be named hodor.wort.js
. You can run this file by typing:
node hodor.wort.js
If you want your wort programs or modules to run in the browser, you can probably use the browserify tool on the output.
Examples
A variation on the typical Hello, World!
program.
# print a message to std out
main: "Hodor!" printz ;
Sum a list of numbers using fold
, a built in function.
# sum a list of numbers (prints 15)
main: [1 2 3 4 5] 0 [+] fold;