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

Loading Truckin balks at recognizing ":" in comments in Truckin code. #1819

Open
skaisler opened this issue Aug 31, 2024 · 16 comments
Open

Loading Truckin balks at recognizing ":" in comments in Truckin code. #1819

skaisler opened this issue Aug 31, 2024 · 16 comments

Comments

@skaisler
Copy link

skaisler commented Aug 31, 2024

Documented several attempts at resolving the problem here.
LOOPS-LoadIssue.docx
LispShots.docx
TRUCKIN.txt

Expected behavior
Should not balk on new comment style format, e.g.. (* : "comment including :")

This is transient.

Context (please complete the following information):

  • OS: Windows 10, 22H2; 19045.4780Medley 240729
  • Host arch: Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz 3.70 GHz
  • Maiko version: 240513
  • IL:MAKESYSDATE: Medley 240729

Additional context
Add any other context about the problem here.

@MattHeffron
Copy link
Contributor

In loops/users/CONVERSION-AIDS the CONVERT-METHODS function is using the "OLD-INTERLISP-FILE" readtable and using TEDIT to change (DEFINEQ ...) into (DEFINE-METHOD-FNS ...) expressions.
Likewise CONVERT-LOOPS-FILES uses the "OLD-INTERLISP-FILE" when processing files. It appears the TRUCKIN file has been processed by this. This processing converts comments.
What I do not see is anything that would indicate why the converted comments aren't reading correctly!
There doesn't appear to be anything that changes the "INTERLISP" readtable to affect LOAD.

@masinter
Copy link
Member

masinter commented Aug 31, 2024

from https://github.com/masinter/homedir file LARRY there is a function GETLOOPS:

(GETLOOPS
[LAMBDA NIL (* ; "Edited 19-Oct-2022 17:00 by lmm")
(FILESLOAD LOADLOOPS)
(LOADLOOPS)
(COND
((CL:Y-OR-N-P "Load Truckin?")
(CNDIR "../truckin")
(FILESLOAD TRUCKINLOAD)
(OR (BOUNDP 'TRUCKINVARS)
(SETQ TRUCKINVRS))
(LoadTruckin)))
(COND
((CL:Y-OR-N-P "Load sources?")
(pushnew DIRECTORIES TruckinPlayersDirectory)
(FOR X IN (REVERSE FILELST) WHEN (NOT (MEMBER X BEFOREFILES))
DO (LOAD X 'PROP)
(MASTERSCOPE `(ANALYZE ANY ON ',X])

w;hich loads all of loops compiled and sources. Without any conversions or errors.

What's missing in this is the file LOOPSMS which should be loaded (FILESLOAD LOOPSMS) after the call to LOADLOOPS but before loading the sources and calling . ANALYZE.

@MattHeffron
Copy link
Contributor

After some experimenting to figure out why GETLOOPS was failing, I added to it:

(GETLOOPS
  [LAMBDA NIL                                                (* ; "Edited  2-Sep-2024 23:18 by mth")
                                                             (* ; "Edited 19-Oct-2022 17:00 by lmm")
    (CL:UNLESS (AND (BOUNDP 'BEFOREFILES)                    (* ; "mth - added this to set BEFOREFILES")
                    BEFOREFILES)
        (SETQ BEFOREFILES (COPY FILELST)))
    (FILESLOAD LOADLOOPS)
    (LOADLOOPS)
    (COND
       ((CL:Y-OR-N-P "Load Truckin?")
        (CNDIR "../truckin")
        (FILESLOAD TRUCKINLOAD)
        (OR (BOUNDP 'TRUCKINVARS)
            (SETQ TRUCKINVRS))
        (LoadTruckin)))
    (COND
       ((CL:Y-OR-N-P "Load sources?")
        (pushnew DIRECTORIES TruckinPlayersDirectory)
        (for X in (REVERSE FILELST) when (NOT (MEMBER X BEFOREFILES))
           do (LOAD X 'PROP)
              (MASTERSCOPE `(ANALYZE ANY ON ',X])

Then it loaded LOOPS and Truckin correctly, but failed in the MASTERSCOPE analysis of Truckin.
image

@masinter
Copy link
Member

masinter commented Sep 5, 2024 via email

@skaisler
Copy link
Author

skaisler commented Sep 5, 2024 via email

@MattHeffron
Copy link
Contributor

I added the (FILESLOAD LOOPSMS) and it got further, but failed analyzing LOOPSKERNEL, in Object.MessageNotUnderstood.
image

@masinter
Copy link
Member

masinter commented Sep 9, 2024

We knew that Interlisp/LOOPS did not like "#", but I am still confused why
it did not like rando occurrences of ":".

I don't know what you mean by 'not like'. Is there (could you make sure there is) an issue describing any failure? If it's loops code you're using, then stay in an interlisp exec 9not xcl0.

@skaisler
Copy link
Author

skaisler commented Sep 9, 2024 via email

@nbriggs
Copy link
Contributor

nbriggs commented Sep 10, 2024

@skaisler
Are the LOOPS files you're loading files that have been modified in any way outside of Medley? (i.e., with Notepad, etc.)
You say it's transient, but that's based on not every occurance of "sm%: " failing within a single file. Is it repeatable? Does the same file fail the same way each time it is loaded?

@skaisler
Copy link
Author

skaisler commented Sep 10, 2024 via email

@nbriggs
Copy link
Contributor

nbriggs commented Sep 10, 2024

@skaisler - but it can change the ability to load the source, since they're managed files. If you have an example of one of the LOOPS files that you have modified and that won't load, please attach it here.

@MattHeffron
Copy link
Contributor

@skaisler Or, instead of attaching one file here, you could commit the edited files to a branch and push it to GitHub.
Don't make a Pull Request (or make one and mark it as Draft).
This would allow us to investigate if there is some bizarre cross-file interaction that's contributing to the problem.
(This is extremely improbable, but I've seen stranger things!)

@skaisler
Copy link
Author

skaisler commented Sep 11, 2024 via email

@pamoroso
Copy link
Contributor

@skaisler The screenshots didn't go through.

@skaisler
Copy link
Author

skaisler commented Sep 11, 2024 via email

@nbriggs
Copy link
Contributor

nbriggs commented Sep 11, 2024

Attaching files with an e-mail reply doesn't seem to work - none of the source file, original images, or word doc got through to the github issue. Could you attach the files directly to the issue via the web interface, please.

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

5 participants