-
Notifications
You must be signed in to change notification settings - Fork 3
updating sbcl & slippery chicken
SBCL is regularly updated, which is great.
Installing and updating via homebrew makes this really convenient.
Deleting all your .fasl
installation files and rebuilding slippery chicken with the latest SBCL, however, is time consuming and inelegant.
I'm a lazy programmer, so I wrote the following script to save me precious seconds.
The following code uses the wonderful UIOP library (which comes installed as part of recent SBCL releases by default). It looks inside all of the "bin" directories that you supply (for sc with optional CMN & CLM) and deletes any .fasl
files. When you relaunch you lisp with M-x slime
, slippery chicken gets re-compiled with the latest version of SBCL.
(rm-fasl-files "~/sc/bin"
:cmn-bin "~/lisp/cmn"
:clm-bin "~/lisp/clm-5"
:simulate nil)
The above code on my mac returns:
Deleted 77 files in /Users/danieljross/sc/bin
Deleted 21 files in /Users/danieljross/lisp/cmn
Deleted 15 files in /Users/danieljross/lisp/clm-5
=>
("/Users/danieljross/sc/bin" "/Users/danieljross/lisp/cmn"
"/Users/danieljross/lisp/clm-5")
Set :simulate
to t
if you want to run this code without actually deleting anything.
Copy and paste the code below into your REPL, or, save it as a file and load it.
Any problems, raise an issue.
I keep a copy of this here.
(require 'uiop)
(defun rm-fasl-files (sc-bin &key cmn-bin clm-bin simulate)
"Remove .fasl files from slippery chicken, CMN and CLM-5 folders"
(let ((dir-list (list sc-bin)))
(when cmn-bin (push cmn-bin dir-list))
(when clm-bin (push clm-bin dir-list))
(loop for dir in (reverse dir-list)
with ok = '()
with wild-dir do
(setf dir (uiop:native-namestring dir))
(if (not (probe-file dir))
(error "~%sc-rebuild: ~a is not a valid directory" dir)
(setf wild-dir
(make-pathname :directory
(list :absolute dir)
:name :wild :type "fasl")))
(loop for file in (directory wild-dir)
with count = 0 do
(unless simulate
(delete-file file)
(incf count))
finally
(return
(format t "~%Deleted ~a files in ~a" count dir)))
(push dir ok)
;; return list of directories
finally (return (reverse ok)))))
- which instruments are available in the standard instrument-palette?
- how can I change the default directory for output?
- how can I change the range of instruments in the standard instrument-palette?
- how can I stop (or start) slippery chicken from opening score files automatically?
- how do I make a one-note rthm-seq with a chord?
- set-limits by section
- empty bars
- combining bars
- combining chopped and unchopped rthm-seq palettes
- how can I 'roll-my-own' slippery-chicken
- graphics files as marks
- three-quarter tone accidentals
- what to do when lilypond fails?
- tuplets with colons e.g 7:6