1 How to think about INTERCAL🔗ℹ

The most useful shift is to stop thinking in terms of recursive functions and start thinking in terms of an explicit state machine.

An INTERCAL program in this repository is usually built from four pieces:

  • mutable scalar variables such as .1 and :1,

  • optional arrays such as ,1 and ;1,

  • control-flow edges built from labels, NEXT, and RESUME, and

  • calls into the standard library routines in "syslib.i".

The compilation strategy in "sick.rkt" preserves this structure very directly. The frontend normalizes the program into a compact S-expression IR, and the macro backend expands that IR into a Racket state machine. That means program structure matters: a clear label layout and disciplined use of temporary variables make programs easier to debug and easier for the compiler to optimize.