11.001001000011111101101010100010001000 Arithmazium
Home

Welcome to Paranoia: The Program

This is the story of a program from the early 1980s. Paranoia runs on any computer supporting the BASIC language, revealing the secrets of the computer's underlying arithmetic.

The story is worth telling, and may you find it worth reading, because Paranoia has the highest concentration of accessible arithmetic wizardry you'll find anywhere. There will never be another code quite like it.

When it appeared, Paranoia became an instant cult classic in the numerical community. Translations to Pascal, C, FORTRAN, and Modula-2 quickly appeared, then Forth decades later. (Let's agree on the mixed-case names like Basic and Fortran to go easier on the eyes.)

To bring the conversation up to the 21st century, I've translated Paranoia to Python. Gone are the restriction to variables like E9 and U2 and a limit on number of lines for comments.

You won't need deep Python knowledge to read this story. Python's clean form allows you to focus on computation, not syntax. Familiarity with any programming language will help, but this discussion includes a section explaining what little of Python you might need.

This presentation proceeds with several introductory pages and and then the code itself, organized as a shallow hierarchy of tests with supporting functions. Paranoia executes in one pass, a sequence of largely independent experiments. It's not an easy program, but its structure is simple. You can unravel bits and pieces without digesting the whole code.

Of course, you're welcome to dive in anywhere, if you've seen other versions of Paranoia or if you're just feeling lucky.

Welcome, I hope you enjoy the story.

Home