Clasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming

Google TechTalks · 51K views · 2015 · 57:38

Open on YouTube

Functional programmingCompilers, interpreters & program analysisChemistrytalk

Why Hacker News recommends it

HN repeatedly cites it as a striking example of Common Lisp used to push the frontier of science, and as one of the most inspiring tech talks.

What it is

Christian Schafmeister's Google Tech Talk on designing spiroligomer molecules and building Clasp, a Common Lisp on LLVM that interoperates with C++, to program molecular design. It covers the chemistry, automatic differentiation for force fields, and how the compiler is built.

Recommended by 8 HN commenters across 8 different months, 2015 to 2024.

What Hacker News said

Strong rec 616c · 2015-06 · on “Making sexy molecules in PowerPoint”

So no one will mention the Clasp (Lisp on LLVM developer)? He built a language to build better, albeit not visualize, better molecules. If you are on this article, you probably will love to watch this guy. I am computer nerd and this guy makes me want to go back and study chemistry. [this video]

Strong rec radicalcut · 2015-07 · on “John Carmack working on Scheme as a VR scripting language”

Unrelated to VR but still: if anyone here hasn't yet watched drmeister's talk about Clasp and his "molecular metaprogramming" project, please do. Absolutely fascinating stuff. [this video] Also recently discussed on HN: [LINK]

Strong rec nabla9 · 2016-02 · on “The Lisp Curse (2011)”

Lisp is programmable programming language, especially Common Lisp. It works as programmer amplifier. Better you are, more you benefit from it. I challenge anyone to watch this lecture from Christian Schafmeister and say they are not impressed: [this video] and [LINK]

Strong rec golergka · 2016-05 · on “European Lisp Symposium 2016”

[this video] This talk is even better. "C++ templates are to Commmon Lisp macros what IRS tax return forms are to poetry". I don't know both well enough to tell if it's true, but damn it's a good metaphor.

Strong rec pmarin · 2018-04 · on “Ask HN: What is your favourite tech talk?”

The most inspiring talk a I have ever seen: Clasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming. ABSTRACT This talk describes our unique approach to constructing large, atomically precise molecules (called "Molecular Lego" or "spiroligomers") that could act as new therapeutics, new catalysts (molecules that make new chemical reactions happen faster) and ultimately to construct atomically precise molecular devices. Then I describe Clasp and CANDO, a new implementation of the powerful language Common Lisp. Clasp is a Common Lisp compiler that uses LLVM to generate fast machine code and it interoperates with C++. CANDO is a molecular design tool that uses Clasp as its programmin

Recommends nnq · 2015-09 · on “Lisp is still a secret weapon”

If you're asking yourself what kinds of problems is a Lisp good for you should probably watch this: [this video] (A computational chemist built himself his own Common Lisp implementation because no other language available was powerful enough for his needs...) It basically boils to: if you're solving a truly new and interesting problems for which the current libraries and ecosystems don't matter that much to you anyhow (because what you do is too bleeding-edge / ahead of everyone else, so you'll write your own better stuff anyhow), than you might want to choose a Lisp. And if your problem is so bleeding-edge and exotic that you also need to build your own programming-language for it, than you mig

Recommends girishso · 2019-01 · on “Ask HN: Can we write a programming language for biology?”

That was my interest when I started my career, but didn’t do much on it. Bio-informatics deals with the stuff you mentioned in-silico. There’re a whole bunch of libraries for many different languages, but I’ve not come across any specific language for bio-informatics. You might find [this video] interesting, they developed a DSL in common lisp to generate C++ code using LLVM.

Recommends simiones · 2021-10 · on “Carp – A statically typed Lisp, without a GC, for real-time applications”

CLASP is a really interesting project. For one, it's created and written by a Chemistry PhD researcher (Christian Schafmeister), not someone with a traditional CS background. For another, it's one of the few languages that has ever attempted to interface with C++ at the template level - you can instantiate C++ template classes from CL, and catch C++ exceptions etc. For yet another, he does compacting garbage collection for the C++ objects used in the CL implementation, with pointer patching and everything else. There's a nice Google Tech Talk about it [0], that goes into both why he did this, and how he implemented this. [0] [this video]