LOGO language for windows, Mac and Linux

Insaf Setitra
9 min readMay 20, 2023

--

What is LOGO?

The name “LOGO” is derived from the Greek word “logos,” which means “word” or “thought. Following this name, ”LOGO was developed in the late 1960s by Wally Feurzeig, Seymour Papert, and Cynthia Solomon at the Massachusetts Institute of Technology (MIT) as a programming language specifically designed to be an educational tool. LOGO aims at introducing children to the world of programming and computer science.

Why LOGO?

One of the key features of LOGO is its turtle graphics, which allows young learners to see the immediate results of their commands and experiment with creating their own designs. In addition to turtle graphics, LOGO also supports a range of programming constructs, such as loops, conditionals, and procedures. LOGO programs are typically written in a simple and readable syntax, using commands like “forward,” “backward,” “right,” “left,” and “repeat” to create sequences of actions.

LOGO’s impact extends beyond its use as a programming language. The Scratch programming language, developed by the Lifelong Kindergarten Group at MIT, draws inspiration from LOGO and features a similar visual programming interface.

In this tutorial we will be introduced to the basic instructions of LOGO by exploring its interface in both Windows, Linux and MAC.

LOGO for windows

To install LOGO on Windows, we will need to install a version of LOGO on our computer. There are several LOGO implementations available for Windows. Popular version include MSWLogoor FMSLogo, which are both free.

For this tutorial, we will be using MSWLogo. To install the latter, we will need to download it from the website implementation by clicking at Setup Kit. This will download and .exe file. The following step is to install it on our computer by double clicking on the icon and following the steps.

Playing around with some coding

There is an infinite number of things that can be done using LOGO.

Here are a few examples of LOGO code that can create interesting and visually appealing patterns using turtle graphics:

  1. A simple square:
REPEAT 36 [  FORWARD 100  RIGHT 90]

The result can be shown in the interface of MSWLogo by writing the code and hitting the execute button.

Note in this example that we asked our logo turtle to repeat 36 time a forward move of the pencil from its original positions by 100 pixels, then turning right by 90 degrees. Note also that 4 instead of 36 repetitions would have led to the same result.

This code draws a square spiral by repeating a forward movement and a right turn 90 degrees, 36 times.

2. Concentric Circles:

REPEAT 10 [  CIRCLE 50  PENUP  FORWARD 20  PENDOWN]

This code draws 10 concentric circles of increasing size, with a radius of 50 for the first circle and incrementing by 20 for each subsequent circle. Not the PENUP and PENDOWN commands where in the former our turtle does not draw and in the latter the drawings are made.

3. Flower Pattern:

REPEAT 36 [
FORWARD 100
RIGHT 45
FORWARD 50
RIGHT 90
FORWARD 50
RIGHT 45
FORWARD 100
RIGHT 100
]

This code creates a flower-like pattern by combining various forward movements and right turns.

4. Fractal Tree:

For this example, we will write the code in a notepad, save it with the extension .LGO then load it from the MSWLogo interface:

TO TREE :SIZE
IF :SIZE < 5 [STOP]
FORWARD :SIZE
LEFT 30
TREE :SIZE / 2
RIGHT 60
TREE :SIZE / 2
LEFT 30
BACK :SIZE
END

TREE 100

The result is:

This code defines a recursive procedure called “TREE” that draws a fractal tree. The initial call to “TREE 100” draws a tree with a trunk size of 100. the “To” in LOGO defines a procedure. The call for the procedure is then the name of it. Note that inside TREE there is a call to TREE which makes it a recursive procedure.

These examples should give you a starting point to explore the creative possibilities of LOGO programming. You can modify and combine these patterns, experiment with different angles and movements, and even create your own unique designs.

5. Exploring the examples provided by the installed version of LOGO

For most versions of LOGO implementation, there is a repository for examples. In MSWLogo for example, the default Softronics:

Let us test the code 3DMOVIE.LGO :

To have a look at the source code, we can open the LGO file using any text editor.

Adding another language to AWSLogo

By default, AWSLogo compiles only english commands. Fo example, when writing: AVANCE instead of FORWARD in AWSLogon then we should have the following error:

Fortunarely, there exist an effort to provide other languages. The french version for example can be found here. The zip file (fichier zip) in this link contains the folder for french.

The content of this zip file called startup.zip should be put directly in the installation repository of LOGO:

Once this done, we need to execute MSWLogo taking into account the translation version. This is done in two ways: whether by adding a parameter in the shortcat of MSWLogo, or by launching MSWLogo using the CMD command line.

  1. Using a shortcut

First, we need to create the shortcut:

Then we need to add the french version parameter to the target of the shortcut. This is done by adding -l start.lgo to the target of the shortcut.

A tree should appear for a short time on the screen.

We can now see that the french version is working. We should not see the error anymore, and the turtle is making a move:

2. Using the CMD command line

This is done simpling by positionning into the folder of installation of AWS and typying the following commands:

cd C:\Program Files (x86)\Softronics\Microsoft Windows Logo
logo32.exe -l start.LGO

MSWLgo with the nice tree should then appear:

LOGO for Linux

For Linux installation; we will follow these steps.

  1. We first need to open a terminal. We can find the terminal in the applications menu or using the keyboard shortcut Ctrl+Alt+T.
  2. Then we need to install the LOGO interpreter. There are several LOGO interpreters available for Linux. One popular choice is Berkeley Logo (UCBLogo). The application will be installed depending on the package manager specific to our Linux distribution.
  • For Ubuntu or Debian-based distributions, use the following command:
sudo apt-get install ucblogo
  • For Fedora or CentOS-based distributions, use the following command:
sudo dnf install ucblogo
  • For Arch Linux or Arch-based distributions:
sudo pacman -S ucblogo

These commands will download and install the Berkeley Logo interpreter on our system.

4. Once the installation is complete, we can launch Berkeley Logo from the terminal by simply typing ucblogo. This will start the interactive LOGO interpreter, where we can enter and execute LOGO commands.

Note: Depending on your Linux distribution, the command to launch Berkeley Logo may vary. If ucblogo doesn't work, you can try logo or consult the documentation specific to your distribution.

Please note that Berkeley Logo is just one of the LOGO interpreters available for Linux. There are other implementations as well, such as KTurtle, which is specifically designed for educational purposes. The installation steps may vary for different implementations, so you can choose the one that suits your needs the best.

That’s it! You now have LOGO installed on your Linux machine using Berkeley Logo. You can start exploring LOGO and writing programs in the LOGO interpreter. The same codes as the ones for MSWLogo can be used.

LOGO for MAC OS

Here are the steps to install LOGO on macOS:

  1. First, we need to choose a LOGO implementation. There are several LOGO implementations available for macOS. One popular choice is the ACSLogo version that can be downloaded from the website (https://www.alancsmith.co.uk/logo/). Note that other versions might be available, feel free to exploit them.
  2. Once the choice made, we need to download the installer. The download is a self-extracting archive (2M) ant the release requires Sierra (OS X 10.12) or later. Right-click on the link ACSLogo1602.dmg and save it to disk.
  3. After the download is complete, locate the downloaded installer package (typically in the Downloads folder) and double-click on it. This will start the installation process.
  4. The installer will guide us through the installation process. We need to follow the on-screen instructions to install ACSLogo on our macOS system. Note that we may need to provide our administrator password during the installation process.
  5. Once the installation is complete, we can launch ACSLogo from the Applications folder or by searching for it in Spotlight. Double-click on the ACSLogo icon to start the program.
  6. That’s it! We now have LOGO installed on our macOS machine using ACSLogo.
  7. ACSLogo provides an interactive environment where we can enter LOGO commands and see the results in real-time. It supports turtle graphics, loops, conditionals, procedures, and other LOGO features, allowing us to explore and create different programs and designs.

Great! You now have LOGO installed on your MAC machine. You can start exploring LOGO and writing programs in the LOGO interpreter. The same codes as the ones for MSWLogo can be used.

LOGO online

There are also several online platforms and emulators where we can play around with LOGO without the need for local installations. Here are a few options:

  1. Turtle Academy (https://turtleacademy.com/): Turtle Academy is an online LOGO programming environment that provides a user-friendly interface for learning and experimenting with LOGO. It offers a range of lessons, challenges, and projects to help you enhance your LOGO skills.
  2. Scratch ( https://scratch.mit.edu/projects/editor/?tutorial=getStarted): Scratch is a popular visual programming language and online community developed by the Lifelong Kindergarten Group at MIT. While not specifically designed for LOGO, Scratch incorporates LOGO-inspired features and turtle graphics, allowing you to create interactive projects using a block-based programming interface.
  3. Online Logo (https://www.transum.org/software/Logo/): online LOGO is a LOGO interpreter that simulates the turtle graphics functionality. It offers a basic LOGO environment where you we write and execute LOGO programs.

These online platforms and emulators provide a convenient way to explore LOGO and experiment with turtle graphics without any access to a local installation. They offer interactive interfaces, tutorials, and resources to help get started with LOGO programming. Note though that not all plateforms have multiple languages, this is why, during the installation of AWSLogo we had to add the french version. Feel free to check for other languages for Linux and MAC.

Happy LOGO programming!

Some useful documentation:

Documents

Links

Other examples

Well, all done. Have fun exploring LOGO!

--

--