I updated the Condition Handling page on the Common Lisp Cookbook to show what it means that handler-bind “doesn’t unwind the stack”, along with a couple real-world use cases.This time I must thank Ari. I originally wrote the page (with contributions from jsjolen, rprimus and phoe), starting from Timmy Jose “z0ltan”’s article (linked in the introduction) and the books I had at my disposal. These don’t show handler-bind’s power and use-cases like this, focusing on restarts (whi...| Lisp journey
Hacker News was written in the Arc lisp dialect, a dialect created by Paul Graham. Arc was implemented on top of Racket, but that has now changed. HN runs on top of SBCL since a few months.But why? For performance reasons. I recently noticed that Hacker News no longer uses paging for long threads. In the past, when a discussion grew large, we had to click “More” to load the next page of comments, and dang would occasionally post helpful tips to remind us about this feature.| Lisp journey
This is a personal pick of the most interesting projects, tools, libraries and articles that popped-up in Common Lisp land in the last two years.Newcomers might not realize how the Common Lisp ecosystem, though stable in many ways, actually evolves, sharpens, tries new solutions, proposes new tools, ships new libraries, revives projects. And everyone might enjoy a refresher.Here’s my previous overview for 2022.The same warnings hold: I picked the most important links, in my view, but this l...| Lisp journey
I just released a new documentation website specialized on web development in Common Lisp: 🚀 https://web-apps-in-lisp.github.io/ I’d be embarrassed to tell how long it took me to grasp all the building blocks and to assemble a resource that makes sense. I hope it serves you well, now don’t hesitate to share what you are building, it creates emulation!In the first tutorial we build a simple app that shows a web form that searches and displays a list of products.| Lisp journey
This is an ongoing work I wanted to share sometimes this year. It isn’t ready, it isn’t released, but if you are a motivated lisper I can add you to the GitHub repository and you can try the demo.We all want more tools for easier and faster web development in CL I guess right? An automatic database admin dashboard is an important component for me, both for personal use and development purposes, but also for client-facing apps, at least at the beginning of a project.| Lisp journey
This is a follow-up from yesterday’s post on reddit and an announce I wanted to make since this summer: I created 9 videos on CLOS, for a total of 1 hour and 22 minutes, in which you learn what I detail below. You can watch the course and subscribe here (Christmas coupon) and learn more on GitHub. The whole course is made of 51 videos divided in 9 chapters, for a total of 7 hours and 12 minutes.| Blogs on Lisp journey
I am not the original author of cl-ansi-term, but I revived it lately. In particular, I added useful stuff to print data in tables: print list of lists (where the first one is the list of headers) print horizontal or vertical tables the header keys are either the first row, either the first column print hash-tables, plists, alists filter keys to display (include, exclude) limit the number of columns they can be styled: with or without borders choose the columns’ width choose the borders’ ...| Blogs on Lisp journey
-- Last week I finished a new service written in Common Lisp. It now runs in production© every mornings, and it expands the set of services I offer to clients. It’s the 4th service of this kind that I developed: - they are not big - but have to be done nonetheless, and the quicker the better (they each amount to 1k to 2k lines of Lisp code), - they are not part of a super advanced domain that requires Common Lisp superpowers - I am the one who benefits from CL during development, - I could...| Blogs on Lisp journey
Common Lisp has various equality functions: =, eq, eql, equal, equalp, string-equal, char-equal… but what are the differences?? We tell you everything, with examples. As usual, this is best read on the Common Lisp Cookbook (a new page added on August, 2024). This is where it will get the updates. In short: = is only for numbers and equal is the equality predicate that works on many things. you can’t overload built-in operators such as = or equal for your own classes, unless you use a libr...| Blogs on Lisp journey
Lem is an awesome project. It’s an editor buit in Common Lisp, ready to use out of the box for Common Lisp, that supports more languages and modes (Python, Rust, Elixir, Go, JavaScript, TypeScript, Haskell, Java, Nim, Dart, OCaml, Scala, Swift, shell, asm, but also markdown, ascii, JSON, HTML and CSS, SQL…) thanks to, in part, its built-in LSP support. I took the challenge to add an interactive interface for Git, à la Magit, because you know, despite all its features (good vim mode, proj...| Blogs on Lisp journey
I just got 1001 learners on my Common Lisp course on Udemy. Thanks everybody for your support, here or elsewhere! Starting with CL was honestly not easy. The first thing I did was writing the “data structures” page on the Cookbook, bewildered that it didn’t exist yet. A few years and a few projects later, this course allows me to share more, learn more, have fun, and have some rewards to keep the motivation up.| Blogs on Lisp journey
We just released cl-str v0.21. It’s been a while since the last release, and many enhancements make it more useful than ever. Let’s review the changes, the newest first. But first, I want to you thank everyone who contributed, by sending pull requests or feedback. Special thanks to @kilianmh who suddenly appeared one day, helped with new features as well as grunt work, and who is now a co-maintainer.| Blogs on Lisp journey
A short post to show the usefulness of Hunchentoot-errors and to thank Mariano again. This library adds the current request and session data to your stacktrace, either in the REPL (base case) or in the browser. TLDR; Use it like this: ;; (ql:quickload "hunchentoot-errors) ;; ;; We also use easy-routes: (ql:quickload "easy-routes") (defclass acceptor (easy-routes:easy-routes-acceptor hunchentoot-errors:errors-acceptor) () (:documentation "Our Hunchentoot acceptor that uses easy-routes and hunc...| Blogs on Lisp journey
For those who don’t know and who didn’t see the banner :D I am creating a Common Lisp course on the Udemy platform (with complementary videos on Youtube). I wanted to do something different and complementary than writing on the Cookbook. I worked on new videos this summer and I just finished editing the subtitles. I have added 17 videos (worth 1h30+ of code-driven content) about Common Lisp macros!| Blogs on Lisp journey
Being able to load a custom theme is great, but it would be even better if we didn’t have to manually install one. Well, recent changes in nodgui from yesterday and today just dramatically improved the GUI situation for Common Lisp[0]. nodgui now ships the yaru theme @cage commited the Yaru theme from ttkthemes in nodgui’s repository, and we added QoL improvements. To use it, now you can simply do:| Blogs on Lisp journey
Do you think Tcl/Tk GUIs are doomed to look outdated? Fear not! A treeview widget: The official example of Forest Light: The ttkthemes gallery Plus, Tk itself has a little choice of built-in themes: We can use these themes with nodgui, the Ltk fork. In June of 2020, @cage added a little function to load a .tcl file: (defun eval-tcl-file (file-path) "This function will feed the TCL interpreter with the contents of the file `path'.| Blogs on Lisp journey
I finally added translations to my Lisp web app \o/ I wanted to do it with gettext and Djula templates. There seemed to be some support for this, but it turned out… not straightforward. After two failed attempts, I decided to offer a little 90 USD bounty for the task (I announced it on the project’s issues and on Discord, watch them out for future bounties ;) ). @fstamour took the challenge and is the person I’ll be eternally grateful for :D He kindly set up everything, answered my ques...| Blogs on Lisp journey
In 2018, I wrote a blog post and the Cookbook page on how to build Common Lisp binaries, and how to parse command-line arguments with the unix-opts library. But since then, new libraries were created an they are pretty good! They are simpler to use, and have much more features. I had a good experience with Clingon: its usage is clear, its documentation is very good, it is very flexible (it has hooks and generic functions waiting to have an :around method) and @dnaeon is not at his first great...| Blogs on Lisp journey
And 2022 is over. The Common Lisp language and environment are solid and stable, yet evolve. Implementations, go-to libraries, best practices, communities evolve. We don’t need a “State of the Ecosystem” every two weeks but still, what happened and what did you miss in 2022? This is my pick of the most exciting, fascinating, interesting or just cool projects, tools, libraries and articles that popped-up during that time (with a few exceptions that appeared in late 2021).| Blogs on Lisp journey
You are doing god’s work on a time-intensive computation, but your final step errors out :S Are you doomed to start everything from zero, and wait again for this long process? No! Find out. I show this with Emacs and Slime, then with the Lem editor (ready-to-use for CL, works with many more languages thanks to its LSP client). (This video is so cool :D Sound on) We use the built-in Common Lisp interactive debugger that lets us restart one precise frame from the call stack.| Blogs on Lisp journey
Those are useful Common Lisp debugging tricks. Did you know about trace options? We see how trace accepts options. Especially, we see how we can break and invoke the interactive debugger before or after a function call, how we can break on a condition (“this argument equals 0”) and how we can enrich the trace output. But we only scratch the surface, more options are documented on their upstream documentation:| Blogs on Lisp journey
In our previous entry, we saw how to deploy our web application with Systemd, either from sources or with a binary. Now we’ll speak more about this building process to produce one binary that contains everything for our web app. We’ll tackle 3 issues: ship foreign libraries alongside your binary, such as libreadline.so or libsqlite3.so, include your Djula templates into your binary, serve static files from your binary, without reading the filesystem, and we’ll see my Gitlab CI recipe.| Blogs on Lisp journey
How do you run your Common Lisp (web) application on your server? Nowadays most GNU/Linux distros have Systemd. I recently used it more, with a mix of applications running from source, from a binary, running locally or on my VPS. I had to bypass a few gotchas, so let’s recap’ what you need to know. Also stay tuned: next, we’ll see how to build a standalone binary for your Common Lisp application with Deploy (so that we handle foreign libraries like libssl), how to include your Djula HTM...| Blogs on Lisp journey
A few weeks ago, I put together a new Lisp video. It’s cool, sound on, ‘til the end ;) I want to show how to (quickly) do practical, real-world stuff in Lisp. Here, how to request a web API. We create a new full-featured project with my project skeleton, we study the GitHub API, and we go ahead. I develop in Emacs with Slime, but in the end we also build a binary, so we have a little application that works on the command line (note that I didn’t use SBCL’s core compression, we could h...| Blogs on Lisp journey
In this video I want to demo real-world Lisp stuff I had trouble finding tutorials for: how to create a CL project: what’s in the .asd file? what’s a simple package definition? how do we load everything in our editor (Emacs and SLIME here)? how to set up tests? and how to run them from the terminal? and (WTF) how to get the correct exit code???? how to build a binary in order to run our app from the terminal?| Blogs on Lisp journey
We want a web app to display a list of data and have an input field to interactively filter it. We’ll start with a simple, regular web app built with Hunchentoot. We’ll have a search input to filter our data, and we’ll see that to be more interactive, typically to filter out the results as the user types, we’ll need more than basic HTTP requests. We’ll need some JavaScript. But we’ll reach this level of interactivity with CLOG (and no JavaScript).| Blogs on Lisp journey
Everyone, let me celebrate a little bit: I am creating a Common Lisp video course on the Udemy platform. I’m several dozen hours in already and it’s taking a good shape! It is so much more time consuming to create videos than to write a tutorial O_o But I like what’s in there already, although there isn’t everything I want to teach, of course. I’m working on more content. Everything will come in time, and meanwhile you can buy the course: you’ll get future content for “free” ...| Blogs on Lisp journey
I have come to like asking questions to people running companies that use CL, and I have Arnold in my radar for quite some time. He contributed a while back to my cl-str library, and at that time, I don’t recall how many Lisp projects he had in his Github, but not as much as today. Since then, he created ScreenShotBot (an open-source screenshot testing service) and he released a few very useful Lisp (and Elisp) libraries.| Blogs on Lisp journey
I maintain a web application written in Common Lisp, used by real world© clients© (incredible I know), and I finally got to finish two little additions: add pagination to the list of products cleanup the HTML I get from webscraping (so we finally fetch a book summary, how cool) (for those who pay for it, we can also use a third-party book database). The HTML cleanup part is about how to use LQuery for the task.| Blogs on Lisp journey
Recently, the awesome-lisp-companies list was posted on HN, more people got to know it (look, this list is fan-cooked and we add companies when we learn about one, often by chance, don’t assume it’s anything “official” or exhaustive), and Alex Nygren informed us that his company Kina Knowledge uses Common Lisp in production: We use Common Lisp extensively in our document processing software core for classification, extraction and other aspects of our service delivery and technology st...| Blogs on Lisp journey
The Lem editor, which supports Common Lisp as well as other languages, works by default in the terminal with a ncurses frontend (it also has an experimental Electron frontend). It ships a nice Lisp REPL: it has good fuzzy completion, enough keyboard shortcuts, an interactive debugger, a completion menu, etc. It is now possible to run Lem straight in its Lisp REPL. Run it with: lem --eval "(lem-lisp-mode:start-lisp-repl t)" The optional argument (t) was added recently (thanks, @cxxxr) and allo...| Blogs on Lisp journey
I am glad to announce that the Common Lisp Cookbook is now available in ePub and PDF. It is available for free, and you can pay what you want[1] to say a loud “thank you” and to further support its development. Thanks! This EPUB represents the work on the span of three years where I have been constantly reading, experimenting, asking, discovering tips, tools, libraries and best-practices, built-in or not, all of which should have been easily accessible but were not.| Blogs on Lisp journey
Some days ago on reddit/r/lisp, we got to (re)discover CLPM, the Common Lisp Package Manager. Its author, Eric Timmons aka daewok, was kind enough to give more context, and to answer some more questions of mine, about his use of Common Lisp in his university group. Below I’ll give an overview of CLPM, stress on how it differs from Quicklisp, and then paste the interview. /Note/: it’s the same content as on reddit, but saved from oblivion!| Blogs on Lisp journey
See here: https://ko-fi.com/s/01fee22a32 Let me try something: I propose you here to buy the ePub, even though it is meant to be available for free. I contributed quite a lot to the Cookbook and I found since the beginning that having an EPUB and/or a PDF version would be very useful. Some years later, nobody did it, and I finally wrote a script to bundle all the pages together and generate an ePub, and then a PDF.| Blogs on Lisp journey
When I didn’t know Lisp at all, I skimmed at CLSQL’s and Mito’s documentation and I didn’t find a mention of “lazy”, “querysets” (a Django term!) nor a mention of any means to compose queries. I had no idea how I would replace querysets, F and Q objects and the many functions for DB queries that were being added into newer Django versions. I concluded that the Lisp ecosystem was lagging behind.| Blogs on Lisp journey
Mikelevins, https://news.ycombinator.com/item?id=23811382, July 2020 (some more comments on https://www.reddit.com/r/lisp/comments/hqesvp/explaining_the_advantages_of_the_repl/) (on terminology: we should maybe call Python’s “REPL” a shell, and put emphasis on image-based development, instead of only saying REPL, for Lisp) I’ve answered similar questions several times over the past few years, but I don’t mind repeating myself. It offers me a glimmer of hope that my preferred way of ...| Blogs on Lisp journey
Dear lispers, I decided that I can not develop three projects in parallel fast enough, so I’m seeking for a fellow programmer to join the effort. Disclaimer: this is not a real position, but there is a little budget I recently presented my online catalogue for bookshops. You will work on something very similar, but bigger. I need help to re-write the existing free software for bookshops in Common Lisp. The existing one is in Python.| Blogs on Lisp journey
I wrote a free software for bookshops to publish their catalogue online. Clients can now browse the available books and order them. It is enough generic so we can show other products too. https://abstock.gitlab.io/#/en/ sources and bug tracker: https://gitlab.com/vindarel/abstock Github mirror: https://github.com/vindarel/ABStock the demo Here’s how a search result looks like: Features The website is made generic enough for different clients, and is made totally hackable with pre- and post-...| Blogs on Lisp journey
Nearly one year ago, I received an email that asked me if I was available to do remote Lisp work. It was the day before the end of a contract and I had to tell my team if I wanted to continue or not. I made a virtual offering to the Lisp god and I started the Lisp job. Disclaimer: this post was written on Lisp Advocates’ reddit. Lisp Advocates is a meme, but it’s sort of serious too.| Blogs on Lisp journey
Nuklear is a small immediate-mode GUI toolkit: Nuklear is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any dependencies, a default render backend or OS window/input handling but instead provides a highly modular, library-based approach, with simple input state for input and draw commands describing primitive shapes as output.| Blogs on Lisp journey
Here’s the second part of our exploration of GUI toolkits for Common Lisp. The first part and introduction is accessible here: part 1: Ltk This blog post series was initially written for the Common Lisp Cookbook, you can (and should) read it there: https://lispcookbook.github.io/cl-cookbook/gui.html Qt4 (Qtools) Do we need to present Qt and Qt4? Qt is huge and contains everything and the kitchen sink. Qt not only provides UI widgets, but numerous other layers (networking, D-BUS…).| Blogs on Lisp journey
ITA Software, owned by Google, the airfare search and pricing system that is still used by companies such as Kayak.com or Orbitz, is a well-known example of a successful industrial and large Common Lisp software. We’re legitimate to wonder if they still run it (they do), if Google develops more CL software (I don’t know), or if they put resources to improve a CL implementation: they do. According to https://mstmetent.blogspot.com/2020/01/sbcl20-in-vienna-last-month-i-attended.html:| Blogs on Lisp journey
please see Python VS Common Lisp (it’s a static page you can find in the menu).| Blogs on Lisp journey
I just discovered clawk, that seems to originate from lispbuilder-clawk. Its last commit dates from 2011, typical from Lisp and that’s OK, libraries have the right to be done, it has no useful README nor documentation, but we can see its use in the tests, and the library is easily discoverable. This library seems perfect to manipulate data in rows and columns. Let’s have a quick look with this dummy txt file:| Blogs on Lisp journey
We recently pushed our replic library version 0.12, adding a couple of expected features, thanks to the input of our users user: we can TAB-complete sentences (strings inside quotes) we can define a different completion method for each arguments of a command. we added a declarative way to automatically print a function’s result. The default function can be overriden by users (in order too, for example, color output). So we can do something like this: we create a function (that will become a...| Blogs on Lisp journey
We just published a long overdue page on the Cookbook: web development in Common Lisp. We have an ambivalent feeling about it since it isn’t really a recipe as in the other pages. Yet it is valuable content that required a certain amount of digging and tryouts. Indeed, it took us about two years to discover and advertise many projects, to learn, try and put a tutorial together. We also wrote a commercial application.| Blogs on Lisp journey
Here’s an enhanced page for the Cookbook: https://lispcookbook.github.io/cl-cookbook/functions.html Only the Currying part was untouched (we enhanced it already), the higher-order functions part existed and was rewritten. The rest is new, and it should help you start writing Common Lisp quicker than ever. Happy lisping ! Table of Contents Named functions: defun Arguments Base case: required arguments Optional arguments: &optional Named parameters: &key Mixing optional and key parameters Def...| Blogs on Lisp journey
I’ve been paid to work on Common Lisp projects for a company for three months already. I didn’t expect it :) And we did hire ! My Github profile shows a good part of what my experience is. I am a regular “full stack developper”, with 7 years of professional experience. I worked on diverse Python and Javascript projects for huge to small companies, private and public. When I re-discovered Common Lisp, I saw it solved a lot of problems I had developing and deploying medium to large soft...| Blogs on Lisp journey
I knew it was possible, but I got to try it recently. Here I run a test with fiveam. It fails. I tell fiveam to enter the debugger on failures with (setf 5am:*on-error* :debug) so we have an immediate feedback and we can re-run the test from where it left off by choosing the appropriate restart. Other test frameworks like Parachute allow that. This is one of the things that make development in Common Lisp enjoyable and faster than with other workflows.| Blogs on Lisp journey
When I started dabbling in CL, I tried to build a readline application to see how it goes. I found cl-readline (I’m only the new maintainer) and it went smoothly. So I built a second and a third app, and found many things to refactor and provide out of the box: now comes replic. It comes as a library (now in Quicklisp, since 2018-01) and as an executable. The library does the following for you:| Blogs on Lisp journey
Hey, pardon this very short post, it’s just for the pleasure of blogging, and to balance the usual lengthy ones. I wanted to commit, one by one, every file of the current directory (it’s useless, don’t ask). I use legit as the interface to Git, and this one-liner: (dolist (file (uiop:directory-files "./")) (legit:git-add :paths (pathname file)) (legit:git-commit :files (pathname file) :message (format nil "add ~a" (file-namestring file)))) I guessed the :paths and :files arguments with ...| Blogs on Lisp journey
We just installed a comment system, and it isn’t Disqus ! We just discovered https://utteranc.es/, a lightweight widget based on Github issues. If it doesn’t find an issue corresponding to the current article, it will create one and post your comment there. Simple :) You dreamed of it ? They did it.| Blogs on Lisp journey
Shuffletron is a nice music player for the terminal written in Common Lisp, “based on search and tagging”, that seduced me with its attention to details. Moreover, its author was very responsive to fix a couple issues. The first time you launch it, it will ask for a music repository and will propose to scan it for id3 tags with the scanid3 command. It is optional, but it allows to print colored information:| Blogs on Lisp journey
What if we want to capture standard (and/or error) output in order to ignore it or post-process it ? It’s very simple, a little search and we’re good: (let ((*standard-output* (make-string-output-stream)) (*error-output* (make-string-output-stream))) (apply function args) ;; anything (setf standard-output (get-output-stream-string *standard-output*))) (print-results standard-output)) and now in print-results we can print to standard output without being intercepted (and in our case, we’...| Blogs on Lisp journey
I just updated my Quicklisp dist and suddenly couldn’t load some libraries any more. I got an error related to cl21 looking like the one below (I didn’t note the exact message sorry), even though the library was unrelate to cl21 (it was about osicat and cffi.grovel): couldn’t find adjustable-vectors from CL21.core.arrays If you skip through the restarts you’ll see mentions of a cache in ~/.cache/common-lisp/sbclxx-xx/quicklisp/…. It contains the compiled .| Blogs on Lisp journey
I’ll save here a reddit discussion, which I find interesting but that will be burried quickly down reddit’s history. The goal is to get all the dependencies of a system. You’d better read the OP’s question and the discussion (where the OP is the experimented svetlyak40wt/40ants, at the moment doing a god’s work on Weblocks). His solution is https://gist.github.com/svetlyak40wt/03bc68c820bb3e45bc7871870379c42e (ql:quickload :fset) (defun get-dependencies (system) "Returns a set with ...| Blogs on Lisp journey
From sjl’s utilities (thanks so much for the nice docstrings). The goal here is to read some code and learn about (hidden) gems. The following snippets should be copy-pastable. They are the ones I find most interesting, I left some behind. To reduce the dependency load, Alexandria or Quickutil functions can be imported one by one with Quickutil. Table of Contents Higher order functions Sequences Debugging and logging Profiling (with SBCL) Higher order functions See also https://github.| Blogs on Lisp journey
print-licenses is a little utility found in Steve Losh’s gigantic utilities and ported to a stand alone project. Example usage: (print-licenses 'fast-io) => alexandria | Public Domain / 0-clause MIT babel | MIT cffi | MIT cffi-grovel | MIT cffi-toolchain | MIT fast-io | NewBSD static-vectors | MIT trivial-features | MIT trivial-gray-streams | MIT uiop | Unspecified It may be available on february, 2018 Quicklisp update (request). One potential source of caution (feedback on reddit):| Blogs on Lisp journey
A common frustration for (impatient) beginners is to see different function names to access common data structures (alists, plists, hash-tables) and their inconsistencies (the order of arguments). Now they are well documented in the… Common Lisp Coobook of course: https://lispcookbook.github.io/cl-cookbook/data-structures.html, but still; and it is annoying to try things out with a data structure and refactor the code to use another one. The library Access solves those problems, it’s always| Blogs on Lisp journey
Structures offer a way to store data in named slots. They support single inheritance. Classes provided by the Common Lisp Object System (CLOS) are more flexible however structures may offer better performance (see for example the SBCL manual). As usual, this is best read in the Common Lisp Cookbook. Structures Creation defstruct (defstruct person id name age) At creation slots are optional and default to nil. To set a default value:| Blogs on Lisp journey
Using a program from a REPL is fine and well, but if we want to distribute our program easily, we’ll want to build an executable. Lisp implementations differ in their processes, but they all create self-contained executables, for the architecture they are built on. The final user doesn’t need to install a Lisp implementation, he can run the software right away. Start-up times are near to zero, specially with SBCL and CCL.| Blogs on Lisp journey
Lately we exercised our Lisp skills by writing cl-torrents, an app that searches for torrents on several sources (the Pirate Bay through piratebay.to, Kickass torrents and torrent.cd), and we wrote an extensive tutorial in the making (that was actually our primary goal). It comes as a library to use from the REPL and as a self-contained executable (download and run, nothing more to install). You’ll find the following topics in the tutorial:| Blogs on Lisp journey
Best read in the Cookbook ! also Travis CI, code coverage, testing with Prove. Gitlab CI is part of Gitlab and is available on Gitlab.com, for public and private repositories. Let’s see straight away a simple .gitlab-ci.yml: image: daewok/lisp-devel before_script: - apt-get update -qy - apt-get install -y git-core - git clone https://github.com/foo/bar ~/quicklisp/local-projects/ test: script: - make test Gitlab CI is based on Docker. With image we tell it to use the daewok/lisp-devel one.| Blogs on Lisp journey
If you didn’t know that, now you do. Quicklisp releases software updates once a month (see Quicklisp’s blog). I didn’t know why, it isn’t explained on its website, so I asked (issue #148). I found the discussion very insightful, everybody being constructive, existing solutions being discussed and architectural choices explained. But it ended up brutally with one more Common Lisp oddity. My first impression was that this fact is annoying, because it already prevented me a couple of tim...| Blogs on Lisp journey
or “Common Lisp is not very functional-programming oriented”. What are the options ? I mean, map is uncommon and there is no short words like take etc for functional composition. Right ? edit see those snippets. edit january, 2019: see this SO answer and the modf library. Map and filter Indeed, there are 8 or so map functions. The one we’re used to is mapcar. The simple map needs a second argument to specify its return type: (map 'list (lambda….| Blogs on Lisp journey
There is nothing built-in since CL predates the posix standard. After a look at Awesome CL, the Osicat library was my go-to package to look for such functionnality. There is its osicat-posix package indeed, even though it is undocumented (issue)… Now a look at the Cookbook is ok. osicat, osicat-posix osicat-posix is included in osicat. (ql:quickload :osicat) (describe (osicat-posix:stat #P"/tmp/file")) #<OSICAT-POSIX:STAT {1004F20C93}> [standard-object] Slots with :INSTANCE allocation: DEV ...| Blogs on Lisp journey
edit: I found Snooze (by Sly and Yasnippet’s author) easier and cleaner in this regard. It also has built-in settings to choose where to catch errors: with Slime’s debugger, with a full stacktrace in the browser or displaying a custom error page. If you’re using Lucerne don’t search more like I did, its with-params macro works with url query parameters (as well as POST parameters). If you’re accessing the url hello?| Blogs on Lisp journey
You dream to build a cross-platform GUI in Common Lisp? It’s now easy with web views.Honestly GUIs are a difficult topic. Add in “cross platform” and you can spend your life trying out different solutions and hesitating between the best one for Common Lisp. It’s doable: Tk, Gtk3 and Gtk4, Qt4 and Qt5, CAPI (LispWorks), IUP, Nuklear, Cocoa, McCLIM, Garnet, Alloy, Java Swing… what can of worms do you want to open?| Lisp journey
LispWorks is a Common Lisp implementation that comes with its own Integrated Development Environment (IDE) and its share of unique features, such as the CAPI GUI toolkit. It is proprietary and provides a free limited version.Here, we will mainly explore its IDE, asking ourselves what it can offer to a seasoned lisper used to Emacs and Slime. The short answer is: more graphical tools, such as an easy to use graphical stepper, a tracer, a code coverage browser or again a class browser.| Lisp journey
This is a description of the Common Lisp ecosystem, as of January, 2021, from the perspective of a user and contributor.The purpose of this article is both to give an overview of the ecosystem, and to help drive consolidation in each domain.Each application domain has recommendations for consolidating that part of the ecosystem, and pointers for interesting future work.This article is derived from Fernando Borretti’s State of the Common Lisp ecosystem from 2015, hence the introduction that ...| Lisp journey
A quick post to celebrate the birth of another Common Lisp application running in production©. This time, it is not open source, but I can describe it.It is used by bookshops in France and Belgium to upload their catalogue to online platforms. And no, they don’t know, and don’t need to know, the language it is implemented in!It is a simple application that reads data from an existing DB, builds a text file with special rules, sends the file to an FTP server, and does it every day.| Lisp journey
I recently enjoyed this discussion on the pro mailing list. It started with a call of recommendations on music software, and the discussion evolved in discussing parallel garbage collection. By the way, can you site an implementation that has parallel GC?Pascal Costanza:«When moving our elPrep software away from Common Lisp, we evaluated C++, Go and Java as potential candidates, and Go turned out to provide the best balance between performance and memory use.| Lisp journey
We all know that we can start a web server in the REPL and develop a web app as interactively as any other app, we know how to connect to a remote Lisp image by starting a Swank server and how to interact with it from our favorite editor on our machine, we know we can build a self-contained binary of the web app and simply run it, but one thing I had not realized, despite being the basics, is that by starting the web app with sbcl --load app.| Lisp journey
Djula is a Common Lisp port of the Django templating language. It’s good, it’s proven (it’s one of the most downloaded Quicklisp packages), it is easy to use and it has good documentation.It basically looks like this:{% extends "base.html" %} {% block title %}Memberlist{% endblock %} {% block content %} <ul> {% for user in users %} <li><a href="{{ user.url }}">{{ user.username }}</a></li> {% endfor %} </ul> {% endblock %} What was missing in the documentation was how to create custom fi...| Lisp journey
IUP is a cross-platform GUI toolkit actively developed at the PUC university of Rio de Janeiro, Brazil. It uses native controls: the Windows API for Windows, Gtk3 for GNU/Linux. At the time of writing, it has a Cocoa port in the works (as well as iOS, Android and WASM ones). A particularity of IUP is its small API.The Lisp bindings are lispnik/iup. They are nicely done in that they are automatically generated from the C sources.| Lisp journey
We continue our tour of GUI toolkits for CL with Gtk+3 and cl-cffi-gtk.The previosu posts are: part 1: Ltk part 2: Qt4 This blog post series was initially written for the Common Lisp Cookbook, you can (and should) read it there:https://lispcookbook.github.io/cl-cookbook/gui.htmlGtk+3 (cl-cffi-gtk) Gtk+3 is the primary library used to build GNOME applications. Its (currently most advanced) lisp bindings is cl-cffi-gtk. While primarily created for GNU/Linux, Gtk works fine under macOS and can ...| Lisp journey
Lisp has a long and rich history and so does the development of Graphical User Interfaces in Lisp. In fact, the first GUI builder was written in Lisp (and sold to Apple. It is now Interface Builder).Lisp is also famous and unrivaled for its interactive development capabilities, a feature even more worth having to develop GUI applications. Can you imagine compiling one function and seeing your GUI update instantly?| Lisp journey
Erudite is a Common Lisp library to write literate programs. The latest release (march, 2020) brings cool new features, amongst which the ability to capture and print code output.This page was created with Erudite. You can follow along with its source here. Blogging about a programming language in the language itself is pretty awesome and convenient (no more copy-pasting of code snippets and manual adjustements of the indentation, yay!| Lisp journey
We often hear that Common Lisp is dynamically typed, which is not wrong, but that leads to the belief that Lisp is as bad as Python concerning types, which is plainly wrong. We don’t hear enough that CL is a compiled language, that we can add type annotations, and that SBCL does thorough type checking. Hence, what we have at hand is awesome: we can compile a whole program or compile a single function and get type warnings.| Lisp journey
Not that I’m interested in using the Java platform :D but relevant comparisons between ABCL (Common Lisp on Java) and Clojure are rare. We just had a nice feedback on reddit, so here it is. The question was: After looking at the quite old benchmarks, ABCL seems to perform alright. Can anyone share their experience with ABCL in terms of performance, stability and memory usage? I wish I could give you more concrete numbers with an application you could test and see for yourself.| Lisp journey
Recently on reddit there was a reminder about lisptips.com and slime-tips. I already knew the two, but this time I fully enjoyed the Slime tips. I copy my favourites.As usual, I enhanced the Cookbook/emacs-ide.html at the same time.The Slime documentation is here: https://common-lisp.net/project/slime/doc/html/Documentation lookup C-c C-d h looks up documentation in CLHS. But it works only on symbols, so there are two more bindings: C-c C-d # for reader macros C-c C-d ~ for format directives ...| Lisp journey
In CLOS, a slot can have a :type option, but it doesn’t inforce type checking. It is good practice to use it, for documentation and for compiler optimizations and warnings sometimes (with CCL and SBCL when safety is high), but one shouldn’t rely on it. To comply this need, we can simply create our own constructor functions.However, the sanity-clause library can do it since a couple of days. The validation error messages are pretty good.| Lisp journey
New page on the Cookbook: https://lispcookbook.github.io/cl-cookbook/pattern_matching.html All examples come from Trivia’s wiki.The ANSI Common Lisp standard does not include facilities for pattern matching, but libraries existed for this task and Trivia became a community standard.Table of Contents Common destructuring patterns cons list, list* vector, vector* Class and structure pattern type, satisfies assoc, property, alist, plist Array, simple-array, row-major-array patterns Logic based...| Lisp journey
It’s been already a little more than a year that I began my Lisp journey. I made quaterly news digests, mainly from reddit’s feed: Q1 2018 - Q2 2018 - Q3 2018 - Q4 2018 Time has come for a yearly overview ! What happened in the Common Lisp world ? Are there (or groundbreaking promising useful fun) projects, articles, discussions, tutorials ?No need to say, I won’t reference everything we find in the quaterly posts, which don’t list all new projects appearing on Quicklisp (we can find ...| Lisp journey
Q1 2018 Q2 2018 Q3 2018 I wanted to do this for a year and here we are ! I don’t think I’ll carry on, with this format at least.If I missed anything crucial: you have comments and PRs: https://gitlab.com/lisp-journey/lisp-journey.gitlab.io/Happy (re)discoveries !Documentation Debugging – the Common Lisp Cookbook Loop, iteration, mapping – the Common Lisp Cookbook cl-exercise: Common Lisp Learning System running on browsers Announcements various SBCL releases (from 1.| Lisp journey
We heard about Deftask, a task management app for teams, a few days ago, in an article about the internals of the Chronicity library. Deftask uses Common Lisp for its backend and its command-line app. This reasonates with the fact that Turtl doesn’t use CL anymore. So I asked Deftask’s author: why did you go with CL ?More than anything else, I think its down to fun and productivity. I feel that I am at my most productive when I writing CL in Emacs+SLIME.| Lisp journey
Turtl is a very well done, secure collaborative notebook web app. https://turtlapp.com Its api backend is built in Common Lisp: https://github.com/turtl/api/ It is based on many async libraries the developer wrote for Turtl, like the Wookie async HTTP server.“is” ? No, was :/ Even though this repository is still maintained (latest commit: 2nd of december 2018), it is deprecated and the new server is written in NodeJS.| Lisp journey
You entered this new world of Lisp and now wonder: how can we debug what’s going on ? How is it more interactive than in other platforms ? What does bring the interactive debugger appart from stacktraces ?note: this tutorial is available on the Common Lisp Cookbook and it will receive updates there.If you want step-by-step examples of interactive debugging with nice screenshots and gifs, see the blog posts in the References section below.| Lisp journey
I have a simple need: I’d like to generate an html documentation from my code. What options do we have ?I searched for “documentation tool” on Quickdocs: http://quickdocs.org/search?q=documentation%20tool, from which I remove old ones (clod, qbook, manifest).I had two pure Lisp solutions working out of the box, two more are of interest, and there’s another non-Lisp of interest.update: just found out that qbook (github mirror)is used for the documentation of Fiveam, which is pretty nic...| Lisp journey
Q1 2018 Q2 2018 Documentation CLOS – the Common Lisp Cookbook (extensive rewrite) Advanced Use of Lisp’s FORMAT Function (2004) Book: Luger/Stubblefield, 2009; AI Algorithms, Data Structures, and Idioms in Prolog, Lisp, and Java (PDF) GitHub - DalekBaldwin/on-lisp: A modernized and annotated code companion to Paul Graham’s “On Lisp” SLY User Manual, version 1.0.0-beta-2 Announcements A new version of Common-Lisp.net has been launched! A new quickdist distribution – Ultralisp.| Lisp journey
We just updated the CLOS page on the Common Lisp Cookbook. You should refer to it for updates.CLOS is the “Common Lisp Object System”, arguably one of the most powerful object systems available in any language.Some of its features include: it is dynamic, making it a joy to work with in a Lisp REPL. For example, changing a class definition will update the existing objects, given certain rules which we have control upon.| Lisp journey
Q1 2018Documentation Paradigms of Artificial Intelligence Programming epub Models and Databases, with Mito and SxQL - the Common Lisp Cookbook Awesome Common Lisp learning list Announcements ELS2018 proceedings (PDF) SBCL 1.4.6 released SBCL 1.4.7 Released LispWorks 7.1.1 - Patches SBCL method-combination fixes SBCL method tracing $500 Bounty on Clozure/ccl Jobs Junior Lisp Developer, RavenPack, Marbella, Spain 3E : Lisp Developer - development, maintenance, design and unit testing of Synapti...| Lisp journey
Weblocks is a web framework, created circa 2007, that allows to write dynamic web applications in full Lisp, without a line of Javascript. It is based on so called widgets, that are rendered server-side and updated on the client, and it was also based on continuations (they were removed in this fork, at least for now). It was quietly being forgotten but it is being fixed, refactored, documented and simplified by Alexander “svetlyak40wt” since a year or so.| Lisp journey
Following is a tutorial on how to use the Mito ORM.As usual, this is best read on the Common Lisp Cookbook. It will be updated there.The Database section on the Awesome-cl list is a resource listing popular libraries to work with different kind of databases. We can group them roughly in four categories: wrappers to one database engine (cl-sqlite, postmodern, cl-redis,…), interfaces to several DB engines (clsql, sxql,…), persistent object databases (bknr.| Lisp journey
Documentation Multidimensional arrays – the Common Lisp Cookbook Error and condition handling - the Common Lisp Cookbook Scripting: parsing command line arguments, building self-contained executables - the Common Lisp Cookbook ASDF Best Practices for 2018 The Quicklisp local-projects mechanism How to distribute your software, not library, on Quicklisp ala python pip Common Lisp Brazil Community Awesome Lisp companies Announcing Quickref: a global documentation project for Common Lisp Announ...| Lisp journey
Common Lisp has mechanisms for error and condition handling as found in other languages, and can do more.What is a condition ? Just like in languages that support exception handling (Java, C++, Python, etc.), a condition represents, for the most part, an “exceptional” situation. However, even more so that those languages, a condition in Common Lisp can represent a general situation where some branching in program logic needs to take place, not necessarily due to some error condition.| Lisp journey
Common Lisp may have more libraries than you think. See: Quickdocs - the library documentation hosting for CL. the Awesome-cl list, a curated list of libraries. lisp-lang.org’s recommended libraries (from State of the CL ecosystem, 2015) Quicklisp is the de-facto package manager, but not the only tool.Some terminology first In the Common Lisp world, a package is a way of grouping symbols together and of providing encapsulation.| Lisp journey
What the heck are alists and plists exactly, how do we manipulate data structures ? It seems tedious sometimes, are there helpers ?Best read in the Cookbook.We hope to give here a clear reference of the common data structures. To really learn the language, you should take the time to read other resources. The following ones, which we relied upon, have many more details: Practical CL, by Peter Seibel CL Recipes, by E.| Lisp journey
The set of tools to do web scraping in Common Lisp is pretty complete and pleasant. In this short tutorial we’ll see how to make http requests, parse html, extract content and do asynchronous requests.Our simple task will be to extract the list of links on the CL Cookbook’s index page and check if they are reachable.Best read in the Cookbook !We’ll use the following libraries:| Lisp journey
I have recently edited and somewhat expanded the macros page on the Common Lisp Cookbook. I find it may more legible and reader friendly, so I reproduce it below (however, I cut two parts so than you get the essential).You’d better read it on the Cookbook: https://lispcookbook.github.io/cl-cookbook/macros.htmlThe word macro is used generally in computer science to mean a syntactic extension to a programming language. (Note: The name comes from the word “macro-instruction,” which was a u...| Lisp journey