The P” Programming Language

The P” (letter P followed by two single-quote characters, “P prime-prime”) programming language is not really a practical programming language, it’s mostly a theoretical notion. P” was created in a 1964 research paper by C. Bohm. The base P” has six instructions:

1. R  - move instruction pointer to right
2. L  - move instruction pointer to left
3. r  - increment [ptr]
4. r' - decrement [ptr]
5. (  - begin loop until [ptr] = 0
6. )  - end loop

P” doesn’t have any input / output statements, but if you add i (for input) and o (for output), then here is a P” program that adds 3 plus 5:

rrrRrrrr(LrRr')rrrrrrrr(LrrrrrrRr')o

If this is the first time you’ve seen P” it’s probably a bit confusing, but if you read the Wikipedia article at https://en.wikipedia.org/wiki/P%E2%80%B2%E2%80%B2 you’ll quickly understand it.

There are several not-very-clever variations of P” where hobbyists substitute symbols and create what they think are cute variations of the language, but P” is really what all these variations are. In general, strange, non-practical languages like P” are sometimes called esoteric languages.

The topic of this blog post was motivated in part by a few news items I read recently. One was about the attempts to add fill-in-the-blank categories of people to tech companies by creating dummied-down programs like “Day of Coding” for young students. In the end, a person is only successful at something they’re truly passionate about.

If I saw a high school student who was fascinated by P” then I’d be almost certain that he’d be well suited to study computer science. But if I saw a student who thought a drag-and-drop thing that moves an Angry Bird cartoon icon around a maze was cool, I wouldn’t be sure if they’d be suited for serious computer science or not.

Computer Science is difficult. Really difficult. So are things like electrical engineering, biochemistry, and so on. To succeed in these areas, a person has to have relentless drive and that drive has to be inner motivated, not pushed by an external agenda. Put another way, if I were the czar of increasing the pipeline of students into science and tech, I’d focus the vast majority of my efforts on K-6 education. In my opinion (backed by quite a bit of research), by age 13, a student’s passions for topics are there or not for the most part.



This guy is about to hear some non-esoteric language from his girlfriend. His instruction pointer will likely not get incremented for a few days.

This entry was posted in Miscellaneous. Bookmark the permalink.