Skip to content

Wrapper around clisp for fast script execution with (on demand compiled and cached) libraries.

Notifications You must be signed in to change notification settings

kisp/clisp-wrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

clisp-wrap

Wrapper around clisp for fast script execution with (on demand compiled and cached) libraries.

See also https://github.com/kisp/sbcl-wrap.

Building

$ cabal sandbox init
$ cabal install --only-dependencies
$ cabal build   

Then install dist/build/clisp-wrap/clisp-wrap to a convenient location, e.g. /usr/local/bin/clisp-wrap.

Usage example

Given a script foo.lisp:

#!/usr/local/bin/clisp-wrap alexandria puri --

(defpackage #:foo
  (:use #:cl #:alexandria))

(in-package #:foo)

(let ((list '(1 2 3)))
  (format t "Getting permutations of ~S via alexandria:~%"
          list)
  (map-permutations (lambda (x) (format t "~S~%" x)) list)
  (terpri))

(format t "Parsing a url via puri: ~S~%" (puri:parse-uri "http://example.com/"))

calling it for the first time will be slow:

$ time ./foo.lisp 
Getting permutations of (1 2 3) via alexandria:
(1 2 3)
(2 1 3)
(3 1 2)
(1 3 2)
(2 3 1)
(3 2 1)

Parsing a url via puri: #<PURI:URI http://example.com/>

real    0m6.040s
user    0m4.517s
sys     0m0.600s

but then:

$ time ./foo.lisp 
Getting permutations of (1 2 3) via alexandria:
(1 2 3)
(2 1 3)
(3 1 2)
(1 3 2)
(2 3 1)
(3 2 1)

Parsing a url via puri: #<PURI:URI http://example.com/>

real    0m0.048s
user    0m0.030s
sys     0m0.017s

The image is stored in ~/.cache/clisp-wrap.

About

Wrapper around clisp for fast script execution with (on demand compiled and cached) libraries.

Resources

Stars

Watchers

Forks

Packages

No packages published