Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use #+(or) to reliably comment out forms

  • Loading branch information...
commit f3faf98c3ba5b36c8e453ad37dd0d75f060b3743 1 parent 3c5fa01
ktilton authored
View
2  Use Cases/dow-jones/stock-exchange.lisp
@@ -55,7 +55,7 @@ weighted index value, and the last move of each index entry.
;; - always call CELLS-RESET when starting a test run
;; - (make-be ...) -> (to-be (make-instance ...))
;; - TO-BE jumpstarts a Cells instance into the flow. (FN to-be)
- #+not
+ #+(or)
(with-open-file (t-data (make-pathname
:directory '(:absolute "0dev" "cells" "Use Cases" "dow-jones")
:name "trades0504" :type "txt"))
View
18 cell-types.lisp
@@ -39,7 +39,7 @@
md-info)
(defmethod trcp ((c cell))
- nil #+not (and (typep (c-model c) 'index)
+ nil #+(or) (and (typep (c-model c) 'index)
(eql 'state (c-slot-name c))))
(defun c-unboundp (c)
@@ -89,7 +89,7 @@
(defstruct streamer from stepper donep to)
-#+notyet
+#+(or)
(defmacro c~~~ (&key (from 0)
stepper
(donep (c-lambda (> .cache (streamer-to slot-c))))
@@ -115,20 +115,6 @@
;;; (call-next-method c slot-value))))
;;; (c-optimize-away?! c))
-#+test
-(progn
- (defmodel streamertest ()
- ((val :accessor val :initform (c~~~ :from 0 :to (^oval)))
- (oval :initarg :oval :accessor oval :initform (c-in 0))))
-
- (def-c-output val ((self streamertest))
- (print `(streamertest old ,old-value new ,new-value)))
-
- (cell-reset)
- (let ((it (make-be 'streamertest :oval 5)))
- ;;(setf (oval it) 5)
- it))
-
(defstruct (c-drifter
(:include c-dependent)))
View
12 cells-test/boiler-examples.lisp
@@ -60,7 +60,7 @@
(cv-assert (eql :closed (vent b)))
))
-#+test
+#+(or)
(boiler-1)
;
@@ -157,7 +157,7 @@
(cv-assert (eql :closed (vent b)))
))
-#+test
+#+(or)
(boiler-2)
;;; ***********************************************
@@ -242,10 +242,10 @@
;;
;; de-comment 'trc statements above to see what is happening
;;
-#+test
+#+(or)
(boiler-3)
-#+test
+#+(or)
(boiler-4)
(defun boiler-5 ()
@@ -267,7 +267,7 @@
(incf (temp (thermometer b))))
(setf (status b) (case (status b) (:on :off)(:off :on))))))
-#+test
+#+(or)
(boiler-5)
@@ -287,4 +287,4 @@
(declare (ignorable syn))
(eko ("f-sensitivity relays")
(setf prior-fire-value new-value)) ;; no modulation of value, but do record for next time
- )))
+ )))
View
4 cells-test/echo-setf.lisp
@@ -43,5 +43,5 @@
:kids (c-in nil))))
(push (make-instance 'bings) (kids top))))
-#+test
-(cv-echo-setf)
+#+(or)
+(cv-echo-setf)
View
4 cells-test/hello-world-q.lisp
@@ -58,10 +58,10 @@
(setf (happen dell) :world)
(values)))
-#+test
+#+(or)
(hello-world)
-#+test
+#+(or)
(traceo sm-echo)
View
2  cells-test/hello-world.lisp
@@ -58,7 +58,7 @@
(setf (happen dell) :world)
(values)))
-#+test
+#+(or)
(hello-world)
View
8 cells-test/internal-combustion.lisp
@@ -100,7 +100,7 @@
(eql :diesel (setf (fuel (make-be 'engine :fuel :gas)) :diesel)))
;;
;;
- #+noterror ;; Cloucell needed to hold a Cell in a non cellular slot. duh.
+ #+(or) ;; not an error: Cloucell needed to hold a Cell in a non cellular slot. duh.
(cv-assert
(handler-case
(progn
@@ -246,7 +246,7 @@
;;
;;
- #+not (let ((e (make-be 'engine
+ #+(or) (let ((e (make-be 'engine
:mod3 (c-in 3)
:mod3ek (c-in 3)
:cylinders (c? (* 4 (mod3 self))))))
@@ -357,6 +357,6 @@
(cv-assert (not valves-fired))
(cv-assert (valves e))(cv-assert valves-fired)))
-#+test
+#+(or)
-(cv-test-engine)
+(cv-test-engine)
View
4 cells-test/lazy-propagation.lisp
@@ -35,7 +35,7 @@
(/ 1000 (^area))) :initarg :density :accessor density)))
-#+test
+#+(or)
(cv-laziness)
(defun cv-laziness ()
@@ -73,7 +73,7 @@
(chk 4 1)
it))))
-#+test
+#+(or)
(cv-laziness)
(def-c-output area ()
View
4 cells-test/output-setf.lisp
@@ -32,7 +32,7 @@
(bwhen (p .parent)
(with-deference
(setf (bang p) new-value)))
- #+not (dolist (k (^kids))
+ #+(or) (dolist (k (^kids))
(setf (bang k) (if (numberp new-value)
(1+ new-value)
0))))
@@ -53,5 +53,5 @@
(dolist (k (kids (car (kids top))))
(setf (bang k) (kid-no k)))))
-#+test
+#+(or)
(cv-output-setf)
View
6 cells-test/person.lisp
@@ -286,7 +286,7 @@
(trc "start guarded cyclic")
- #+not (cv-assert-error
+ #+(or) (cv-assert-error
(let ((tk (make-be 'talker)))
(setf (idea tk) "yes")
(cv-assert (string-equal "yes" (words tk)))
@@ -298,9 +298,9 @@
;; is being given the same value it already has, and propagation stops.
;;
(make-be 'talker8)
- #+not (let ((tk (make-be 'talker8)))
+ #+(or) (let ((tk (make-be 'talker8)))
(setf (idea8 tk) "yes")
(string-equal "yes" (words8 tk))
(setf (words8 tk) "no")
(string-equal "no" (idea8 tk)))
- )
+ )
View
8 cells-test/test-family.lisp
@@ -83,7 +83,7 @@
(pop (kids mom))
(nat-age 40))))
-#+test
+#+(or)
(cv-test-family)
@@ -119,7 +119,7 @@
(defmodel bottle (model)
((label :initarg :label :initform "unlabeled" :accessor label)))
-#+test
+#+(or)
(cv-family-values)
(defun cv-family-values ()
@@ -154,5 +154,5 @@
))
-#+test
-(cv-family-values)
+#+(or)
+(cv-family-values)
View
2  cells-test/test-lazy.lisp
@@ -116,4 +116,4 @@
(unbound-error-p (md-slot-makunbound self 'val2))))
2 nil nil)
-#+test (do-tests)
+#+(or) (do-tests)
View
2  cells-test/test.lisp
@@ -74,7 +74,7 @@
(cv-test-lazy))))
-#+test
+#+(or)
(progn
(let ((*c-debug* t))
(cell-reset)
View
2  cells.lisp
@@ -58,7 +58,7 @@
(defmacro c-assert (assertion &optional places fmt$ &rest fmt-args)
(declare (ignorable assertion places fmt$ fmt-args))
- `(progn) #+not
+ `(progn) #+(or)
`(unless *stop*
(unless ,assertion
,(if fmt$
View
2  doc/hw.lisp
@@ -54,7 +54,7 @@
(setf (salutation system) "hiya")
(values)))
-#+test
+#+(or)
(hello-world)
#| output
View
2  family.lisp
@@ -159,7 +159,7 @@
(c-assert (not (member nil new-kids)))
(trc nil "md-kids-change > entry" usage new-kids old-kids)
- #+not (when (and (trcp self)
+ #+(or) (when (and (trcp self)
(eql usage :mdslotvalueassume))
(c-break "how here? ~a" self))
View
2  integrity.lisp
@@ -85,7 +85,7 @@ to avoid warning that setf is being deferred"
(ufb-add opcode (cons (cdr defer-info) action))
(when (and (not *deference-acknowledged*)
(member opcode '(:setf :makunbound)))
- #+not (error 'c-opcode-deferred
+ #+(or) (error 'c-opcode-deferred
:defer-info defer-info)
(trc nil "!!! New pulse, event" *data-pulse-id* defer-info)))
(funcall action))
View
2  link.lisp
@@ -22,7 +22,7 @@
(in-package :cells)
-#+not
+#+(or)
(eval-when (compile load)
(proclaim '(optimize (speed 3) (safety 0) (space 0) (debug 0))))
View
15 test.lisp
@@ -108,21 +108,6 @@ subclass for them?)
(kids i)))
(trc "index total" (md-value i))))
-#+test
-(let* ((a (make-array 16 :element-type 'bit
- ;;:adjustable t
- :initial-element 0))
- (asz (array-dimension a 0)))
- (DESCRIBE A)
- (inspect a)
- (print a)
- (dotimes (n 20)
- (print n)
- #+not (unless (< n asz)
- (adjust-array a (incf asz 16) :initial-element 0))
- (setf (sbit a n) 1))
- a)
-
(defmodel m-null ()
((aa :initform nil :cell nil :initarg :aa :accessor aa)))
View
2  utils-kt/debug.lisp
@@ -159,7 +159,7 @@
(defmacro count-it (&rest keys)
(declare (ignorable keys))
- #+not `(progn)
+ #+(or) `(progn)
`(when *counting*
(call-count-it ,@keys)))
View
2  utils-kt/detritus.lisp
@@ -71,7 +71,7 @@
(loop until (fifo-empty q)
do (funcall fn (fifo-pop q))))
-#+test
+#+(or)
(let ((*print-circle* t))
(let ((q (make-fifo-queue)))
(loop for n below 3
View
2  utils-kt/strings.lisp
@@ -143,7 +143,7 @@
(or (null s)
(if (stringp s)
(string-equal "" (trim$ s))
- #+not (trc nil "empty$> sees non-string" (type-of s)))
+ #+(or) (trc nil "empty$> sees non-string" (type-of s)))
))
(defmacro find$ (it where &rest args)
Please sign in to comment.
Something went wrong with that request. Please try again.