PDP-10 / its

Incompatible Timesharing System
Other
868 stars 84 forks source link

TEACH; LISP #377

Closed larsbrinkhoff closed 6 years ago

larsbrinkhoff commented 7 years ago

There's TEACH; TS LISP that says it's assembled from SYS: SYS; PURQIO 2149. So Lisp, I guess?

TEACH; TEACH 159 looks promising.

@BobKerns, do you want to look into this?

larsbrinkhoff commented 7 years ago

It loads:

I think we have everything covered.

eswenson1 commented 7 years ago

Wow! RWK! Didn't know he came onboard.

eswenson1 commented 7 years ago

Or I can, once I finish the rest of the lisp packages.

larsbrinkhoff commented 7 years ago

I suppose all of TEACH; LESSON * are part of this.

larsbrinkhoff commented 7 years ago

TEACH; TS MACSYM - teach Macsyma?
TEACH; TDUMP 2 - xfile for dumping a new TEACH; LISP
TEACH; TEACH DUMP - Lisp file for dumping
TEACH; TEACH MIDAS

larsbrinkhoff commented 7 years ago

It seems proper that RWK should have dibs on this. :-)

BobKerns commented 7 years ago

I imagine TS MACSYM is probably a link?

LESSON * would be the content,, written by me and KMP.

No idea about TEACH MIDAS. Where would I find all this good stuff? I poked around a bit earlier but I am on my phone, so I didn't clone.

Maybe I should get ITS up on this phone.. I think SIMH should work. Maybe even KLH10?

Can I get it up on my watch?

larsbrinkhoff commented 7 years ago

Yes, both SIMH and KLH10 works. I suggest you run CROCK on your watch!

eswenson1 commented 7 years ago

Indeed. But I doubt he'll be able to get it up on his watch! :-) @bobkerns let me know if you want to take this on or if you'd like me to.

larsbrinkhoff commented 7 years ago

Looks like it's all yours, @eswenson1!

eswenson1 commented 7 years ago

Did @bobkerns say he did't want to do it?

larsbrinkhoff commented 7 years ago

No, he didn't say either way.

larsbrinkhoff commented 6 years ago

Ping.

larsbrinkhoff commented 6 years ago

I think we can safely say this is up for grabs. I'm looking at it now, but I'll defer to you @eswenson1.

larsbrinkhoff commented 6 years ago
BobKerns commented 6 years ago

Sorry to be AWOL. I've had a lot going on w/ health (mine and family), and haven't been able to get up to speed to really say or do anything useful.

In particular, I don't know where the files you're referencing are? I can't find them in master and there doesn't seem to be an obvious branch.

Does TEACH DUMP load TEACH INIT from TEACH;, or from the current dir? It might be found in RWK;...

Or it might be one of the two links you hypothesize.

Anyway, if you can point me to the files, I'll see if I can offer any insight.

larsbrinkhoff commented 6 years ago

Hello @BobKerns,

Thanks for getting back in touch. The files are here:
https://github.com/PDP-10/its-vault/tree/master/files/teach

BobKerns commented 6 years ago

Thanks!

Observations:

larsbrinkhoff commented 6 years ago

Thank you @BobKerns!

I'd like to see this running soon. I think maybe @eswenson1 is busy with Multics now, so I volunteer myself.

eswenson1 commented 6 years ago

If you do the following:

  :link teach;teach init,teach;init >
  teach$$^S
  teach$^S
  complr^K
  teach;teach
  ^Z
  :KILL
  lisp^K
  n
  (load '((teach) teach)
  (load '((teach) init)

You get a GC OVERFLOW. If, at this point, if you simply do:

  $p<space>

TEACH starts up and prompts with a "$".

If you then type:

  (lesson)

A lesson starts.

I suspect that we need to set up an appropriate allocation (rather than typing "n") on lisp startup to avoid the gc overflow.

I'm a little surprised that TEACH INIT doesn't a) perform an allocation and b) doesn't load TEACH;TEACH FASL before doing what it does. This suggests to me that TEACH; TEACH INIT was not simply a link to TEACH; INIT >, but a simple wrapper that performed an allocation, loaded TEACH; TEACH FASL, and then ran TEACH; INIT >.

eswenson1 commented 6 years ago

The above steps seem to result in a working TEACH. I typed:

(lesson info)

and went through some of the intro, typing ^N when told to move to the next section.

I ran into this section:

Getting a normal Lisp
------- - ------ ----

To get a Lisp, one normally types LISP^K or just L^K (or one of several
variations on this.....) However, for the purposes of this course there
has been created a special version of Lisp (one of the neatest things
about Lisp is that it makes such things surprisingly easy.). To run it,
just say :RWK;LISP

This suggests that we'll need an RWK;TS LISP -- probably a link to SYS; TS LISP.

eswenson1 commented 6 years ago

I went through the following lessons without any issues: INTRO, EVAL, OBJECT, DOT, SETQ, COND, FIB, MEMQ, ASSQ, LAMBDA, DEFUN, OUTPUT, INPUT, PROG, and DO. After DO, came TRACE. I didn't actually do any work in this lesson, just typed ^N at each step. At the end, TEACH asked me whether I wanted to restart TRACE. It didn't offer to move onto any other lesson. Perhaps there aren't any.

eswenson1 commented 6 years ago

If you do:

teach$^S
tdump$j
$l tdump bin
$g

You get:

--Dump out a new TEACH;TS XLISP-- (Yes)
.VAL 0; UINTPU>>PUSH FXP,R   R/   0      

If you try to proceed:

$p
ILOPR;(ATTY;) 0>>0   0/   0   0/   0      
eswenson1 commented 6 years ago

The above error occurs because there is no saved-obarray property on the 'obarray symbol. I'll look for a source file that saves the old obarray and try to load it before running TEACH DUMP.

eswenson1 commented 6 years ago

Looks like one shouldn't load teach;teach fasl, but rather teach;start >.

eswenson1 commented 6 years ago

Well, that doesn't work. While a saved-obarray property is placed on 'obarray, I still get .val errors trying to dump.

While I haven't managed to figure out how to dump a TEACH using TEACH; TEACH DUMP, I have managed to dump a TEACH (defaults to TEACH; TS XLISP) by manually running (DUMP) after forcing the OBARRAY to be the one that is the one saved on the 'obarray symbol.

I did this:

(setq obarray (get 'obarray 'saved-obarray)
(dump)

in a lisp where I had loaded teach; start >. But I don't understand (yet) why TEACH DUMP doesn't work. It just binds obarray to the saved obarray and funcalls the function on the DUMP symbol (which is put there by TEACH; TEACH FASL). That should have worked as far as I know.

eswenson1 commented 6 years ago

If I do this:

teach$$^S
lisp^K
n
(load '((teach) start))
(let ((obarray (get 'obarray 'saved-obarray))) (funcall (intern "DUMP")))

I can successfully create a TEACH; TS XLISP that is a TEACH lisp. And it appears to work. Why TEACH; TEACH DUMP doesn't work is still a mystery to me. @larsbrinkhoff we've seen a .VAL recently from LISP and proceeding from that PC gave an ILOPR, I think. Do you remember what that was, and what the solution was?

Regardless, we can create a TEACH using the steps I mentioned above, so we can proceed with including TEACH in DB if we like. Thoughts?

eswenson1 commented 6 years ago

For me, at least, loading teach;init > (or teach;teach init, as a link to teach;init >) results in the .VAL error. The approach to dumping a TEACH xlisp in my previous post seems to work -- it does result in INIT > being loaded. TEACH > has a "(load-module init)" which loads INIT. So I don't really know what TEACH; TEACH INIT is supposed to be -- not a link to TEACH; INIT >.

eswenson1 commented 6 years ago

So I created a dummy file called TEACH; TEACH INIT, which contained just (). And then, I can do this successfully:

teach$$^S
lisp^K
n
(load '((teach) start))
(load '((teach) teach dump))

And this successfully dumps out a TEACH; TS XLISP that works.

eswenson1 commented 6 years ago

Note; I used all the FASL files from 1982-1984 for the above experiment except for TEACH >, which I had recompiled. I'm going to retry the whole experiment when compiling all the LISP files to FASL files first. If this works, shall I commit this to DB build?

eswenson1 commented 6 years ago

I deleted all the FASL files (from 1982-1984) and recompiled them (first compiling MACRO in one COMPLR, and then all the rest in another). I then redumped a new XLISP, and it worked fine. So I think we are "good" here. I'll commit unless I hear from Lars that I shouldn't for some reason.

larsbrinkhoff commented 6 years ago

Good work! Can you make a pull request as usual?

eswenson1 commented 6 years ago

Yes, doing that now. Testing out a DB build.

eswenson1 commented 6 years ago

I'm going to commit everything necessary to build TEACH; TS XLISP, as well as the all the LESSON files that we have in the its-vault. I'll also commit the -read- -this-, to-do >, no >, yes >, tdump >, teach bugs, and teach midas. I'm not going to build no or yes (in this commit) or do anything with those auxilliary files. In another commit, I can see about building yes and no to see if these actually work, as well as figuring out what to do with the extra files. Ok?

larsbrinkhoff commented 6 years ago

Ok.