POSIX errexit is a terrible, no good, very bad thing because of its non-local action.
This file contains hidden or 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
fastcgi.server = ( ".cl" => | |
(( "socket" => "/tmp/cl-fastcgi.socket", | |
"bin-path" => "/path/to/init.cl", | |
)) | |
) |
This file contains hidden or 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
all: foo.out1 foo.out2 bar.out1 bar.out2 | |
foo.out1: foo.in | |
sh multiple.sh foo.in | |
foo.out2: foo.out1 | |
true | |
bar.out1 bar.out2: bar.in | |
sh multiple.sh bar.in |
This file contains hidden or 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 | |
usage() { | |
cat <<EOF >&1 | |
Usage: $1 [OPTION].. SRC DSTDIR | |
Recursively copy SRC to destination directory DSTDIR. | |
-f Create DSTDIR if it does not exist | |
-H FORMAT Use tar format FORMAT (default=pax) |
This file contains hidden or 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
(defvar *html-outstream*) | |
(defun index-body (&optional (outstream *html-outstream*)) | |
(cl-who:with-html-output (*html-outstream* outstream) | |
(:body (:main :class "wrapper" | |
(navigation) | |
(:header :class "header" :id "entrance" | |
(:section :class "container" :id "header" | |
(:img :src "/images/lambda-pink.png" | |
:height "45") |
This file contains hidden or 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
(defpackage ltk-first-example | |
(:use "CL" "LTK")) | |
(in-package "LTK-FIRST-EXAMPLE") | |
(defun gui () | |
(let ((ltk:*debug-tk* t)) | |
(with-ltk () | |
(wm-title *tk* "Feet to Meters") | |
(let ((c (make-instance 'frame))) |
This file contains hidden or 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
(defpackage rpn (:use :cl) (:export :rpn)) | |
(defpackage rpn-internal (:export :+ :print)) | |
(in-package :rpn) | |
(defgeneric rpn-eval (token &optional y)) | |
(defun rpn () | |
(rpn-eval (let ((*package* (find-package 'rpn-internal))) (read)))) |
This file contains hidden or 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 bit-ldb (vector byte-spec) | |
(loop | |
for idx downfrom (- (length vector) (byte-position byte-spec) 1) | |
for pos from 0 below (byte-size byte-spec) | |
unless (zerop (bit vector idx)) sum (ash 1 pos))) | |
(define-setf-expander bit-ldb (vector bytespec &environment env) | |
"Set some bits in a bit-vector to a value based on a bytespec" | |
(multiple-value-bind (dummies vals newval setter getter) | |
(get-setf-expansion vector env) |
This file contains hidden or 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
(loop for n from 0 | |
for next = 1 then (+ cur next) | |
for cur = 0 then next | |
when (= n 10) | |
return cur) |
This file contains hidden or 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
(cxml:parse #P"foo.xml" (cxml-xmls:make-xmls-builder)) ;;=> | |
;(("stream" . "http://etherx.jabber.org/streams") | |
; ((("lang" . "http://www.w3.org/XML/1998/namespace") "en") | |
; (("stream" . "http://www.w3.org/2000/xmlns/") | |
; "http://etherx.jabber.org/streams") | |
; ("version" "1.0") ("to" "localhost") | |
; ((NIL . "http://www.w3.org/2000/xmlns/") "jabber:client")) | |
; " | |
; " | |
; (("iq" . "jabber:client") |
NewerOlder