FurryScript is a programming language for random text generation from templates. It has a similar purpose to DadaEngine, although it was written completely independently, and is much more strange (you may compare them).
Rather than a set of rules which list the valid alternatives and call other rules within (which would seem more sensible), it works like this:
- Read all strings on the stack when the outer program has finished (anything other than a string is ignored).
- Call subroutines mentioned in the strings.
- Pick a random string out of what that subroutine pushed onto the stack.
- Continue the same thing recursively.
Among other strange features includes:
- There are no scalar variables (only list variables exist, although they can be named or anonymous; this is despite lists not being a first-class data type).
- Subroutines can also be named or anonymous, and can be overwritten during the program.
- The three data types are: strings, integers, and continuations.
- In addition to the stuff pushed on the stack by a subroutine (and possibly it may pull parameters from the stack, too, or receive parameters in numbered list variables), it also has another kind of return value, which can be one of the three values "okay", "bad", or "very bad" (if none is given, it is "okay" by default).
- Templates (the name FurryScript uses for text strings) can not only contain normal text and subroutine calls, but also regular expressions, continuations, and a few other things.
- It also includes commands for a dice roller and a "skill generator", each of which uses its own mini programming language. These mini programs are written using templates, so they can include all of the things that templates can include!
CategoryLanguage