Logo Programming Language (el.media.mit.edu)

244 pointsby azhenley3 days ago103 comments

yogsototh 9 hours ago

I myself learned programming with logo, at my school when I was 8 or 10. And it was a delight, I am so grateful it existed.

But quite surprisingly, when later during my Ph.D. part of my time was dedicated to give exercises to students. And we used logo instead of the more usual programming languages. And I think it really helped them to really internalise programming a lot better. Typically, the latest exercices introduced recursion which is immediately visible as fractals.

    HIDETURTLE
    
    PENUP
    SETXY -200 0
    RIGHT 90
    PENDOWN
    
    to dragon :degree :size
        setpensize 1
        if :size>5  [setpensize 2]
        if :size>10 [setpensize 3]
        if :size>20 [setpensize 4]
        if :size>40 [setpensize 5]
        ifelse :degree=0 [
            fd :size
        ][
            left  45 dragon (:degree-1) (size/4)
            right 90 dragon (:degree-1) (size/2)
            left  90 dragon (:degree-1) (size/4)
            right 45
        ]
    end
    
    dragon 6 3000

if you want to give a try :)

xtracto 8 hours ago

I was also introduced to computer programming using LOGO back in 1989. I remember drawing houses and stick figures in it.

Fast forward around 2010, I gave Agent Based Simulation workshop courses to PhD students using NetLogo , which at the time was very popular in the Social Sciences.

It was very interesting to teach programming to non-tech very intelligent people. Some of them came up with really cool simulation ideas. I loved that part of my career.

gregsadetsky 6 hours ago

small correction - use `:size` in the three lines near the bottom (rather than `size`)

I tried it on https://www.calormen.com/jslogo/ and saw this small typo

cheers!

p.s. same as you, I was introduced to Logo around the age of 8 and I remember writing programs on paper when I was home, stepping through them line by line... it was inevitable I'd gravitate towards programming, ha :-)

SamBam 6 hours ago

I should have scrolled down to your comment first! I spent 10 minutes debugging.

Nice work GP if that was air-coded, though.

imb 5 hours ago

For many years, our students[0] have used Logo as an integral part of their math circle-style[1] classes. When we started Wally Feurzeig, one of the creators of Logo, was instrumental in helping us incorporate ideas from Logo into the kind of non-standard problem solving that we were striving for. Turtle geometry is a particularly helpful "instrument of the mind" for exploring dynamic geometry. Our co-founder, Victor Gutenmacher, wrote an incredible book[2] on "geometry in motion," which gave a completely different perspective on geometry from the one seen in school and which our students could explore with the help of Logo. For many of our students, especially those with math anxiety, Logo was what enabled them to overcome that anxiety and discover the joy of thinking and tinkering. Many programmers today have fond memories of getting into programming via Logo, but I would argue that despite the current blistering pace of progress, it remains one of the best and gentlest introductions to problem solving and computational thinking.

[0] https://www.gentleknowledge.com/

[1] https://en.wikipedia.org/wiki/Math_circle

[2] https://www.amazon.com/dp/0817641610

jhbadger 25 minutes ago

Logo is a serious programming language. People maybe only know it as the thing to teach kids programming via turtle graphics, but people like Brian Harvey at Berkley have used it to teach functional programming rather than Lisp or Scheme.

ihumanable 12 hours ago

I still remember when we learned logo in elementary school. I had to get my mom to go out and buy a 3.5" disk so I could save my programs.

When I realized that all of logo was actually saved on that disk and I could continue playing with the turtle at home, I was amazed.

Drawing little things, realizing that I was repeating stuff and breaking it into little functions so I could draw them again more easily. I was learning the essentials of programming and didn't even realize it.

Xirdus 12 hours ago

We had it (or one of the clones) in middle school, but it was a demo version that had saving disabled. Half of each class was messing with the turtle. The other half was writing down the code with pen and paper so that we can have it graded.

reaperducer 11 hours ago

I remember learning LOGO in school. There was a single 4K computer for the entire school, so we learned how to program by calling out turtle commands to the teacher who would draw the results with a marker on a sheet of plastic on an overhead projector.

At the end of that exercise, the accumulated commands would be taken to the computer (in another part of the school) and entered into the computer, and eventually we'd get a plotter printout showing the results.

Those early days of computing feel like we were like being on another planet.

astrobe_ 10 hours ago

Also as a child, I was amazed by the associative tables it offered; I thought "I can make intelligent programs". I think I was thinking AI but I won't trust my memory on this. But I played a lot more with the turtle.

Bankq 11 hours ago

I'm forever grateful for having the access to Logo programming in early 90s, as a kid from a 3rd world country, for how it leads to where I am today.

My first ever english word that I can spell out is REPEAT.

yurimalheiros 11 hours ago

Me too. It was one of my first experiences with programming languages back in elementary school in Brazil.

mauvehaus 11 hours ago

In the early nineties in elementary school I lived in Belgium, and went to a summer camp where we programmed with Logo in a localized French version.

I had played with Logo on Apple IIe's in the US, and thought it made sense that in a French-speaking region[0] they'd have a French version. I relearned what little I already knew, but regrettably, this did not help greatly with my French skills.

All I remember from this is that `hazard' was the random built-in. Dunno why that's stuck, but there's probably some more important bit of information that should be in my brain if that weren't.

[0] Yeah, yeah, I know French, Flemish, and German are the official languages. I was in a French-speaking part.

lackoftactics 13 hours ago

I didn't win logo programming competition in polish equivalent of 7th grade and I am still salty about it

Tade0 12 hours ago

I learned the Language through examples because the version provided by the school didn't have documentation and in 00s Poland internet was still relatively rare.

I... participed in the competition, but that's all.

lackoftactics 12 hours ago

same problem, it wasn't exaclty the best experience with first programming language

knome 11 hours ago

ha. 4th grade for me, though I'm more amused than salty about the affair. who's ever heard of 'recursion'? honestly.

lackoftactics 11 hours ago

tbh, sounds like a made-up term coined by someone who could go on and on

turtlegeometry 11 hours ago

This is on top of HN right now, and there is still nobody who has mentioned the fact that the tier-1 book Turtle Geometry <https://direct.mit.edu/books/oa-monograph/4663/Turtle-Geomet...> , is in open access.

Do yourself a favor, and read it today : it is that good. Even though it is quite depressing to see that the revolution in education that the book was predicting in its preface, simply never happened.

madcaptenor 10 hours ago

I was not expecting to see that the book would culminate in a chapter on general relativity!

mcphage 8 hours ago

There was also "Turtles, Termites, and Traffic Jams" which uses a parallelized version of logo to explore ideas about decentralized systems and is really excellent: https://mitpress.mit.edu/9780262680936/turtles-termites-and-...

briandw 11 hours ago

Logo was created by by Seymour Papert. I highly recommend his book Mindstorms: https://en.wikipedia.org/wiki/Mindstorms_(book) It was written in 1980 but could have mostly been written today. All the same issues with teachers misunderstandings and fear of math and technology and refusal to change to meet the challenges of the age.

dofm 9 hours ago

I believe it is legally available as a PDF — as far as I remember via the ACM?

Very important book.

jecel 8 hours ago

The first line of https://en.wikipedia.org/wiki/Logo_(programming_language) is "Logo is an educational programming language, designed in 1967 by Wally Feurzeig, Seymour Papert, and Cynthia Solomon." so you are correct but it is nice to mention his co-inventors. I agree about the book. I had to borrow it from a friend, read it quickly and give it back in 1983 so my memories of it are a bit fuzzy.

jkestner 5 hours ago

One of my favorite books is Turtles, Termites, and Traffic Jams (https://mitpress.mit.edu/9780262680936/turtles-termites-and-...), basically the thesis of one of his students (and current MIT Media Lab professor) Mitchel Resnick. It's about the educational value of modeling distributed systems with StarLogo.

ejflick an hour ago

I read that book earlier this year. It made me rethink how we approach problem solving in team environments. I now aspire for code I write to be able to be played with as a child would play with a turtle. I find this lack of being able to play is what makes it hard for software developers to really understand each other’s work.

There’s also a section in that book that briefly talks about agentic modeling in the same way people use LLM’s today. I find it fascinating that this idea was already that old at that time.

kdavis 10 hours ago

Kicked off so many memories...

Early 80's I learned Logo and Basic at a local store that sold Apple computers. It was called "The Logical Choice" and had a classroom tucked away behind a false wall and an English Sheep dog "Sir Isaac Newton" that would hang around the store!

Nice, I just found a story on the store, page 5 of [1].

[1] https://mirrors.apple2.org.za/ftp.apple.asimov.net/documenta...

zorobo 6 hours ago

My favorite logo on macOS is https://www.alancsmith.co.uk/logo/ First dabbled with logo on my apple ][, attracted by turtle graphics like many others.

msarnoff 8 hours ago

LCSI LogoWriter for 68k Macs[0] was my shit. It was my first[1] introduction to programming in elementary school and I spent hours trying to make games with it. There were 4 turtles and you could treat them like sprites; you give them custom shapes and colours, and there were basic collision detection primitives. You could also check for collisions with the background by querying the colour under a turtle. You could play and record your own sounds... spent so much time with that little round Apple microphone[2] recording goofy sound effects.

[0] https://www.macintoshrepository.org/6717-logo-writer-2-0

[1] technically I had used the Apple II version a couple times first

[2] https://applerescueofdenver.com/products-page/macintosh-to-p...

mschaef 12 hours ago

Back in 1983, my elementary school was a part of a Logo pilot program. We had a lab of Commodore 64's that I had free run of (my mom was a teacher there), and it's why I do what I do all these years later.

What I find interesting it that it's not just programming, specifically. Logo is a highly interactive and dynamic language (a relative of Lisp), and that influenced the way I think about writing code. Seymour Papert did a lot for me, albeit highly indirectly.

https://mschaef.com/c64

r2ob 12 hours ago

Logo was my first contact with computer (pc 386)

corysama 12 hours ago

Logo was my introduction to programming. Working on a 1 MHz Commodore64, my masterpiece was a fireworks show that was animated by the fact that the individual drawing commands were so slow you could watch them play out.

So, draw a curve from the ground to the sky. Draw some explosion shape. Change pen color to the sky color. Draw the curve and the explosion again to erase them. Change pen color and start the next firework.

consumer451 11 hours ago

Anyone here remember a 1980's Logo-programmable robot that I once used in a TAG program? It had a pen, we would lay it on top of a giant sheet of paper.

It was like a little futuristic tank. I searched for a minute, and I cannot find the exact model. Did I imagine this?

criddell 11 hours ago

Did it look like this:

https://en.wikipedia.org/wiki/Big_Trak

Doesn't have a pen, but maybe it was a modified version of that toy?

consumer451 11 hours ago

YES! This was exactly it. Thank you.

It seems my pen memory came from a different logo-driven bot. In-fact, the Big Trak was not even Logo-driven, but had a similar command system.

I appear to have combined childhood recollections, but that was the shape I was "remembering." No wonder, just look at that thing! lol

jamessb 11 hours ago

It was probably one of the Turtle robots or a derivative of them: https://en.wikipedia.org/wiki/Turtle_(robot)

One later variant is the Valiant Roamer https://www.computinghistory.org.uk/det/30545/Valiant-Roamer...

richstokes an hour ago

We had the Roamer, British school, very early 90's.

I remember programming a logo/turtle type thing on the BBC Micro, and then I think there was a way to copy the program on to the Roamer directly from the BBC. Or maybe we did it manually. But it was amazing to me, and I always felt sad we didnt use it more!

dekhn 11 hours ago

Yes, I remember. See anything familiar on https://www.weeklyrobotics.com/articles/2023_01_25_the_histo...

dofm 9 hours ago

Logo is a real surprise if you revisit it as a grown professional. Remarkably elegant language.

Hobadee 3 hours ago

I'm not seeing any shout-outs to MSWLogo! I loved being able to create dialog boxes and UIs!

Also, The Great Logo Adventure is a great book for kids learning Logo. It's what I learned with, and it's available as a free PDF now!

thought_alarm 11 hours ago

This on-line version of Logo is pretty great: https://www.calormen.com/jslogo/

TheSkyHasEyes 11 hours ago

hide turtle

> Don't know how to HIDE

:(

thought_alarm 11 hours ago

Try hideturtle or ht.

spdustin an hour ago

I have fond memories learning about Logo from Mr. Wizard!

kccqzy 10 hours ago

As a child, I really enjoyed Logo. It appeared as a sidebar on a math textbook about angles and line segments. I studied it like I studied everything else in the textbook, but I didn’t immediately realize it was a programming language, a means to control a computer. Fast forward a few years in elementary school, when the teacher actually began to teach Logo with all students in front of a computer, it was such a profound revelation for me.

During the second Logo class, the teacher set up a competition. A prize was to be given to the student who could first plot an equilateral triangle, a square, a regular pentagon, a regular hexagon, etc, up to a regular icosagon. I won the prize because I wrote formulas to make the computer do the angle computation. I was so so proud of myself compared to my classmates who were computing angles with pen and paper. It felt like the first inkling of the power of automation.

Duanemclemore 12 hours ago

When I was seven I wrote my first program. It was in Terrapin Logo and evenly tiled the monitor of my elementary school's Apple IIe with hexagons.

It's been all downhill since.

JSR_FDED 11 hours ago

Turtles all the way down?

jasperry 10 hours ago

Very similar to my story. Sometimes I feel sad that I'll never know who was the enlightened administrator in my humble district who somehow got my elementary school an Apple computer lab with Logo in 1983, and that they'll never know what an impact it made on my life.

nsoldiac 11 hours ago

They taught us Logo at school in the early 90s in Lima, Peru. I'll never forget the aha moment of going from "forward 10, left 90" to "repeat 360 [forward 1 right 1]" and bam a circle! They had us bring a formatted 5in floppy disk (they were indeed floppy) to our first class; what was this sorcery?

vilius 7 hours ago

It’s 1998, I’m 10, it’s a gloomy autumn morning, in Klaipeda (pop. 200k), Lithuania, eastern Europe. I’m at school. Informatics class. Never touched a computer before.

The computer is running windows 95. The teacher starts Logo and I see that turtle in the middle of the screen. She explains how to make it move.

And I start typing my very first code.

It’s lisp based. Took me 28 years to learn that. Now I think I need to finish the job and pock up lisp.

Havoc 9 hours ago

Didn't notice it as a kid but Logo is an absolute masterpiece if you think about raw impact on the IT world.

70 comments here and they're basically all positive about Logo being formative

animateus 13 hours ago

Oh my god - Logo, brings back memories of my childhood and my first "microcomputer": ZX Spectrum +. I spent countless hours trying to force the damn turtle to draw shapes I wanted it to. Unbelievable that this language is still alive.

fipar 12 hours ago

Same for me but on the Spectrum's illegitimate South American cousin, the TK-90X :)

The language is still alive but I think Scratch has mostly taken its place.

timbit42 6 hours ago

Well, Scratch essentially is Logo, but with dragging bricks instead of typing.

JosephRedfern 6 hours ago

I had a great teacher in primary school who introduced us to programming with Logo. We ran a variant called MSWLogo - it was my gateway drug, and how I learned what "paisley" was. Good times!