Consider the following expression:
Code: Select all
(ml '(
(table(& bgcolor "white" border 1)
(tr (F th (font(& color "darkred") "View File"))
(F th "Log Dir"))
(tr(,(select-file filelist))
(form (& method POST action (, cgi:path-thru))
(td(& valign top)
(F select (& name logdir size (,(length dirlist)))
(, dirlist))(br)
(input (& type submit value "Log Directory"))))))) 1)
on http://www.newlisp.org/index.cgi?page=S ... ons_to_XML and is extended
to html, with conditional evaluation, attribute lists and optional 'oneline' mode. (as
opposed to nesting)
Now let's consider the following subexpression:
Code: Select all
(,(select-file filelist))
Code: Select all
(,(select-file filelist $DEPTH))
sub-expression.
2)Note the comma that starts the sub-expression. Ripped off from CL, tells 'ml
to evaluate the following expression. In rebol the 'compose function will signal
the interpreter to evaluate anything in a parens. (rebol uses a block structure where
expressions are delimited by opening and closing square brackets)
I find the DSL (domain-specific language) paradigm very useful. My two "wishes",
the $DEPTH variable and conditional evaluation signal would be useful to me. I wonder
if they would have other uses.
Comments are welcome.
Thanks
Tim