Settings

Theme

Fast SEQUENCE iteration in Common Lisp

world-playground-deceit.net

60 points by BoingBoomTschak 14 days ago · 14 comments

Reader

vindarel 10 days ago

The same day, after this post, SBCL's main developer made reduce faster (https://www.reddit.com/r/lisp/comments/1pmip8o/fast_sequence...). Let's see on the next SBCL release what the final results are.

  • themafia 10 days ago

    Stas is a machine. Almost every single day he's in the sources making improvements. I joined the sbcl-commit list recently and the project is far more active and cared for than I had originally suspected.

    • stackghost 9 days ago

      SBCL is a treasure. I really enjoy writing lisp, I just wish the library ecosystem was a little more mature.

      I still use it whenever I can

matheusmoreira 10 days ago

> sequences are a band-aid over the lack of real iterator protocol

Wouldn't it be better to solve that problem? Proper generalized iteration with generators is just semicoroutines which can be implemented by swapping around stack pointers with zero copying. Should be competitive performance wise.

  • BoingBoomTschakOP 10 days ago

    As linked, the extensible sequence protocol (https://shinmera.com/docs/trivial-extensible-sequences/) already exists and is quite workable. The problem is that it's not supported enough, both by implementations (CCL missing, for example) and the entire ecosystem.

    In the end, it's simpler to stay with boring, ANSI compliant solutions well optimized by compilers.

    • stackghost 9 days ago

      There are effectively two Common Lisp worlds: the commercial world where Allegro and Lispworks dominate, and the non-commercial world where SBCL is more or less the only game in town.

      CCL, as far as I can tell, is abandonware

      • guenthert 9 days ago

        > CCL, as far as I can tell, is abandonware

        Last release was August 14 2024. For a 30+ year old project, that's quite recent methinks.

        It clearly doesn't move as fast as SBCL, but I wouldn't call it abandoned either.

        ototh, afaiu, SBCL gave up on ARM32. Can't blame them for that, but until 2023 I was still using an early Banana Pi with such. CCL worked there much better (also it's GC seems more robust).

      • a-french-anon 9 days ago

        Personally, I still try to support CCL, ECL and CLISP in addition to SBCL; I mostly ignore CLISP's warnings though.

      • tmtvl 9 days ago

        ECL still has its niches (if you want to use CL in an Android application, for example, ECL is easier to work with than SBCL).

    • shawn_w 9 days ago

      I've been toying with trying to add extensible sequences to ccl as a way to get more familiar with it, but ccl development seems dead so I'm not sure it's worth the effort.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection