Better HN
topnewbestaskshowjobs
Log inSign up

vindarel

1,546 karma · joined Jul 7, 2017 (9y ago) · 607 submissions

Pythonista turned lisper.

https://lisp-journey.gitlab.io/pythonvslisp/

I run CL apps in production.

CL, batteries included, fast scripting: http://ciel-lang.org/

I create a Common Lisp course in videos. It's a progressive and structured course, where everything that was hard for me (especially hard to find) is made easy for you. Check it out! https://www.udemy.com/course/common-lisp-programming/?referralCode=2F3D698BBC4326F94358

---

@ vindarel mailz.org

Submissions

comment 1w ago · link · parent

For CL, see also:

https://github.com/hyotang666/trivial-formatter · https://github.com/eschulte/lisp-format · https://github.com/yitzchak/cl-indentify

https://github.com/fukamachi/mallet "A sensible Common Lisp linter that catches real mistakes, not style"

and ocicl's built-in linter and auto-fixer https://github.com/ocicl/ocicl/

comment 2w ago · link · parent

There's first, second... tenth and rest in CL too. My 0.0002c.

The convention is to use car and cdr with cons cell structures that are not lists.

comment 2w ago · link · parent

> the one thing unique

it's the developer experience

(and the combination of all features, including homoiconic macros)

> a real world problem

You can solve anything with enough sweat ;)

One example? Routific's core algorithm is written in CL (source: its author on HN). Why not Java, like everybody on his field at this time? Because it was too tedious (edit: and we're not talking only about syntax) (there's a blog post somewhere). His prototype evolved in efficient production code, now the heart of the company.

> my thesis: most of that…

agreed on "most". Many features appear here and there in other languages. But there's the parts and the whole.

And the living platform ("stop writing dead programs"), still unique (with Smalltalk).

comment 2w ago · link · parent

The real "[Common] Lisp curse" is that once you taste it, there's no going back.

Other than that, the Common Lisp ecosystem is doing well thank you very much. Many contributors to SBCL, regular contributions to the important ecosystem libraries, vivid projects (Lem), new editors (mine) and plugins (OLIVE), some companies picking Lisp and somehow supporting the ecosystem (hosting conferences, contracting implementors). https://github.com/CodyReichert/awesome-cl/ · https://github.com/azzamsa/awesome-lisp-companies/ And yes, new vibe-coded projects too. Some are useful (ICL, cl-tuition…), some reinventing the wheel (badly) went nowhere. For some, we'll see.

comment 3w ago · link · parent

(or LispWork$ and its Java interface)

comment 1mo ago · link · parent

mmh but the rest of my examples, you can't do them in Python (:

comment 1mo ago · link · parent

You can use the features as little and as safely as you want:

> can be useful in extreme situations

it's already useful in development, it's one of those things that shorten the dev loop and make development in CL a breeze. For production, you choose. Connect to the live image to inspect the state without modifying anything or debug while it's live.

> recorded nowhere

you can connect to a running program and have the source under VCS. The thing to do isn't to copy-paste new function definitions in the live image's REPL, but to connect to the image, make changes to the source files, and re-compile them (a C-c C-c in Slime) (sending changes to the running program).

> safer

yep, some things are safer. Advanced features are useful even for simple things (introspection, etc).

comment 1mo ago · link · parent

No debugging window opens up for anybody by default^^ The web server (ex: Hunchentoot) will crash the request's thread and print the backtrace by default. Change a server's variable and print the backtrace in the browser (= dev mode), change another variable and get the interactive debugger (= dev mode++). All this without stopping/restarting the server. Or just restart it if you want.

comment 1mo ago · link · parent

no, the app isn't frozen (thinking about the Hunchentoot web server).

Also of course the default is to not get the debugger but let the server thread crash and print the backtrace. With a user setting, you can choose to get the debugger, and have this request wait (the connection may time out, which isn't an issue during development). Another setting is to print the backtrace in the browser (= dev mode).

comment 1mo ago · link · parent

In Python, can you fix the buggy function, re-compile it, and resume execution from the stack you want? I don't think so. That's common practice in CL, useful both during development and in production if necessary. In Python, you edit the file, your webserver restarts and reloads everything. In CL, the change is in. Nothing is restarted. The function was compiled and the next call will use it.

Python REPL and CL's are very different!

In CL: you can install new dependencies from the REPL. You can change a class definition, the existing objects will take the changes at the next invocation. You can control how this happens, etc. TLDR; CL is built around live programs. Buuut we can also do it the dumb (and safe) way following the industry's best practices.

comment 3mo ago · link · parent

here:

    I’m curious: was Arc running Racket BC or CS? I understand it got a big performance boost after switching to Chez Scheme.

    dang: It was running BC. I had high hopes for switching to CS because I'd heard the same thing you had, but when I tried it, HN slowed to a crawl. This stuff is so unpredictable.
https://news.ycombinator.com/item?id=47140657

comment 3mo ago · link · parent

Use `C-c C-]` (`slime-close-all-parens-in-sexp`) in SLIME ;)

comment 3mo ago · link · parent

I collected the disparate words of Dang here: https://lisp-journey.gitlab.io/blog/hacker-news-now-runs-on-...

comment 4mo ago · link · parent

> Common Lisp lacks some conveniences that have become common in newer languages, such as concise literals for a wider variety of data structures, persistent immutable collections, lazy sequences and built-in general-purpose pattern matching.

we can explore libraries on https://github.com/CodyReichert/awesome-cl/

concise literals: serapeum's dict or other libraries bring you { } for hash tables and the like.

persistent collections: FSet (and more)

lazy sequences: series, gtwiwtg (generators) (and more)

pattern-matching: Trivia

many libraries are shipped in CIEL: https://ciel-lang.org/ (shameless plug)

---

> It’s currently used in …

more example companies: https://github.com/azzamsa/awesome-lisp-companies/

also: https://lisp-screenshots.org/

---

> at the cost of slightly slower startup times

that means ±30ms, not the Java-esque slow startup time ;)

---

editors: don't miss https://lispcookbook.github.io/cl-cookbook/editor-support.ht... and the new Mine, OLIVE for VSCode, ICL repl (terminal and browser).

comment 4mo ago · link · parent

So let's try: SBCL with

* [clj-coll](https://github.com/dtenny/clj-coll) - Clojure collection and sequence APIs in Common Lisp, with optional Clojure collection syntax.

  * provides immutable Cons, Queue, PersistentList, capabilities as well as Vector, Set, and Map analogues built on FSet (but accessed entirely via Clojure APIs).

  * optional read syntax so you can type `{:a 1 :b 2}`, `#{1 2 3}`, and `[1 2 3]`.

* [clj-con](https://github.com/dtenny/clj-con) - Clojure-style concurrency operations in Common Lisp.

* [clj-re](https://github.com/dtenny/clj-re/) - Clojure-style regular expression functions.

* [clj-arrows](https://github.com/dtenny/clj-arrows) - Clojure-compatible threading/transformation/arrow macros for Common Lisp.

editor: https://coalton-lang.github.io/20260424-mine/

type system: Coalton

comment 4mo ago · link · parent

What about this one? https://github.com/dotcl/dotcl

> Common Lisp implementation on .NET. Lisp source is compiled to CIL (Common Intermediate Language) and runs on the .NET JIT — so the same Lisp image runs on Windows, macOS, and Linux across x86-64 and ARM64 without per-platform porting work.

comment 4mo ago · link · parent

Reminds me of https://scorecloud.com/ "ScoreCloud Songwriter takes recordings of voice and instruments and turns it into Lead Sheets, with melody, lyrics and chords." except there is no live demo (but a free download for W$ and Mac, and an iPhone app) (didn't try)

(It's built in Common Lisp (LispWorks))

comment 4mo ago · link · parent

Start here with Common Lisp 8-) https://lispcookbook.github.io/cl-cookbook/getting-started.h... To learn the language, look at the good books out there (Touretzky's etc).

ps: you don't need to learn Emacs. A terminal even is enough. See the Cookbook/ Editors section.

comment 4mo ago · link · parent

Don't miss out, we had new excellent editors and tools being released in the last months:

Mine: a complete, single-download application that comes with everything needed to experience the interactive and incremental development programming workflow, including hot-reloading and on-the-fly debugging. For CL and Coalton.

https://coalton-lang.github.io/20260424-mine/

OLIVE: a new hand-made plugin for VSCode.

ICL: a new REPL for the terminal and the browser with advanced features.

as a bonus: a JupyterLite kernel based on JSCL that runs 100% in the browser.

find them all: https://lispcookbook.github.io/cl-cookbook/editor-support.ht...

comment 4mo ago · link · parent

the python debugger is cool but is an inferior experience. It isn't only about a REPL, but about the editing experience, and about the language being thought from the ground up for long-living programs. See: https://mikelevins.github.io/posts/2020-12-18-repl-driven/

comment 4mo ago · link · parent

Flight search (Google's ITA Software), underground planning (SISCOG), CAD software (PTC Creo et all), the Gollum face (Mirai), automation of document extraction, renewable energies resource planning (3E), project management (planisware),

games (Kandria),

Maxima,

a faster pgloader (https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much-fas...),

hackernews (was rewritten to SBCL: https://lisp-journey.gitlab.io/blog/hacker-news-now-runs-on-...), first reddit…

https://lisp-screenshots.org/

https://www.lispworks.com/success-stories/

also Emacs (for another dialect).

comment 5mo ago · link · parent

also in the interop topic:

Common Lisp for Python: https://github.com/marcoheisig/cl4py

call Python from CL: https://github.com/digikar99/py4cl2-cffi

comment 5mo ago · link · parent

and the newer Moonli for CL: https://moonli-lang.github.io/ (:

comment 6mo ago · link · parent

I like History but I'll comment about Lisp in web apps today, if I may. We have a choice of web servers and web libraries (https://github.com/CodyReichert/awesome-cl/#web-development), and we live in happy times where HTMX or Datastar are great fit for Lisp -as with any stack. See these Datastar examples built in CL: https://github.com/fsmunoz/datastar-cl I use and like the Mito ORM too, which comes with automatic migrations and, since last year, a composable query engine (SxQL).

Here you will find some screenshots of some of today's web applications built in CL: http://lisp-screenshots.org/ and here an opinionated tutorial: https://web-apps-in-lisp.github.io/ One example: ScreenShotBot https://screenshotbot.io/ a successful open-source product and company. It now replaced Facebook's automatic screenshot testing tool (source: their blog). So, web apps in Lisp are possible -with a right amount of learning time and elbow grease.

The incremental development and interactive top-level are still precious and unmatched.

comment 6mo ago · link · parent

The trap is using quote, with the list operator there are no issues:

    (defparameter *a* (list 1 2 3))
and of course, mutating top-level variables is bad style.

comment 6mo ago · link · parent

Notes on CL:

- why nothing on the "compiler" line? Everytime you load a snippet or a file with SBCL, it compiles it (to machine code). There's also compile-file.

- interpreter: likewise, all code is compiled by default with SBCL, not interpreted, even in the REPL. To use the interpreter, we must do this: https://github.com/lisp-tips/lisp-tips/issues/52

- command line program: the racket cell shows the use of -e (eval), the same can be done with any CL implementation.

- since the string split line introduces cl-ppcre, one could mention cl-str :D (plug) (much terser join, trim, concat etc)

- ah ok, for dates and times, flattening a list, hash-table literals… we need more libraries.

- more files operations: https://lispcookbook.github.io/cl-cookbook/files.html

- emacs buffers: now compare with Lem buffers 8-)

- posix-getenv: I'd rather use uiop:getenv (comes in implementations).

- uiop:*command-line-arguments*

- exit: uiop:quit

- uiop:run-program (sync) / launch-program (async)

- java interop: with LispWorks or ABCL (or other libraries)

my 2c

comment 6mo ago · link · parent

Thanks for this. Saved: https://gist.github.com/vindarel/3484a4bcc944a5be143e74bfae1...

comment 7mo ago · link · parent

Someone threw out a Zed LSP for Common Lisp with LLMs help: https://github.com/etyurkin/zed-cl It requires heavy compilation of the wasm toolchain so I finally didn't try it. It seems it doesn't have a lisp debugger.

comment 7mo ago · link · parent

its Common Lisp cousin: https://github.com/fosskers/transducers/

comment 8mo ago · link · parent

more importantly, as you precise below, you edited (and somewhat corrected) the article after feedback from /r/lisp. So it isn't only AI output.
12345
21