Experimenting with Lonely Hearts

Load up the procedures and try out lonely

Copy Lonely Hearts from this page and paste it into your editor or save it as a text file which you should be able to load straightforwardly into your workspace.

To run Lonely Hearts just type:

print lonely or (for short) pr lonely

If you are feeling really lazy try:

repeat 10 [print lonely]

Some suggestions for when you are bored . . .

There are many ways in which you could test or modify the Lonely Hearts system and, in doing so, gain practice in understanding and developing procedure definitions. Don't feel restricted or inhibited by the suggestions which follow:

1. Run each of the procedures separately. E.g type someone by itself or age. This will at very least reinforce the point that Lonely Hearts is a set of tools occupying a workspace rather than an indissoluble program.

2. Replace lonely by a new superprocedure (perhaps called lonely2) which ties the lower level procedures together in some different way. You don't need to worry about removing or otherwise disabling the original lonely. It will co-exist quite happily with your new procedure. They are just different tools. Maybe you could define the new procedure as a command so that the user need only type lonely2 not print lonely2.

3. Change the content of the lists which the various pickrandoms choose from. This is trivial and you won't learn much from it - but it can be fun.

4. To provide some more v ariation in the form of the advertisements, define a new sub-procedure seeks - on the model of description - and then modify lonely by changing the word "seeks to seeks. (Why do you need to do that?)

And for something completely different . . .

Investigate the possibilities of a different sub-language. There are many similarly restricted uses of language which will provide you with scope to practice the mechanics of procedure definition. And you don't really need to stick to a single sentence pattern. (Remember that print provides a <return> at the end of a line it displays.)

Instead of Lonely Hearts ads, for example, you could experiment with houses for sale advertisements, or tombstone epitaphs or weather forecasts (plenty of opportunity to use pickrandom there.). Take a look at some real examples of the data you plan to model and attempt to make some simple generalisations about the form of the texts before you get down to writing out Logo procedures.

Ron Brasington
Department of Linguistic Science
The University of Reading

E-mail: ron.brasington@rdg.ac.uk