Skip to content

My personal collection of Common Lisp utilities

Notifications You must be signed in to change notification settings

OlafMerkert/ol-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ol-utils

In this place I collect all the little lisp functions and utilities which seem to be of general use in different projects. I took a lot of inspiration from ”On Lisp” by Paul Graham, and ”Let Over Lambda” by Doug Hoyte (both books heavily recommended).

The goal of this system is to provide some personalised/personalisable lisp utilities for myself. Originally, everything should be self-contained (without any dependencies), however mid-term I would like to replace custom implementations with imports from other utility packages.

available systems/packages

ol-utils

The main package which contains almost all the utilities. It has the nickname :OL, in analogy to :CL. There is also the :OL-USER package, which I use as default REPL package instead of :CL-USER.

It depends on some packages (available through Quicklisp):

ol-data-utils

Utilities for CL-PREVALENCE (setting up stores) and functions for printing and parsing dates for LOCAL-TIME

ol-sql-utils

Some utility functions for working with CLSQL, mainly related to date queries. It bridges between LOCAL-TIME data types and CLSQL data types.

read-macros

I adapted a few of those suggested in “Let Over Lambda”, and have used them frequently.

The read-macros are loaded by default, probably loading the standard readtable should get rid of them again.

Philosophy

When working on particular projects, I sometimes write general utilities (as needed). When cleaning up code, they get proper documentation and get moved into the ol-utils project.

As ol-utils is used in all my projects, it provides a consistent environment for me when programming Common Lisp.

Functionality

packages
basics
string and symbol building, list utilities required for macros
reader
read macros
macrodef
defmacro! and friends
binding
shorter aliases for binding macros
conditionals
while% and related
anaphoric
my favourite anaphoric macros
setf
sequences
functions
composition and variation of lambda
lists
list building/transformation and access, queues and custom mapping functions
trees
basic tree walking
memoisation
memoisation functions/macros using both hash-tables and arrays
lazy
lazy evaluation and pipes
arrays
(sub)array iteration and filling (also for multidimensional arrays)
lazy-array
infinite length arrays (vectors), see also math-utils
nlazy-array
lazy array API ported to normal arrays
infinite
a simpler approach to infinite arrays
strings
arithmetic
tables
hash-table access helper, converting between alists and hash-tables
clos
files
iterating on lines of a file
applications
a function to quickly launch my lisp applications
portability

Tasks

reuse utilities from other projects

Check out Alexandria and other utility collections.

write tests for more complicated functions

A large part functions are so simple that testing does not make sense. It is unlikely I would change them, and their correctness is obvious from the definition.

However testing would be a good idea for some of the more complicated functions.

check completeness of documentation

add proper license

also a header for each file

check for unused functions

collect utilities from my other projects

About

My personal collection of Common Lisp utilities

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published