News for hackers. Stuff that matters.
Re:Clasp 0.4 – Joining Common Lisp and C++ by elcritch on Saturday November 21, 2015 @03:45PM (#10607962)
Fascinating project! I kind of hope to need to work on C++ sometime so I can try it out. Particularly the Clang AST library would be a enormous boon for any LLVM / C++ / C work. IMHO, 9/10's of any compiler work is just figuring out how to write recursive functions to modify the AST which is a pain using C++ and visitor patterns. Working in LISP for these parts while being integrated with C++ for other parts sounds like it would be awesome if not outright fun.
Re:Clasp 0.4 – Joining Common Lisp and C++ by drmeister on Saturday November 21, 2015 @04:36PM (#10608118)
Thanks - yes it's fun and very powerful. An integral part of Clasp is "clasp-analyzer" - a static analyzer that uses the ASTMatcher library to analyze all of the Clasp C++ source code (>170 source files). It builds an interface to the Memory Pool System garbage collector (coming soon) and builds a fast replacement for dynamic_cast. We are planning to use it to write a "super-swig" that could automatically build foreign function interfaces for C++ code.