cl4l

2017-04-03

cl4l

esoteric CL essentials

support

This project is running on a shoestring budget; please consider helping out, every contribution counts.

welcome

Welcome to cl4l. The project supports asdf and may be loaded by calling (ql:quickload "cl4l") once cl4l.asd is in the asdf search path. (cl4l-test:run-suite nil) runs all tests. Most of the code comes with inline documentation and basic tests, you may find more context and background in my blog. If you're still confused about something, or have ideas on how to improve the code; just open a Github issue and I'll have a look.

setup

cl4l is included in Quicklisp, evaluating (ql:quickload "cl4l") should get you started.

memoization

memoize.lisp implements general purpose memoization of arbitrary parameterized expressions.

iterators

iter.lisp implements an extensible iterator protocol on top of coroutines using conditions and restarts. They are currently around 3x slower than consing and reversing lists, 10x slower than using callbacks; while supporting infinite sequences without freaking out, and offering more call-site flexibility than callbacks.

transactions

trans.lisp implements general purpose transactions with commit- and rollback hooks.

tables

table.lisp implements hashed, optionally composite key/transacted tables with set operations, event hooks, index-/update and i/o support that offer significantly (currently hovering above 10x) better performance for set operations than built-in set functionality.

indexes

index.lisp implements ordered, optionally composite key/transacted/unique indexes with event hooks and i/o support that offer significantly (currently hovering around 20x) better performance for set operations than built-in set functionality.

databases

db.lisp implements minimal, embedded databases with tables and indexes.

fifo queues

fifo.lisp implements minimal fifo queues on top of lists.

semaphores

semaphore.lisp implements minimal semaphores on top of bordeaux-threads.

channels

chan.lisp implements buffered channels on top of fifo queues and semaphores.

multi-threaded generators

tiger.lisp implements an extensible multi-threaded generator protocol on top of channels. Since generators run in separate threads and batch items through channels; performance depends on batch size, scheduling and how well user code can make use of the parallelism; worst case is roughly 20x slower than iterators.

tasks

task.lisp implements cooperatively scheduled tasks on top of a Lispy interpretation of Duff's Device. Tasks are usually several thousand times faster than preemptive threads and quite probably the fastest approach to green threads in Common Lisp so far.

virtual DOM

html.lisp implements a basic virtual DOM with transaction support.

classification

bayes.lisp implements a general purpose Bayesian classifier that supports any kind of features and any number of classes. It's just as usable for classifying text based on language as emails based on subject category or badly formatted log entries based on severity.

tests

test.lisp implements a test framework using tags to group and trigger tests dynamically.

license

MIT

ps

You are perfect, immortal spirit; whole and innocent.
All is forgiven and released.

peace, out

Author
Andreas <codr4life@gmail.com>
License
MIT