Using the Python Interpreter as a Reference

Chris Angelico rosuav at gmail.com
Sun Nov 27 19:26:17 EST 2011


On Mon, Nov 28, 2011 at 10:55 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> What does it mean to say that a language is "small"?
>
> A Turing Machine is a pretty small language, with only a few
> instructions: step forward, step backwards, erase a cell, write a cell,
> branch on the state of the cell. And yet anything that can be computed,
> anything at all, can be computed by a Turning Machine...

Ook has only three tokens (okay, it's a derivative of BrainF** so it
kinda has eight, but they're implemented on three). It's
Turing-complete, but it is so small as to be useless for any practical
purposes. The ONLY way to use Ook for any useful code would be to
write an interpreter for another language in it, and use that other
language.

However, Ook can be proven to be flawless, as can an Ook interpreter,
much more easily than a full-featured language like Python or C.

ChrisA



More information about the Python-list mailing list