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

hash p write pathname #1612

Merged
merged 3 commits into from Apr 9, 2024
Merged

hash p write pathname #1612

merged 3 commits into from Apr 9, 2024

Conversation

masinter
Copy link
Member

  • #P"pathname" reads in as pathname
  • #P"pathname" used for printing pathnames
    do reading first

@masinter
Copy link
Member Author

I closed #1611 since it was included in this PR, and you will need both. This isn't changing the implementation, just adding the #P reader macro.

@nbriggs
Copy link
Contributor

nbriggs commented Mar 31, 2024

Presumably this doesn't affect reading the old #.(PATHNAME "foo"), since #. is just an eval reader macro and (PATHNAME "foo") is a normal way to create a pathname. There are a bunch of references to #.(PATHNAME ...) in the envos repository, though there are none that I can see in Medley or Notecards.

@masinter
Copy link
Member Author

masinter commented Apr 1, 2024

If there were any #.(PATHNAME "string") around, they would read in no problem.

Copy link
Contributor

@nbriggs nbriggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe loading this file 'ALLPROP and remaking it would fix the duplicate COMS issue.

@@ -503,18 +505,59 @@
(ADDTOVAR LAMA CL:ENOUGH-NAMESTRING CL:HOST-NAMESTRING FILE-NAME CL:MERGE-PATHNAMES PATHNAME
%%PRINT-DIRECTORY-COMPONENT CL:MAKE-PATHNAME %%PRINT-PATHNAME)
)
(PRETTYCOMPRINT CMLPATHNAMECOMS)

(RPAQQ CMLPATHNAMECOMS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to duplicate the RPAQQ of the CMLPATHNAMECOMS earlier in the file...?

@masinter
Copy link
Member Author

masinter commented Apr 9, 2024

The duplication of CMLPATHNAMESCOMS in this case is a leftover from Interlisp-10, where the compiled code for calling a lambda-nospread function (LAMBDA N ... (ARG N 1) ...) was different than calling a spread. It is still needed for NLAMBDA's.

@nbriggs
Copy link
Contributor

nbriggs commented Apr 9, 2024

OK, but I don't understand how having the exact same RPAQQ to set the CMLPATHNAMECOMS twice in different places in the file affects how lambda no-spread and nlambdas are compiled. Can you enlighten me?

@nbriggs
Copy link
Contributor

nbriggs commented Apr 9, 2024

And this was a newly introduced change - it was apparently OK before the addition of #P pathname, but something about that caused it to be added?

Copy link
Contributor

@nbriggs nbriggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@masinter masinter merged commit 44b1f8a into master Apr 9, 2024
@masinter masinter deleted the hash-p-write-pathname branch April 16, 2024 04:40
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

Successfully merging this pull request may close these issues.

None yet

2 participants