Package for CL didn't save

70 views
Skip to first unread message

pixel...@gmail.com

unread,
Apr 12, 2026, 2:42:59 AMApr 12
to Medley Interlisp core
I spent an afternoon porting some old Common Lisp "turtle graphics" code I wrote.

It's kind of a nice way to abstract stateful drawing. (Funfact LOGO was my first programming language in elementary school and we did a lot of turtle graphics on Apple ][e computer via LOGOWriter)

Anyway, I began a project by creating a package in the repl.
I then began pasting in my functions.

I *thought* it'd carry over with package but I must have done something wrong when running FILES? and then MAKEFILES.

I recall some voodoo around the Common Lisp packages being handled carefully.

It went quite well (as you can see below) but I'll include the file.

Screenshot_20260411_234103.png


TURTLE.LISP

Paolo Amoroso

unread,
Apr 12, 2026, 6:08:08 AMApr 12
to pixel...@gmail.com, Medley Interlisp core
Your turtle graphics is pretty neat and period accurate.



--
You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lispcore/0a2d1d65-130a-4768-be65-54dfb33797d0n%40googlegroups.com.


--

Ron Kaplan

unread,
Apr 12, 2026, 12:14:10 PMApr 12
to Paolo Amoroso, pixel...@gmail.com, Medley Interlisp core
In your journal you have a quote from TextModules, but I don't think what it says is correct.

The forms in a file are not first all read, then evaluated.  They are evaluated in sequence as they are read.  And what is always evaluated first is the DEFINE-FILE-INFO expression at the top.

But this raises another question: should the DEFINE-FILE-ENVIRONMENT also take an optional EXTERNAL-FORMAT for the file?

On Apr 12, 2026, at 3:07 AM, Paolo Amoroso <paolo....@gmail.com> wrote:

Your turtle graphics is pretty neat and period accurate.



On Sun, Apr 12, 2026 at 8:43 AM pixel...@gmail.com <pixel...@gmail.com> wrote:
I spent an afternoon porting some old Common Lisp "turtle graphics" code I wrote.

It's kind of a nice way to abstract stateful drawing. (Funfact LOGO was my first programming language in elementary school and we did a lot of turtle graphics on Apple ][e computer via LOGOWriter)

Anyway, I began a project by creating a package in the repl.
I then began pasting in my functions.

I *thought* it'd carry over with package but I must have done something wrong when running FILES? and then MAKEFILES.

I recall some voodoo around the Common Lisp packages being handled carefully.

It went quite well (as you can see below) but I'll include the file.

<Screenshot_20260411_234103.png>



--
You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lispcore/0a2d1d65-130a-4768-be65-54dfb33797d0n%40googlegroups.com.


--

--
You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.

Larry Masinter

unread,
Apr 12, 2026, 7:19:19 PMApr 12
to Ron Kaplan, Paolo Amoroso, pixel...@gmail.com, Medley Interlisp core
The forms in a file are not first all read, then evaluated.  They are evaluated in sequence as they are read.  

That might be a good approximation, but when you throw in compiling and other file package manipulations, the truth is somewhat more complicated, because you are transforming what you read into somethinig the compiler will emit compiled definitions and expressions. Manipulating packages in the middle of a file won't work well with LOADFNS/GETDEF even if not compiling.
I wish there was a way to simplify this for users, because this is even more confusing than EVAL and QUOTE and backquote....

pixel...@gmail.com

unread,
Apr 12, 2026, 8:35:39 PMApr 12
to Medley Interlisp core
Thanks for the guidance. :)

So if I follow, it seems the source of the quote in Paolo's post was too optimistic?
Is the process outlined on the blog still the way to go anyway?

I do like the notion of turtle drawing, especially with an open ended "drawing" function.
It's actually not too far off from how CNC works, so in theory I could make the turtles not only draw but generate CNC GCODE to file as a side effect.

- Ryan

pixel...@gmail.com

unread,
Apr 20, 2026, 1:44:31 AMApr 20
to Medley Interlisp core
I ended up practising more with Interlisp and rewrote it using Interlisp instead.

https://github.com/RyanBurnside/TURT.LISP

Feel free to hack on it as you please and suggest changes.
I did notice that if I had a WITH form enclosing a LET* form it caused some strange behavior.
I may try to rewrite the FD (forward) function once more with WITH and see it was just me...

Also it would have been nice to have LT (left turn) to compliment RT (right turn) but I didn't see a way to have LT as it was already in use.

- Ryan

Paolo Amoroso

unread,
Apr 21, 2026, 7:57:37 AMApr 21
to pixel...@gmail.com, Medley Interlisp core
In case you're interested this is the specification of a turtle library in Interlisp designed at Ohio State University (the code is missing).



Arun Welch

unread,
Apr 21, 2026, 9:28:36 AMApr 21
to Paolo Amoroso, pixel...@gmail.com, Medley Interlisp core
Minor correction, that was a class taught by the Loops team to the folks at OSU and Batelle.
> To view this discussion visit https://groups.google.com/d/msgid/lispcore/CAGi1hztuRj8GkbwVG_ekD_t6fcRHctdt%2Bs%2B7Qn%2BQuhvzF_AMPw%40mail.gmail.com.

Larry Masinter

unread,
Apr 21, 2026, 3:23:09 PMApr 21
to Paolo Amoroso, pixel...@gmail.com, Medley Interlisp core
> I did notice that if I had a WITH form enclosing a LET* form it caused some strange behavior.

> I may try to rewrite the FD (forward) function once more with WITH and see it was just me...

 
> Also it would have been nice to have LT (left turn) to compliment RT (right turn) but I didn't see a way to have LT as it was already in use.

Not sure but it would be good to have issues if these are repeatable problems? 

> So if I follow, it seems the source of the quote in Paolo's post was too optimistic?
> Is the process outlined on the blog still the way to go anyway?


We're stll discovering and debugging the advice for how to use the file package with CL packages.  I don't think we've solved the problem, so let's continue to look for solutions.

 

pixel...@gmail.com

unread,
Apr 22, 2026, 12:27:04 AMApr 22
to Medley Interlisp core
Paolo, 

Thanks for the article - It was a fun read! 
This notion of Papert's "turtle graphics" comes up again and again it seems...
It is a very nice way to do abstraction of stateful drawing at the cost of some extra CONSing and memory.
Python (the language) has a built in module as well. https://docs.python.org/3/library/turtle.html
I know that Turtle Graphics made its way into the Smalltalk environments too. I know Smalltalk V has it perhaps PARC's Smalltalks do too.

It's standard for LOGO of course where people mistook a somewhat Lispy (symbolic) language for the graphics functionality.
UCB LOGO has some nods to Lisp in the manual but alas it's not s-expression based. (Still a reasonably powerful language)
https://en.wikipedia.org/wiki/UCBLogo
https://people.eecs.berkeley.edu/~bh/logo.html

I happen to have some select hard copies of a few BYTE Magazines including the LOGO issue. 
https://vintageapple.org/byte/pdf/198208_Byte_Magazine_Vol_07-08_Logo.pdf

I also have "Turtle Geometry: The Computer as a Medium for Exploring Mathematics (Artificial Intelligence) "
https://www.amazon.com/Turtle-Geometry-Mathematics-Artificial-Intelligence/dp/0262510375

As well as the Computer Science Logo Style trilogy:
https://people.eecs.berkeley.edu/~bh/v1-toc2.html
https://people.eecs.berkeley.edu/~bh/v2-toc2.html
https://people.eecs.berkeley.edu/~bh/v3-toc2.html


Larry,

I'll try and recreate my previous code and capture the issues over the next few days.

I appreciate the thoughtfulness around the CL stuff!

I did see some mentions in the meetings, I've been hopping between job interviews lately but may try to attend another soon.
I do occasionally watch Interlisp meetings if something piques my interest. :)

Sorry for the core dump of links.
I've just polished off a can of energy drink and can taste color at this point. :}

Sincerely,
Ryan
Reply all
Reply to author
Forward
0 new messages