P
Every repository I keep has one file in its root called maak.scm, and that file is the project’s control plane. It builds, tests, lints, formats, serves, deploys, packages, releases and writes documentation. If a command matters to the project, it is a task in that file; if it is not in that file, it is a command somebody remembers, which means it is a command that will be forgotten. Maak is a task runner à la Make whose task list is a Guile Scheme module. That one sentence is the whole design.…
P
Writing the program is half the work. The other half is making it installable by somebody who did not build it, on a machine you have never seen, with a toolchain you do not control. That second half is packaging, and it is where a lot of free software quietly stops. A repository with a good README and no package asks every user to become a builder. Most people will not. The ones who do will build a slightly different thing than you did, in a slightly different environment, and some of them…
P
I do not install a toolchain on a machine any more. I describe one in the repository, and enter it. That decision has a cost and a payoff that are easy to state. The cost is four files per project and a little discipline about pins and hashes. The payoff is that a checkout from three years ago still builds, that CI runs the same commands I run, and that a contributor does not need a paragraph of installation instructions before the first maak check. There is no “works on my machine” left to…
P
I do not open an editor to write code. I open a Lisp machine that happens to have my project in it. That sentence sounds like a slogan until you use a configuration where it is literally true. In heks-emacs every module is an Emacs Lisp file, the key scheme is a data table, the documentation of the keys is written from that table, the package set is a lock file in the repository, and the checks that hold all of it together are Guile programs run through Maak. When something is wrong I can read…
P
Olive CSS generates a utility-class stylesheet from a Guile program. You write the class names you already know from Tailwind, and one plain CSS file comes out. I wrote it because I was tired of installing a JavaScript toolchain to produce a file whose entire job is to contain CSS. The generator is a Guile library, so a build is a function call with the colours, breakpoints and variants you want, and everything between the palette and the stylesheet is code I can read. Tailwind’s syntax, a Lisp…
P
SRFI 266 is now in final status.The syntax expr allows Scheme programmers to write arithmetic expressions using a syntax similar to mathematical notation, potentially improving the readability of Scheme programs.
P
sift is one Guile program: a formatter, a linter and a language server for Scheme, Racket, Emacs Lisp and Common Lisp. It has 95 rules, formatting is idempotent, and it runs in your editor, your terminal, CI, a container and a browser tab. I’ve been writing Lisp for a few years, and for most of that time my tooling was a pile of workarounds. Two editors disagreed about indentation. CI formatted the code one way and my editor another. A compiler warning was prose: no stable code, no severity, no…
P
Update, 29 November: The suspension has now been reversed and I received an apology from the mastodon.social moderation team. They acknowledged having made a mistake, and say there is a discussion internally on how to prevent the mistake recurring. My fediverse account, @dpk@swhack.com, has been suspended on the largest Mastodon instance, mastodon.social, for unclear reasons since roughly Tuesday 24 November. This apparently means that if you have your account on mastodon.social and I was…
P
Updating named-let: ignored bindings, multi-form inits, and more named-let is a small Common Lisp library of Scheme-inspired binding macros: named-let, named-lambda, letrec, letrec*, flambda, and a Lisp-1 style define. It also provides an extended let that you can shadow-import in place of the standard one. This post describes a round of changes to the library: a new way to ignore bindings, clarified handling of multi-form bindings, a bug fix, and improvements to documentation and tests.…
P
Here is a shell script for having the Music Player Daemon trigger events. It shells out to mpc and this example config also shells out to kasa, a lamp control app. In the example, each album in the playlist has its own mood lightning. You can get fancy and add --transition flags, perhaps starting the transition by %position% of the previous album’s last song and prepending a sleep such-and-such-many seconds; rather than by %album%.The script is meant to run in the background or with dtach or…
P
This year's Autumn Lisp Game Jam has just wrapped up! Spritely's contribution to the jam was Polydraw, a peer-to-peer party game that is easy to pick up and play with friends. In Polydraw, players take turns being the artist who draws an image based on a prompt. The catch is that the artist only has 60 seconds and can only draw using triangles. All of the other players are guessers who try to correctly guess the prompt. We're quite pleased with how the game turned out! The rest of this post is…
P
SRFI 289 is now in draft status. Sets and bags (also known as multisets) are unordered collections that contain only objects of a type given by a collection’s SRFI 128 comparator. Every element of a set is unique (in the sense of the set’s comparator), but bags can contain any number of duplicate elements. This SRFI is a revision of SRFI 113 that fixes several infelicities and is more consistent with related SRFIs.
P
SRFI 272 is now in final status. This SRFI follows the traditional Scheme model of pretty printing, which treats it as a process distinct from general controlled formatting. While general-purpose formatters often prioritize specialized presentation at the expense of machine-readability, Scheme’s pretty-printers (such as those of SLIB and MIT Scheme) have traditionally treated pretty printing as a variant of write, differing primarily in the insertion of whitespace to make the presentation more…
P
SRFI 279 is now in final status. Interactive REPL-driven systems (that most Schemes are) need a way to get detailed information on a given piece of data. Inspectors, as these are conventionally called. This SRFI defines a basic protocol for inspectors, consisting of three procedures: inspect-properties, inspect-property, and inspect-describe. Some suggestions for standard and popular types’ inspection are also provided.
P
We are excited to announce the release of Hoot 0.10.0! Hoot is a Scheme to WebAssembly compiler backend for Guile, as well as a general purpose WebAssembly toolchain. In other words, Scheme in the browser! This release contains new features and bug fixes and since the 0.9.0 release back in May. Use Hoot in the upcoming Lisp Game Jam! On Friday (October 30th 2026), the autumn edition of the Lisp Game Jam will begin! It's a 10-day long game jam where participants make games using their favorite…
P
SRFI 265 is now in final status.This SRFI defines a language to describe control-flow graphs (CFGs) suitable for formulating iterative and recursive algorithms. Using the notion of a CFG term, this language can be seamlessly embedded in the Scheme language. Complex CFG terms can be composed from simple CFG terms. The language described in this SRFI is not meant to be directly used in programs but by library authors to build abstractions like loop facilities on top of it.
P
SRFI 242 is now in withdrawn status. This SRFI defines a language to describe control-flow graphs (CFGs) suitable for formulating iterative and recursive algorithms. Using the notion of a CFG term, this language can be seamlessly embedded in the Scheme language. Complex CFG terms can be composed from simple CFG terms.
P
SRFI 288 is now in draft status. A condition object system is introduced that attempts to be implementable in and interoperable with many implementation’s condition systems, including the condition system of the R6RS. The condition system includes compound conditions, but does not include subtyping of conditions. Simple conditions can be any implementation-defined value, and are also objects that can be made with the interface in this SRFI. An implementation may add other features, such as…
P
Akku.scm version 1.2.0, the language package manager for R6RS and R7RS Scheme, is now generally available. It can be downloaded from GitLab. The most important change is a fix to the dependency solver, which was running very slowly due to a bug triggered by the many versions of the chez-srfi package. Akku is a project-based package manager, where each project has its own set of dependencies. You use .akku/env to set shell variables that let your Scheme implementation know where to find…
P
OrgWebAlchemy is a Guile library that parses Org mode with a Parsing Expression Grammar and renders it to HTML, Markdown, or SXML. I wrote an earlier article about why a PEG is the right tool for Org: the grammar describes the language, the parser builds a tree, the renderers turn that tree into output. This is the follow-up, and it turned into a harder question than I expected: how do you make a parser fast without making it wrong? I didn’t want something that’s quick on my test files and…
P
I’ve been slowly turning my Emacs config into something I actually enjoy using, not just something that works, and folding was the last place where that wasn’t true. Every mode had its own idea of what folding is: treesit-fold in Tree-sitter modes, Hideshow in the Lisp-ish ones, Outline in everything that resembles text, Org with its own invisible text that no one else’s commands can undo. So every buffer had different keys, a different look, and worst of all different performance…
P
SRFI 278 is now in final status. This SRFI defines procedures on Scheme numbers that aim to improve the portability and usefulness of Scheme arithmetic. These procedures include predicates with extended domains, hyperbolic and inverse hyperbolic functions, the R6RS numeric tower, and additional procedures for rounding. Also included are recommendations and justifications for mixed inexact/exact arithmetic to make complex number arithmetic more predictable.
P
SRFI 287 is now in draft status.This SRFI proposes a programming interface for working with graphs, based on Martin Erwig’s functional graph library design. The FGL design takes a rather different view of graphs from most graph presentations, in that the data structures are persistent, which is a good fit for Scheme. The interface is generic to any node and edge label data-type, as long as a SRFI 128 comparator can be specified.
P
SRFI 275 is now in final status.This SRFI proposes a programming interface for working with RFC 3986 universal resource identifiers (URIs), as well as RFC 3987’s generalization to internationalized resource identifiers (IRIs). This document defines record types, normalization procedures, and conversion between URIs and IRIs. The proposal also specifies a basic programming interface for working with paths in isolation, as this is a pervasive usage of URIs and IRIs. Finally, we contribute a test…
P
Creating a direct connection between any two computers (not just from client to server) over the internet is notoriously difficult. Many home networks are behind NATs which prevent new inbound connections. Sometimes these NATs are from the ISP (carrier-grade NATs) which are impossible to work around with port forwarding and/or UPnP. While hole punching techniques can break through NATs, it's far from guaranteed. Thus, we need something that works in the general case: relays. Relays are servers,…
P
On or before August 10th, a macOS system at Northwestern University which builds and hosts Racket snapshots was compromised. The attackers installed a crypto miner, which was detected by Northwestern network monitoring. By August 18th, the machine was fully deactivated, and was subsequently wiped. After our investigation, there is no evidence that the attackers did anything other than install a crypto miner, or that they knew the system was connected to the Racket project, or that they used…
P
Ports and adapters, also called hexagonal architecture, is the pattern I reach for when a system has rules worth protecting, and the pattern I refuse when it has none. This article is the map between those two cases. If you have read Hexagon of Doom, you know the other half of the argument: on a small service with a thin domain, the hexagon is pure indirection, and the indirection costs more than the boundary buys. On the tech radar, ports and adapters now sits in Adopt, with exactly that…
P
SRFI 286 is now in draft status. R7RS Scheme allows programs to query library presence at macro-expansion time using (cond-expand ((library ⟨library name ⟩) ...)). However, when an implementation ships a shared library tree across interpreters built with different feature configurations, or when third-party libraries depend on conditionally present implementation features, standardizing library presence detection becomes problematic. This proposal specifies library mask files (mask.slm), a…