HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

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

Google TechTalks8 HN recommenders · recommended in 8 months, 2015-2024
YouTube
52K views · 11 years ago · talk · evergreen

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.

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.

Functional programmingCompilers, interpreters & program analysisChemistry#clasp#llvm#commonlisp#nanotechnology#metaprogramming#chemistry

20 comments from Hacker News

@flobosg2024 · in “Leap – Chemistry Through a Computational Lens”

Fun fact: LEaP’s original author, Christian Schafmeister, went on to create a Common Lisp implementation that uses C++ and LLVM for applications in molecular nanotechnology: ▶ this video

CitesView on HN
@simiones2021 · in “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

RecommendsView on HN
@jakeogh2021 · in “SICL: A New Common Lisp Implementation”

Ah, related to #clasp: ▶ this video Clasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming link 2018 LLVM Developers Meeting: C. Schafmeister lessons Learned Implementing Common Lisp with LLVM link Clasp: Common Lisp using LLVM and C++ for Designing Molecules link Modular Polymer Catalysts - Chris Schafmeister link 10S6P4 Christian Schafmeister 2010 UNTT 3rd Annual Conference Session 6 Presentation 4

CitesView on HN
@lispm2019 · in “PAIP: Run Common Lisp in Browser?”

Common Lisp traditionally favors other forms of interoperability: with Assembler, C, C++, Objective-C, UNIX/POSIX, etc... For example one prefers to directly call old-fashioned GTK+, Cocoa or Windows - instead of calling via a Java UI layer or a Javascript library. Common Lisp has interoperability with the JVM in various forms (from FFIs to ABCL, a Common Lisp on JVM implementation), but it's not a popular choice. There are several CL implementations with deep C integration, for example by compilation to C. CLASP has deep C++ and LLVM integration. Some implementation can create shared libraries which are being loaded from other programs. CLASP: ▶ this video It's possible to bring Common Lisp on top of runtimes like the JVM or Javascript - but there is some larger mismatch, because Common Lisp (different from Clojure) a platform independent full programming language. For example Common Lisp specifies a numeric tower with bignums, some float types, complex numbers and rational numbers. JavaScript internally does only offer floats. Common Lisp also specifies its own object system, which does not map well on top of the JVM (single inheritance, non-dynamic) or JavaScript.

CitesView on HN
@leanthonyrn2019 · in “Switching from Common Lisp to Julia (2017)”

I was thinking about this the other day. How can I expose my Common Lisp code to Julia. 1. You could take the Clasp path by exposing CL to C++. ▶ this video This means taking / writing a CL in Julia. 2. Julia has an AST representation written in femtolisp. So it would be in interesting target for CL or some glue middle language like Shen. link link

CitesView on HN
@e12e2019 · in “I Built a Lisp Compiler”

> whose C++ implementation from scratch... You're aware of clasp? link Which builds (in part) on embeddable common lisp: link See around 20-30 minutes: ▶ this video

CitesView on HN
@cracauer2019 · in “Let over Lambda – Common Lisp Book (2008)”

That is me, I'm half of that team (Martin Cracauer). If you have any questions I'd be happy to answer. If you want to learn more about the programming side of our work (not so chemical), check out our other videos. They are from programming conferences: Longer talk: ▶ this video Shorter one from the LLVM meeting: link (yes, the whole system is a compiler using LLVM as the last stage to make machine code from abstract assembly. The thing I always missed in SBCL)

CitesView on HN
@girishso2019 · in “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.

RecommendsView on HN
@drmeister2018 · in “Ask HN: Are you working on interesting technical problems?”

We are developing a matter compiler. We are working on designing molecular Lego to assemble them into new catalysts, therapeutic compounds, atomically precise membranes and sensors for proteins and small molecules. The goal is to make molecules that can do everything that proteins can do and that can be designed by human beings with computer assistance. We've developed a programming environment with a custom compiler and Common Lisp implementation for designing these molecules. We are looking for programmers with chemistry experience. ▶ this video

CitesView on HN
@pmarin2018 · in “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 programming language. Together I believe that these are the hardware (molecules) and the software (the CANDO/Clasp compiler) that will enable the development of sophisticated molecular nanotechnology. ▶ this video

Strongly recommendsView on HN
@sedachv2017 · in “AI and Robotics in Agriculture in Japan [video]”

Check out Christian Schafmeister's research if you are interested in this: link There is a brief summary of the history of Schafmeister's approaches (and why he thinks direct copying of protein-based mechanisms from nature will not work) in this talk: ▶ this video

CitesView on HN
@bloaf2017 · in “Why programmers will never be the brightest and the best”

I'd argue that there are essentially two problems in computer science: 1. Math. 2. Dealing with the hardware. Virtually all the ugliness is a product of the interface between these two areas. Dealing with the hardware requires a fascination with minutiae and imperfection, while working in Math requires a fascination with generalities and perfection. The people on the math side create systems like Haskell, which let you express very abstract concepts, and reason very generally about your code, but make dealing with hardware issues difficult. The people on the hardware side use things like Forth, which is very powerful for building code that works closely with the hardware, but whose paradigms actively discourage the generality present in many other languages. And so, what's needed is someone who can develop a system that can fully express high level math concepts in such a way that there is a straightforward mapping to the messy world of hardware capabilities. However, I think the "killing blow" for pure programmers' motivations comes when they realize that mapping between the pure world of math and the messy world of hardware isn't enough. The focus on "end users" is the tacit admission that even if you do successfully build a beautiful system, most people don't want to work at a high level of mathematical abstraction. If you really want to revolutionize computer science, in order to accomplish the actual revolution, your system needs to be able to let people work in the term

CitesView on HN
@golergka2016 · in “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.

Strongly recommendsView on HN
@TeMPOraL2016 · in “Whoever does not understand Lisp is doomed to reinvent it (2007)”

A small few: link . EDIT: Also, ▶ this video for a recent example of Common Lisp pushing the limits of science and computing in chemistry.

CitesView on HN
@nabla92016 · in “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

Strongly recommendsView on HN
@nnq2015 · in “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 might just as well build yourself a Lisp (like the guy in the video did) and add your needed features to it, because this would be easier than any other approaches and allow you to spend more time on your problem and not on the language... EDIT+: another example is DWave using SBCL: link - if quantum (or analog... anyway...) computing is not "truly new and cutting edge", than I don't know what is

RecommendsView on HN
@radicalcut2015 · in “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

Strongly recommendsView on HN
@istvan__2015 · in “John Carmack working on Scheme as a VR scripting language”

Same here, I never understood Java interfaces, abstract classes, and a ton of other "features" but picking up Clojure was a breeze. I don't understand why complicating thing that supposed to be simple helps you by any mean. On the top of that, I have seen several cases when Java programmers tipped over in their own code because of the complexity that they thought they understand, except there was a particular case when it was doing something else then expected. Reasoning about Clojure (LISP) code is always easy because if you follow best practices you have small functions with very little context to understand. On the top of these, I see the ratio of LOC 50:1 (worst case even higher) for Java : Clojure code that does the same thing. Usually people get triggered and say why does it matter, but in reality less code is better for everybody. Easier to understand, less chance of errors, etc. Correctness was long time lost for majority of Java developers, just put out a survey and you can see it for yourself. It is also pretty common practice not to handle exceptions well and just let a DNS not found error explode as an IOexception and good luck tracking down what caused it (literary happened to me). I understand that the average Java dev does not see any value in LISP (Clojure) but it silly to expect that the average of any group is going to lead the scientific advancement of any field including computer science. One tendency that you can see if you are walking around with open ey

CitesView on HN
@616c2015 · in “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

Strongly recommendsView on HN
@justifier2015 · in “Aneurysm”

" I rarely clip aneurysms now. All the skills that I slowly and painfully acquired to become an aneurysm surgeon have been rendered obsolete by technological change. Although neurosurgery is no longer what it once was, the neurosurgeon’s loss has been the patient’s gain. " so nice to read this many of the entrenched remain so through superstition at the loss of progress, but to read someone speak highly of a practice that rendered a section of their skill set obsolete is heartening i have family who work in trauma and they condescendingly balk at my excitement over new medical technology: link ▶ this video personally, i look forward to bones: link

CitesView on HN
Clasp: Common Lisp using LLVM and C++ for Designing Molecules1:00:16

Clasp: Common Lisp using LLVM and C++ for Designing Molecules

Google TechTalks
9K views • 11 years ago
2018 LLVM Developers’ Meeting:  C. Schafmeister “Lessons Learned Implementing Common Lisp with LLVM”26:01

2018 LLVM Developers’ Meeting: C. Schafmeister “Lessons Learned Implementing Common Lisp with LLVM”

LLVM
61K views • 7 years ago
CANDO: A Compiled Programming Language for Computer-Aided Nanomaterial Design and Optimization28:10

CANDO: A Compiled Programming Language for Computer-Aided Nanomaterial Design and Optimization

European Lisp Symposium
3K views • 10 years ago
Escape from the Heap: Low-Level Programming in Common Lisp56:49

Escape from the Heap: Low-Level Programming in Common Lisp

Arthur Gleckler
17K views • 10 years ago
William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]1:31:06

William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC]

PapersWeLove
367K views • 9 years ago
Invited Talk - Guy Steele1:07:22

Invited Talk - Guy Steele

ClojureTV
39K views • 9 years ago
Lecture 7A | MIT 6.001 Structure and Interpretation, 19861:24:38

Lecture 7A | MIT 6.001 Structure and Interpretation, 1986

MIT OpenCourseWare
35K views • 17 years ago
Web Development in Emacs, Common Lisp and Clojurescript - Emacs SG1:18:42

Web Development in Emacs, Common Lisp and Clojurescript - Emacs SG

Engineers.SG
14K views • 10 years ago
Clojure for Lisp Programmers Part 1 - Rich Hickey1:28:59

Clojure for Lisp Programmers Part 1 - Rich Hickey

ClojureTV
25K views • 13 years ago
Saša Jurić - Parsing from first principles - WebCamp Zagreb 20191:10:16

Saša Jurić - Parsing from first principles - WebCamp Zagreb 2019

WebCamp Zagreb
6K views • 7 years ago
Practical Common Lisp1:12:10

Practical Common Lisp

Google TechTalks
98K views • 19 years ago
Lisp at the Frontier of Computation, by Robert Smith at Rigetti Computing1:14:51

Lisp at the Frontier of Computation, by Robert Smith at Rigetti Computing

Arthur Gleckler
16K views • 8 years ago
Expert to Expert: Rich Hickey and Brian Beckman - Inside Clojure53:56

Expert to Expert: Rich Hickey and Brian Beckman - Inside Clojure

jasonofthel33t
119K views • 13 years ago
Lecture 1A: Overview and Introduction to Lisp1:12:56

Lecture 1A: Overview and Introduction to Lisp

MIT OpenCourseWare
420K views • 7 years ago
Andy Keep - Writing a Nanopass Compiler40:48

Andy Keep - Writing a Nanopass Compiler

ClojureTV
29K views • 12 years ago
"Pixie - A Lightweight Lisp with 'Magical' Powers" by Timothy Baldridge33:13

"Pixie - A Lightweight Lisp with 'Magical' Powers" by Timothy Baldridge

Strange Loop Conference
30K views • 11 years ago
Parsing with Derivatives1:13:10

Parsing with Derivatives

Stanford
13K views • 15 years ago
Lecture 7A: Metacircular Evaluator, Part 11:24:38

Lecture 7A: Metacircular Evaluator, Part 1

MIT OpenCourseWare
32K views • 7 years ago
"Shen: A Sufficiently Advanced Lisp" by Aditya Siram40:20

"Shen: A Sufficiently Advanced Lisp" by Aditya Siram

Strange Loop Conference
26K views • 12 years ago
Lecture 1B | MIT 6.001 Structure and Interpretation, 198658:22

Lecture 1B | MIT 6.001 Structure and Interpretation, 1986

MIT OpenCourseWare
116K views • 17 years ago