← SPL reference

roast (lib/roast.spl)

A joke import. Adding use roast.spl; at the top of a script randomly sabotages the rest of your program. It does not analyze your code — messages are fixed strings for laughs only.

Requires an explicit extension: reqFileExtension.setVar(true); — use use roast.spl;, not use roast;.

Disclaimer (first import per session)

The first time you load roast in an interpreter session, it prints a short disclaimer explaining the three outcomes below. The roll itself happens immediately after the import finishes — no wrapper block is required.

Usage

use roast.spl;

print.string("This line only runs if roast lets you through.");
print.number(math.add(2, 2));

Put use roast.spl; before the code you want roasted. Everything after the import in that script is affected.

What can happen

REPL

In interactive mode, the same roll applies after you type use roast.spl;. Reject mode ignores further top-level input; run+insult mode prints the bit string when you exit the REPL (Ctrl+D / Ctrl+C).

Implementation notes

Implementation: someProgrammingLanguage/lib/roast.spl