SHRDLU Source Code?

187 views
Skip to first unread message

Charley Jones

unread,
Aug 4, 2024, 3:38:04 AM8/4/24
to PiDP-10
From the documentation, it was said that the source code was lost.
I did find this page talking about the source code:
I don’t know enough about the source code to know if this was the code behind the demo,
Or the actual code itself.

Dataman In Las Vegas

Eric Swenson

unread,
Aug 4, 2024, 11:23:34 AM8/4/24
to Charley Jones, PiDP-10, its-h...@its.victor.se
Hi Charley,

Where are you seeing that the source code was lost?  We got the sources from the Tapes of Tech Square (ToTS) archive at MIT. They were mostly complete and certainly not lost.

And, as you said the sources were also hosted on the Stanford web site. There are also various collections of sources that can be found (such as a Common Lisp version).

The issue, as I understand it, was that up until my recent success in getting it running, others had not fared well in getting it to run. In my recent effort, I actually can get it to display on an emulated Type 340 display, just as Terry Winograd and Gerry Sussman, and others, had it doing so in the early 1970s.

Now, to be fair, there were a few missing/corrupted sources in the files from ToTS, and the code, as found there wouldn’t run or compile in the version of MacLISP we have today in ITS. Several functions in the 1974 BIBOP MacLISP don’t exist in more modern versions, and many things don’t work the same way. For example, the original code used (CDR <atom>) to get the property list of an atom. The compiler of old treated all free variables as special, whereas the compiler of the late 70s and beyond treated them as lexical. 

I’ve had to make quite a few changes in order to get the code to compile, and the compiled code to run. What I’ve committed to the ITS GitHub repository is a version that runs interpreted. I’ll soon commit a version that runs compiled (and the updated sources allowing it to be compiled). It runs a lot faster compiled.

— Eric (KC6EJS)

On Aug 4, 2024, at 00:38, Charley Jones <data...@gmail.com> wrote:

From the documentation, it was said that the source code was lost.
--
You received this message because you are subscribed to the Google Groups "PiDP-10" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-10+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-10/A435F28B-CED8-4AEF-B5C4-88B7433D8143%40gmail.com.

Eric Swenson

unread,
Aug 4, 2024, 12:02:09 PM8/4/24
to Charley Jones, PiDP-10, its-h...@its.victor.se
It occurs to me that there may be confusion regarding the “SHRDLU demo” and SHRDLU itself.

The SHRDLU demo, which we have had committed to the ITS GitHub repository does not have any accompanying sources. Perhaps the reference to lost sources was for it.

In fact, however, I do have sources for that demo, but have not yet tried building the demo from those sources.

The demo, however, does not run SHRDLU. It is simply a program that reads a script file and issues commands to the Type 340 display to:

* display text for the commands and questions that would have been typed to SHRDLU
* display text for the responses that SHRDLU would have typed to the user
* issue the corresponding graphics commands that SHRDLU would have made had those commands been typed at a real SHRDLU.

The DEMO FLICK script is an annotated and marked up copy of a session with a SHRDLU. My guess is that the implementers wanted:

* a demo of SHRDLU that didn’t require a human to type, without error, all the commands and questions

* that didn’t require the audience to wait while the presenter typed all that text

* that performed a lot faster than the real SHRDLU

So the demo (TWDEMO) is nothing more than a scripted presentation that renders on the Type 340 display.

In the real SHRDLU that I have running, which is based on the latest sources from MIT’s AI Lab (1974), I have tried to enter all the commands and questions captured in the demo (you can see these by looking at SHRDLU;DEMO FLICK). For most of them the current SHRDLU responses match exactly. For some of them SHRDLU claims it doesn’t understand the prompt. My guess is that either a) the script was based on an earlier version of SHRDLU that actually understood those prompts, or b) that the current version is running into an error during parsing, which DOES result in a “I DON’T UNDERSTAND THAT.” response. 

In at least one case, the prompt from the script results in a message that a function is not implemented yet. And indeed the definition of that function produces the error that it is not implemented. Whether it was implemented at one time and after some rewrite was not newly implemented, or whether there is an error in parsing that results in a different function from the intended one being executed, I don’t know. I’ll need to dig deeper.

And for those prompts that reference “TO THE RIGHT OF” or “TO THE LEFT OF”, these are no longer understood. I’ll have to debug this because I do see vocabulary defined for this and do see code that looks like it tries to handle these

It is quite possible that all of the deviations from completely matching the DEMO FLICK responses are due to lurking bugs (corrupted sources, differences in the lisp interpreter, etc). It is true that much of the code has large bodies of code wrapped in ERRSET, which rather than displaying a LISP error and entering a BREAK REPL, simply returns some value to the caller. That response might result in incorrect handling (I DON’T UNDERSTAND) or other failures. I’ll have to spend more time on debugging those deviations. 

There is one more possibility, which I hope not to be true: the demo might NOT reflect an actual conversation with a real SHRDLU, but rather an imagined or intended one. 

Anyway, I’m still working on this and will share more and commit to the ITS repository when I reach various milestones.

— Eric (KC6EJS)

On Aug 4, 2024, at 08:23, Eric Swenson <er...@swenson.org> wrote:

Hi Charley,

Eric Swenson

unread,
Aug 4, 2024, 1:32:27 PM8/4/24
to Ken Harrenstien, Charley Jones, PiDP-10, its-h...@its.victor.se
Hi Ken.

I’ve been keeping him abreast of all my work and he has provided some feedback.  I did forward him both of my most recent messages to this list, so am eager to know if he has any insight. And yes, he’s very excited about the progress. Thanks. — Eric

On Aug 4, 2024, at 10:28 AM, Ken Harrenstien <ice...@gmail.com> wrote:

Have you considered asking Terry Winograd himself to
resolve some of these mysteries?  If he doesn't already
know about this effort, he might be tickled to hear from
you.  Hopefully he's still doing well.

His Stanford address (wino...@cs.stanford.edu) may still forward
to the right place.  He used to also hang out at Google, but seems
to have left about the same time he left Stanford.

--Ken

Eric Swenson

unread,
Aug 4, 2024, 10:26:56 PM8/4/24
to Lars Brinkhoff, Ken Harrenstien, its-h...@its.victor.se, Charley Jones, PiDP-10
I forwarded Terry the messages I’ve written here and he said that although TWDEMO was a scripted movie driver that output to the Type 340 display, all commands and responses had been run through SHRDLU. He said it may have been the case that multiple interactions with SHRDLU were used to generate the script, and that he may have updated SHRDLU multiple times to bluff bugs in order to get SHRDLU to produce all the responses see. In the script. He confirmed that TWDEMO was not running SHRDLU in real time.

He also said that this demo script was created based on interactions with SHRDLU prior to a complete rewrite by Stu Card in 1971 or 1972. Clearly, the sources I’ve been using were from after this rewrite. So it is certainly possible that that newer SHRDLU couldn’t respond exactly the same as the earlier ones.

— Eric (KC6EJS)

> On Aug 4, 2024, at 10:41, Lars Brinkhoff <la...@nocrew.org> wrote:
> Ken Harrenstien wrote:
>> Have you considered asking Terry Winograd himself to resolve some of
>> these mysteries?
>
> We (mostly Eric, Lyle Bickley, and I) have occasionally been in touch
> with Terry the past couple years. Understandably, Terry don't remember
> the exact state of SHRDLU code 50 years ago. There have been various
> rumours circulating that the code never really worked well and had to be
> hand patched from DDT. Now that I have seen the changed Eric has made,
> it's my impression the state of SHRDLU probably was not too bad after all.
>
> When the PiDP-10 delegation visited MIT, we mentioned SHRDLU to Gerald
> Sussman. He said he might take a look and fix the code, but we didn't
> take him up on his offer, if indeed it was a serious offer.

Charley Jones

unread,
Aug 5, 2024, 12:53:48 AM8/5/24
to Eric Swenson, Lars Brinkhoff, Ken Harrenstien, its-h...@its.victor.se, PiDP-10
This really a great thread.
Thank you for the update!
-crj

Sent from my iPhone 15pm!
Charley Jones, PMP

> On Aug 4, 2024, at 7:26 PM, Eric Swenson <er...@swenson.org> wrote:
>
> I forwarded Terry the messages I’ve written here and he said that although TWDEMO was a scripted movie driver that output to the Type 340 display, all commands and responses had been run through SHRDLU. He said it may have been the case that multiple interactions with SHRDLU were used to generate the script, and that he may have updated SHRDLU multiple times to bluff bugs in order to get SHRDLU to produce all the responses see. In the script. He confirmed that TWDEMO was not running SHRDLU in real time.

Layton Graye

unread,
Aug 5, 2024, 3:42:51 AM8/5/24
to Charley Jones, Eric Swenson, Lars Brinkhoff, Ken Harrenstien, its-h...@its.victor.se, PiDP-10

For the first time, this forum mail/chat subscription thingy is FINALLY giving me the ability comment, or originate. I'm still in the queue to get the PiDP 10 kit, then I'll be able to contribute to the confusion.


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

Charley Jones

unread,
Aug 5, 2024, 3:52:57 PM8/5/24
to Charley Jones, Eric Swenson, Lars Brinkhoff, Ken Harrenstien, its-h...@its.victor.se, PiDP-10
This is why I raised the question and started looking. 

From Oscars PIDP-10 User Doc:

Again, log in to ITS (F1:login turist) and go to the Shrdlu directory (:cwd shrdlu). Then, run the demo with :twdemo and start it off by typing Ctrl-Q in the Knight TV terminal window. Move the window aside so you have the type 340 window in full view again:

AF9CE6F5-2BFD-4505-BBC8-A0A93E3AF484.png 

At some point, use F1 and :kill to terminate the demo. Sadly, the original interactive Shrdlu has not been recovered. We have only the scripted demo. Some Googling will tell you the story, and why it is not likely the unscripted version will ever be brought back…



Sent from my iPhone 15pm!
Charley Jones, PMP

On Aug 4, 2024, at 9:53 PM, Charley Jones <data...@gmail.com> wrote:

This really a great thread.  

Charley Jones

unread,
Aug 5, 2024, 3:58:29 PM8/5/24
to Layton Graye, PiDP-10
If you look at the build instructions, you just really need a raspberry pi to build the base system.  You have to do it anyhow, so get a raw pi 5, cooler, and a nice microSD card.  You can run headless. 

Sent from my iPhone 15pm!
Charley Jones, PMP

On Aug 5, 2024, at 12:42 AM, Layton Graye <layto...@gmail.com> wrote:



Eric Swenson

unread,
Aug 5, 2024, 4:59:14 PM8/5/24
to Charley Jones, Lars Brinkhoff, Ken Harrenstien, its-h...@its.victor.se, PiDP-10
Actually, the original SHRDLU *has* been recovered. I committed it to the Github IT repository last week! I am still fixing a few bugs in it. And I’m working on making it faster by getting it all compiled and running.  But you can interact with the SRDLU that I have committed and successfully execute much of the original demo script if you’d like.

— Eric (KC6EJS)

On Aug 5, 2024, at 12:52, Charley Jones <data...@gmail.com> wrote:

This is why I raised the question and started looking. 

Again, log in to ITS (F1:login turist) and go to the Shrdlu directory (:cwd shrdlu). Then, run the demo with :twdemo and start it off by typing Ctrl-Q in the Knight TV terminal window. Move the window aside so you have the type 340 window in full view again:

<AF9CE6F5-2BFD-4505-BBC8-A0A93E3AF484.png>
 
Reply all
Reply to author
Forward
0 new messages