3 ms·
There are also innovations in implementations. A recent one was the development of CLASP, a Common Lisp implementation with deep C++ / LLVM integration. https:
by _19qg 3y ago
There are also innovations in implementations. A recent one was the development of CLASP, a Common Lisp implementation with deep C++ / LLVM integration.
https://clasp-developers.github.io 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."
- JonChesterfield 3y agoThat 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 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.
- _19qg 3y agoThere 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, ...