Commit 4a0478ef authored by Dave Cooper's avatar Dave Cooper
Browse files

making linux gendl build

parent 46733fbd
......@@ -797,7 +797,9 @@ If you specify :part-symbol-supplied, do not specify :instance-supplied."))
(pretty-definition
()
(let ((*package* (find-package (the part-package))))
(let ((*package* (find-package (the part-package)))
;;(*print-case* :downcase)
)
(html-stream *stream*
(:pre
((:div :class "gdl-object-def")
......@@ -841,7 +843,8 @@ If you specify :part-symbol-supplied, do not specify :instance-supplied."))
(:princ (if (and (the first?) (the parent first?))
"" " "))
(:princ (if (member (the section category) (list :required-input-slots)) "" "("))
((:span :class "gdl-message-name") (:princ (the message-name))))
((:span :class "gdl-message-name")
(:princ (the message-name))))
(if (the objects?)
......
......@@ -54,6 +54,43 @@ prog1 is also available, which returns the return-value of the first form</i>."
(prog1 (broadcast-apology)
(shut-down-rocket)))
:return-value "Countdown has been broadcast")))))
(:title "<tt>progn</tt> and <tt>prog1</tt>"
:bullet-points
((:description "Note the use of <tt>progn</tt> and <tt>prog1</tt> in the previous example.")
(:description "Some places in CL (e.g. the <i>test</i>,
<i>then</i>, and <i>else</i> clauses of an <tt>if</tt>
statement) accept only a single expression.")
(:description "In such places, <tt>progn</tt> can be
used to group expressions to be evaluated in the order
they are listed, with the return-value of the last
expression being the final return-value from the
progn.")
(:description "In such places, <tt>prog1</tt> can be
used to group expressions to be evaluated in the order
they are listed, with the return-value of the first
expression being the final return-value from the
progn.")
(:description "Other places in CL accept a <i>body</i>
of code (e.g. inside a function definition or inside a
<tt>let</tt>), where expressions are evaluated in the
order they are listed, with the return-value of the
last expression being the final return-value of the
code body.")
(:description "No <tt>progn</tt> or <tt>prog1</tt> is
needed to surround such a body of code.")
(:description "The <i>only</i> time it makes sense to
have a <tt>progn</tt>, <tt>prog1</tt>, or more than one
expression in a body of code, is when some local or
global side-effect is happening (i.e. you are modifying
a value or performing some output).")))
(:title "When"
......
......@@ -157,7 +157,7 @@ is evaluated, and its result is passed as an argument")
(:description
"No ambiguity or precedence rules to remember regarding Order of Operations")
(:description
"Any number of arguments"
"Functions potentially can take any number of arguments (including zero)"
:examples
((:code
(+)
......@@ -166,25 +166,47 @@ is evaluated, and its result is passed as an argument")
(:code
(+ 1)
:return-value
1)))))
1)))
(:description
"Functions can also have certain required arguments"
:examples
((:code
(/ 2)
:return-value
1/2)
(:code
(- 2)
:return-value
-2)))
(:description "Most modern CL development
environments (e.g. Slime) will tell you what are the required
arguments (if any) when you insert a function name.")))
(:title
"Turning off Evaluation"
:bullet-points
((:description
"(+ 1 2) evaluates to 3")
"<tt>(+ 1 2)</tt> evaluates to 3")
(:description
"Sometimes you want to turn off expression evaluation")
(:description
"(quote (+ 1 2)) evaluates to (+ 1 2)")
"<tt>(quote (+ 1 2))</tt> evaluates to <tt>(+ 1 2)</tt>")
(:description
"Common Lisp defines ' as an abbreviation for quote")
(:description
"'(+ 1 2) evaluates to (+ 1 2)")))
"<tt>'(+ 1 2)</tt> evaluates to <tt>(+ 1 2)</tt>")
(:description
"Note that <tt>quote</tt> is one of a few <i>special
operators</i> in Common Lisp (you can see that it is not an ordinary
function, otherwise it would evaluate its arguments).")
(:description
"Note also that lists returned by <tt>quote</tt> (unlike
lists returned by <tt>list</tt>) may be assumed to be <i>immutable</i>
-- that is, you should never modify them in place using any
destructive operators (no need to worry about this for now).")))
(:title
......
......@@ -11,3 +11,11 @@
(publish-directory :prefix "/g101/style/"
:destination (format nil "~a" (translate-logical-pathname "~/genworks/gendl/documentation/training/g101/style/")))
(defun make! ()
(gwl:crawl "training-g101:assembly")
(glisp:rsync "/tmp/sites/assembly/"
"genworks.com:kitchen/downloads/training-g101/"
:options (list "zav")))
......@@ -254,13 +254,15 @@
(sample-drawing
(when (and (the define-object) (the have-sample-drawing?))
(let* ((image-name (format nil "~a.png" (the define-object)))
(let* ((image-name (format nil "~(~a~).png" (the define-object)))
(output-file (merge-pathnames image-name (the images-path)))
#+nil
(temp-file (merge-pathnames (string-append image-name "-t")
(the images-path))))
(ensure-directories-exist (the images-path))
(generate-sample-drawing
:page-width 500
:page-length 350
......@@ -301,14 +303,17 @@
(html ((:span :class "lisp-code")
(:pre
(:princ-safe (with-output-to-string(ss)
(let (*print-length* *print-level*
(*print-right-margin* 50)
(*package* (the slide-package)))
(let (*print-length*
*print-level*
(*print-case* :downcase)
(*print-right-margin* 50)
(*package* (the slide-package)))
(pprint (the code) ss))))))))
(when (the define-object)
(let ((object-doc (the yadd (find-object-doc (the define-object)))))
(when object-doc (write-the-object object-doc pretty-definition))))
(when object-doc
(write-the-object object-doc pretty-definition))))
(when (the print-string)
(html ((:div :class "print-string")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment