3 ms·
The surprise for me, working on the Emacs backend for McCLIM, is that CLIM is actually a lot simpler than it seems. The CLIM specification is overwhelming. The
by lukego 5y ago
The surprise for me, working on the Emacs backend for McCLIM, is that CLIM is actually a lot simpler than it seems.
The CLIM specification is overwhelming. The Lispworks and Franz user manuals for CLIM are too. There are just too many concepts being presented at the same time and with incredibly complex class hierarchies (e.g. a Stream is a Medium is a Pane is a ... I can't keep track.)
But behind all of that there are a few simple and mostly separate frameworks: describing colored geometric shapes and text; associating drawn shapes with application objects; defining commands to operate on application objects.
You can actually pick and choose from these APIs and map them onto whatever "backend" you like. The Emacs backend, for example, initially just translated the geometric drawing commands into SVG elements. That was really easy. Then we added unique IDs to those elements so that we can enable/disable them as input sources - also fairly easy.
The Emacs backend is becoming fairly extensive but it's still only 650 lines of code: https://github.com/nuddyco/McCLIM/blob/clime/Backends/Emacs/emacs.lisp https://github.com/nuddyco/McCLIM/blob/clime/Backends/Emacs/...