Re:Steel Bank Common Lisp
by JonChesterfield on Saturday July 01, 2023 @01:54PM
(#36552925)
That description sounds great but the docs are less compelling. The integration is you can write a C++ file that exposes individual functions to lisp, https://clasp-developers.github.io/clbind-doc.html.
There doesn't seem to be any way to feed C++ headers into clasp and get out template instantiations accessible to lisp. It looks like SWIG or pybind but you write the shims yourself, and it's function pointer based so templates are wrapped one instantiation at a time.
Garbage collection in the docs is a one paragraph stub which suggests you're on your own for lifetime management across the languages.
Cool thing to exist. Seamless interoperation is either overselling it or the docs are out of date.
There is a bit more to it. It allows one to create mixed C++ / Lisp projects with memory management, CLOS methods for C++ classes, CLOS subclass of C++ classes, Lisp and C++ gets compiled to LLVM-IR, debug source output mixing compiled C++ and Lisp frames, ...
https://clasp-developers.github.io
"Clasp is a new Common Lisp implementation that seamlessly interoperates with C++ libraries and programs using LLVM for compilation to native code. This allows Clasp to take advantage of a vast array of preexisting libraries and programs, such as out of the scientific computing ecosystem. Embedding them in a Common Lisp environment allows you to make use of rapid prototyping, incremental development, and other capabilities that make it a powerful language."