Questions tagged [logo-lang]

Logo is a computer programming language, created mainly for the purposes of education. Please do not use this tag for questions regarding graphical corporate-logos.

Logo was created in 1967 at Bolt, Beranek and Newman (BBN), a Cambridge, Massachusetts research firm, by Wally Feurzeig and Seymour Papert.

Its intellectual roots are in artificial intelligence, mathematical logic and developmental psychology. The first four years of Logo research, development and teaching work was done at BBN.

The first implementation of Logo, called Ghost, was written in LISP on an SDS 950. The goal was to create a math land where kids could play with words and sentences. Modelled on LISP, the design goals of Logo included accessible power and informative error messages.

The use of virtual Turtles allowed for immediate visual feedback and debugging.

This tag was previously named logo, but it was renamed to logo-lang due to confusion with graphical corporate logos. See this meta discussion for more information behind the rationale for the name-change.

References

Sample Program

; draws a square with sides 100 units long
FORWARD 100
LEFT 90
FORWARD 100
LEFT 90
FORWARD 100
LEFT 90
FORWARD 100
LEFT 90
47 questions
4
votes
2 answers

Algorithm to generate a starfield

I just learned about Logo yesterday. Being born in the nineties I never came across it before. So I started using an online Logo Interpreter written by Joshua Bell and I decided to write a circle function to make concentric circles. This is what I…
Aadit M Shah
  • 72,912
  • 30
  • 168
  • 299
3
votes
1 answer

Does Logo really use dynamic scoping, and how is this different than global variables?

Logo is the first programming language I ever learned as a child. I recently found out that Logo supposedly uses dynamic scoping, which came as a surprise to me because I always thought it just used global variables. This made me wonder if perhaps…
Tim Goodman
  • 23,308
  • 7
  • 64
  • 83
3
votes
1 answer

How to catch command line arguments in Berkley Logo (UCBLogo)?

Berkeley Logo User Manual tells that all command line arguments after a hypen will be collected in the variable: If a command line argument is just a hyphen, then all command line arguments after the hyphen are not taken as filenames, but are…
tse
  • 5,769
  • 6
  • 38
  • 58
3
votes
1 answer

Choosing a syntax for a new language based on Logo

I'm building a project that consists of a web port of LogoWR (Tutle Graphics), but I want to make some changes to the syntax, such as the way variables are named. Original: :variable New: #number_variable $text_variable :indistinct (Can be number…
tolueno7
  • 31
  • 1
2
votes
2 answers

how do we create turtle geometry in three.js?

We are trying to create a simple programming environment that lets people generate 3D forms (it's inspired by the Scratch project). We'd like it to work in a "turtle geometry" fashion, where a creature (we call it the beetle, by analogy to the logo…
2
votes
2 answers

How to use conditional statements in LOGO

? MAKE "num RANDOM 1 ? IF [:num = 1] [print "Number is one.] [print "Number is zero.] [:num = 1] is neither FALSE nor TRUE! Why won't this work? I'm using Imagine LOGO.
alexia
  • 14,440
  • 8
  • 42
  • 52
2
votes
1 answer

How to perform sub-string substitutions in LOGO?

I'd like to get string from user, parse it, then run the parsed commands. The string input will be something like "F20N20E10L10", guaranteed no spaces. This input I want to convert to LOGO commands with substitutions like these: "F" → fd "N" → seth…
Yimin Rong
  • 1,890
  • 4
  • 31
  • 48
2
votes
1 answer

Check if a variable if is even or odd in Imagine Logo

I need to check a variable if it is even or odd and I don't know how to do it in Imagine Logo. In case that it is not possible, I need at least something like this... if (a = 1 || a = 2 || a = 3)
TrotlOtl
  • 103
  • 1
  • 1
  • 9
2
votes
1 answer

Spliting screen into ncurses and non ncurses area

I am a beginner C programmer and one of my assignments asks me to write an interpreter for the Logo Programming Language. To that end I was wondering if it was possible, when using the ncurses library, to split the screen up so that half retains…
pingOfDoom
  • 408
  • 1
  • 4
  • 21
2
votes
2 answers

A dictionary data structure in the Logo language (key/value store)

I'm wondering if there is an implementation of a first class dictionary data structure available for use in the Logo language? I don't see one available in the documentation of UCB Logo or FMS Logo. I see that there are property lists, but those…
Greg Buchholz
  • 900
  • 4
  • 17
2
votes
1 answer

Draw a snowflake with Frozen on Code.org

I'm trying to solve this problem which asks to make a snowflake, so far I tried using forward by 100 pixels and right by 90 degrees but I only made it do a shape in the left bottom corner, then I did a square and it said I messed up... Could…
noahlz
  • 10,202
  • 7
  • 56
  • 75
2
votes
1 answer

Logo if statement

I am using Logo and I have certain problems while iterating through list. What is the problem with the line. if count :L = 0 [stop] The :L is a list. So, I would like to test the length of list and stop after the list is empty.
user5070
  • 21
  • 3
2
votes
1 answer

Logo to PostScript mini-Compiler

I am currently writing a Logo to Postscript compiler. My PS output code doesn't seem to be valid. Any ideas what could be the problem? Or what the actual PostScript version for the LOGO should look like? The LOGO input code PROC LDRAGON ( LEVEL ) …
2
votes
1 answer

Kid-friendly tiling window manager

I am looking for a tiling window manager that will allow my daughter (4 yrs) to run ucblogo and display the turtle graphics at the same time. A little background: Ubuntu/Debian has a package ucblogo, which runs from the console or, graphically, from…
Christian
  • 1,212
  • 1
  • 15
  • 30
1
vote
3 answers

Using turtle graphics in Java?

So, I'm using a special turtle graphics set of classes in Java (but they have all the regular commands: move, paint, turn, etc.). I'm trying to draw a six-point star (which is effectively two triangles). Could anyone perhaps give some pseudo-code as…
Bob