Skip to content

Instantly share code, notes, and snippets.

@vindarel
vindarel / Common Lisp VS Racket - testimonies.md
Last active April 20, 2024 03:18
Common Lisp VS Racket. Feedback from (common) lispers.

Developer experience, libraries, performance… (2021/11)

I'll preface this with three things. 1. I prefer schemes over Common Lisps, and I prefer Racket of the Schemes. 2. There is more to it than the points I raise here. 3. I assume you have no previous experience with Lisp, and don't have a preference for Schemes over Common Lisp. With all that out of the way... I would say Common Lisp/SBCL. Let me explain

  1. SBCL Is by far the most common of the CL implementations in 2021. It will be the easiest to find help for, easiest to find videos about, and many major open source CL projects are written using SBCL
  2. Download a binary directly from the website http://www.sbcl.org/platform-table.html (even for M1 macs) to get up and running (easy to get started)
  3. Great video for setting up Emacs + Slime + Quick Lisp https://www.youtube.com/watch?v=VnWVu8VVDbI

Now as to why Common Lisp over Scheme

@vindarel
vindarel / common-lisp-VS-clojure.md
Last active April 17, 2024 22:01
Notes on Common Lisp VS Clojure

Testimonies

CL's compiler

The thing in CL I miss most doing Clojure as my day job? CL's compiler. I like having a compiler tell me at compile time about the mistakes I've made. Bogus arguments. Unreachable code because of unhandled exceptions, and so on. CL saves me round after round of bugs that in clojure aren't found until you run the code. If you test well, it's found when testing, if you don't it's found in production. "Clojure compiler" almost demands air quotes.

CL's optional but oh-so-useful model of type declarations is also infinitely more useful (to me) than Clojure's use of "spec", and instrumentation that happens only at test time because of the cost. Depending on the OPTIMIZE declarations, other type defs are a floor wax and dessert topping. Want checks for argument types? Lower optimizations. Want most efficient machine code? High optimizations.

/u/Decweb, March 2023 https://www.reddit.com/r/lisp/comments/11ttnxk/the_rise_fall_of_lisp_too_good_for_the_rest_of/jczpysp/

@vindarel
vindarel / lisp-vs-julia.md
Last active February 16, 2024 14:41
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 / debugging common lisp - slime interactivity.md
Last active December 23, 2023 08:55
Awesome example on Common Lisp's interactive debugger (Slime) advanced interactivity

Awesome comment: https://www.reddit.com/r/programming/comments/65ct5j/a_pythonist_finds_a_new_home_at_clojure_land/dg9p8rk/

That's not an interpreter. A REPL is not the same as a Lisp interpreter. REPL means read eval print loop. EVAL can be implemented by a compiler or an interpreter. Common Lisp has both and mixed implementations with both compiler and interpreter.

A Lisp interpreter is executing Lisp code directly. Clojure does not have an Interpreter.

https://clojure.org/reference/evaluation

Clojure has no interpreter.
@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 / 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 / lisp standalone binary issues.md
Last active December 30, 2022 13:36
Common Lisp: building a standalone binary issues and solutions
@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 / 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).

@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).