Package for CL didn't save

30 views
Skip to first unread message

pixel...@gmail.com

unread,
Apr 12, 2026, 2:42:59 AM (5 days ago) Apr 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 AM (5 days ago) Apr 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 PM (5 days ago) Apr 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 PM (5 days ago) Apr 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 PM (5 days ago) Apr 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
Reply all
Reply to author
Forward
0 new messages