Started to work on a label-pane "widget" for LispWorks, text pane with support for minimal html-like markup. Inspired by Qt's QLabel. So far looks good. I got a strange alignment of letters with smaller font sizes on Windows, but looks ok in Linux LW. No extra dependencies, just LW. Lists etc still not implemented but basic formatting is in place:
https://codeberg.org/fourier/lw-rich-text

#lispworks #commonlisp

lw-rich-text

A set of LispWorks panes with support for HTML-like markup.

Codeberg.org

Submitted a bugreport this morning to LispWorks Hobbyist and received a free patch this evening already. Love LW!

#lispworks

Finally got some time to implement Wizard pages/dialogs support for LispWorks CAPI:

https://codeberg.org/fourier/lw-wizard

#lispworks #commonlisp

lw-wizard

LispWorks CAPI-based wizard dialog

Codeberg.org
a quick hack for #adventofcode2024 Day 2 using #CommonLisp in #LispWorks

#lisp #commonlisp #lispworks #symbolics #lispmachine

Made the KR frame system from the UIMS Garnet for two Common Lisp implementations work: LispWorks 8 and Portable Genera. I used this version: https://github.com/ury-marshak/kr

Typical problem porting code:: the initial value for structure slots is undefined in CL. The code assumes NIL.

Attached a screenshot of the KR examples in Portable Genera, a Virtual Lisp Machine on an Apple Mac mini with M4 Pro.

GitHub - ury-marshak/kr: Prototype object system for Common Lisp and more. KR: Constraint-Based Knowledge Representation

Prototype object system for Common Lisp and more. KR: Constraint-Based Knowledge Representation - ury-marshak/kr

GitHub
Spent whole yesterday's evening on implementing word-wrap function (to split string by provided line length in characters) only to find out today that LispWorks already has capi:wrap-text. Oh well.
#lispworks

Apparently a problem of boundling dynamic libraries in OSX is an [in]famous one. While creating a binary with LispWorks DV for OSX I've found that my app uses osicat, which generates the libosicat.dylib, so I had to bundle it together with the app.
LW solution seems to be trivial for that - I've just embed the library into LW binary, instead of copying the file.
To do that, in a in a delivery step I do
```
(push :myapp-delivery *features*)
(ql:quickload :myapp)

;; Special handling for osicat. We need to find libosicat.dylib cffi-wrapper library and embed it into the image
(defun find-osicat-dylib ()
;; "/Users/fourier/.cache/common-lisp/lw-8.0.1-macosx-x64/Users/fourier/.quicklisp/dists/quicklisp/software/osicat-20231021-git/posix/libosicat.dylib"))
(let ((osicat-dylib
(directory (merge-pathnames "**/libosicat.dylib" asdf:*user-cache*))))
(assert osicat-dylib)
(car osicat-dylib)))

(fli:setup-embedded-module :libosicat
#.(fli:get-embedded-module-data
(find-osicat-dylib)))

(fli:install-embedded-module :libosicat)

```
This allows the LW to embed the libosicat.dylib into the binary.

In main app function I would just need to load it explicitely from the embedded module:
```
#+:myapp-delivery (fli:install-embedded-module :libosicat)

```

Now delivered app works fine even without libosicat.dylib present on a target computer.

#lispworks