ZX Computing


Designs For Living

Publisher: Sinclair Research
Machine: Spectrum 48K

 
Published in ZX Computing #16

Colin Christmas turns turtle with Sinclair's package

Designs For Living

There are certain people for whom the usual channels of communication, such as a cheerful "Hi. How are you? Your place or mine? Leave it out, John,", and so on, are virtually useless. In this category, I put all aliens. Chiefly because I've never met any or at least any who would admit to having come from another world.

Also in this category, anyone from another country who has not learned English, or any other gibberish that I can't understand.

And most mathematicians.

Logo

That's my experience for what it's worth. The problem of course is language. Mathematicians seem to have their own and since my only consistent success in that field is to have failed every test and examination they cared to set for me, we never seem to have anything to talk about.

Imagine, then, a cosy meal late into the night and me deep in conversation wth a mathematician... She is talking about computers, learning and languages - computer languages. Her enthusiasm for one in particular cannot be ignored. It was called Logo and all this took place in 1983. She was less of a mathematician, more of a maths teacher.

I hope the relevance of that little anecdote to this article will soon be obvious. Regular readers of ZX Computing will at least be familiar with Logo through reading excellent articles by Tim Hartnell and the series Slogo by David Nowotnik who has written a Basic program which gives us quite a powerful and versatile version of Logo for the 48K Spectrum.

Readers will also (I hope) be well aware of the increasing number of utilities and toolkits being made available to Spectrum users for work in graphics and areas like computer aided design, something of a special interest of mine, as regular readers might have noticed.

Get Computers Into School

Logo is probably best known as a graphics language. Many children today will be familiar with 'buggies' or 'turtles' which many schools bought as part of the package in the great "Let's get computers into schools" campaign which in fact is still going strong.

These mini robots receive Logo commands from a computer and move about on sheets of paper on the floor creating designs and shapes. Needless to say, Seymour Papert, the founding father of Logo, had more than just graphics in mind when designing this language which would 'teach learning'.

He certainly had young children in mind however, and furthermore he had the world of mathematics in mind too. The common denominator would be the computer used as a tool by children. The language would need to be able to develop logical thinking, introduce children to computer programming and, at the same time, prepare them for future programming and languages other than the cumbersome Basic.

This was Papert's task. Logo, the result.

Its not the only competitor in the field of languages for education. There's Pascal, also 'procedure orientated' and Comal which is used educationally in Sweden and Norway.

But it's not my brief to go into Logo in deatil - there's neither time nor spacehere - nor to offer comparisons with other languages. Rather, it is to give a considered welcome to Sinclair's Logo package for the 48K Spectrum.

The package comprises two books, and a software cassette by LCSI/SOLI. The first book, Sinclair Logo 1, deals exclusively with turtle graphics. The 'turtle' incidentally is not the robot kind but a graphics turtle, which appears as a small triangle on the screen.

The graphics screen is known as the Turtle's Field, and this, apart from the bottom two lines of your TV screen, is your drawing board.

The size of the field can be changed using a very simple command (ALL commands, operations and procedures in Logo are extremely easy to grasp - almost literally 'childs-play'), this particular command setting the aspect ratio to (XY) which changes the scales on which your images have been drawn.

Primitives

Logo understands a number of words called Primitive Procedures known as Primitives and many of these have a shorthand form. So that to make the turtle apear on the screen, you type SHOWTURTLE or ST (its short form) and to make it disappear you type HIDETURTLE or HT.

The shape of the turtle gives you its Position and its Heading. This is known as the turtle's State. It's State, Background colour, all movement Back, Forward, Left, Right, Pencolour (the turtle is imagined as carrying a pen which it draws with, or not because you can instruct the turtle to lift its pen, in which case it does not draw as it moves), the boundaries of its movement, all of these can be changed with abbreviated commands.

Once you have used primitive procedures to draw a square or some other geometrical shape, then Logo can be taught to understand all of these procedures as one procedure by simply giving it a name.

In this way, by building new procedures, you are continually extending Logo's vocabulary. And you can master it in minutes.

Documentation

The first book goes on to show how you can write programs which can manipulate words and lists, known as Objects in Logo.

When the software cassette is loaded, the Spectrum is in Textscreen mode. There are 22 lines available for text.

Every time you use a primitive related to the movement of the turtle, you go into the graphics mode, again with 22 lines for graphics and the two already mentioned which are for your conversation or communication with Logo. To get back into Textscreen simply type TS. You cannot, of course, see the turtle in this mode.

This last part of the first book instructs the user on using Variables, carrying out arithmetic operations, assigning values to variables, exploring the potential of Logo for producting beautiful designs based on circles, polygons and spirals, exploring the capability in Logo of procedures being able to call or be called by any other procedure including itself (known as recursive procedures) and finally the setting up of a game using Logo.

I can't truthfully imagine many people finding this first book difficult to use and for that matter finding Logo anything but fascinating and challenging to use.

The second book in the package describes itself as "a reference manual for experienced Logo users, rather than a guide for newcomers."

All I can say here is that working through the first book is easy and enjoyable and having done that, by its own definition, the Sinclair Logo package welcomes you to the second book as "an experienced Logo user".

The reference manual is extremely comprehensive and so far has not let me down once. It is set out clearly and is very easy to use for reference. Fourteen chapters and two Appendices take you through first the basic rules for writing and combining procedures, the grammar to make Logo understand what you want it to do. Each of the Primitives is then defined and their use explained in considerable detail. It's this which makes it only suitable for experienced Logo users, not its degree of difficulty in being understood or used.

Good News

Like any new message, the good news of Logo has been steadily spreading since it was first announced in the Sixties. Sinclair have at last now provided Spectrum users with their own 'bible' in the shape of this package. This means more disciples and I think the package will find its first converts amongst those who are in any way 'instructors'.

It is another language, to many of us refreshingly different from Basic. It is widely recognised that you tend to prefer the language you first learned to program with, and so the package will only appeal at first to the most open-minded micro users. But now that it is here in this form, I foresee a new wave of programmers and a wider use of Logo in the vocabulary of children and teachers in particular.

Logo is something new to Spectrum uses. Its potential for early learning should not be ignored. Once again we have at our fingertips a tool which will become commonplace to future generations or at least act as a stepping stone on the journey toward new horizons for the home computer.