On this page:
Designing INTERCAL Programs
9.1

Designing INTERCAL Programs🔗ℹ

Ethan Hawk and Eva Augur

This guide is aimed at a Racket programmer who wants to write new programs for this implementation instead of only reading existing ones.

    1 How to think about INTERCAL

    2 A practical workflow

    3 Worked Example: Triangular Numbers

      3.1 Start with an ordinary Racket function

      3.2 Rewrite the Racket into effectful stateful code

      3.3 Separate helpers from the loop body

      3.4 Map Racket variables to INTERCAL variables

      3.5 Translate helper calls to NEXT and RESUME

      3.6 Translate one loop iteration

      3.7 Translate the loop back-edge

      3.8 Assemble the final program

      3.9 How the labels correspond to the Racket structure

      3.10 A translation recipe

    4 Debugging Advice

    5 How to grow from here