Skip to content

Instantly share code, notes, and snippets.

@vindarel
vindarel / is-lispworks-worth-it.md
Created February 22, 2023 20:39
Is LispWorks worth it?! Users feedback on this commercial Common Lisp implementation.

LispWorks is a commercial Common Lisp implementation still thriving. Besides the CL ANSI language implementation, LispWorks provides additional features, tooling and libraries. Among others:

  • the CAPI GUI cross-platform framework
  • the LispWorks IDE (built in CAPI)
  • the mobile runtime (iOs, Android)
  • its tree shaker to ship smaller binaries
  • its Java interface
  • the KnowledgeWorks system for "rule-based, object-oriented, logical, functional and database programming"
  • its own, production-grade webserver, and more.
@vindarel
vindarel / rlwrap-for-sbcl.md
Last active November 13, 2023 15:07
RLWRAP settings for SBCL

The ReadLine Wrapper (rlwrap) utility is actually a must have when you want to run SBCL from the command line, because by default, SBCL in the terminal:

  • doesn't offer symbol completion
  • doesn't offer a history of commands
  • doesn't even understand the arrow keys, left and right (they input [[[A instead), nor any default readline keybindings, the ones we find in bash et all: C-e, C-a, C-u, C-k, Alt-b, Alt-f etc.

We can actually fix this with rlwrap options.

@vindarel
vindarel / init.slime
Last active August 29, 2022 15:29 — forked from Goheeca/init.slime
Full screen terminal Slime REPL for Common Lisp (one-liner)
;; (ql:quickload "str")
@vindarel
vindarel / lisp standalone binary issues.md
Last active August 29, 2024 14:38
Common Lisp: building a standalone binary issues and solutions
;; Possible Portacle elisp configuration.
;;
;; this is to be saved under <your Portacle directory>/config/user.el
;; Disable paredit-mode, automatically adding parenthesis and other pair delimiters.
(remove-hook 'slime-repl-mode-hook 'enable-paredit-mode) ; disable paredit-mode for the REPL
(remove-hook 'lisp-mode-hook 'enable-paredit-mode) ; disable paredit-mode for lisp files
@vindarel
vindarel / Example Common Lisp web applications.md
Created August 24, 2021 11:27
Example Common Lisp web applications
  • screenshotbot-oss - a Screenshot Testing service. This code powers https://screenshotbot.io.
    • uses Bknr.datastore as the datastore. Heavy use of their markup library (JSX-like).
    • Closures as URLs (nibble, not yet a standalone library). "Essentially, it allows me to create "anonymous" HTTP endpoints that evaluate a lambda. We integrate it with markup to make it pleasant to write multi-page web forms and flows. e.g. Here's a flow that lets you delete an API key, but before deleting it it asks you for a confirmation."
    • user auth and sessions.

Smaller demos:

  • cl-trello-clone - a Trello clone demo app in Common Lisp. Built with HTMX and HyperScript. Caveman an
@vindarel
vindarel / lisp-vs-julia.md
Last active May 7, 2024 23:29
Common Lisp VS Julia

I don't know Julia!

I saw devs leaving CL for a new graal (and eventually coming back). Grass may not be greener on the other side…

Long compilation times

You can't make it a CLI script, because it compiles the whole code WITH dependencies every time, and as soon as you import some serious libraries, compile times will skyrocket. I quickly hit 40 seconds of compilation with just geospatial lib and dataframes. These 40 seconds turned out to be A LOT when you develop interactively. And you can't build everything in a Jupyter Notebook, because eventually you'll have to switch to a CLI script.

https://news.ycombinator.com/item?id=36755618, 2023

@vindarel
vindarel / ccl-cocoa.md
Created April 23, 2021 09:19
How to build native Cocoa GUIs with Common Lisp (Clozure)

Historically, Clozure CL Objective-C bridge has been the best tool for this. On macOS CCL comes with a set of interfaces to Cocoa and some other OS frameworks that allow one to write native Cocoa applications in Common Lisp, with all the attendant advantages that provides. The Objective-C bridge is even pretty good at catching ObjC errors and turning them into Lisp errors, so one can have an iterative REPL-based development cycle for a macOS GUI application. Furthermore, the ObjC bridge can take Lisp representations of ObjC objects in a saved image and revive those objects--CCL provides tools to use his feature to build deployable GUI applications.

The problem is that the Objective-C bridge and the associated Cocoa interfaces have bit-rotted and no longer work portably on recent versions of macOS. A Lisp image saved using an older version of CCL used to reliably work on newer macOS versions. But now the images only seem to work reliably on the exact same macOS version, and often break even on minor revisions

@vindarel
vindarel / Elixir VS Common Lisp.md
Last active March 30, 2022 13:36
Elixir VS Common Lisp - preliminary remarks

I am still only lurking into Elixir. My friends love it. I want to evaluate the developer experience and compare it with Common Lisp.

Alchemist mode for Emacs doesn't seem to have much of the interactive capabilities of Slime (and that would be understandable, given it's the most one can do).

often alchemist has to boot an Erlang VM to evaluate a single expression. Running tests boots a VM, looking up a function’s source doc boots a VM, each prefix autocompletion boots a VM. This is slow, and if you want the VM to load the code you’re actively developing you better not have any compile-time errors.

http://jtmoulia.pocketknife.io/blog/2015/03/11/elixir-and-distel/

We will want to try Distel, even if it doesn't look much maintained (at all).

@vindarel
vindarel / python-pip-fails.md
Last active June 30, 2022 19:51
Python and pip fails

pip can break anytime, even dependencies of your dependencies can break if they were not pinned correctly (by their maintainers, not you).

Upgraded to pip 20? Too bad!

cannot import name SourceDistribution

You are now unable to install anythnig, nor to downgrade or upgrade pip itself (to 20.0.1 or 19).