The Language
INTERCAL-64
A 64-bit extension to the Compiler Language With No Pronounceable Acronym. It is 100% backwards compatible with every INTERCAL program ever written — it simply lets you write bigger, more confusing ones.
What it is
INTERCAL-64 extends the 1972 language to 64-bit arithmetic, adds a complete system library written in pure INTERCAL, and ships with the first interactive debugger the language has ever had. The reference compiler is churn; the file extension is .ic64.
Every classic INTERCAL program still compiles and runs unchanged. Nothing has been taken away — only added, and only at widths nobody asked for.
Variables
All classic variable types are supported, joined by three new 64-bit types.
| Prefix | Name | Width | Description |
|---|---|---|---|
. | spot | 16-bit | A 16-bit unsigned integer |
: | two-spot | 32-bit | A 32-bit unsigned integer |
:: | double cateye | 64-bit | A 64-bit unsigned integer |
, | tail | 16-bit | A 16-bit array |
; | hybrid | 32-bit | A 32-bit array |
;; | double hybrid | 64-bit | A 64-bit array |
The spot (.) and two-spot (:) retain their classic meanings. The new double cateye (::) extends the series to 64-bit precision. It is so named because it consists of two two-spots, and two twos is four.
Constants
Constants are formed with the mesh (#) prefix.
| Prefix | Name | Width |
|---|---|---|
# | mesh | 16-bit |
## | fence | 32-bit |
#### | stockade | 64-bit |
The absence of a triple mesh (###) is intentional. Three meshes would imply 48-bit precision, which is not a thing.
Operators
The five original operators are retained without change.
| Operator | Name | Type | Description |
|---|---|---|---|
$ | big money | Binary | Interleaves the bits of two operands (mingle) |
~ | select | Binary | Extracts bits using a mask |
& | ampersand | Unary | AND of adjacent bit pairs |
V | V | Unary | OR of adjacent bit pairs |
? | what | Unary | XOR of adjacent bit pairs |
Mingle and select at higher widths
The mingle operator ($) produces a result twice the width of its operands.
| Operands | Result |
|---|---|
16-bit $ 16-bit | 32-bit |
32-bit $ 32-bit | 64-bit |
64-bit $ 64-bit | 128-bit (ephemeral) |
The 128-bit result of mingling two 64-bit values is ephemeral: it cannot be stored in any variable. It exists only long enough to be consumed by a select (~), which reduces it back to at most 64 bits. Briefly real, then gone — much like a good idea in a committee meeting.
Statements
All original INTERCAL statements are retained without modification. The programmer may continue to ABSTAIN FROM CALCULATING, COME FROM unexpected places, and GIVE UP at any time.
For what COME FROM can do that DO NEXT cannot — including a formal proof that it is computationally necessary — see the papers.
Labels
Labels have been extended to 64 bits, so that programs exceeding 119 lines are assured of enough labels. The reader is aware that 64-bit values take more space. Users are encouraged to avoid labels like (10) DO <whatever> and to prefer (744073709551615) DO <whatever>, in the hope of fewer integration problems in the future. The authors tested the label 744073709551615 but did not test all labels available.
INTERCAL-64 descends from cringe (2003), the proof-of-concept compiler that first established all of this was possible. cringe is preserved as a historical artifact and is no longer developed.
