Introduction to rhoScript

rhoScript, or ⍴Script, is a strongly-typed stack-based concatenative programming language designed for code golf (writing a program which solves a given problem in as few characters as possible).

rhoScript is currently in alpha stages of development and there are many uncompleted tasks which must be completed before it can be "seriously" used to solve code golf problems. Despite that, it is even now quite good at code golf. rhoScript is inspired mainly by forth, haskell, and lisp. rhoScript is implemented in, and compiles to, common lisp.

Typically written at a higher level and then compiled down to the dense form, rhoScript takes code golfing to the extreme. While the high-level language looks like a somewhat-standard stack-based language, the low-level language is a dense, arithmetic encoded, version of the high-level program where each of the built-in functions all take under a byte to reference. This compression is achieved due to the static typing which lets the compiler obtain highly accurate guesses as to which function will be called next.

The following rhoScript high-level program solves the 8 queens problem:
8 range permutations (with-index (sum) map uniq arg-a with-index (*exploding subtract) map uniq concatenate length) keep-maxes-by run
The low-level, typed, arithmetic-encoded form is only 17 bytes:
A9 91 CB A0 6F 87 C1 FB E9 7D 82 C1 CD 65 E2 F8 90
There are no backward compatibility guarantees between versions. In fact, it is expected that no code compiled with the alpha version will run on the beta version of the compiler. However, for the most part, code written in the high-level language will be consistent from version to version.

Want to know more? Visit the tutorial for a brief introduction to rhoScript, and then try the online interactive rhoScript repl, or download the source.

Suggestions? Comments? Send mail to hi@rhoscript.com.

rhoScript is Open Source under the GPL v3, and the code is available on GitHub.