1 Overview and Etymology
1.1 Definition as a Build System
ASDF (Another System Definition Facility) is a build system and dependency manager for Common Lisp. It simplifies the process of loading, compiling, and managing software components called “systems.” Developed in the early 2000s, ASDF has become the de facto standard for organizing Common Lisp projects, analogous to tools like Make, Maven, or Cargo in other programming ecosystems. It handles system definitions, transitive dependencies, and compilation order, and is integrated into most Common Lisp implementations.
1.2 Origin of the Name "ASDF"
1.2.1 "Another System Definition Facility"
The name “Another System Definition Facility” follows a common Unix tradition of recursive or self‑deprecating acronyms (e.g., “GNU” for “GNU’s Not Unix”). The first implementation was written by Daniel Barlow and later maintained by others. It was intended to replace earlier, less flexible system definition tools.
1.2.2 Relationship to Placeholder Text and Keyboard Home Row
The four letters A, S, D, and F are the left‑hand home‑row keys on a QWERTY keyboard. This coincidence led to the acronym being widely repurposed as placeholder text (similar to “Lorem ipsum”) and as a popular internet meme. The letters are often typed rapidly in sequences to represent keyboard smashing or random typing.
2 Core Concepts and Architecture
2.1 Systems and Components
In ASDF, a *system* is a logical unit of software, typically a library or application. Each system is composed of *components*, which can be source files, modules, or other subsystems. Components are organized in a tree‑like dependency hierarchy.
2.1.1 System Definitions (.asd files)
Every system is defined in a file with a .asd extension. This file contains a call to defsystem, specifying the system’s name, version, dependencies, components, and metadata. ASDF reads these definitions to understand how to load and compile the code.
2.2 Dependency Resolution
ASDF automatically resolves transitive dependencies. When a system is loaded, ASDF creates a dependency graph, orders the required systems and components, and loads them in the correct sequence.
2.2.1 Defsystem
defsystem is the macro used inside .asd files to declare a system. It accepts keyword arguments such as :depends-on, :components, :serial, and :version. For example:
(defsystem "my-library"
:depends-on ("alexandria" "cl-ppcre")
:components ((:file "package")
(:file "core" :depends-on ("package"))))
2.2.2 Load Order and Compilation
ASDF determines load order based on explicit dependencies and the :serial flag. By default, components are compiled and loaded in the order they are listed. If :serial t is specified, each component is processed after its predecessor, ensuring that earlier definitions are available to later files.
2.3 Integration with Common Lisp Implementations
Most Common Lisp implementations (e.g., SBCL, Clozure CL, Allegro CL, LispWorks) ship with ASDF bundled. ASDF provides implementation‑specific hooks for compiling and loading foreign code, and it respects each implementation’s native compile‑file and load‑file operations.
2.3.1 Quicklisp and ASDF
Quicklisp is a package manager for Common Lisp that builds on top of ASDF. Quicklisp distributes libraries as ASDF systems, allowing users to install and load them with a single command. Quicklisp automatically handles transitive dependencies by using ASDF’s resolution mechanism.
3 Usage and Workflow
3.1 Loading a System (asdf:load-system)
The primary way to load a system is by calling (asdf:load-system :system-name). This function locates the system definition, resolves its dependencies, and then compiles and loads all necessary files. It can be invoked from the REPL or in a script.
3.2 Defining a New System
To define a new system, create a .asd file in a directory known to ASDF. The file must contain a defsystem form. The simplest example:
(defsystem "hello-world"
:components ((:file "hello")))
The corresponding hello.lisp file contains the actual Lisp code.
3.3 Managing Multiple Systems with Registries
ASDF searches for .asd files in a list of directories called *registries*. Users can modify the variable asdf:*central-registry* or configure ASDF to scan source‑registry directories. Tools like Quicklisp automatically manage the registry.
3.4 ASDF Extensions and Plugins
ASDF supports extensions that modify its behavior. Examples include:
- asdf‑finalizers: Run custom code after a system is loaded.
- asdf‑encodings: Handle source files with non‑standard character encodings.
- asdf‑package‑inferred: Automatically infer system components from files and packages.
Extensions are themselves ASDF systems that are loaded before use.
4 Historical Development
4.1 Early Versions (ASDF 1)
The first version of ASDF was released around 2001 by Daniel Barlow. ASDF 1 introduced the basic defsystem syntax and dependency resolution. It quickly replaced earlier tools such as mk:defsystem and became the recommended way to distribute Common Lisp code.
4.2 ASDF 2 and 3
ASDF 2 (2009) introduced significant improvements: a more robust directory registry, support for versioned dependencies, and better integration with implementation internals. ASDF 3 (2012) added portability across implementations, the :serial component option, and the ability to define systems in memory without .asd files.
4.3 ASDF 4 and Modern Features
ASDF 4 (released in the late 2010s) focused on streamlining the codebase, improving performance, and reducing implementation‑specific workarounds. It introduced the concept of “bundle” operations, allowing systems to be compiled into standalone executables or shared libraries. ASDF 4 also deprecated many older interfaces in favor of simpler functions.
5 Related Tools and Ecosystems
5.1 Quicklisp Package Manager
Quicklisp, created by Zach Beane, is the most widely used package manager for Common Lisp. It downloads and installs libraries as ASDF systems. Quicklisp maintains a comprehensive repository (the “Quicklisp distribution”) that is updated quarterly.
5.2 cl-launch and Build Tools
cl‑launch is a shell‑level tool that facilitates building and running Common Lisp programs from the command line. It uses ASDF to locate systems and can produce standalone executables. Other build tools like buildapp and sb-ext:save-lisp-and-die also rely on ASDF for loading dependencies.
5.3 Roswell (Lisp Scripting)
Roswell is a scripting environment for Common Lisp that bundles ASDF, Quicklisp, and other utilities. It allows users to write Lisp scripts that can be executed like shell scripts, with automatic dependency resolution via ASDF.
6 Cultural and Internet Phenomenon
6.1 "ASDF" as Keyboard Smashing
Outside programming, the string “asdf” is famously used as a placeholder for random text or to simulate keyboard smashing. It originates from typing‑practice programs (e.g., Mavis Beacon Teaches Typing) where home‑row drills often involve a s d f. The term “asdf” has become synonymous with nonsensical keyboard input.
6.2 Memes and Typing Tests
On social media and forums, “asdf” is frequently used as a comment to indicate a lack of content or to mock random typing. It appears in memes, such as the “ASDF Movie” series (song parodies and short animations) and in reaction images. Many typing‑test websites assess the number of “asdf” sequences a user can type in a minute as a fun benchmark.
6.3 In Popular Culture and Social Media
The acronym has entered general internet slang. For instance, “asdfghjkl;” (extending the home‑row keys) is used to express frustration or excitement. ASDF references appear in videos, tweets, and chat applications, often divorced from the original Common Lisp meaning.
7 See Also
- Common Lisp
- Dependencies (software)
- GNU Make
- Keyboard layout
- Lorem ipsum
- Package manager
- QWERTY
8 References
- Barlow, D., et al. *ASDF Manual* (current version). Available at https://asdf.common-lisp.dev/.
- Beane, Z. *Quicklisp: A Library Manager for Common Lisp*. https://www.quicklisp.org/.
- Rhodes, C. *Common Lisp: A Gentle Introduction to Symbolic Computation* (chapters on system definitions).
- “ASDF: Another System Definition Facility.” *Common Lisp Wiki*. https://cliki.net/ASDF.
- “ASDF (Keyboarding).” *Know Your Meme*. https://knowyourmeme.com/memes/asdf.