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

Sdílet
Vložit
  • čas přidán 22. 06. 2024
  • llvm.org/devmtg/2018-10/
    -
    Lessons Learned Implementing Common Lisp with LLVM over Six Years - Christian Schafmeister
    Slides: Coming Soon
    -
    I will present the lessons learned while using LLVM to efficiently implement a complex memory managed, dynamic programming language within which everything can be redefined on the fly. I will present Clasp, a new Common Lisp compiler and programming environment that uses LLVM as its back-end and that interoperates smoothly with C++/C. Clasp is written in both C++ and Common Lisp. The Clasp compiler is written in Common Lisp and makes extensive use of the LLVM C++ API and the ORC JIT to generate native code both ahead of time and just in time. Among its unique features, Clasp uses a compacting garbage collector to manage memory, incorporates multithreading, uses C++ compatible exception handling to achieve stack unwinding and an incorporates an advanced compiler written in Common Lisp to achieve performance that approaches that of C++. Clasp is being developed as a high-performance scientific and general purpose programming language that makes use of available C++ libraries.
    -
    Videos Filmed & Edited by Bash Films: www.BashFilms.com
  • Věda a technologie

Komentáře • 47

  • @raulalvareztorrico1153
    @raulalvareztorrico1153 Před 5 lety +266

    "Common Lisp macros are to C++ templates what poetry is to IRS tax forms"

  • @christianschafmeister2359
    @christianschafmeister2359 Před 5 lety +177

    Author here: I'd like to thank Karsten Poeck for all of his work getting the ansi tests running and fixing bugs.

    • @orrbifold
      @orrbifold Před 5 lety +3

      You're the man! I remember seeing your Google Talk a few years ago, it's awesome to see how the project has progressed.

    • @palimondo
      @palimondo Před 5 lety +2

      Thank you for your awesomeness, sir!

    • @diegonayalazo
      @diegonayalazo Před 4 lety +3

      You are very passionate. Thanks for the inspiration!

    • @empresagabriel
      @empresagabriel Před 3 lety

      Thank you for your lectures, sir! Your work have inspired me to change my career path

    • @emanuellandeholm5657
      @emanuellandeholm5657 Před rokem

      This is so cool! I just had a daydream of combining Lisp with llvm, googled it and then ended up here. :) And I absolutely agree with you on Lisp macros. The macros are a killing feature of Lisp IMHO.

  • @Skullamortis
    @Skullamortis Před 4 měsíci +3

    Captain Jean Luc Picard, from USS Enterprise.
    Awesome work!

  • @Collaborologist
    @Collaborologist Před 3 lety +11

    11:22 It's a standard language and It's timeless; it's not being updated all the time. It's not changing It doesn't need to because it has macros

  • @cat-.-
    @cat-.- Před 2 lety +13

    llvm is such a wonderful tool for people writing compilers!!
    And it’s developed by someone at UIUC and I’m so excited when I learned it because I’m going to attend uiuc this fall!!

  • @c0okiemon5ter
    @c0okiemon5ter Před 5 lety +27

    Great work; for a cause that's more useful that what the IT domains gets busy with in most cases .. And such a humble presentation :) Thank you

  • @TheOneTrueMaNicXs
    @TheOneTrueMaNicXs Před 4 lety +23

    Wow he's programming chemistry.

  • @marijnstollenga1601
    @marijnstollenga1601 Před 5 lety +10

    I remember watching his talk many years ago, great to see an update and the progress that is made!

  • @ColinLandrum
    @ColinLandrum Před 5 lety +10

    woah! I am blown away. Amazing

  •  Před 3 lety +4

    Great approach. I love that he could craft CUDA kernels with an LLVM compiler. I'll need to take a closer look at this!

  • @BlindingStupidity
    @BlindingStupidity Před 3 lety +5

    I loved this talk, your enthusiasm, and confidence to just go for it, is amazing, thank you. Inspiring indeed

  • @ruffianeo3418
    @ruffianeo3418 Před rokem +5

    Common Lisp is indeed a long lasting "local optimum" for programming. It is fast, has enough core functionality to get you started with a project without having to hunt for libraries (you can, but you are not forced to like you are in other languages, which are "minimalist").
    The only drawback which annoys me is that all implementations use pointer tagging, so, if you REALLY need a 64 bit fixnum, not boxed, you are out of luck.
    sbcl: (log most-positive-fixnum 2) >> 62.0
    clasp: (log most-positive-fixnum 2) >> 61.0
    Common Lisp would be perfect, if there was an implementation which has 64 bit fixnums.

    • @IExSet
      @IExSet Před 2 měsíci

      Is it really a case, what about declare optimize speed 3 fixnum x ?

  • @TheRealisticNihilist
    @TheRealisticNihilist Před rokem

    I'm just blown away by what this guy says about aging. I need to follow this development. I want to know if he's right. If he is this is miraculous.

  • @userador
    @userador Před 5 lety

    Amazing work!

  • @miljanc
    @miljanc Před 4 lety +3

    Wow, this is mega cool. Would love to have this debug for elisp.
    Brilliant mind

  • @sempiedram
    @sempiedram Před 5 lety +1

    That was really great!

  • @chinmay8954
    @chinmay8954 Před 5 měsíci

    This was an awesome talk. Thanks !

  • @hankigoe829
    @hankigoe829 Před 3 lety +8

    Lisp is God's favorite language

  • @prism223
    @prism223 Před 2 lety

    10:32 Oh I'm stealing this line, genius!

  • @beziko
    @beziko Před 4 lety

    Fascinating

  • @randaldavis8976
    @randaldavis8976 Před 5 lety +2

    CanDo was hypercard like programming application on the Amiga

  • @manoelnt0
    @manoelnt0 Před 5 lety +3

    FANCY! SUPER NIFTY

  • @bpa5721
    @bpa5721 Před 3 lety

    lovely. Esp. the GPU part is interesting.

  • @billfrug
    @billfrug Před 3 měsíci +1

    if sbcl faster why not just use that?

  • @danielya8634
    @danielya8634 Před 2 lety +1

    Always liked c style languages but learned clojure recently and liked it too. Not sure how it compares to clisp in terms of speed and macro capabilities.

    • @PixelOutlaw
      @PixelOutlaw Před rokem +1

      Clojure is generally slower than SBCL, there is a heavy price to being hosted on the JVM. The macro capabilities are similar however. Be careful with the word "clisp" there is a dormant Common Lisp implementation called "clisp" so it should not be used to mean "Common Lisp" itself. I would say Common Lisp is the more "lispy" of the two as most people using Clojure don't have a Lisp background in general so they drag in habits from non-Lisp languages this spills over into the libraries favoring things like hashmap dispatch over combinators and also hashmaps over functions with heavy destructuring rather than abstracting and reusing.

  • @sargijapunk
    @sargijapunk Před 4 lety +2

    Why need to implement CL on LLVM, why not just exposing C++ to SBCL? Why new compiler?

    • @captainobvious9188
      @captainobvious9188 Před 3 lety +9

      He uses a lot of existing code to implement CL (Like SICL), and because it has LLVM internals exposed in CL and presumably uses C++ style object style storage internally it will be much easier to co-mingle with C++ going into the future. Also, he can target any LLVM backend architecture with his CL code so it can be relatively easily adapted to modern compute architectures (Supercomputer, GPU, etc.).

  • @-leovinci
    @-leovinci Před 3 lety +5

    Common Lisp is hackers’ favorite language

    • @JstJaybeingJay
      @JstJaybeingJay Před 3 lety

      Why so?

    • @-leovinci
      @-leovinci Před 3 lety +2

      @@JstJaybeingJay Because it's too flexible, you can optimize the language as you want, like human languate

  • @ThrashAbaddon
    @ThrashAbaddon Před 3 lety

    wow

  • @proweiqi
    @proweiqi Před 5 lety +2

    I wonder if Julia would work here as well

    • @andreianton1602
      @andreianton1602 Před 5 lety +1

      @spaceLem what are limitations of Julia's macro system? Just that it's practically harder to use because the language has rich syntax and you need to keep that in mind?

  • @user-cq7db9ij1o
    @user-cq7db9ij1o Před 4 lety

    People talk a lot about Common Lisp but its implemented in C/C++, right?

    • @PixelOutlaw
      @PixelOutlaw Před 4 lety +5

      It can be or it can be in a different language. In the past, they've implemented C using Lisp. More about that here: en.wikipedia.org/wiki/Genera_(operating_system)

    • @PixelOutlaw
      @PixelOutlaw Před 3 lety

      ​@FichDich InDemArsch My example was just concrete evidence that C or C++ is not strictly necessary to implement Common Lisp. There are even systems where C and C++ are not available out of the box instead you might have a horrid language like IBM RPG. For most common computers, C and C++ are probably the way to go. You can't necessarily implement any language in any language. If you've got a high level language which can't access hardware but the language you're implementing, language B needs to access hardware, say display to screen as part of the language spec you can't get there. Some languages especially dialects of BASIC can render shapes and such as part of the spec, if you've got a language which can't get at the display driver say Scheme (R5RS only), you're not getting there.

  • @L4rsTrysToMakeTut
    @L4rsTrysToMakeTut Před 3 lety +1

    Try Julia Lang