1. 10
  1.  

  2. 3

    Wow I love this! Just watched it, here is a little summary:

    • Application: designing / synthesizing molecules from “molecular legos”.
    • It sounds like mostly do brute force search in the style of “superoptimization”. That is, generate a bunch of candidates in a combinatorial fashion, and score them. So they need both interactive computing like Python, but also raw speed.
    • Common Lisp fits the application domain of molecules because it’s all trees and graphs
    • They want to use GPUs to do this search, hence LLVM.

    Back story:

    • Crazy computational chemistry professor has been programming for 20 years. Claims he programs for 6-8 hours a day!
    • Has problems with interfacing Python and C++ (I can relate), and stumbles into Common Lisp 5 years ago.
    • Combines an existing Common Lisp implementation with LLVM. There is a complex bootstrapping process.
    • Wraps the unstable LLVM C++ interface in Common Lisp, so you can do metaprogramming on C++ with Common Lisp!
      • Generates his garbage collector! The garbage collector has to know about C++ types that are pointers.
      • Wraps the ASTMatcher API to do source-level refactoring of C++ ?
    1. 1

      This is https://github.com/clasp-developers/clasp

      From the readme

      Building on most systems will take around 8-12GB of memory and ~1-2 hours with a relatively modern processor

      I’m not sure why they need llvm. I wonder how its execution speed is compared with sbcl, and if the science they do can be easily achieved with sbcl as well.

      1. 3

        I wonder how its execution speed is compared with sbcl

        He mentions relation to SBCL performance once in the talk - in that benchmark clasp is 4 times slower.

        if the science they do can be easily achieved with sbcl as well.

        SBCL can’t target GPUs.

        1. 1

          So how does clasp handle GPUs?

          1. 1

            With LLVM. I imagine the support must be pretty good because Google uses it for the open source gpucc compiler:

            https://ai.google/research/pubs/pub45226

            Hm actually I was searching on Github for this, and I remembered that its part of LLVM proper now! It’s not even a separate project.

        2. 1

          LLVM buys you more than speed. Check this video for an example of the cool things one can use with Clasp. https://www.youtube.com/watch?v=h31pURzgYX8