5:13:16nij-I've just watched this nice talk again https://www.youtube.com/watch?v=8X69_42Mj-g Got a bit confused.. seems that the goal is to use C++ libs easily in CL. But why go all over the ways? Can't we just use CFFI to glue CL and C++ with C?
5:30:33drmeisterwhereiseveryone: yes - we just added the feature to start/run/shutdown clasp as a library
5:35:48drmeisterWe haven’t set up clasp to build as a library yet. That would require a bit of work with the build system.
14:51:31nij-I mean, in theory, CFFI is "enough", right? There maybe a whole lot of extra work to do to connect CL and C++ via CFFI, but I guess the amount is still uch less than implementing CLASP. In this sense, CLASP must have achieved other things that my naive approach would not. What are those things?
15:32:31jackdanielnij-: defining common lisp class as c++ class and using c++ class as lisp class, as pointed out above
15:32:57jackdanielinvoking c++ functions that are overloaded is another I guess
15:41:11nij-> class -- I see. Is it because both CL and C++ are compiled into LLVM, the classes can be made essentially the same? In my naive "approach", we would have to transform CL class to C data and then to C++ class, which makes it slower and seamful?
15:43:02jackdanielI don't know what does it mean to transform cl class to c data
15:43:26jackdanielto be blunt, I think that you are out of your depth with this proposal
15:58:21drmeisterI'm going to start adding support for llvm15 while continuing to support llvm14 and older versions going forward. llvm14 has the minimum of what we needed to support fast startup.
15:59:44drmeisternij: C and C++ are not safe languages, they use plain old data. You can't have that in CL without a lot of work to guarantee safety.
16:00:49yitzithey've got a dash at the end of their handle.
16:01:00drmeisternij-: Common Lisp makes guarantees about safety - it is never supposed to segfault.
16:05:51drmeisterProbably not - there's no llvm15 when I use `apt-cache search llvm | grep 15`
16:07:48nij-jackdaniel That's alright. I'm not proposing to replace clasp. I just want to understand the advantage of clasp approach, by proposing a naive approach and ask for why it's worse.
16:10:08drmeisternij-: With Clasp we have the ability to write code that combines C++ for fast numerical calculations and Common Lisp for fast complex logic.
16:10:43drmeisterYou can do that with CFFI but you are going to spend a lot of time writing C wrappers.
16:11:22drmeisterC++ template programming provides the basic tools you need to automate generation of wrappers.
16:11:49drmeisterClasp incorporates a C++ template library like pybind11.