Mullets, Moustaches and MicroPROLOG

There was more to the eighties than funny looking moustaches, mullets and screaming electrical guitars. I’m of course talking about the home computer revolution: the era when the end-user was more or less expected to have a solid understand of how the hardware and software worked. Some time ago I thought it would be a great idea to deepen my knowledge of this period, and did what any self-respecting man or woman would do in my situation: grow a moustache – ehr, I mean: read a book about it. The book in question is named The Personal Computer Handbook (Swedish: Allt du behöver veta om persondatorer), and is precisely the kind of book that I would normally scoff at. If it was written today that assessment would probably be correct, but it managed to surpass my wildest imaginations. Just look at this image from the second page, and you’ll probably understand why:

That’s the future right there! And the book keeps delivering. Instead of explaining how one uses a word processor it delves deep in technical details about electronics, peripherals, computer architectures, micro code, assembly code and finally high-level languages such as BASIC, LOGO, COBOL, LISP and finally the Prolog dialect microPROLOG. The text goes as follows (disclaimer: this is my translation from the Swedish book. The English version probably differs!):

At Imperial College in London, a team under the direction of Robert Kowalski has worked on a simplified version of PROLOG (called microPROLOG) intended to foster the children’s capability in logical thinking. This capability is not restricted to computers, but can also be applied in other areas such as mathematics, French, history and geographics.    

While LOGO’s Turtle Graphics is based on the computer’s ability to create images and figures, microPROLOG is focused on the computer’s ability to manipulate symbolic expressions. But Turtle Graphics has proved to be a such successful system, that it has been included in some versions of microPROLOG.

Simple PROLOG programs can be built from propositions that contains names of individuals and relations between them.

One first constructs atomic propositions (so-called because they are the simplest possible propositions.) For example: Anders is-neighbor-with Lisa. Lotta is-friend-with Nicke. Lisa is-fighting-with Anders.

One can also construct molecular (composite) propositions, for example: Maria likes Johan if Johan likes Maria and Johan is-nice-to Maria. Or: x is-larger-than y if x is-larger-than z and z is-larger-than y. One can ask questions to the computer that are based on these facts and relations. Writing microPROLOG programs is like writing simplified and logically clear English, and the children becomes excited by the fact that the computer understands a language so close to their own.

MicroPROLOG is just like BASIC an interactive language, where the pupil can add, remove and modify the program and immediately see the result of the modification. Individuals in simple programs can be replaced by variables or lists, for example: Johan has-favourite-groups (Police, Roxy Music, ABBA).

PROLOG can handle such lists by first dividing them into a head and a tail. The head is the first element in the list, and the tail is the rest. The head in Johan’s list is therefore “Police”, and the tail is everything else in the parenthesis. The same head-tail structure is also found in LISP and LOGO.

Recent studies show that education in BASIC programming learn children how they should use the computers of the seventies, while education in LOGO and microPROLOG prepares them for the computers of the eighties and the nineties.

I can’t help but be a little moved by such unbridled enthusiasm! What went wrong? When I went to middle-school they didn’t even teach us a Basic dialect! Perhaps it’s time to revitalize the grand plans of microPROLOG and create a new generation of Prolog hackers?

Finally, I feel obliged to post one final picture from the book. It’s referred to as The computer controlled home, and should speak for itself.

Man, the future is such a letdown!

(For the record, the next installment regarding computer generated music will probably be delayed for a few weeks due to an upcoming examination period.)

Advertisements

8 responses to “Mullets, Moustaches and MicroPROLOG”

  1. thanosQR says :

    lol, LOGO+PROLOG xd
    such a pity that the evil imperative languages survived 😐

  2. Someone Who Hacks Prolog says :

    Sorry, you were born too late.

    I was lucky enough to grow up during that period (born 1974). Back when the Z80 and the 6502 were the processors us hobby hackers used (8088 and 8086 PCs were just too expensive), you just had to understand how to program if you wanted to get the machine to do something interesting. They were fun times.

    When I was 12 or 13 I was taught LOGO in school but didn’t get to do half of the stuff you can read about in the “Computer Science Logo Style” trilogy by Brian Harvey. Back then I saw it as a turtle manipulation language – not a dynamically scoped LISP dialect. It must have has some effect on me as I’ve spent a large chunk of my personal time implementing various LISP like systems, albeit lexically scoped ones. However, back then my mind was polluted with assembly language and BASIC. My goal was to get a 16-bit computer and learn C. Languages like LOGO weren’t for serious work. Silly boy!

    Anyway, I came to this blog after searching for micro PROLOG. I’ve just finished scanning the ZX Spectrum micro PROLOG manual and was quite surprised at how different from Edinburgh PROLOG it looks. I cannot imagine trying to squeeze all that into 48Kb. My ISO/Edinburgh PROLOG implementation on a 64-bit machine is over 200Kb (abstract machine + compiler + ISO built in predicates + top level user interaction).

    I also saw a reference to a “Logic as a Computer Language for Children” project in the acknowledgements in the introduction of the book.

    • Someone Who Hacks Prolog says :

      Strange coincidence, just found this old advertisement:

      • victorlagerkvist says :

        Thanks for your insightful comment, and great picture! It appears as though the knowledge level of programmers gets lower for each generation, as the computers and software tools get more powerful and hides details. We can only hope that the process overflows and someday returns to its peak.

  3. natecull says :

    Thanks so much for this! I’m a child of the early 70s too and grew up in the 80s. Never had a Spectrum but I did play with Turbo Prolog on the PC and fell in love with the language. Then was bitterly disappointed when the 90s came and the entire logic programming paradigm was tossed into the dustbin.

    I’m reading the MicroProlog Primer (from here – http://www.worldofspectrum.org/infoseekid.cgi?id=0008429 ) and wow, this looks like a really neat implementation! As easy to use as BASIC, and with some nice syntax properties (like an S-expression base, and not reserving all uppercase symbols as variables) that aren’t in the standard varieties, but should have been. SMILE alone *needed* to have been in high school computing curricula. Sigh.

    .

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: