Jump to content
Sign in to follow this  
DavidC

LOGO anyone?

Recommended Posts

After getting frustrated with pretty much everything, I decided to try TI LOGO II .  I know, I know its a language for children. But if you suck at basic, cant wrap your (my) feeble antique brain around Forth and just want to have fun, I find it quite forgiving and accessible.  The biggest pain in the ass, for lack of a better term, that people have with TI LOGO is running out of ink for the turtle drawings. But, there is so much more to LOGO than just making designs with the turtle.  The Sprites seem very easy to control and designing your own characters is pretty freaking easy.    So...have there been any worth while games made using LOGO?  Is there any at all?   Animations?  Anything done with LOGO that is worth .dsk space?     

  • Like 4

Share this post


Link to post
Share on other sites

The old Amnion Software Library contained at least ten volumes of Logo programs. I'm not sure if they are available online though.

  • Like 1

Share this post


Link to post
Share on other sites
12 hours ago, DavidC said:

After getting frustrated with pretty much everything, I decided to try TI LOGO II .  I know, I know its a language for children. But if you suck at basic, cant wrap your (my) feeble antique brain around Forth and just want to have fun, I find it quite forgiving and accessible.  The biggest pain in the ass, for lack of a better term, that people have with TI LOGO is running out of ink for the turtle drawings. But, there is so much more to LOGO than just making designs with the turtle.  The Sprites seem very easy to control and designing your own characters is pretty freaking easy.    So...have there been any worth while games made using LOGO?  Is there any at all?   Animations?  Anything done with LOGO that is worth .dsk space?     

I think LOGO is a great language. I haven't used it beyond a casual play around and some reading but...

  • It lets you or rather forces you to break complex programs up into small understandable pieces.
  • Like BASIC it has protections everywhere to prevent you from totally crashing the machine (unless you really know how)
  • Unlike BASIC it has some advanced data structures like lists which make handling text in LOGO much cooler than using string arrays.

I found this nice site at MIT just now

https://el.media.mit.edu/logo-foundation/what_is_logo/logo_programming.html

 

And for the BASIC programmer who wants to expand(warp?)  their mind LOGO supports recursion.

(For a definition of recursion see:  recursion)

to factorial :number
if :number = 1 [output 1]
output :number * factorial :number - 1
end

I also just read that LOGO is a dialect of LISP which explains why it works at such a high level. 

Makes me want to look under the hood. :) 

  • Like 5

Share this post


Link to post
Share on other sites
2 hours ago, TheBF said:

I think LOGO is a great language. I haven't used it beyond a casual play around and some reading but...

  • It lets you or rather forces you to break complex programs up into small understandable pieces.
  • Like BASIC it has protections everywhere to prevent you from totally crashing the machine (unless you really know how)
  • Unlike BASIC it has some advanced data structures like lists which make handling text in LOGO much cooler than using string arrays.

I found this nice site at MIT just now

https://el.media.mit.edu/logo-foundation/what_is_logo/logo_programming.html

 

And for the BASIC programmer who wants to expand(warp?)  their mind LOGO supports recursion.

(For a definition of recursion see:  recursion)

to factorial :number
if :number = 1 [output 1]
output :number * factorial :number - 1
end

I also just read that LOGO is a dialect of LISP which explains why it works at such a high level. 

Makes me want to look under the hood. :) 

Yes.   I have been scouring the web and that is one of the first sites I bookmarked.   I also went crazy on Archive.org and downloaded just about any book I could find,  TI related or not (terrapin is pretty close).  It is pretty cool. 

  • Like 3

Share this post


Link to post
Share on other sites
14 hours ago, DavidC said:

The biggest pain in the ass, for lack of a better term, that people have with TI LOGO is running out of ink for the turtle drawings.

 

This happens because TI LOGO uses characters in Graphics mode for the “ink”. The character table is a finite resource. When drawing, you are composing characters. If the 8x8-pixel grid for the character position where the turtle currently points represents a 257th character, you are out of ink as soon as you draw in it. There could be more than 256 character positions with ink in them if TI LOGO scans existing “ink” characters for a duplicate pattern, but I rather doubt that is what happens.

 

If the TI LOGO developers had used Bitmap mode for turtle graphics, there would be no “out of ink” problem, but the code, likely, would have been more complicated and memory hungry. I have always intended to write a LOGO system in fbForth 2.0 that would use Bitmap mode, but have managed to get hopelessly sidetracked over the years. Perhaps, one day.... |:)

 

...lee

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Lee Stewart said:

 

This happens because TI LOGO uses characters in Graphics mode for the “ink”. The character table is a finite resource. When drawing, you are composing characters. If the 8x8-pixel grid for the character position where the turtle currently points represents a 257th character, you are out of ink as soon as you draw in it. There could be more than 256 character positions with ink in them if TI LOGO scans existing “ink” characters for a duplicate pattern, but I rather doubt that is what happens.

 

If the TI LOGO developers had used Bitmap mode for turtle graphics, there would be no “out of ink” problem, but the code, likely, would have been more complicated and memory hungry. I have always intended to write a LOGO system in fbForth 2.0 that would use Bitmap mode, but have managed to get hopelessly sidetracked over the years. Perhaps, one day.... |:)

 

...lee

I'm guessing the reason for this was to retain compatibility with the TI-99/4, which does not support bit mapped graphics. (From the LOGO manual: "The resulting TI Logo system, which runs on the Tl 99/ 4 and 99/ 4A computers, etc.") It seems to me that if LOGO does not make heavy use of the VDP ram it would be possible to rewrite it to use bit mapped graphics. Especially if the source code was available.

  • Like 3

Share this post


Link to post
Share on other sites

I posted this a while back where nobody would ever see it. (Forth tutorials) :) 

I still like it.

 

 

 LOGO is the Language Of God, and we are His turtles.

    L: Language
    O: Of
    G: God
    O: Only God knows what the last "O" stands for.

 

  • Like 3

Share this post


Link to post
Share on other sites
Posted (edited)
3 hours ago, senior_falcon said:

I'm guessing the reason for this was to retain compatibility with the TI-99/4, which does not support bit mapped graphics. (From the LOGO manual: "The resulting TI Logo system, which runs on the Tl 99/ 4 and 99/ 4A computers, etc.") It seems to me that if LOGO does not make heavy use of the VDP ram it would be possible to rewrite it to use bit mapped graphics. Especially if the source code was available.

I thought that TI LOGO II already did that?

 

(Edit: Huh, I guess not. I've been living a lie all this time! ;) )
image.thumb.png.c43d81e7575bd4cfe5492981426a2258.png
 

 

Edited by Tursi
  • Like 1

Share this post


Link to post
Share on other sites

I am curious (...and somewhat concerned) about why computer programming using LOGO and/or BASIC is no longer part of elementary and middle school curriculum. These disciplines augment mathematics for teaching concepts such as analogies, methodologies and algorithms. Is learning how to learn and learning how to think no longer important?

  • Like 3
  • Sad 2

Share this post


Link to post
Share on other sites

Because computers are now appliances - there's no more expectation that students will learn to program them than that they will learn to build microwaves or repair vehicles.

 

I'm sad that it's gone, too. On the other hand, for kids who are genuinely interested in learning to program, the opportunities today are so much greater than we had. :)

 

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
4 hours ago, Tursi said:

for kids who are genuinely interested in learning to program, the opportunities today are so much greater than we had. :)

But the incentives are fewer.

  • Like 1

Share this post


Link to post
Share on other sites

My kids and most of their friends have learned to program in Scratch, and most schools teach Scratch. They have made programs, games, and programmed robots with it. Scratch is a visual language, so very different from typing into a command line like I did back in the day, but they are still learning programming skills. 

  • Like 2

Share this post


Link to post
Share on other sites

TI LOGO also supports recursion, a powerful feature. I have never truly explored TI LOGO except superficially, but perhaps I need to take a closer look. I have a hunch it is far more capable than it's reputation suggests...

  • Like 1

Share this post


Link to post
Share on other sites

I still believe when I was young, 1985-6, there was a TI-Forth implementation of LOGO that I picked up from the local users group... Maybe it was just a turtle graphics words in forth though... that's possible... would have been 2 years since using logo at that stage. 

 

(I was only young for 2 years, I don't know what I was before or after that)

Share this post


Link to post
Share on other sites
14 minutes ago, jedimatt42 said:

I still believe when I was young, 1985-6, there was a TI-Forth implementation of LOGO that I picked up from the local users group... 

 

(I was only young for 2 years, I don't know what I was before or after that)

This is a Fig Forth version (like TI-Forth) for fignition. https://docs.microsoft.com/en-us/archive/blogs/ashleyf/turtle-graphics-on-the-fignition

 

I have a version of it that is a little more verbose so it's more legible and I used a 1 degree trig table.

I haven't got Camel99 switched over to bit-mapped mode so all it does is pushes a sprite around the screen.

 

It's reverse polish notation which I get is not everyone's preference but the programs end up being pretty concise.

DECIMAL
: WALK     ( turns moves loops -- )
           0 ?DO   2DUP FWD TURN   LOOP 2DROP PEN-UP ;

: CIRCLE  ( -- ) 1 2 360 WALK ;
: SQUARE  ( -- ) 4 0 DO 50 FWD 90 TURN   LOOP  ;
: SPIRAL  ( -- ) 45 0 DO  CIRCLE 4 TURN  LOOP ;

: BURST   ( -- ) 360 0 DO  0 0 GOTO  I HEAD  110 FWD   6 +LOOP ;

: STAR    ( -- ) 24 80 5 WALK ;
: STARS   ( -- ) 3 0 DO   STAR 60 TURN   LOOP ;

: SQUIRAL ( -- ) -50 50 GOTO  20 0 DO 100 FWD 62 TURN LOOP ;

: ROSE    ( -- ) 0 50 0 DO 2+ DUP FWD  84 TURN  LOOP ;

: HP      ( -- ) 1 5 45 WALK    -1 2 45 WALK ;
: PETAL   ( -- ) HP 180 TURN  HP 180 TURN  ;
: FLOWER  ( -- ) 15 0 DO   PETAL 24 TURN    LOOP ;

 

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, Vorticon said:

TI LOGO also supports recursion, a powerful feature. I have never truly explored TI LOGO except superficially, but perhaps I need to take a closer look. I have a hunch it is far more capable than it's reputation suggests...

I know that recursion was always touted as a huge educational feature of LOGO, but... what languages DON'T? ;) Even BASIC can use GOSUB to call the same function again and recurse. I always had the impression that this was the buzzword used to justify it for education more than a standout feature of the language...

 

Factorial of N is the classic example of a recursive algorithm... pretty sure every language can do it? (snippet from https://www.geeksforgeeks.org/recursion/)

int fact(int n)
{
    if (n < = 1) // base case
        return 1;
    else    
        return n*fact(n-1);    
}

Share this post


Link to post
Share on other sites

I fired up the Sinclair "EightyOne" emulator to play with this. Using "GOSUB" doesn't seem to work very well unless it's wrapped in a conditional "GOTO" loop or "FOR" loop. I decided to just use a "FOR" loop with the number of iterations based on the input. The input prompt warns against numbers greater than 15, but it still works with an answer in scientific notation and some loss of precision for larger numbers. I don't check for non-numeric input but the ZX81 halts the program with error codes if that's the case.

 

Listing.thumb.png.1e444afe5ecabcce3f8653c8ebfec91a.png

 

Run.thumb.png.bc095b64e04a5ee708e1667d299f61ed.png

 

I'm probably using more variables than I need to (...and of course, in BASIC they're all global), and I don't know that this example really captures the "spirit" of what recursion is (...since a "FOR" loop doesn't really "unwrap" the return values the way a recursive function call does). In any case, I never thought of recursion as being the major selling point of LOGO anyway. To me, the appeal is more the nature of quick visual feedback of experimentation of concepts, and the building of complexity through iterations of simple sub-units. I've always found BASIC to do fine with these ideas too.

 

I'm encouraged to hear that there are some school districts teaching the "Scratch" language. I'm familiar with it, although I haven't taken the time to play with it at all (...truth be told, I haven't played with LOGO either).

 

Going back to my earlier post though, I don't think the point of teaching a programming language to children is to prepare them for careers in computer science, any more than teaching basic mathematics is to prepare them to become accountants. I think it is more to the idea of teaching approaches to problem solving and learning with concepts such as analogies, abstraction, and algorithms.

Share this post


Link to post
Share on other sites
18 hours ago, Tursi said:

Because computers are now appliances - there's no more expectation that students will learn to program them than that they will learn to build microwaves or repair vehicles.

 

I'm sad that it's gone, too. On the other hand, for kids who are genuinely interested in learning to program, the opportunities today are so much greater than we had. :)

 

My kids, 11 grade and the other just graduated cannot sign their own names. They can print. I asked my son, why can't you sign your name, he said I can e-sign my documents....hmmm

  • Like 1
  • Sad 1

Share this post


Link to post
Share on other sites
5 hours ago, Tursi said:

I know that recursion was always touted as a huge educational feature of LOGO, but... what languages DON'T? ;) Even BASIC can use GOSUB to call the same function again and recurse. I always had the impression that this was the buzzword used to justify it for education more than a standout feature of the language...

 

Factorial of N is the classic example of a recursive algorithm... pretty sure every language can do it? (snippet from https://www.geeksforgeeks.org/recursion/)

int fact(int n)
{
    if (n < = 1) // base case
        return 1;
    else    
        return n*fact(n-1);    
}

 

Though you can use GOSUB to effect a kind of recursion, both TI Basic (DEF functions) and XB (DEF functions and SUB subprograms) explicitly proscribe recursive calls. You will get an error message if you try it—DEF, when you define the function, and SUB, when the recursive CALL is actually attempted at runtime.

 

...lee

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Wow.  I was sitting here bored and figured I would try a super scientific experiment.  I loaded classic99 with LOGO II on my laptop and typed:

 

 MAKE "X 0 REPEAT 1000 [PRINT :X MAKE "X :X + 1 ]

 

I typed that on the command line, hit enter and timed it with my ultra precision cell phone stopwatch.  25 seconds to count to 1000.

 

I loaded up VICE64 with TERRAPIN LOGO on my laptop and did the same thing.   1 MINUTE 33 SECONDS!!!!  To run the exact same code.  Could be the difference between the two emulators, could be my laptop runs classic99 better than VICE64, but I don't notice any performance issues playing C64 games, they run fine.

 

 The TI99/4a destroyed the Commodore 64.   Would love to test this on the real machines.  I am going to load LOGO II on the real iron here and see what happens.    Ok, I tried it on the real TI.  Same thing. 25 seconds.  

Edited by DavidC
tried it on the real machine

Share this post


Link to post
Share on other sites
Posted (edited)
? QUIT
TELL ME HOW TO QUIT

 

OK, I tried the friendly way ... you asked for it, you'll get it! :D

 

(Tried the PRINT program on MAME, same result for time.)

Edited by mizapf
I just don't know why I keep getting blank lines in code sections...
  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites
Posted (edited)

I found a set of floppys for my breadbin C64 with box and documentation on EBAY, should be here in a week.   Boredom strikes again!!  I am fascinated with this language though.  That ain't no joke.

Edited by DavidC

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...