This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun make-dfun-varname (fname) | |
(intern (format nil "*DFUN-~A*" fname))) | |
(defmacro dflet (fbindings &body body) | |
`(let | |
,(loop for fbinding in fbindings | |
collect | |
(destructuring-bind (fname args &body body) fbinding | |
(let ((dfun-varname (make-dfun-varname fname))) | |
`(,dfun-varname (cons (lambda ,args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# get <url> <destination> | |
get() { | |
url=$1 | |
destination=$2 | |
echo "Downloading ${url}..." | |
curl --no-progress-bar --retry 10 -o "$destination" -L "$url" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Implementation of syntax for symbols to be able to use spaces instead of '-' in them. | |
;; The default enclosing chars are '<' and '>'. | |
;; Example: | |
;; (defclass <My Class> (<Standard Object>) | |
;; ((<My Slot> :accessor <My Slot> | |
;; :initarg :my-slot))) | |
;; | |
;; (<with slots> (<My slot>) | |
;; (<make instance> '<My class> :my-slot "Value") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun read-separator (str) | |
(let | |
((*readtable* (copy-readtable *readtable* nil))) | |
(set-macro-character #\, (lambda (stream char) | |
(declare (ignore char) (ignore stream)) | |
'break)) | |
(read str nil))) | |
(set-macro-character #\{ | |
(lambda (str char) |
NewerOlder