4 ms·
Since you're already using LLVM, I'm wondering if you've thought about adding something similar to the includec function in Terra [1] which uses Clang to parse
by eslaught 8y ago
Since you're already using LLVM, I'm wondering if you've thought about adding something similar to the includec function in Terra [1] which uses Clang to parse C headers. I used to think that Lisp's CFFI was the best FFI out there until I saw that it was possible to literally parse a C header file and have it "just work". It seems like if you're already building against LLVM, so bundling Clang with your project too might not be that big of a jump for you.
[1]: http://terralang.org/api.html#using-c-inside-terra http://terralang.org/api.html#using-c-inside-terra . The same idea also occurs in e.g. Python DragonFFI.
- drmeister 8y agoThank you - I'll check it out. We exposed the AST and ASTMatcher libraries of Clang inside of Clasp and we use it to analyze all of the Clasp C++ code to build an interface to the Memory Pool System memory manager. I want to have something that can include C and C++ header files and automatically expose them to the Common Lisp - that would be neat! Maybe we can steal some ideas like the includec function of Terra.
- nextos 8y agoCando and Clasp are really inspiring. Is it easy to get academic funding for such a non-incremental idea?
- drmeister 8y agoNo, none, zero, zip, nadda. What you do is you hook it to another really important idea and then you work until 3:00am every night for months and then years writing code. You take all those voices in your head that say you should not be doing this and squeeze them hard until they... go to sleep and stop bothering you. For me it started paying off in the last year and it is starting to look like it was a really good idea.
- nextos 8y agoIt's sad agencies are not funding this kind of stuff, although I think they are getting slightly less conservative. In any case, congratulations. It's an amazing piece of work.