19:48:19Biketechnically ERROR and so on only accept symbols
19:48:26Bikeanyway i was just wondering if anyone has ever actually used this
19:48:27pjbit's a subtype of condition in all implementations!
19:48:55Bikeno, i mean the function ERROR takes a condition designator, and a condition designator is either a symbol or a format control or a condition.
19:49:02pjbBike: error takes a condition n. 1. an object which represents a situation---usually, but not necessarily, during signaling. 2. an object of type condition.
19:49:39Bikeyes and the designators are clearly defined in 9.1.2.1 and specify a symbol, not any subtype. okay? okay. so does anyone actually use this thing.
19:49:58pjbThis is a great find! I've been definining conditions just to mix simple-condition with my errors!!!
19:50:43Bikewell if you did (make-condition '(and my-error simple-condition) ...) that could still just be an empty type.
19:52:05pjbBike: you're right about 9.1.2.1, but ERROR is specified to accept and OR type specifier, and MAKE-CONDITION is explicitely designed to accept it.
19:52:48Bikeerror is not specified to accept a type specifier.
19:53:08aethTangentially related, but I'd say the weakest part of the standard is conditions. Didn't someone here write their own destructuring-bind just to get a consistent cross-implementation condition there?
19:53:09pjbabcl, ccl and sbcl fail on (make-condition (quote (or type-error simple-condition)))
19:54:09aethBike: normally I'd also say maybe Bike knows, but...
21:58:17t58Hey I'm using slime with emacs is there a shortcut to close all the open parens? I'm sure there was one like C-c C-q or something like that but I can't find any reference to it online.
22:11:07LiamHIf you use insert-parentheses, you always get your close paren with your open paren.
22:17:43White_Flameand paredit is highly recommended, nearly always keeping things balanced (except for cut'n'paste)
22:18:04White_Flameincluding doublequotes, moving parens out of comments, etc
5:09:22p0aI can flatten later but is it easy to do it inside loop?
5:09:32beach(loop with result = '() for i in list do (loop for j in list do (loop for k in list do (push (list i j k) result))) finally (return result))
6:39:16pjb(defun combinations (list n) (cond ((zerop n) '()) ((= 1 n) (mapcar (function list) list)) (t (mapcan (lambda (rest) (mapcan (lambda (first) (list (cons first rest))) list)) (combinations list (1- n)))))) (combinations '(a b c) 3) #| --> ((a a a) (b a a) (c a a) (a b a) (b b a) (c b a) (a c a) (b c a) (c c a) (a a b) (b a b) (c a b) (a b b) (b b b) (c b b) (a c b) (b c b) (c c b) (a a c) (b a c) (c a c) (a b c) (b b c) (c b c) (a