Closed masinter closed 2 years ago
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.
The immediate problem when (LOADLOOPS NIL 'SOURCE) is an undefined function $AV when loading LOOPSWINDOW at byte 7560
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)
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.
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.
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.
On 14 Aug 2022, at 17:02, Larry Masinter @.***> wrote:
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
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.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
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
I put current status in the README of the lmm-loops branch:
https://github.com/Interlisp/loops/blob/lmm-loops/README.md