Re:Creating a Non-Trivial Lisp Game in 2018
by mthom on Tuesday December 25, 2018 @12:01PM
(#18758053)
Wonderful and inspiring work! I wonder if it would be possible to create a similar interop story with the Rust programming language, which also targets LLVM -- ideally without having to redo all the hard work that went into Clasp. I have a Prolog interpreter/compiler I'm developing in Rust right now. One of my aims (eventually) is to compile Prolog to fast native code with it. It would be nice to have convenient access to it from a Common Lisp environment.
[ Parent
| on HN ]
Re:Creating a Non-Trivial Lisp Game in 2018
by gameswithgo on Tuesday December 25, 2018 @01:51PM
(#18758685)
Rust can already talk C ABI so I think the dream is already reality.
Re:Creating a Non-Trivial Lisp Game in 2018
by armitron on Tuesday December 25, 2018 @02:58PM
(#18758956)
Rust does not have native C++ interop.
C ABI is different to what clasp has done (native C++ interop). All widely used Common Lisp implementations have seamless C ABI interop through their FFIs / CFFI [1].
Clasp goes above and beyond that and natively interfaces with C++. LTO works with mixed Common Lisp and C++ code. Exception handling works as expected. You can mix Common Lisp and C++ stack frames. Correct me if I'm wrong but Rust does not have anything equivalent. The language that comes closest is D I think [2].