Petrovich


Introduction

Petrovich is more than just a programming language, it is a complete computer operating system and program development environment. It is named after Ivan Petrovich Pavlov, the guy who demonstrated conditional responses to stimuli in dogs. I would have called the language "Pavlov", but it seems all the cool names for languages have already been used by someone else.

Design Principles

Language Concepts

Petrovich provides two methods of influencing its behaviour: rewards and punishments. Whenever Petrovich does something the user doesn't approve of, the user can punish it. Conversely, whenever Petrovich does something useful, the user can reward it. Petrovich then adapts its behaviour to avoid punishment and enjoy more rewards.

Commands

Petrovich is very simple to use, as it has only four commands. These are usually entered in interactive mode. A scripted version is available, although this recommended only for advanced users.

Examples

In order to understand how Petrovich works, it is instructive to run through some examples. This is a sample interactive Petrovich session, annotated with comments.

Petrovich> do something
11:15:23 11 June 2005
Petrovich> reward
Petrovich>

The user asked Petrovich to do something, and Petrovich responded with the current time. Since this was useful to the user, the user rewards Petrovich.

Petrovich> do something with data_run_20050711.txt
plotting data to printer
Petrovich> punish
Petrovich> do something with data_run_20050711.txt
performing Fast Fourier Transform...
saving result to data_FFT_20050711.txt
Petrovich> reward
Petrovich>

The user asked Petrovich to do something with some scientific data. It responds first by plotting the data and printing it. Since this is not what the user wanted, he punishes Petrovich, then tries again. Wanting to avoid punishment, Petrovich tries something different, and this time performs an operation useful to the user. To encourage such behaviour, the user rewards Petrovich.

Petrovich> do something with HalleBerry001.jpg
file deleted
Petrovich> punish
Petrovich> do something with HalleBerry002.jpg
searching web for similar images...
downloading...
Petrovich> reward
Petrovich>

The user asked Petrovich to do something with a soft porn file, and Petrovich responded by deleting the file. The user did not want this to happen, so punishes Petrovich. The user then asks Petrovich to do something with another file. This time, chastened by the punishment, Petrovich tries a web search and retrieving similar images to add to the user's porn collection. The user rewards Petrovich.

It should be clear from these examples that Petrovich is incredibly powerful and can develop software to handle any data processing task.

And in case you think this is entirely a joke, imagine a Petrovich layer over another operating system, such as Microsoft Windows (TM). Every time Windows does something you don't like, you could punish it, and it would never do it again...


Home | Esoteric Programming Languages
Last updated: Wednesday, 08 February, 2006; 00:40:42 PST.
Copyright © 1990-2014, David Morgan-Mar. dmm@dangermouse.net
Hosted by: DreamHost