Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cl-sl

CI License: MIT Documentation

An original reimplementation of the classic Unix joke command sl (Steam Locomotive): mistype ls as sl and, instead of a shell error, an original hand-authored steam locomotive runs across the terminal and exits automatically once it scrolls off screen, rendered live via cl-tty-kit. Every sprite here is original art authored for this repository -- none of it is copied or transcribed from the classic sl.c train art. Targets SBCL only.

Full documentation is published at https://nerima-lisp.github.io/cl-sl/. The source for that site lives in docs/src/.

Quick Start

(asdf:load-system "cl-sl")

(cl-sl:run :accident-p t)
;; Fills the current terminal until the train exits or `q' is pressed.

Or, once built, from the command line:

cl-sl              # the default full-size train
cl-sl -a           # -a/--accident: a person appears in its path
cl-sl -l           # -l/--little: a shorter train pulling logs
cl-sl -F           # -F/--fly: the train's height oscillates as it crosses
cl-sl --fps 30

Install

As a command, from a checkout:

nix build              # -> ./result/bin/cl-sl
./result/bin/cl-sl -a

Or without cloning: nix run github:nerima-lisp/cl-sl.

As a library, from another flake:

# flake.nix
inputs.cl-sl = {
  url = "github:nerima-lisp/cl-sl/v0.1.0";
  inputs.nixpkgs.follows = "nixpkgs";
};

Note the pinned tag. Consumers inside this org must pin a release tag rather than follow the default branch. On a lispDependencies edge, read cl-sl.packages.<system>.cl-sl -- packages.default is the delivered binary, not the ASDF system.

Documentation

Development

nix develop          # SBCL with CL_SOURCE_REGISTRY already set
nix build            # -> ./result/bin/cl-sl
nix run .#test       # run the test suite
nix flake check      # tests + formatting + docs + paredit lint, the same gate CI uses
nix fmt              # format Nix sources (treefmt)
nix build .#checks.x86_64-linux.coverage --no-link --print-out-paths
                     # sb-cover HTML report for src/; open cover-index.html
                     # from the printed path. No pass/fail threshold -- see
                     # flake.nix.

Tests live in t/ and run under cl-weave, the org's test framework. nix flake check additionally runs paredit-cli's structural lint over every Lisp source file.

Contributing

See the org-wide CONTRIBUTING guide and the package standard.

Support

See SUPPORT.

License

MIT. See LICENSE.

About

An original Common Lisp reimplementation of sl: an ASCII-art steam locomotive that runs across the terminal

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages