Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • Great semver number
  • checkout lumbda dot com if you are into lisp / scheme
  • I'm going pretty deep on Lisp on accident - can anybody give me more context on this?
  • (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  • more context beyond the changelog? what would you like to know?
  • You might find this interesting: https://news.ycombinator.com/item?id=43636230
  • If memory serves, traditionally, CCL (Clozure Common Lisp [0]) had better support for Windows but SBCL was unbeatable for speed. Is that still the case?

    [0] https://ccl.clozure.com/

  • Part of why SBCL took longer is, IIRC, that SBCL went with embedding proper SEH support into generated code (important among other things to get page fault information), whereas CCL used VEH (which is simpler to use but only available from XP onwards)
    by p_l
  • SBCL works fine on Windows. It used to display a warning about fragility at startup, but that was removed in version 2.0.3, 6 years ago, after already being obsolete for quite a while.

    CCL isn't very actively maintained and currently doesn't have an ARM64 port, but otherwise continues to work fine. I believe one reason people use it is that it compiles a bit faster than SBCL, at least in part by doing less optimization.

  • Great to see the project is still going strong, I kinda want to try CL but I always feel like I don't have a great use-case.
  • I bet you do, or you will. In my case, I had been getting movie recommendations from friends and also randomly. I'd look up the flick on IMDB, metacritic, and rotten tomatoes and I'd guess whether I would like it.

    I wanted something more 'algorithmic' - and more accurate.

    So me and Claude build an sbcl-based Film Recommendation system. Type in a new film name, it goes to open film database OMDB, grabs the scores, and then, using films I have already rated and with a built-in tiny Neural Net, gives me a personal recommendation. It uses the OMDB data and an algo that weights those with my personal values (in half a dozen areas: overall, acting, cinematography, etc), along with a 'comments' box to note for friends / others.

    The code is very well-done CL, heavily commented. The film & ratings database is stored as S-exprs, naturally, all in one file. I don't use a database as I only have a few hundred films, but maybe later I will. And that's the point -- this is a living chunk of code that I from time to time bolt in new features, or try new things (e.g. the UI is localhost:8080)

    I fretted about having a 'real' project to really dig into CL for a long time, and finally, found a meaty-enough project that ends up being really useful & quite a learning (continuing learning) experience. I start it up inside emacs/sly like this:

      (ql:quickload '(:hunchentoot :dexador :yason))
      (load "s:/filmrec.lisp")
      (filmrec:start)
    
    I have to set the omdb key:

      (setf filmrec:*omdb-api-key* "fxxxx70")
    
    Then, every so often, I retrain the NN:

      (filmrec:retrain)
    
    Good Luck, you'll find a project. And with an LLM buddy, you'll succeed.
  • An extensible LLM agent (such as https://pi.dev/ or maybe hermes) written in common lisp could be interesting. Conditions and restarts and general debugging and repair of the live system, fast startup, native execution speeds, ability to add or replace or modify core functionality on the fly, solid multi-threading support, dynamic introspection including documentation, CLOS and multiple dispatch, saved images.
  • CL can be used pretty much anywhere nowadays, even on the web with ECL wasm compilation.
  • SB-MANUAL looks great—having the manual available through docstrings and SLIME should make SBCL development much more pleasant.
  • I wonder sometimes how the world would look like if lisp won and the unit of deployment was a lisp machine image, if that makes sense. How would a kubernetes optimized for lisp look like? How would AWS EC2 look like? etc.
    by baq
  • if you are pondering about that, then i think you'll like this:

    https://ngnghm.github.io/

  • > How would a kubernetes optimized for lisp look like

    I imagine it would look a bit like Erlang's BEAM. No need to stop and start the application, but write a script to do hot updates of a live image.

    by sph
  • > How would a kubernetes

    We have a few services built in Clojure and we expose nrepl port on our pods in our SDEs, it's enormously helpful to test and debug things on the fly, without having to redeploy or restart anything. Without having to deal with state, caching, etc.

  • The worst thing that ever happened to Common Lisp was its ANSI standardization, which for many years killed almost all language innovation and improvement.
  • I've often thought that s-expression diff-viewers would be very nice tooling. I've also often wondered how easy it would be to just sling s-expressions across the wire to execute in another environment. What would modern infrastructure look like if you could just have lambdas running lambdas?
  • That would be a bad idea. In Smalltalk the "image" was the main thing and I think that was one thing that led to the commercail demise of Smalltalk. You can not combine two (or more) images. You can not build new things by using "images" as components. Instead as we know source-code modules with well-defined interfaces between them is what keeps productivity hhigh. At least before AI.
  • That (deployment is via a customized image) is the thing I find most awkward.

    Somewhere, I have a copy of a commercial LISP for Windows which would compile to an executable --- apparently this sort of thing is still possible, but it's not widely known/used, and sadly Jean-Marie Hullot's "SOS Interface" for the Mac was co-opted to NeXTstep:

    https://denninginstitute.com/itcore/userinterface/GUIHistory...

    I'd dearly love to see a RAD (Rapid Application Development) tool using LISP w/ a nifty UI for working up a GUI which would compile to something easily deployed (maybe HTML5 Canvas and JavaScript) as a stand-alone/single-file web application?

  • We wouldn't have need such barbaric things in a lisp world. :p

    Personally I think/hope they would have earlier discoveries / more broad usage of the deterministic systems like nix etc, which are built upon functional principles of immutability etc.

    Maybe the world would be guix/Hurd!

  • If any SBCL dev is here, please add documentation for how to use the memory arena feature. The only doc is an very old proposal document.
  • Yeah I'm not sure why it's not in the manual, as it's had arena allocation support since at least 2.4.x, but basically:

    - use SB-VM:NEW-ARENA to make a new arena

    - use SB-VM:WITH-ARENA to redirect ordinary allocation into an existing arena like you would use WITH-OPEN-FILE or similar macros

    The only real doc is this internals note, and it doesn't even cover NEW-ARENA which I guess is left as an exercise to the reader: https://github.com/sbcl/sbcl/blob/master/doc/internals-notes...

  • Steel Bank Common Lisp is what Hacker News uses.

    https://news.ycombinator.com/item?id=44099006

    I discovered this while doing some research for a post the other day: https://vale.rocks/posts/hacker-news

  • I recall HN originally using Arc. Is there a history available regarding its development and redevelopment?
  •     * the SB-SIMD contrib now supports ARM64. (Thanks to Sylvia Harrington)
        * AVX512 instructions are now supported on X86-64. (Thanks to Robert Smith and Arthur Miller)
        * additional support for SIMD instructions on ARM64 and X86-64. (Thanks to Arthur Miller)
    
    These seem like pretty awesome additions. Does anyone know how SIMD works in SBCL? Is this at the codegen layer? i.e. can it auto-vectorize or anything like that? Or are these intrinsics you have to explicitly ask for?
  • > Is this at the codegen layer?

    On implementation level, it is a codegen layer. It uses a system of macros to generate instructions from a database of instructions. The database is specified manually:

    https://github.com/sbcl/sbcl/tree/master/contrib/sb-simd/cod...

    At compile-time, they are converted into "VOPs", i.e. intrinsic functions, which are used by the compiler to emit the actual machine instructions.

    > can it auto-vectorize or anything like that?

    Unfortunately, it can't.

    > are these intrinsics you have to explicitly ask for?

    Yes, more like higher-level intrinsics. You get quite some automation, but you are requesting manually what you need. More like a DSL, than pure intrinsics. This is how you can use it (as an example):

    (defun count-lines-and-words-ascii (sap size ws-init-state) (declare (type fixnum size) (type (unsigned-byte 8) ws-init-state) (type sb-sys:system-area-pointer sap) (optimize (speed 3) (safety 0))) (loop with loop-end of-type fixnum = (logandc2 size 127) for i of-type fixnum from 0 below loop-end by 128

        with 0x0  of-type u8.32 = (u8.32 #x00)
        with 0x20 of-type u8.32 = (u8.32 #x20)
        with 0x0A of-type u8.32 = (u8.32 #x0A)
    
        with wa of-type u64.4 = (u64.4 0)
        with la of-type u64.4 = (u64.4 0)
    
        with ws-prev of-type u8.32 = (u8.32 ws-init-state)
    
        for c1 = (u8.32-sap-ref sap (+ i 0))
        for c2 = (u8.32-sap-ref sap (+ i 32))
        for c3 = (u8.32-sap-ref sap (+ i 64))
        for c4 = (u8.32-sap-ref sap (+ i 96))
    
        do
           (flet ((process-chunk (curr prev)
                    (let* ((ctrl  (u8.32-sat- (u8.32- curr 9) 4))
                           (ws (u8.32-or (u8.32= ctrl 0x0) (u8.32= curr 0x20)))
    
                           (ws-shift (u8.32-alignr ws (u8.32-permute128 prev ws #x21) 15))
                           (wmask    (u8.32-andc1 ws ws-shift))
    
                           (lmask (u8.32= curr 0x0A)))
                      (values wmask lmask ws))))
    
             (multiple-value-bind (wm lm prev) (process-chunk c1 ws-prev)
               (psetf wa (u64.4+ wa (u8.32-sad wm 0x0))
                      la (u64.4+ la (u8.32-sad lm 0x0))
                      ws-prev prev))
             (multiple-value-bind (wm lm prev) (process-chunk c2 ws-prev)
               (psetf wa (u64.4+ wa (u8.32-sad wm 0x0))
                      la (u64.4+ la (u8.32-sad lm 0x0))
                      ws-prev prev))
             (multiple-value-bind (wm lm prev) (process-chunk c3 ws-prev)
               (psetf wa (u64.4+ wa (u8.32-sad wm 0x0))
                      la (u64.4+ la (u8.32-sad lm 0x0))
                      ws-prev prev))
             (multiple-value-bind (wm lm prev) (process-chunk c4 ws-prev)
               (psetf wa (u64.4+ wa (u8.32-sad wm 0x0))
                      la (u64.4+ la (u8.32-sad lm 0x0))
                      ws-prev prev)))
        finally
           (return
             (loop for j from loop-end below size
    
                   with words of-type fixnum    = (sum-lanes wa)
                   with lines of-type fixnum    = (sum-lanes la)
                   with prev-ws of-type boolean = (logbitp 31 (u8.32-movemask ws-prev))
                   with tlines of-type fixnum   = 0
                   with twords of-type fixnum   = 0
                   for byte of-type fixnum      = (sb-sys:sap-ref-8 sap j)
                   for curr-ws of-type boolean  = (or (= byte 32) (<= 9 byte 13))
    
                   do
                      (when (= byte 10) (incf tlines))
                      (when (and (not curr-ws) prev-ws) (incf twords))
                      (setf prev-ws curr-ws)
                   finally
                      (return (values (the fixnum (+ lines tlines))
                                      (the fixnum (+ words twords))
                                      nil))))))
    by amno
  • by e12e