Skip to content
/ sigma Public

This is a collection of general utilities that is shared by most of my Lisp code. I am providing it under a BSD-style license.

Notifications You must be signed in to change notification settings

cgore/sigma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Christopher Mark Gore nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Introduction

This is a library of utility functions that I use in ANSI Common Lisp. I find them useful, and hopefully you will too. Most of the code should work in any ANSI Common Lisp, but I use SBCL exclusively and some of the code will assume that and only work there. You will need a working and modern ASDF system.

How To Use

First we need to clone the utilities.

 % mkdir -p ~/programming/lisp
 % cd ~/programming/lisp
 % git clone [email protected]:cgore/sigma.git

Now we need to make a directory for our project and symlink to the ASDF definition. There are other ways to load ASDF libraries, especially if you want to have them available globally; I strongly recommend you read the documentation to ASDF.

 % mkdir our-new-project
 % cd our-new-project
 % ln -s ~/programming/lisp/sigma/sigma.asd

Now we need to start up our Lisp REPL. The best way to do this for perfonal use is SLIME from within Emacs, but I will demonstrate using the shell itself here.

 % sbcl

Now we are in SBCL.

 (require :asdf) ; Require ASDF
 (asdf:operate 'asdf:load-op 'sigma) ; Require the system via ASDF.
 (sigma:use-all-sigma) ; This will pollute COMMON-LISP-USER
 (sum (loop for i from 1 to 100 collect i)) ; Returns 5050 and makes Euler sad.

Have fun!

About

This is a collection of general utilities that is shared by most of my Lisp code. I am providing it under a BSD-style license.

Resources

Stars

Watchers

Forks

Packages

No packages published