Proce

Proce (pronounced like the first syllable of the verb "process"—Brit. /prəʊs/, U.S. /prɑs/) is an esoteric programming language by Tanner Swett.

A program consists of a series of statements, delimited by line breaks. If a number sign appears anywhere within a line, the remainder of the line is ignored. The syntax for a statement is:

::= name | number | "(" ")" | (number "*" | "d!" | "i!" | "r!") | ("+" | "-")

A "name" is a sequence of letters and underscores. A "number" is a decimal literal, consisting of digits and optionally a period and/or a hyphen. Whitespace between tokens is ignored; note that the strings "d!", "i!", and "r!" are each a single token. Unary operations (including multiplication) take precedence over binary operations.

There exists a positive real number δ called the resolution. This real number is defined by the interpreter, and must be no larger than 1/44100. Each signal consists of a function taking the time t, a non-negative integer multiple of δ, and returning a real number. Executing a program consists of evaluating all signals mentioned in the program at 0, then at δ, then at 2δ, and so on.

The signals are defined as follows:


 * (t) = x * (t)
 * (t) = ( (t) - (t-δ))/δ
 * (t) = (t-δ) + (t)*δ
 * (t) = (t) (if  (t) > 0), 0 (otherwise)
 * (t) = (t) +  (t)
 * (t) = (t) -  (t)

A numeric literal represents a constant signal. A named signal is equal to 0 at all non-positive values of t, and for all positive integers n, the signal at t = nδ is equal to the right-hand side of its definition, evaluated at t = (n-1)δ. However, slew rate is limited to 44100: the difference between a signal's value at time nδ and its value at time (n-1)δ is clamped to the interval [-44100δ, 44100δ].

The following program defines  as an approximation of the sine function. The approximation can be made arbitrarily good by decreasing δ:

sin = i!(1 - i!sin)

Computation in Proce may be possible, but it is not obvious how to implement it.