Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
drmeister
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
91.
▲
by
drmeister
11y ago
I think for naming purposes we should go with "cclasp" as the name.
92.
▲
by
drmeister
11y ago
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 int
93.
▲
by
drmeister
11y ago
There are several. In Clasp there is https://github.com/drmeister/clasp/blob/master/src/asttoolin... - that exposes the entire Clang AST class hierarchy. Then there is https://github.co
94.
▲
by
drmeister
11y ago
Yes - I have a plan to clean it up. Clasp exposes the clang source to source translation library. Now that it's fast I'm going to automatically refactor the whole thing in one go.
95.
▲
by
drmeister
11y ago
Announcing Clasp 0.4 – a new release that incorporates a brand new compiler – capable of generating 200x faster code than previously, many bug fixes, a more complete Common Lisp implementation, and improved C++ interoperation.
96.
▲
Clasp 0.4 – Joining Common Lisp and C++
(github.com)
12 points
by
drmeister
11y ago
|
1 comments
97.
▲
by
drmeister
11y ago
Thank you, you summed it up better than I could.
98.
▲
by
drmeister
11y ago
In short Common Lisp has two namespaces, one for functions and macros and a second for variable names - Scheme has one namespace. So you have fewer conflicts in naming in Common Lisp. In Scheme there is a lot of concern about hygienic macro
99.
▲
by
drmeister
11y ago
I've implemented a Common Lisp that interoperates with C++ and uses LLVM as the backend because I was motivated by the same shortcomings in traditional software development languages and tools ( https://github.com/drmeis
100.
▲
by
drmeister
11y ago
Christian Schafmeister here with a shoutout to the Ravenbrook people who are awesome and very helpful. They have excellent documentation: https://www.ravenbrook.com/project/mps . I don't own stock or anything but
101.
▲
by
drmeister
11y ago
Christian Schafmeister here - thanks! You make some very good points that I can address: (1) Things made with "Molecular Lego" still move, but they keep their shape just enough to organize atoms/groups to do things like spe
102.
▲
by
drmeister
11y ago
Hi, I'm Christian Schafmeister. Thank you so much for the nice comments! I just want to point out that this work was all done with your tax dollars. This work was made possible by support from the National Institute of Health (NIGMS),
103.
▲
by
drmeister
12y ago
Because it's the only language worth talking about :-)
104.
▲
by
drmeister
12y ago
I developed it on OS X so that's a good choice. The README on github lists the linux distributions that it's been compiled on.
105.
▲
by
drmeister
12y ago
Yes, I'll post more on this and provide example code in the coming weeks on the blog. It's really exciting and it's something that Clasp can do right now even though the Clasp compiler isn't a highly optimizing one yet.
106.
▲
by
drmeister
12y ago
Thanks - yes the analyzer tracks roots through about 300 C++ classes. It also finds global variables and builds C++ code to interface with the MPS library. I exposed the Clang libraries to search the AST and describe the AST in Common Lisp
107.
▲
by
drmeister
12y ago
Yes, the Memory Pool System by Ravenbrook ( https://www.ravenbrook.com/project/mps/ ) is a proper, moving garbage collector. It uses precise GC on the heap and conservative GC on the stack, as does the garbage colle
108.
▲
by
drmeister
12y ago
Agreed, but it's more of a "tree-shaking problem" than anything else. Clasp is written in C++ and Common Lisp. Clasp compiles Common Lisp to LLVM-IR and Clang compiles C++ to LLVM-IR. So theoretically you could compile every
109.
▲
by
drmeister
12y ago
I disagree. Clasp could do this because it compiles Common Lisp to LLVM-IR bitcode files (using COMPILE-FILE) as well as directly to native code using LLVM's MCJIT engine (using COMPILE). emscripten ( https://github.com/
110.
▲
by
drmeister
12y ago
I don't see why we couldn't do this. emscripten ( https://github.com/kripken/emscripten ) says it takes LLVM-IR to JavaScript. The Clasp (Common Lisp) function COMPILE-FILE compiles to LLVM-IR bitcode files.
111.
▲
by
drmeister
12y ago
Yes, LLVM is awesome. Clasp uses the inlining LLVM provides to inline C++ code within Common Lisp code by generating LLVM-IR bitcode files from C++ source and linking them with Clasp generated bitcode files and then running them through LL
112.
▲
by
drmeister
12y ago
SBCL doesn't generate LLVM code. My primary goal was Common Lisp with C++ interoperation. It seemed easier at the time to start from the ECL Common Lisp code base and write a new C++ core and a Common Lisp interpreter that always inte
113.
▲
by
drmeister
12y ago
The reason is that Clasp doesn't do Lisp language level optimizations like escape analysis yet. All bindings are stored on the heap and the stack/registers are underutilized. LLVM is a great library for implementing C and C++ but
114.
▲
Clasp – A Common Lisp with LLVM back end and interoperation with C++
(drmeister.wordpress.com)
278 points
by
drmeister
12y ago
|
74 comments