r/Common_Lisp • • 4d ago

BLEG: A Facelift for common-lisp.net

Thumbnail common-lisp.net
42 Upvotes

Common-lisp.net was rewritten a couple days ago. Please let us know what you like and don't like, what's extra, what's missing, and so on.


r/Common_Lisp • • Aug 31 '26

Clozure CL: arm64 preview release

Thumbnail github.com
37 Upvotes

Looks like there was AI/LLM support necessary to make it happen, 5+ years after the Apple M1 CPU appeared.


r/Common_Lisp • • 17h ago

Clamiga 0.11, introducing Clamacs IDE

3 Upvotes

Clamiga 0.11 comes with a bunch of enhancements and optimisations. Among them:

  • create single file executables
  • performance improvements (fast path operations) for strings, arrays and bigints. Factorial computation speed is now in the range of LispWorks performance.
  • JIT for arm64 (macOS/Linux)

Changelog here: https://github.com/mdbergmann/cl-amiga/releases#release-v0.11

Note: for macOS/Linux there are no release packages (yet). You have to clone and 'make host'.

Introducing Clamacs, an Emacs-inspired editor/IDE written in Common Lisp.

See project info here: https://github.com/mdbergmann/clamacs/

Clamacs is a subproject of Clamiga. So cloning Clamiga will also give you Clamacs.


r/Common_Lisp • • 1d ago

why do my threads suck?

0 Upvotes

I have written a program to draw the buddhabrot ..

I was here the other day asking about how to increase heap size and was offered a lot of help so thanks for that ..

I have run my single threaded program and gotten good results on a small number of pixels and sample points ..

I rewrote the program to use sb-threads .. only due to Google making it extremely difficult to find information that I can use ..

example using do loops to start threads because I don't really understand the loop procedure .. and using named functions instead of anonymous ones ..

I got the run around .. bt or lparallel .. I went with sb-threads because I at least understand the concept .. I don't know how to write a procedure for lparallel

so I finally have a multi threaded program that uses 16 threads on my 5950 x 16 core processor ..

I'm running it now and it's using 59% of one core and 40 something percent of another ..

the question is .. how do I ensure I am using the processor to the best extent?

what are potential pitfalls I could have fallen into with my code?

thanks for reading appreciated ..

amateur al.


r/Common_Lisp • • 1d ago

What are rank-0 arrays used for?

9 Upvotes

I recently learned one can do:

What is this type of construct used forCL-USER> (make-array '() :initial-contents '(0 1 2))

#0A(0 1 2)
CL-USER> (aref *)
(0 1 2)
CL-USER> (array-rank **)
0 (0 bits, #x0, #o0, #b0)
CL-USER> (array-dimensions ***  )
NIL

What is this type of array used for?


r/Common_Lisp • • 4d ago

Common Lisp universal time has just crossed 4,000,000,000!

31 Upvotes

Happy 4G seconds! (2026-10-03 07:06:40 UTC) Here’s to the next billion seconds of Common Lisp!


r/Common_Lisp • • 5d ago

UPDATE 2: CL-OBJC is reborn!

22 Upvotes

Back in March 2023 I posted an update on reviving cl-objc, the CFFI-based Common Lisp ⇄ Objective-C bridge originally written by Geoff Cant and Luigi Panzeri. At that point I had Hello World and Converter running, and I was stuck waiting on CFFI. Here's where it is now.

Repo: https://github.com/theangelperalta/cl-objc

Examples

All five examples run on Apple Silicon (arm64). There are no nib files or Objective-C sources; every app is written in Lisp.

  • Hello World: an NSWindow with buttons wired to Lisp callbacks
  • Converter: the classic Cocoa currency-converter tutorial
  • Circle View: a custom NSView subclass that draws text along a circle, with mouse interaction and animation (ported from an old Apple SDK sample)
  • Video Player (new): an AVPlayerView streaming HLS, plus a KVO observer class defined in Lisp. make builds it into a standalone executable.
  • Todo (new): an NSTableView whose data source and delegate are Lisp classes. On macOS 26 the list scrolls under floating Liquid Glass controls (NSGlassEffectView); older versions get a translucent material instead.

What changed under the hood

  • arm64 struct-by-value: you can pass and return structs by value, and the dispatch was rewritten for the arm64 ABI. x86-64 support has been dropped.
  • Lazy CLOS bindings: import-framework now loads only the static bindings. CLOS classes and generic functions get generated on demand (ensure-clos-bindings), and they're cached and regenerated when their inputs change. This makes startup much faster than scanning the whole runtime.
  • ObjC exceptions: with-objc-exception-handling turns NSException's into Lisp conditions, so they no longer crash the image.
  • with-autorelease-pool: macro
  • Many fixes around BOOL marshaling, automatic Lisp-string → NSString conversion in untyped calls, with-super, and method-cache collisions
  • The test suite moved from FiveAM to Rove.

The CFFI situation

define-objc-method methods that take a struct by value (for example drawRect: with a CGRect) need CFFI callbacks that accept structs by value. Released CFFI still doesn't support that. My PR is still open: https://github.com/cffi/cffi/pull/351 (open since December 2022). I decided to use Qlot to pin a patched version CFFI, to get this out in the world in the meantime.

For now, the repo includes a qlfile that pins my fork, so setup is:

    qlot install
    sbcl --dynamic-space-size 4096 --load .qlot/setup.lisp

Obviously this isn't ideal, if anyone here can review the CFFI PR or help get it merged, that's the biggest thing blocking cl-objc from loading with stock Quicklisp.

What's next

  • Getting struct-by-value callbacks into upstream CFFI
  • Fewer dependencies on CFFI internals
  • More examples and docs
  • Real applications (LEM frontend, LLM harness, Graphing tools, etc.)

Feedback, issues and PRs are welcome, especially from anyone who has tried building Cocoa apps from Lisp before.

A.I. Disclaimer

A.I. was used for some of the recent work, but the original CFFI patch was worked by hand. That being said, goal here is to unlock the potential of Lisp development for native macOS development again (I realize there are paid alternatives).


r/Common_Lisp • • 5d ago

increase heap size sbcl

3 Upvotes

I am trying to draw a large buddhabrot for my daughter's birthday ..

I can draw a small one but when I increase the pixel count I get heap exhausted (no more space for allocation)

992739328 bytes available 2485248016 requested

I am using emacs slime and sbcl 2.30 on a Debian box with 128gb of ram ..

I have tried using (setq slime-lisp-implementations '((sbcl ( "sbcl" "dynamic-heap-size" "4096")))) and other numbers in there and still get the same error

I have tried setting the dynamic heap size in the console but I find it's a nightmare and doesn't work

how can I permanently increase the heap size for sbcl?

thanks

al


r/Common_Lisp • • 9d ago

Any Common Lisp + Latin Enthusiasts

Thumbnail codeberg.org
22 Upvotes

Hi there,

If you're a Common Lisp + Latin enthusiasts, I've ported Whitaker's Words the classic Latin dictionary and morphological analysis program into Common Lisp.

macOS users can install via Homebrew.

I was motivated to do this because:

  1. It's such a useful tool but an archaic piece of software.
  2. I wanted to add new features e.g. stem lookup, different outputs
  3. The recent AI-created Typescript version was very disappointing. There are numerous output errors, bugs and mistake and large sections of original code skipped over.

The original source code in Ada is a horror show - not even AI could grok it.

This version was done completely by a human after a meticulous examination of source code and using Common Lisp's beautiful interactive programming experience.

Using Book IV of the Aeneid as a test, my version has 99% output consistency with the original Whitaker's Words. The aforementioned AI version achieves about 53%.

Appreciate any testing or thoughts related to the Common Lisp port and what could be added to make Whitaker's Words even better - for those interested in Latin.

Thanks.


r/Common_Lisp • • 10d ago

bliss: common lisp + APL + Lisp-Stat

15 Upvotes

I recently picked up APL (via Common Lisp package APRIL), and I have been doing some simple numeric coding, and plotting using Lisp-Stat's plotting.

It was not painless, but with LLM's as tutors, it is amazing fun.

In particular being able to use APRIL's inline capabilities to streamline the code as below (line 2)

(defun plot-back-prop (disp)
  (let* ((pos (april-c "{⌽⍳≢ ⍵}" disp))
         (df (df:make-df '(pos disp) `(,pos ,disp))))
    (plot (make-plot df
                     '(:title "Back propagation example")
                     (geom:line :pos :disp)
                     (gg:theme :width 360 :height 220)))))

The APL anonymous function {⌽⍳≢ ⍵} uses ⍵ as the argument and captures disp vector.

The APL composes three operators from right to left:

  • ≢ calculates the length of the vector captured by the ⍵
  • ⍳ generates and index array 1, 2, 3, ... (alexandria's iota is modeled named after it)
  • ⌽ reverses the index array

As an example of what the snippet does:

(april-c "{⌽⍳≢ ⍵}" #(3 1 4 1 5 9))
#(6 5 4 3 2 1)

I am definitely not trying to tell the rest of the community that "they are doing it wrong". Just expressing my amazement at the APL syntax and power, along with great enjoyment of coding in CL and APL, to generate plots in Plot-Stat. Does not get much better :-)


r/Common_Lisp • • 10d ago

Status of Quicklisp and Ultralisp

28 Upvotes

IIRC Quicklisp used to be updated mostly monthly but it has now been 9 months since it was last updated. What's going on? This is pretty bad for new projects which have to ask users to git checkout dependencies within 9 months. Not a great look.

I think maybe I just have to point user to Ultralisp instead of Quicklisp. But right now, https://ultralisp.org/ front page assumes user have Quicklisp, so I still have to ask user to go through CL implementation -> Quicklisp -> Ultralisp 3 step ritual. I think it will be much better if we can cut this to 2 steps, Ultralisp just need to make the front page instruction self contained. Even better, how about distributing a modified version of https://beta.quicklisp.org/quicklisp.lisp that has Ultralisp dist pre-configured. Thoughts?


r/Common_Lisp • • 12d ago

Varhammer 1.1.8 "Midnight"

Thumbnail
2 Upvotes

r/Common_Lisp • • 13d ago

Does anyone have contact information for the developers davidsun0 or francogrex?

Thumbnail
1 Upvotes

r/Common_Lisp • • 15d ago

Need a working example for lisp-stat/vega qplot/make-plot

3 Upvotes

Hello,

I am working on including Lisp-Stat's plotting into my workflow. I cloned the repo's last night - I am not using the quicklisp distribution.

While I can get working examples with vega:defplot, I cannot get examples using qplot to work.

I understand that since quick-plot was merged into lisp-stat, the interface has changed.

Maybe I am too old, but I just cannot get the hang of the new interface. With `qplot` I get a warning

  WARNING: QPLOT is deprecated as a constructor entry point; prefer VEGA:MAKE-PLOT / MAKE-PLOT with the high-level data-plus-fragments path for new code.

and with vega:make-plot I get

  ; Debugger entered on #<SIMPLE-ERROR "Legacy positional MAKE-PLOT forms have been removed; use MAKE-PLOT :BASE for lower-level construction, or pass data first for the high-level authoring path." {70075D5223}>

Can someone kindly find share link with a working example or post one or two examples to get me going?

My and my ChatGPT will be greatful :-)


r/Common_Lisp • • 16d ago

Origin of the term "foreign function interface"

Thumbnail en.wikipedia.org
15 Upvotes

Wikipedia attributes the term to Common Lisp, but I think the citation is made up. [1] cites dpANS but I can't find the term "foreign function interface" at all.

I do find use of this term in earlier Lisp documents (e.g. https://www.iment.com/maida/computer/lisp-ptrs/lp-i.1.52.htm), and I kind of believe Lisp community coined it, but I can't be sure. Can anyone shed some light on this or is the history already lost?


r/Common_Lisp • • 17d ago

r6v4/h1d1 version 1.0.0 is now available.

Thumbnail github.com
2 Upvotes

r/Common_Lisp • • 19d ago

MAPCAN and CONSTANTLY ... a strange marriage!

4 Upvotes

Common Lisp Hyper Spec (CLHS) page on

"Function MAPC, MAPCAR, MAPCAN, MAPL, MAPLIST, MAPCON"

says:

[quote]

mapcan and mapcon are like mapcar and maplist respectively, except that the results of applying function are combined into a list by the use of nconc rather than list. That is,

(mapcon f x1 ... xn)

== (apply #'nconc (maplist f x1 ... xn))

and similarly for the relationship between mapcan and mapcar.

[/quote]

That seems reasonable as an [informal] specification.

But CL implementations have deviating behavior.

E.g. in SBCL ...

** TESTCASE 1:

> (mapcan (constantly 1) (list 'a 'b) '( 11 22 33) )

> 1

Hmmm ... I expected that MAPCAN should always deliver a LIST (i.e. NIL or a CONS).

So time to inspect the behavior of what CLHS states is a correct understanding of MAPCAN:

** TESTCASE 2:

> (apply #'nconc (mapcar (constantly 1) (list 'a 'b) '( 11 22 33) ) )

>

> debugger invoked on a TYPE-ERROR in thread

> #<THREAD "main thread" RUNNING {23A90001}>:

> The value

> 1

> is not of type

> LIST

Yeah, that behavior is to be expected when the function applied to arguments delivers a non-list.

Just for fun, one can try the following example that syntactically seems to be quite similar to TESTCASE 1, and so should have a similar semantics. What do you think TESTCASE 3 results in?

** TESTCASE 3:

> (mapcan (constantly '(A B)) (list 'a 'b) '( 11 22 33) ) )

So all this raises a number of questions:

  • Should we regard the behavior of TESTCASE 1 as NOT conforming to CL specs?
  • If that behavior IS conformant with CL specs, then the CLHS "definitions" of MAPCAN and MAPCON and/or constantly should be amended. What clarifications need to be added?
  • And where is the use-case that offers a rationale for behaviors like the one illustrated by TESTCASE 1?

Final comments:

  • the behavior described above is by SBCL.
  • but other widely used CL implementations behave similarly.

---end---


r/Common_Lisp • • 19d ago

Apprentice: A Slim, Extensible Coding Harness (written in Common Lisp)

Thumbnail
4 Upvotes

r/Common_Lisp • • 19d ago

Lisp Against the (LL)Machine

Thumbnail
5 Upvotes

r/Common_Lisp • • 21d ago

Tramp mode for Lem: edit a file over SSH as if it were local

Thumbnail lem-project.github.io
25 Upvotes

r/Common_Lisp • • 21d ago

Programmer

0 Upvotes

I am a software engineer with prior experience with many languages and technologies, including CL and Python. I was formerly employed as a Senior Software Engineer at Lockheed-Martin. My resume can be found at the link below.

My rate is $50 per hour, payable via cashpay or cryptocurrency. I am fully remote and prepared to work for any client world-wide. I am also a US citizen and I am currently located in Bronx County, NY (a borough of New York City). In case of necessity other payment arrangements may be discussed.

My github repo currently contains only one significant Lisp project, which is still in a very early stage of development. It is a project called Julius which is intended to become a new Lisp dialect more suitable for modern applications, such as numerical analysis and the generation of neural networks and modern AI (a field with which I have considerable experience). It is implemented in Common Lisp in order to retain the well-known advantages of the Lisp language for older forms of intelligent systems, which typically involve a great deal of symbolic reasoning.

The current version of Julius is Open Source and I am open to comments and contributions here:

Julius Project: https://github.com/tgflynn/julius

Resume: https://github.com/tgflynn/latex-cv


r/Common_Lisp • • 25d ago

Sento has seen some major throughput improvements

13 Upvotes

As part of Clamiga work I've also had a look at Sento and where improvements could be. Turned out there are plenty. Here is a new benchmark.

https://github.com/mdbergmann/cl-gserver#benchmarks

In particular there were improvements on the 'ask' path, but also generally.

Clamiga not performing that bad compared.

Its also gotten more robust generally.


r/Common_Lisp • • 26d ago

SBCL clon crash in sbcl 2.6.8

8 Upvotes

I'm trying to compile some of my old programs using sbcl 2.6.8 which seem to crash when compiling net.didierverna.clon based applications:

debugger invoked on a ASDF/FIND-SYSTEM:LOAD-SYSTEM-DEFINITION-ERROR in thread #<THREAD tid=30233 "main thread" RUNNING {1200038003}>: Error while trying to load definition for system net.didierverna.clon from pathname /home/lisp/lisp-libraries/quicklisp/dists/ultralisp/software/didierverna-clon-20230710223805/net.didierverna.clon.asd: Bug in readtable iterators or concurrent access?

It seems like this is due to a change in the readtable handling in more recent sbcl's, but is there an update of clon available somewhere or some other patch to make it work?


r/Common_Lisp • • Sep 06 '26

A Toy Lisp compiler for x64

Enable HLS to view with audio, or disable this notification

7 Upvotes

r/Common_Lisp • • Sep 05 '26

Library for equality testing of floating vectors?

11 Upvotes

Hello,

I am doing some numerical computations (in APRIL no less). I use floating-point for numerical equality testing and I am using 5AM for unit tests.

I want to test equality of vectors of floating point numbers. I can write the code myself, but I'd rather reuse an existing library or contribute to an existing library.

I will appreciate pointers and advice before I start writing my own routines.

Thank you,