Re: Sbcl-help Digest, Vol 211, Issue 1 RE: comments on output
steve gonedes <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <[email protected]> |
On 8/5/24 09:11, [email protected] wrote: > Send Sbcl-help mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/sbcl-help > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Sbcl-help digest..." > > > Today's Topics: > > 1. Reason behind semicolumns (i.e. "inline comments") in system > output? (Jan J.) > > > one use of comments for/debugging is to make copy and pasting easier. I always felt that they provided a more professional way of determining input from user vs output/input of the lisp. i think every lisp program and C program I have ever written has similar cruft. (defparameter *debugging-rules* t) (defmacro debugging-rules (msg &rest args) `(when *debugging-rules* (format *debug-io* ,msg ,@args))) (defun insert-new (tre fact) (assert fact () "Can't assert NIL.") (let ((dbclass (get-dbclass tre fact))) ;;; ----- (debugging-rules "~%;; insert-new fact: ~w" fact) ;;;; ------ (cond ((member fact (dbclass-facts dbclass) :test #'equal) nil) ((zerop (tre-depth tre)) (push fact (dbclass-facts dbclass))) ((member fact (tre-local-data tre) :test #'equal) nil) (t (push fact (tre-local-data tre)))))) I don't have any C at the moment but i use GCC and varadic macros and asprintf a whole lot. you must recompile the entire program when doing this though.