Home

Awesome

wslib

wslib is a library of utilities written in Whitespace, intended to become the standard library for an upcoming compiler.

Modules

Style

Functions are documented with a prose description similarly to godoc, as opposed to Javadoc. Labels prefixed with . are not exported.

Parameters and return values are specified with Forth-style # (x y -- z) comments and preconditions are specified with # Requires comments. These will hopefully become checked by the compiler at every call site.

Using the heap for local variables is avoided when possible until the compiler has sufficient dataflow analysis that can allocate non-conflicting addresses and registerize most heap operations. Until then, and on most interpreters, stack operations are significantly faster than heap operations.

Syntax

wslib uses Whitelips/Nebula instruction names, with extended arguments and shorthands. assemble.sh converts the wslib dialect to a format recognizable by whitespace-rs.

Instruction shorthands

Instruction macros

Imports

Tokens

Contributing

If you'd like to help, get in touch by filing an issue, pull request, or sending me an email. There's lots of useful and interesting library APIs to implement!

TODO

License

This project is made available under the Mozilla Public License, v. 2.0.