Logo (programming language)

from Wikipedia, the free encyclopedia
logo
Remi turtlegrafik.png
Example of a logo output
Basic data
Paradigms : functional , educational , procedural , reflexive
Publishing year: 1967
Designer: Wally Feurendung, Seymour Papert
Developer: Wally Feurendung, Seymour Papert
Typing : dynamic
Important implementations : UCBLogo and others
Influenced by: Lisp
Affected: Scratch
Operating system : cross-platform

Logo is an education-oriented functional programming language created in 1967 by Daniel G. Bobrow , Wally Feursehen , Seymour Papert, and Cynthia Solomon . Logo is easy to learn and was most popular in the 1980s, during the home computer era .

For the time, Logo had a very high performance thanks to the dynamic lists from Lisp , freely definable and recursively callable functions and a few other elements. Nevertheless, the programming language could not compete with other "beginner programming languages" such as B. implement BASIC , which was also due to the fact that it was developed in a child-friendly manner and was therefore underestimated by many.

Unusual elements at the time such as B. a dynamic data type recognition also provided speed disadvantages. In addition, the philosophy of the programming language contradicted the thought of structured programming that was emerging at the time . Loops can normally only be implemented using recursion or program parts embedded in lists. Recursion was often considered difficult to read and required a lot of memory and computing time. A code embedded in data and therefore changeable at runtime was considered a recipe for unpredictable program properties and in multi-user environments (including networks ) as a security problem.

In modern programming languages ​​such as Lingo, there are some options for a logo - sometimes in the form of objects .

Naming

“Logo” is not an  acronym . It was derived from Feurweise from the Greek word logos , which means word  or  thought here . Feurzeig's concept was to manipulate words and sentences. The Turtle graphic was only added later by Seymour Papert when they joined the project.

Example:

PRINT FIRST [Hallo Welt!]

Hallo

Turtle graphic

The most well-known specialty of Logo is Turtle graphics , in which one or more virtual turtles can be moved across the screen , which if necessary draw a colored line behind them. A drawing can then be created in this way.

The most important turtle graphics commands in LOGO
command short form description In German
FORWARD length FD length The turtle / hedgehog moves forward a certain number of units FORWARD length (VW)
BACK length BK length The turtle / hedgehog moves back a certain number of units REVERSE length (RW)
RIGHT angle RT angle The turtle / hedgehog turns a certain angle to the right. RIGHT angle (RE)
LEFT angle LT angle The turtle / hedgehog turns to the left by a certain angle. LEFT angle (LK)
HOME The turtle / hedgehog moves to the center of the screen with an upward orientation (0 °) CENTER
CLEAN The screen is cleared, the position of the turtle / hedgehog does not change. ERASED IMAGE (LBD)
CLEARSCREEN CS Clears the screen and returns the turtle / hedgehog to its starting position IMAGE
PENUP PU The pen is removed from the drawing area. STIFTHOCH (SH)
PENDOWN PD The pen is placed on the drawing area. STIFTAB (SA)
HIDETURTLE HT The turtle / hedgehog becomes invisible. HIDDEN TIG (VI)
SHOWTURTLE ST The turtle / hedgehog becomes visible. ZEIGEL (ZI)
SETPENCOLOR [ r g b ] SETPC [ r g b ] The pen is assigned the color in RGB components (0-255). FARBEIGEL (FI) WHITE BLUE YELLOW BLACK RED GREEN LINDE WASSER FUCHSIA SARCELLE OLIVE BROWN GRAY ORANGE PINK VIOLET

or a number, or FARBEIGEL RGB [% red% green% blue].

Turtle graphics are predestined for two-dimensional geometric drawings and fractal curves of the type of the dragon curve or the Hilbert curve .

For example, the first image - but without the color - is generated by the following program:

TO N_ECK :ne :sz   ; Definiert eine neue Funktion N_ECK mit zwei Parametern
    REPEAT :ne [    ; Wiederholt den folgenden Codeblock :ne mal 
        RT 360 / :ne  ; Dreht das Turtle um einen Winkel von 360° / :ne nach rechts
        FD :sz     ; Bewegt das Turtle um :sz nach vorne und malt dabei eine Linie
    ]
END
TO MN_ECK :ne :sz  ; Definiert eine neue Funktion MN_ECK mit zwei Parametern
    REPEAT :ne [    ; Wiederholt den folgenden Codeblock :ne mal
        RT 360 / :ne  ; Dreht das Turtle um einen Winkel von 360° / :ne Grad
        N_ECK :ne :sz ; Führt N_ECK aus und malt so das oben definierte N_ECK
    ]
END
MN_ECK 36 20      ; Führt MN_ECK aus und malt so das oben definierte MN_ECK

Calling N_ECKwith a large parameter :necreates the impression of a circle. MN_ECKoften turns the turtle a little and then paints a circle so that it looks like a large circle, which in turn contains small circles.

It's better in German. (with DLogo ).

UM N_ECK :ne :sz  // Definiere eine neue Funktion N_ECK mit zwei Parametern
  WIEDERHOLE :ne [  // Wiederholt den folgenden Kodeblock :ne mal
     RE 360 / :ne // Dreht das Turtle um einen Winkel von 360° / :ne nach rechts
      VW :sz   // Bewegt das Turtle um :sz nach vorne und malt dabei eine Linie
                       ]
ENDE
UM MN_ECK : ne  :sz // Definiere eine neue Funktion MN_ECK mit zwei Parametern
   WIEDERHOLE :ne [   // Wiederholt den folgenden Kodeblock :ne mal
          RE 360 / :ne // Dreht das Turtle um einen Winkel von 360° / :ne Grad
                 N_ECK :ne :sz // Führe N_ECK aus und malt so das oben definierte N_ECK
                        ]
ENDE
LÖSCHBILD BESCHLEUNIGE MN_ECK 36 20 // Führt MN_ECK aus und malt so das oben definierte MN_ECK

See also

Web links

Commons : Logo  - collection of images, videos and audio files
Wikibooks: Logo  - learning and teaching materials
  • UCB logo interpreter by Brian Harvey, the father of the UCB logo
  • A variant of the UCB logo that has been expanded to include multimedia functions
  • aUCBLogo a free software implementation by UCB Logo from Augsburg.
  • DLogo a free software implementation since the translation into German of the French version Logoplus. The majority of the primitives are there in German. Many primitives specialize in math and robotics as well. Capacity to translate an algorithm LOGO into German, French or English.
  • German MSW logo : The current version (6.5) may be suitable. a. also for controls (running lights, stepper motors) via the parallel printer port for Win9x / 2K / ME / XP. It will no longer be developed.
  • FMSLogo : FMSLogo is a successor to MSWLogo, which is updated regularly. He has a project page on Sourceforge.net.
  • KTurtle is not a real logo interpreter - there are only Turtlegraphics . KTurtle is part of the KDE edutainment project.
  • Lhogho is a logo compiler.
  • NetLogo is a multi-agent programming language with an integrated modeling environment.
  • XLogo is a logo interpreter written in Java.
  • XLogo4Schools is a further development of XLogo.
  • XLogoOnline is a modern, browser-based programming environment for primary schools, which uses a subset of the vocabulary of the XLogo dialect. Offline versions for Windows, macOS and Linux are also available for this programming environment.
  • WIN-LOGO 3.0 is a further development of WIN-LOGO 2.0 by the German author Gerhard Otte. WIN-LOGO 3.0 is also available as a 64-bit version in German and supports interfaces from Fischer-Technik and Knobloch on a parallel interface and USB port for controlling robots. Under / learning corner you will find videos that explain the programming and control of robots with WIN-LOGO.

Individual evidence

  1. Byte Magazine Volume 07 Number 08 - Logo. In: archive.org. Retrieved January 17, 2016 .
  2. ^ Gary Stager: Logo history interview. April 23, 2011, accessed May 23, 2020 .
  3. In different versions of Logo these commands have partly inconsistent names. This table refers to MSWLogo ( ( page no longer available , search in web archives: derrel.net ), accessed on February 9, 2011)@1@ 2Template: Toter Link / derrel.net