Logo For The 64
The Logo language has been causing quite a stir in the home/educational market lately. Originally available only for the Texas Instruments microcomputers, there are now implementations of Logo available for every major brand of home computer on the market.
Buying Logo, like buying a computer, can be an expensive proposition for home users:
Typically, the language retails for between $100 and $200. The Commodore 64, however, has the virtue of being inexpensive as home computers go; it is also remarkably versatile. Given this, it is not surprising that the Commodore 64 Logo package is both affordable and powerful.
Designed for Commodore by Terrapin, the 64 version of Logo makes good use of the hires graphics, sprites, color and sound capabilities for which the 64 is known. It also includes a thorough manual/tutorial and a utilities/demo disk. The price: about $50–$80, although it can be picked up on sale for as low as $35 at some retail outlets.
Logo includes both the turtle graphics system and a sophisticated language that is stimulating and challenging for adults as well as kids. Logo is a user-friendly cousin to languages like LISP, which are used in research on artificial intelligence. Because of this, it operates using a system called "list-processing," which organizes its programs as lists of procedures. Each procedure is itself a list of procedures; so a Logo program follows a "tree" structure, all the way down to the smallest roots, which are the built-in commands that come with the language. If this description seems a bit abstract, consider this standard example, one of the first Logo graphics programs most people learn to write:
TO SQUARE ; Name of the procedure FORWARD 50 ; Moves the screen turtle forward 50 "turtle steps" RIGHT 90 ; Turtle turns 90 degrees right— FORWARD 50 ; Across the top… RIGHT 90 ; Another turn— FORWARD 50 ; Down the other side… RIGHT 90 ; Turn again— FORWARD 50 ; Bottom of the square RIGHT 90 ; Turn turtle back to original heading END
Does all that seem repetitive? Too much typing? Logo lets you abbreviate and take shortcuts, doing the whole thing more elegantly:
TO SQUARE REPEAT 4 [FD 50 RT 90] END
Commands like FORWARD, BACK, RIGHT, and LEFT are called Logo "primitives." The user puts them together into procedures such as SQUARE. The interesting thing is that, for all practical purposes, Logo treats primitives like FORWARD and procedures like SQUARE as though they were identical. This lets the user "teach" the computer new commands. These commands can then be used over and over again in different programs.
Seymour Papert, the man who headed the original Logo project, had worked with the late Jean Piaget, the renowned Swiss psychologist who studied how people—particularly children—learn to teach themselves. Logo reflects Piaget's philosophy, and that is why Papert and many others consider it an ideal educational tool, if used properly. In a Logo environment, children develop an instinct for geometry and mathematical relationships by "teaching" the turtle to walk around the screen, drawing figures of startling complexity.
Thinking About Thinking
Having defined SQUARE, we can now use it as part of another procedure called HOUSE, which can in turn be part of a larger procedure called CITY. That is all, in essence, a Logo program is: a list of procedures. By breaking down the problem of drawing a city into the procedures of drawing a house, a square, a window, or a roof, children learn to structure their thinking. Bugs in the program are solved by "playing turtle"—that is, physically retracing the turtle's directions. In the process, says Papert, they become epistemologists: They learn to think about thinking.
The manual that comes with 64 Logo also reflects this philosophy of learning. It introduces the user to the language by allowing him or her to choose the features that are of initial interest, and starting there.
The tutorial chapters are nondirective, taking you through the steps needed to become acquainted with techniques for building programs. Having grounded you in the basics, it then simply suggests experiments, rather than telling you what to do. Three Logo "mascots" help you pace yourself: An elephant means "this is important: remember this"; a rabbit means "here is a valuable shortcut or a programming trick"; a snail means "go slowly in this section." The tutorial is excellent in most respects, but young children will find it rough going—the print is small, and it is really targeted for adult users who want thorough documentation on the language.
Graphics & Assembler
The utilities/demo disk contains several useful programs and procedures. Some are used in conjunction with the manual to demonstrate how to manipulate sprites (64 Logo has a total of seven) or play music. Others are graphics demos or simple games that show how list processing works. Utilities include sprite files with ready-made shapes of animals, vehicles, and assorted figures; a sprite editor for redefining your own shapes; and even a machine language assembler written in Logo for creating your own user-callable machine language routines.
The demo disk is a nice idea, but some of the demo programs are a bit disappointing; they are more fragments of programs than actual programs. Undoubtedly, that is all that was intended—program examples that the user can elaborate on—but you can't help responding to some of the demos with "That's it?" One exception is a Logo version of the famous game "Animal" in which the user thinks of an animal and the computer asks a series of questions to "guess" the name of the animal, in the process creating a tree-like classification structure which can then be viewed using the "Animal Inspector" program. This classic demonstration of simplified artificial intelligence makes particularly good use of Logo's list-processing 'abilities, as well as showing the user how the language stores its information.
A Sound Solution
Logo's system for handling the sound capabilities of the 64 is fairly simple, and the demo disk provides ready-made procedures like PLAY to make it even simpler. Basically, you decide what values your notes should have and what duration they should be; Logo does the rest. The manual doesn't point out how to control all three voices or how to set the volume. A serious programmer could write routines to handle these features, using the .DEPOSIT command (Logo's equivalent of the BASIC command POKE). The routines provided on the disk are satisfactory for most types of music and sound effects needed.
In addition to its turtle graphics and extras like sprites and sound, Logo is a natural for handling words and sentences. It contains all sorts of primitives for manipulating phrases. For example, typing in:
PRINT SENTENCE [JOHN LIKES] ITEM 3 [ MARY SUE[TO SKI]]
Will print out:
JOHN LIKES TO SKI
The primitive SENTENCE will put together two elements that follow it into a single sentence, and ITEM 3 will pick out the third item in a list. Note that the bracketed phrase "to ski" is treated as one element of the list. Logo also has primitives for determining if a particular piece of input matches one or more elements in a given list. These text-manipulation features are the true core of Logo, and make it well-suited for educational uses.
Commodore Logo's error messages are friendly. If you attempt to use a procedure and haven't defined it, Logo will tell you that it doesn't know a procedure by that name. It also tells you exactly where the error was found. In the event of a major error that hangs up the system, Logo stops itself in many cases and cheerfully informs you: CONGRATULATIONS! YOU FOUND A BUG! It then gives you the option of continuing where you left off or erasing the faulty procedure and starting completely from scratch. However, the one time this happened to me the restart option didn't work quite right, resulting in input problems. I ended up turning off the computer and rebooting the language disk.
All in all, this is a solid version of Logo for a reasonable price. It contains features lacking in some of the other versions of Logo—sprites, sound, the ability to save drawings from the screen, and touch-sensitive turtles (any of the sprites can be used as turtles) that can sense contact with the background or other turtles. On top of this, it costs less than any other implementation of Logo currently on the market. For both first-time users, exploring their first programming language, and seasoned hackers—children and adults alike—Commodore 64 Logo is an excellent package.
Commodore Business Machines, Inc.
1200 Wilson Drive
West Chester, PA 19380