Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOOPS progress and puzzles #872

Closed
masinter opened this issue Aug 3, 2022 · 6 comments
Closed

LOOPS progress and puzzles #872

masinter opened this issue Aug 3, 2022 · 6 comments
Assignees

Comments

@masinter
Copy link
Member

masinter commented Aug 3, 2022

I put current status in the README of the lmm-loops branch:

https://github.com/Interlisp/loops/blob/lmm-loops/README.md

@masinter
Copy link
Member Author

See discussion about problems with loading loops source.
loops PR interlisp/loops/13
I merged that PR (the lmm-loops branch) but there are several problems and areas to explore.

#, read macro

The immediate problem when (LOADLOOPS NIL 'SOURCE) is an undefined function $AV when loading LOOPSWINDOW at byte 7560
image
which is at the space before 'DontSave' in the line
(window #,($AV LispWindowAV ((YIV0.C=N5.W_7 . 10))) DontSave (Value)

Now, the puzzle is: who sets #, to be a read-macro dispatch? It looks like this was previously done in LOOPS code in the file LOOPSPRINT but now is done by the Common Lisp and Interlisp readtables.
(This might add some additional motivation to the 'OLD-INTERLISP-T' changes to the read table.)
Tthere is code in LOOPSPRINT for setting up # that is turned off now

"Used to include the following: (COMS (P  (SETALLSYNTAX LoopsReadMacroChar '(MACRO FIRST HashMacro)))
        (ADVICE HPINITRDTBL)"
and a definition of SETALLSYNTAX (not called).
     grep -r HASHREADMACRO .
     grep -r '#\,' .


anyway, somehow loops is implementing #, as if it were #. or at least EVALing the following form.
But for some reason $AV isn't defined.

NOTE: http://clhs.lisp.se/Front/X_Mast_9.htm doesn't mention #, even though there is a HASH-COMMA on the file CMLREADTABLE. I haven't looked in CLTL2 yet.

![image](https://user-images.githubusercontent.com/1116587/184545107-cd46d998-fcea-4ada-8116-3b7f0cbe5358.png)

![image](https://user-images.githubusercontent.com/1116587/184545141-a7fe1d90-74d1-4ab9-aaab-aad8b56a029f.png)

@nbriggs
Copy link
Contributor

nbriggs commented Aug 14, 2022

You're going down a rabbit hole there -- the problem seems to be that LOOPSACTIVEVALUES gets LOADCOMP'd by one of the previously loaded files in the list, and then the (DOFILESLOAD (SOURCE) LOOPSACTIVEVALUES) doesn't load the source, so there is no code to run for the LOOPSWINDOW which depends on the active values infrastructure.

@masinter
Copy link
Member Author

i'll try fixing DOFILESLOAD(SOURCE).

More suspicious stuff that is likely wrong for Medley 3.5:

The file LOOPSSPEEDUP has several constructs that are highly suspicious of being written for the old memory layout.
image

@nbriggs
Copy link
Contributor

nbriggs commented Aug 14, 2022

How about starting with looking at what is in the LOADCOMP'd expressions to see if it's sufficient.
We've had the discussion about DOFILESLOAD and LOADCOMP in the past, and it wasn't clear what it should be doing and Ron reported that it had changed over time.
There's nothing wrong with the LOOPSSPEEDUP "Make-Not-Reference-Counted" function -- Ron did the same in LFG, and this code is very similar and also works.

@tfeb
Copy link
Contributor

tfeb commented Aug 14, 2022 via email

@masinter
Copy link
Member Author

The issue #733 talks more about loading LOOPS from sources. There is a work-around of avoiding a couple of the loadcomps .
Now that there are compiled versions of all the loops files (system, library, users, users/rules trucin/players) the problem left is making players whose name is NIL. Will make a separate focused issue

@masinter masinter closed this as not planned Won't fix, can't repro, duplicate, stale Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants