A bunch of random ideas put together in a programming language.
Its name stands for "Computer Language With Pronounceable Acronym, Just Not This Acronym". Its name, along with the fact that it's sort of a parody of other programming languages, is inspired by Compiler Language With No Pronounceable Acronym (abbreviated INTERCAL).
Comments are like in C++ and Java (//
to the end of the line, or between /*
and */
). Whitespace mostly doesn't matter. String literals are surrounded by single or double quotes and can contain similar escapes to C++.
Parentheses, square brackets, and braces must match but are otherwise completely interchangeable (except within strings).
The main data types are numbers and strings.
=
value
?
value, value ≠
value
≠
may also be written !=
.
(
expression )
+
-
*
/
%
^
±
number
++
may be used instead.
<
>
≤
≥
<=
and >=
are also available for Unicodiphobes.
int(
number )
makeMoreStringy(
value)
, makeLessStringy(
value)
+
string
-
string
*
number
truck(
string)
string * .5
.
asky(
values)
something(
values)
something()
nothing(
values)
nothing()
imagine
statement
imagine
statement. (ask()
will return a random number if imagined.)
answer(
values )
ask()
;
statement
then
statement
wild
statement
too(
initializer,
condition)
statement
for
loop. Executes the initializer, then executes the statement, too. The condition is not tested the first time through the loop.
always
statement
sometime
statement
neverEver
statement
neverEver
statement is encountered).
procrastinate(
variables)
statement
deadline(
result of a procrastinate statement)
sometimes
statement
because(0±1>0)
.
never
statement
because(0)
.
please
statement
because(1,1)
.
because(
conditions)
statement
;
and then
operators and the bodies of wild
loops and superroutines.
;
uses these statements to determine the relative probabilities of each statement; then
uses these statements to decide how many times each statement should execute (but it determines it when the then
statement starts executing); wild
uses these statements to decide the probability of ending the loop.
goAway()
When entering the main program or a superroutine, the interpreter searches for any superroutines it contains. If it finds one that returns to the calling superroutine (initially main
), it executes that instead of whatever it would have otherwise executed (choosing randomly if necessary).
super
name body
never
statement.
(
value)
superroutine name
never
statement if the wrong superroutine name is specified.
call()
pi
, e
, inf
answer
, ask
, makeLessStringy
, makeMoreStringy
, int
please
, never
, wild
, because
, too
, ;
, and then
asky
, truck
, something
, nothing
, goAway
imagine
, always
, sometimes
, sometime
, neverEver
±
, string versions of -
and *
, and Unicode variants of operators ≠
, ≤
, and ≥
a; b; c
choose equally among their arguments rather than interpreting it like (a; b); c
.
because
now allows multiple arguments
Applet; Download (125 KB), Download source (19 KB) (downloads also include Try and 42)