Skip to content

Rmk103 font and related code updates #2216

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

Open
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

rmkaplan
Copy link
Contributor

This includes changes to cleanup and simplify (somewhat) the interface and some of the internals of the FONT architecture. It also includes MEDLEYFONTFORMAT, the implementation of the new read/writable format for display and other device fonts. The changes to FONT are documented in docs/internal/FONTCODECHANGES.TEDIT, the document for MEDLEYFONTFORMAT is in docs/internal/MEDLEYFONTFORMAT.TEDIT.

Around this central core there are a bunch of files with small changes for compatibility with some of the font changes. E.g. the recursion surrounding the validation of font attributes has been flattened out, and almost all calls to \COERCEFONTDESC have been eliminated (addressing #2100).

And the loadup sequences and have been adjusted and a few functions have been moved so that medley-format fonts can be included in the MAKEINIT.

This PR includes only 2 medley-format fonts, for GACHA10 and HELVETICA10. GACHA10 is created in the MAKEINIT. HEVETICA10 a little later, when MENU is loaded. I've included them here to test that everything hangs together.

(Separately, I have created medley-format fonts for all the display fonts, but I want to release those in a separate PR after this code has settled down. The new NS fonts will be MCCS-encoded, and that will require some other adjustments.)

@pamoroso
Copy link
Contributor

I checked out this PR on Linux Mint 22.1 Cinnamon and the apps sysout fails with the error File not found: MCCS error during GREET...:

paolo@lispmachine:~/medley/medley$ ./scripts/loadup-all.sh -apps
>>>>> START loadup-init
"/home/paolo/bin/lde" "/home/paolo/medley/medley/internal/loadups/starter.sysout" -id "loadup_init_1" -title "Medley::loadup_init_1" -g 1024x768 -sc 1024x768 -noscroll
MEDLEYDIR: "/home/paolo/medley/medley"
LOGINDIR: "/home/paolo/medley/medley/loadups/build/logindir"
GREET FILE: "/home/paolo/medley/medley/loadups/build/loadup-init.init"
REM.CM FILE: ""
VMEM FILE: "/home/paolo/medley/medley/loadups/build/logindir/vmem/lisp_loadup_init_1.virtualmem"
apps-sysout-error

I'm attaching the loadups directory: loadups.zip

The Medley head:

commit b8b210803e0104b7e43a28a39bbaae42679a5cdb (HEAD -> rmk103--Font-and-related-code-updates, origin/rmk103--Font-and-related-code-updates)

The Maiko head on master:

commit fc90838ad84a152bfc70ce1d091b13166d0bf0d5

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Jul 17, 2025 via email

@pamoroso
Copy link
Contributor

With loadup-full.sh I get the same error File not found: MCCS error during GREET...:

paolo@lispmachine:~/medley/medley$ ./scripts/loadup-full.sh 
>>>>> START loadup-init
"/home/paolo/bin/lde" "/home/paolo/medley/medley/internal/loadups/starter.sysout" -id "loadup_init_1" -title "Medley::loadup_init_1" -g 1024x768 -sc 1024x768 -noscroll
MEDLEYDIR: "/home/paolo/medley/medley"
LOGINDIR: "/home/paolo/medley/medley/loadups/build/logindir"
GREET FILE: "/home/paolo/medley/medley/loadups/build/loadup-init.init"
REM.CM FILE: ""
VMEM FILE: "/home/paolo/medley/medley/loadups/build/logindir/vmem/lisp_loadup_init_1.virtualmem"
loadup-full-error

The loadups directory: loadups.zip

(These were for the next phase)
@rmkaplan
Copy link
Contributor Author

rmkaplan commented Jul 17, 2025 via email

@pamoroso
Copy link
Contributor

I updated to commit f93cc9e and the apps sysout failed with the error File not found: MEDLEYFONTFORMATerror during GREET...

paolo@lispmachine:~/medley/medley$ ./scripts/loadup-all.sh -apps
>>>>> START loadup-init
"/home/paolo/bin/lde" "/home/paolo/medley/medley/internal/loadups/starter.sysout" -id "loadup_init_1" -title "Medley::loadup_init_1" -g 1024x768 -sc 1024x768 -noscroll
MEDLEYDIR: "/home/paolo/medley/medley"
LOGINDIR: "/home/paolo/medley/medley/loadups/build/logindir"
GREET FILE: "/home/paolo/medley/medley/loadups/build/loadup-init.init"
REM.CM FILE: ""
VMEM FILE: "/home/paolo/medley/medley/loadups/build/logindir/vmem/lisp_loadup_init_1.virtualmem"
loadup-all-error

The loadups directory: loadups.zip

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Jul 17, 2025 via email

@nbriggs
Copy link
Contributor

nbriggs commented Jul 17, 2025

OK, loadups work with the MEDLEYFONTFORMAT now present.
lisp.sysout is now about 1.5% bigger and a full loadup takes about 10% longer than it used to. Not sure why.

Untracked files don't get deleted by git when you switch between branches, so if there's a new file that you forgot to commit then changing branches will leave it there and presumably GITFNS will think it's also in the branch it switched to. If a file was committed in one branch and then you switch to a branch where it doesn't exist then it will get deleted. I don't know that treating things as {unix} would help -- at least not that problem.

@pamoroso
Copy link
Contributor

I updated to commit 51d2cc6 and the apps loadup failed with the error (the Medley window was closed):

paolo@lispmachine:~/medley/medley$ ./scripts/loadup-all.sh -apps
>>>>> START loadup-init
"/home/paolo/bin/lde" "/home/paolo/medley/medley/internal/loadups/starter.sysout" -id "loadup_init_1" -title "Medley::loadup_init_1" -g 1024x768 -sc 1024x768 -noscroll
MEDLEYDIR: "/home/paolo/medley/medley"
LOGINDIR: "/home/paolo/medley/medley/loadups/build/logindir"
GREET FILE: "/home/paolo/medley/medley/loadups/build/loadup-init.init"
REM.CM FILE: ""
VMEM FILE: "/home/paolo/medley/medley/loadups/build/logindir/vmem/lisp_loadup_init_1.virtualmem"
+++++ SUCCESS +++++

[...]

>>>>> START loadup-apps-from-full
"/home/paolo/bin/lde" "/home/paolo/medley/medley/loadups/build/full.sysout" -id "loadup_apps_from_full_1" -title "Medley::loadup_apps_from_full_1" -g 1024x768 -sc 1024x768 -noscroll
MEDLEYDIR: "/home/paolo/medley/medley"
LOGINDIR: "/home/paolo/medley/medley/loadups/build/logindir"
GREET FILE: "/home/paolo/medley/medley/greetfiles/NOGREET"
REM.CM FILE: "/home/paolo/medley/medley/loadups/build/loadup-apps-from-full.cm"
VMEM FILE: "/home/paolo/medley/medley/loadups/build/logindir/vmem/lisp_loadup_apps_from_full_1.virtualmem"
+++++ SUCCESS +++++
..... files created .....
-rw-rw-r-- 1 paolo paolo 12692 Jul 17 19:59 /home/paolo/medley/medley/loadups/build/apps.dribble
-rw-rw-r-- 1 paolo paolo 13494272 Jul 17 19:59 /home/paolo/medley/medley/loadups/build/apps.sysout
<<<<< END loadup-apps-from-full

Added RDSYS.~40~ to library
Linked RDSYS to RDSYS.~40~ in library
Added RDSYS.LCOM.~40~ to library
Linked RDSYS.LCOM to RDSYS.LCOM.~40~ in library
Added lisp.sysout to loadups
Added lisp.dribble to loadups
Added full.sysout to loadups
Added full.dribble to loadups
Added apps.sysout to loadups
Added apps.dribble to loadups
>>>>> START loadup-aux
"/home/paolo/bin/lde" "/home/paolo/medley/medley/loadups/full.sysout" -id "loadup_aux_1" -title "Medley::loadup_aux_1" -g 1024x768 -sc 1024x768 -noscroll
MEDLEYDIR: "/home/paolo/medley/medley"
LOGINDIR: "/home/paolo/medley/medley/loadups/build/logindir"
GREET FILE: "/home/paolo/medley/medley/greetfiles/NOGREET"
REM.CM FILE: "/home/paolo/medley/medley/loadups/build/loadup-aux.cm"
VMEM FILE: "/home/paolo/medley/medley/loadups/build/logindir/vmem/lisp_loadup_aux_1.virtualmem"
----- FAILURE loadup-aux-----
..... files created .....
<<<<< END loadup-aux

----- loadup-all: FAILURE -----

The dribble files: loadups-dribble.zip

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Jul 17, 2025 via email

@nbriggs
Copy link
Contributor

nbriggs commented Jul 17, 2025

It's failing the -aux part because:

{DSK}<Users>briggs>Projects>medley>sources>FILESETS.;1
File created 17-Jul-2025 09:32:58
FILESETSCOMS
File not found: MCCS

4> 
        (IL:LOGOUT T 1)

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Jul 17, 2025 via email

@nbriggs
Copy link
Contributor

nbriggs commented Jul 17, 2025

The space increase is reproducible, the time for a ./loadup -f isn't consistent - there may be something else going on with the timing.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Jul 17, 2025 via email

@pamoroso
Copy link
Contributor

I'm testing the commits up to 28cf61a on Linux Mint 22.1 Cinnamon, nothing unusual so far.

@pamoroso
Copy link
Contributor

pamoroso commented Aug 5, 2025

After updating to commit fa62d05 I still don't have anything unusual to report.

Copy link
Member

@masinter masinter left a comment

Choose a reason for hiding this comment

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

see notes

@rmkaplan rmkaplan requested review from masinter and removed request for masinter August 9, 2025 23:41
@rmkaplan
Copy link
Contributor Author

rmkaplan commented Aug 9, 2025

@masinter , I don't see any notes. Where are they?

@masinter
Copy link
Member

sorry they disappeared. I can reconstruct but mainly; the file PDFSTREAM was deleted from library (PDFSTREAM.LCOM remains). The ASSOC multilevel function changes were handled by another PR.
loadup --aux dies when it cant find PDFSTREAM.

My local builds were working, but my directory had the ~nn~ version without the Unix file.
@rmkaplan
Copy link
Contributor Author

wrt PDFSTREAM, my loadups were working but I saw that my local directory at only the nn version, the Unix file was gone. I ran Frank's thinner, which cleaned out all the old stuff so I could see what's happening. (Note that the thinner doesn't clean out RDSYS, FWIW).

I think something went wrong when I merged the PDFSTREAM PR into this.

Anyway, try it now.

@rmkaplan
Copy link
Contributor Author

wrt MULTI-ALIST, this PR moved it to the library. The GETMULTI PR #2245 is an updated version, simplified and with a new capability--out of step because this one was hanging out for so long.

I could add the new version to this PR and delete the other one. But I'm expecting to be able just merge the new one into this after this is approved/merged. Will git prevent that?

@pamoroso
Copy link
Contributor

I updated to commit 455d714 and it's still looking good.

Copy link
Member

Choose a reason for hiding this comment

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

can we establish the convention that TEdit files use .TEDIT consistently?

Does it make sense to document "changes" in the medley repository? In the future, will the 'changes' be relevant and useful? Or just detritus left over from one of several changes?

Copy link
Member

Choose a reason for hiding this comment

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

does it make sense to update files that belong in 'obsolete'? The FX-80 is not something anyone will have.

Copy link
Contributor

Choose a reason for hiding this comment

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

I read somewhere in the documentation that the FX-80 driver, given its simplicity, is a good example to study for writing new types of IMAGESTREAM.

Copy link
Member

Choose a reason for hiding this comment

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

I remember Nick said something about 'subrs' (not compiled into current maiko) that implemented reading and writing binary bitmaps. I don't remember why these bitmap reading and writing are moved from here.

Copy link
Member

Choose a reason for hiding this comment

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

Is it impossible to extract the MULTI-ALIST file changes into a separate PR?
Do the other changes depend on it? There are lots of commits, and it will be hard to sort out.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the changes to MULTI-ALIST (now in library/MULTI-ALIST and related files) in PR #2216 can be separated from the other changes in that PR—but this would require creating a new pull request that contains only the MULTI-ALIST changes.

Currently, PR #2216 includes 52 changed files, covering a wide range of areas: font system architecture, font formats, compatibility updates, loadup sequence adjustments, and more. The MULTI-ALIST changes are just a subset among these many modifications.

To separate them:

  • You (or the PR author) would need to create a new branch based on master (or the appropriate base), and cherry-pick or re-apply only the changes relevant to MULTI-ALIST (and its .LCOM/.TEDIT companions, if changed).
  • You would then open a new PR just for those changes.
  • The original PR (Rmk103 font and related code updates #2216) would need to drop those changes to avoid duplication/conflicts.

For a complete and up-to-date list of all files and changes in PR #2216, see: https://github.com/Interlisp/medley/pull/2216/files

Note: My API access is limited to 30 files at a time, so there may be more files changed than I can see directly. For the full set, use the GitHub link above.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Aug 11, 2025 via email

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Aug 11, 2025 via email

@nbriggs
Copy link
Contributor

nbriggs commented Aug 11, 2025

The PRESS code is used to read PRESS format files containing bitmaps, it should not be obsoleted.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Aug 11, 2025 via email

@nbriggs
Copy link
Contributor

nbriggs commented Aug 11, 2025 via email

@pamoroso
Copy link
Contributor

Commit 56cf738 doesn't fix the PLOOKS issue for me on Linux Mint 22.1 Cinnamon. When I open DInfo from the background menu I get a break window with the error:

TYPE-MISMATCH
In CL::%%NOT-NONCOMPLEX-NUMBER-ERROR:
NIL is not a number
dinfo-error

The backtrace:

OLDMOUSE/5(debug)BTV
CL::%%NOT-NONCOMPLEX-NUMBER-ERROR
IPLUS
   TEXTOBJ {TEXTOBJ}#122,600
   CH#1 1
   LINE {L81/61864: NIL-NIL}
   THISLINE {THISLINE}#121,177764
   FONT {GACHA10-MRR/173,176734}
   CLOOKS {CL100/17880:Gacha10}
   TRUEASCENT 10
   TRUEDESCENT 3
   LM NIL
   PLOOKS {PL81/64968:NI-NIL-NIL}
\TEDIT.FORMATLINE.EMPTY
   TSTREAM #<IO Text Stream/127,114700>
   CH#1 1
   LINE {L81/61864: NIL-NIL}
   REGION NIL
   IMAGESTREAM #<Output Display Stream/146,41300>
   FORMATTINGSTATE NIL
   TEXTOBJ {TEXTOBJ}#122,600
   OFFSET 0
   TRUEASCENT -1
   TRUEDESCENT -1
   ASCENTB 0
   DESCENTB 0
   ASCENTC 0
   DESCENTC 0
   OVERHANG 0
   SPACELEFT 0
   TX 0
   BOXSTREAM #<Output Display Stream/146,41300>
   CHARLOOKS NIL
   THISLINE {THISLINE}#121,177764
   LINETYPE NIL
   WIDTH NIL
   WMARGIN NIL
   SCALE NIL
   PARALOOKS NIL
   RIGHTMARGIN NIL
   HASKERN NIL
   PC NIL
   CHARSLOT NIL
   PREVSP NIL
   1STLN NIL
   CHNOB NIL
   FORCED-END NIL
   CHNO NIL
   LX1 NIL
   TX NIL
   TXB NIL
   FONT NIL
   CHARSLOTB NIL
   TABPENDING NIL
   PREVHYPH NIL
   PREVDHYPH NIL
   START-OF-PIECE 1
   UNBREAKABLE NIL
   OLDPIECE {PIECE}#121,174744
   OLDPCCHARSLEFT 0
   OLDCARETLOOKS {CL100/17880:Gacha10}
   FIRSTSEPR NIL
\TEDIT.FORMATLINE
   PANE {WINDOW}#122,6664
   TSTREAM #<IO Text Stream/127,114700>
   PREVLINE {L81/61906: 0-0 FED}
\TEDIT.SUFFIXLINE.CREATE
   TSTREAM #<IO Text Stream/127,114700>
   PANE {WINDOW}#122,6664
   LCHARLAST NIL
   YBOT NIL
   PREFIX {L81/61906: 0-0 FED}
\TEDIT.PANE.CREATELINES
   PANE {WINDOW}#122,6664
   TSTREAM #<IO Text Stream/127,114700>
   PROPS (READONLY QUIET NOTITLE T TITLEMENUFN 
DINFO.TITLEMENUFN)
   AFTERPANE NIL
   LCHAR1 NIL
   TEXTOBJ {TEXTOBJ}#122,600
   MENUPROP NIL
   SEL {SEL: unset 101/30514}
   LASTVISIBLE NIL
\TEDIT.WINDOW.SETUP
   WINDOW {WINDOW}#122,6664
   TSTREAM #<IO Text Stream/127,114700>
   PROPS (READONLY QUIET NOTITLE T TITLEMENUFN 
DINFO.TITLEMENUFN)
   TEXTOBJ {TEXTOBJ}#122,600
   FILEPTR 0
\TEDIT.OPENTEXTSTREAM.WINDOW
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   TSTREAM #<IO Text Stream/127,114700>
   TEXTOBJ {TEXTOBJ}#122,600
   TEDIT.GET.FINISHEDFORMS NIL
   PRIMPANE NIL
   START NIL
SI::*UNWIND-PROTECT*
   TEXT NIL
   WINDOW {WINDOW}#122,6664
   START/PROPS NIL
   END NIL
   PROPS (READONLY QUIET NOTITLE T TITLEMENUFN 
DINFO.TITLEMENUFN)
   LISPXHIST NIL
   SI::*RESETFORMS* NIL
   RESETSTATE NIL
OPENTEXTSTREAM
   GRAPH {DINFOGRAPH}#137,153640
   NODE NIL
   SEL NIL
   OFF? T
   WINDOW {WINDOW}#122,6664
   FILENAME NIL
   FROM NIL
   TO NIL
   PROPS (READONLY QUIET NOTITLE T TITLEMENUFN 
DINFO.TITLEMENUFN)
   OLD.TEXTSTREAM NIL
   TEXTSTREAM NIL
   FULLFILENAME NIL
DINFO.UPDATE.TEXT.DISPLAY
   GRAPH {DINFOGRAPH}#137,153640
   WINDOW {WINDOW}#122,6664
   NO.FREEMENU? NIL
DINFO.SETUP.WINDOW
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   W {WINDOW}#122,6664
   GRAPH {DINFOGRAPH}#137,153640
   MONITORLOCK #<Lock DInfo/174,6570>
SI::*UNWIND-PROTECT*
   GRAPH.OR.FILE {DINFOGRAPH}#137,153640
   WINDOW.OR.REGION {WINDOW}#122,6664
   SETUP.ONLY? T
   NO.FREEMENU? NIL
   LISPXHIST NIL
   SI::*RESETFORMS* ((& NIL))
   RESETSTATE NIL
DINFO
   FROM.BACKGROUND? T
IRM.GET.DINFOGRAPH
   *FORM* (IRM.GET.DINFOGRAPH T)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* IRM.GET.DINFOGRAPH
\EVALFORM
   \INTERNAL NIL
EVAL
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
SI::*UNWIND-PROTECT*
   SI::*RESETFORMS* ((&))
DINFO.SELECT.GRAPH
   *FORM* (DINFO.SELECT.GRAPH)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* DINFO.SELECT.GRAPH
\EVALFORM
STKEVAL
   ITEM (DInfo (DINFO.SELECT.GRAPH) 
"Open a DInfo window for browsing documentation.")
   FROMMENU {MENU}#131,70130
   BUTTON RIGHT
DEFAULTWHENSELECTEDFN
   MENU {MENU}#131,70130
   ITEM (DInfo (DINFO.SELECT.GRAPH) 
"Open a DInfo window for browsing documentation.")
   BUTTON RIGHT
DOSELECTEDITEM
   MENU {MENU}#131,70130
   RELEASECONTROLFLG NIL
   NESTEDFLG NIL
   IMAGE {WINDOW}#122,15000
   DSP #<Output Display Stream/146,41200>
MENU
   FORM NIL
DOBACKGROUNDCOM
   ARGS 1
   WINDOW NIL
DOWINDOWCOM
   \MHCOM NIL
   \MHPROCESS NIL
   \MHWINDOW NIL
   \MOUSEBUSY T
WINDOW.MOUSE.HANDLER
   \OLDTTY NIL
   \MOUSEBUSY NIL
\MOUSE.PROCESS
   *FORM* (\MOUSE.PROCESS)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* \MOUSE.PROCESS
\EVALFORM
   %#FORM# (\MOUSE.PROCESS)
   *CURRENT-PROCESS* #<Process OLDMOUSE/174,11410>
   HELPFLAG BREAK!
   \CURRENTDISPLAYLINE 0
   \#DISPLAYLINES 40
   \LINEBUF.OFD #<IO Stream on T/174,55500>
   *READTABLE* #<ReadTable INTERLISP/174,54714>
   \PRIMTERMTABLE {TERMTABLEP}#174,47740
   \PRIMTERMSA {CHARTABLE}#174,50000
   TtyDisplayStream 
#<Output Display Stream/127,125100>
   SI::*RESETFORMS* NIL
   \INTERRUPTABLE T
   \TTYWINDOW NIL
   READBUF NIL
   \TERM.OFD #<Output Stream on T/167,134000>
   *STANDARD-OUTPUT* #<Output Stream on T/167,134000>
   *STANDARD-INPUT* #<IO Stream on T/174,55500>
\MAKE.PROCESS0
T

Minor dependency on the new public interface for default paragraph looks
@rmkaplan
Copy link
Contributor Author

rmkaplan commented Aug 11, 2025 via email

@nbriggs
Copy link
Contributor

nbriggs commented Aug 11, 2025

It fixed "MAN RSTRING" and "(RSTRING ?", but yes I also see the "NIL IS NOT A NUMBER" error if I try to start DInfo from the background menu.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Aug 11, 2025 via email

@rmkaplan
Copy link
Contributor Author

@masinter wondered about the extension for Tedit files. The put tries to suggest .TEDIT for formatted files, but it had a heuristic that said to lower-case if the file itself had any lower-case. That test was incorrect--it tested the whole file, including directory, and not just the name part.

So if the concern was about seeing it suggest .tedit instead of .TEDIT, that will be fixed in the next Tedit PR.

@pamoroso
Copy link
Contributor

Commit 8e8d9a4 fixes all the issue for me: MAN RSTRING, (RSTRING ?, and DInfo.

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.

A MENU created with MENUFONT specified as a list of font properties rather than a FONTDESCRIPTOR fails
4 participants