From: c hore
Subject: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <ca167c61.0307091806.61649fd3@posting.google.com>
(lisp lisp lisp
  (lisp 
    (lisp lisp "The quick brown
fox jumps over the
lazy dog.")
    (lisp lisp lisp "She sells sea shells
down by the
sea shore.

Ever Dearest My Dear Aunt Sally.

<p>
Betty Botta bought a bit of bitter butter."
      lisp
      lisp)))

Any solution to this?  Or do you just learn to live
with this interspersion of raw, unindented text [or
more precisely, text with /its/ own indentation rules]
and Lisp code with Lisp indentation?

From: Nick Levine
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <8732fc48.0307100438.17ecfac9@posting.google.com>
> Any solution to this?  Or do you just learn to live
> with this interspersion of raw, unindented text [or
> more precisely, text with /its/ own indentation rules]
> and Lisp code with Lisp indentation?

It strikes me that your main problem here is the handling of
multi-line strings (at least CL has them - many languages don't),
which isn't really anything to do with html generation. Take a look at
section 22.3.9.3 "Tilde Newline: Ignored Newline" in the CL spec
   http://www.lispworks.com/reference/HyperSpec/Body/22_cic.htm

As far as html goes, you do have the added entertainment of juggling
long format strings, html tags and attributes, and probably a whole
load of dynamic content. I've tried several approaches to doing this
gracefully. My current favorite, which has the advantage of generating
"more correct" (x)html than blind use of format, is available for you
to download and play with, from
   http://www.nicklevine.org/play/xhtml.lisp

-nick
From: Henrik Motakef
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <pan.2003.07.10.09.24.37.619179@henrik-motakef.de>
On Wed, 09 Jul 2003 20:06:56 -0700, c hore wrote:

> Any solution to this?  Or do you just learn to live with this
> interspersion of raw, unindented text [or more precisely, text with /its/
> own indentation rules] and Lisp code with Lisp indentation?

I once wrote a reader macro that stripped leading whitespace from lines in
a string, based on the amount found in the first non-empty line after the
very first one in the string. I.e. you could write

  (lisp lisp #d"The quick brown
   fox jumped over
   the lazy dog.")

and all lines would have all leading spaces stripped.

I thought it would make source files with lots of docstrings easier to
read (it was basically an adoption of the conventions used in Python
docstrings, although in Python the functions displaying it, like help(),
have to care about all that, due to the lack of a flexible reader). I
don't use it any more and don't even know where I could have that code,
but it is really easy to write.

And, of course, for HTML, you might be better off using one the HTML
generation packages, see http://www.cliki.net/Lisp%20Markup%20Languages
From: Coby Beck
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <bej3u5$bmg$1@otis.netspace.net.au>
"c hore" <·······@yahoo.com> wrote in message
·································@posting.google.com...
> (lisp lisp lisp
>   (lisp
>     (lisp lisp "The quick brown
> fox jumps over the
> lazy dog.")
>     (lisp lisp lisp "She sells sea shells
> down by the
> sea shore.
>
> Ever Dearest My Dear Aunt Sally.
>
> <p>
> Betty Botta bought a bit of bitter butter."
>       lisp
>       lisp)))
>
> Any solution to this?  Or do you just learn to live
> with this interspersion of raw, unindented text [or
> more precisely, text with /its/ own indentation rules]
> and Lisp code with Lisp indentation?

There are a couple of approaches I use for literal strings in code.  If it
will be a big block of text I would probably do:
(lisp lisp lisp
  (lisp
    (lisp lisp "
The quick brown
fox jumps over the
lazy dog.")
    (lisp lisp lisp "
She sells sea shells
down by the
sea shore.
"
       )))

If it is not so large a block I might do:
(lisp lisp lisp
  (lisp
    (lisp lisp (format nil "The quick brown% ~
                            fox jumps over the% ~
                            lazy dog.")
    (lisp lisp lisp (format nil "She sells sea shells% ~
                                 down by the% ~
                                 sea shore.%% ~

                                 Ever Dearest My Dear Aunt Sally.")))))

The ~ by itself means ignore the following whitespace.

--
Coby Beck
(remove #\Space "coby 101 @ big pond . com")
From: Janis Dzerins
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <twkllv6201o.fsf@gulbis.latnet.lv>
"Coby Beck" <·····@mercury.bc.ca> writes:

> If it is not so large a block I might do:
> (lisp lisp lisp
>   (lisp
>     (lisp lisp (format nil "The quick brown% ~
>                             fox jumps over the% ~
>                             lazy dog.")
>     (lisp lisp lisp (format nil "She sells sea shells% ~
>                                  down by the% ~
>                                  sea shore.%% ~
> 
>                                  Ever Dearest My Dear Aunt Sally.")))))
> 
> The ~ by itself means ignore the following whitespace.

Not really.  Tilde followed by a newline is an ignored newline, but
all the following spaces will stay where they are.  I sometimes do it
this way:

(lisp lisp lisp
  (lisp
    (lisp lisp (format nil "~
The quick brown
fox jumps over the
lazy dog.")
    (lisp lisp lisp (format nil "~
She sells sea shells
down by the
sea shore.

Ever Dearest My Dear Aunt Sally.")))))

-- 
Janis Dzerins

  If million people say a stupid thing, it's still a stupid thing.
From: Rob Warnock
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <i8WdnXanCMOyQJKiXTWc-g@speakeasy.net>
Janis Dzerins  <·····@latnet.lv> wrote:
+---------------
| "Coby Beck" <·····@mercury.bc.ca> writes:
| > The ~ by itself means ignore the following whitespace.
| 
| Not really.  Tilde followed by a newline is an ignored newline, but
| all the following spaces will stay where they are.
+---------------

Sorry, Coby is correct here. In fact, if you *don't* want the following
spaces to be ignored you have to use the ":" modifier. (Also note the ·@"
modifier, which keeps the newline but ignores the following whitespace.)
See CLHS 22.3.9.3 "Tilde Newline: Ignored Newline" for details.


-Rob

-----
Rob Warnock, PP-ASEL-IA         <····@rpw3.org>
627 26th Avenue                 <URL:http://rpw3.org/>
San Mateo, CA 94403             (650)572-2607
From: Janis Dzerins
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <twky8z1e20a.fsf@gulbis.latnet.lv>
····@rpw3.org (Rob Warnock) writes:

> Janis Dzerins  <·····@latnet.lv> wrote:
> +---------------
> | "Coby Beck" <·····@mercury.bc.ca> writes:
> | > The ~ by itself means ignore the following whitespace.
> | 
> | Not really.  Tilde followed by a newline is an ignored newline, but
> | all the following spaces will stay where they are.
> +---------------
> 
> Sorry, Coby is correct here. In fact, if you *don't* want the following
> spaces to be ignored you have to use the ":" modifier. (Also note the ·@"
> modifier, which keeps the newline but ignores the following whitespace.)
> See CLHS 22.3.9.3 "Tilde Newline: Ignored Newline" for details.

This is what I get when posting in haste.  I read the section about
Tilde Newline, and I cancelled the article.  I just did it in the
wrong order.

-- 
Janis Dzerins

  If million people say a stupid thing, it's still a stupid thing.
From: Coby Beck
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <bej5km$c3j$1@otis.netspace.net.au>
"Coby Beck" <·····@mercury.bc.ca> wrote in message
·················@otis.netspace.net.au...

>     (lisp lisp (format nil "The quick brown% ~
>                             fox jumps over the% ~
>                             lazy dog.")
>     (lisp lisp lisp (format nil "She sells sea shells% ~
>                                  down by the% ~
>                                  sea shore.%% ~

Sorry, replace all those % signs with ~%...

--
Coby Beck
(remove #\Space "coby 101 @ big pond . com")
From: Ignas Mikalajunas
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <fde4537f.0307120618.234a01d3@posting.google.com>
> Any solution to this?  Or do you just learn to live
> with this interspersion of raw, unindented text [or
> more precisely, text with /its/ own indentation rules]
> and Lisp code with Lisp indentation?

   I think the best practice is trying not to mix lisp code and html
in the same file, because weha you are delivering a product you do not
want designers who use some WYSIWYG editor to be messing with your
lisp code. Or asking the programmer to move that banner to the end of
teh document, exchange two buttons or change the colors of the
headlines. Some template lib whould be nice so htm'l files would look
like this:
<html>
<body>
<table>
<tr><td>(head-row)</td></tr>
</table>
</body>
</html>

and in lisp you would just write
(include-template "./bah.html")
and get the headrow replaced by the output of the function.

  Ignas Mikalajunas
From: Nick Levine
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <8732fc48.0307130041.d18c670@posting.google.com>
Just thought I'd mention "Active Lisp Pages" in this context.

http://www.ai.sri.com/~alp/alp.html

-n
From: Nick Levine
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <8732fc48.0307130042.6fdd054d@posting.google.com>
Just thought I'd mention "Active Lisp Pages" in this context.

http://www.ai.sri.com/~alp/alp.html

-n
From: David Golden
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <235b265c.0307130350.4a0970da@posting.google.com>
······@centras.lt (Ignas Mikalajunas) wrote in message 
> Some template lib whould be nice so htm'l files would look
> like this:
> and in lisp you would just write
> (include-template "./bah.html")
> and get the headrow replaced by the output of the function.

On the off-chance someone is inspired to make such a lisp templating
library, that someone should be aware of a nice HTML templating system
- Zope page templates.  Zope is a quite powerful python (i.e. fairly
close to lisp but no cookie) web application server.

Check out Zope's TAL and METAL template and template-macro systems at
http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixC.stx

They have been sighted outside zope (though I don't think they've
escaped the larger python community).

They are carefully designed to be as wysiwig-html-editor-invariant as
possible. The wysiwig-invariance is because most editors pass through
attributes they don't know about, in compliance with w3c guidelines -
something similar should be fairly easy in lisp, TALES (the
expressions that TAL understands) could probably be extended with a
lisp: expression handler to preserve intercompatibility.

If someone is planning a templating engine for use with Common Lisp, a
largely  TAL-compatible system with a lisp: expression type instead of
python: might be better than wheel-reinvention - a lot of thinking
through subtleties of content-replacement and testing  interactions
with common wysiwig editors has already been done for you.

Your example in TAL could be
<tr><td tal:replace="structure python:head-row();">dummy head
row</td></tr>
Lisp could easily fit in instead as e.g.
<tr><td tal:replace="structure lisp:(head-row)">dummy head
row</td></tr>
From: Ng Pheng Siong
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <berukj$jkb$1@reader01.singnet.com.sg>
According to David Golden <············@oceanfree.net>:
> Check out Zope's TAL and METAL template and template-macro systems at
> http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixC.stx

Seconded.

> Your example in TAL could be
> <tr><td tal:replace="structure python:head-row();">dummy head
> row</td></tr>
> Lisp could easily fit in instead as e.g.
> <tr><td tal:replace="structure lisp:(head-row)">dummy head
> row</td></tr>

Over the weekend, I wrote a mod_lisp client-side implementation in Python,
and hooked that up to Zope, so that in the above, it still says "python:
head_row()" but head_row() now invokes Lisp functionality via mod_lisp.

Still playing; no idea about the scalability.

My intention is to use Zope to do whatever Zope is already good at, and do
application-specific heavy lifting in Lisp.

There is a paper "Zope: The Good, The Bad, How to win big" on the net
propounding Zope as a _platform_. Interesting read.


-- 
Ng Pheng Siong <····@netmemetic.com> 

http://firewall.rulemaker.net  -+- Manage Your Firewall Rulebase Changes
http://www.post1.com/home/ngps -+- Open Source Python Crypto & SSL
From: Marc Battyani
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <besgcs$tpk@library2.airnews.net>
"Ng Pheng Siong" <····@netmemetic.com> wrote
> According to David Golden <············@oceanfree.net>:
> > Check out Zope's TAL and METAL template and template-macro systems at
> > http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixC.stx
>
> Seconded.

Ahem... Don't tell me a graphic designer can use such a thing and don't tell
me that a programmer wants to use such a thing.
This looks like a bad case of Greenspun's tenth law... ;-)

> > Your example in TAL could be
> > <tr><td tal:replace="structure python:head-row();">dummy head
> > row</td></tr>
> > Lisp could easily fit in instead as e.g.
> > <tr><td tal:replace="structure lisp:(head-row)">dummy head
> > row</td></tr>

I do prefer this: (:tr (:td (head-row)))
Much nicer IMO.

From a TAL example:
<div tal:repeat="item python:range(10)">
<p tal:condition="repeat/item/even">Even</p>
<p tal:condition="repeat/item/odd">Odd</p>
</div>
The same (even better) in Lisp:
`(:div ,@(loop for i below 10 collect (list :p i " is " (if (evenp i) "Even"
"Odd"))))
=> (:div (:p 0 " is " "Even") (:p 1 " is " "Odd") (:p 2 " is " "Even") (:p 3
" is " "Odd") (:p 4 " is " "Even") (:p 5 " is " "Odd") (:p 6 " is " "Even")
(:p 7 " is " "Odd") (:p 8 " is " "Even") (:p 9 " is " "Odd"))
=>"<DIV><P>0 is Even</P><P>1 is Odd</P><P>2 is Even</P><P>3 is Odd</P><P>4 is
Even</P><P>5 is Odd</P><P>6 is Even</P><P>7 is Odd</P><P>8 is Even</P><P>9 is
Odd</P></DIV>"

> Over the weekend, I wrote a mod_lisp client-side implementation in Python,
> and hooked that up to Zope, so that in the above, it still says "python:
> head_row()" but head_row() now invokes Lisp functionality via mod_lisp.

This look like a better idea!

> Still playing; no idea about the scalability.
>
> My intention is to use Zope to do whatever Zope is already good at, and do
> application-specific heavy lifting in Lisp.

Good idea though I think this is going to be difficult if the application
complexity increase and you have more and more stuff in Lisp.

Marc
From: Ng Pheng Siong
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <besv29$jb6$1@mawar.singnet.com.sg>
According to Marc Battyani <·············@fractalconcept.com>:
> "Ng Pheng Siong" <····@netmemetic.com> wrote
> > According to David Golden <············@oceanfree.net>:
> > > Check out Zope's TAL and METAL template and template-macro systems at
> > > http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixC.stx
> >
> > Seconded.
> 
> Ahem... Don't tell me a graphic designer can use such a thing and don't tell
> me that a programmer wants to use such a thing.
> This looks like a bad case of Greenspun's tenth law... ;-)

I learnt TAL and METAL by example. Haven't seen the above website until
now; it is indeed quite dry and ugly in its presentation.

This thing is actually quite useable and does achieve its goal of
seperating web page design and programmability, with a workflow like the
following:

1. Designer whips up a fancy page using whatever wysiwyg editor, including
dummy output for what is to be dynamic content.

2. Programmer goes thru the page, surrounding the dynamic content with
TAL spans/divs, like this:

> <div tal:repeat="item python:range(10)">
> <p tal:condition="repeat/item/even">Even</p>
> <p tal:condition="repeat/item/odd">Odd</p>
> </div>

A div that includes more substantial dummy output ("even" and "odd" above)
will bring the flavour out better, I think.

3. Programmer goes on to implement backend to serve up the dynamic content.

4. Designer can change the page's look-&-feel anytime with his favourite
wysiwyg editor, just needs to ignore the TAL elements, which his
self-respecting editor should do automatically.


> > Over the weekend, I wrote a mod_lisp client-side implementation in Python,
> > and hooked that up to Zope, so that in the above, it still says "python:
> > head_row()" but head_row() now invokes Lisp functionality via mod_lisp.
> 
> This look like a better idea!

One tricky issue is that sometimes Zope or the browser sends headers with
embedded newlines, which screws the protocol. I punt on that by not sending
such headers to the mod_lisp server.


> > My intention is to use Zope to do whatever Zope is already good at, and do
> > application-specific heavy lifting in Lisp.
> 
> Good idea though I think this is going to be difficult if the application
> complexity increase and you have more and more stuff in Lisp.

Aye. I'll have to see how far this goes.


-- 
Ng Pheng Siong <····@netmemetic.com> 

http://firewall.rulemaker.net  -+- Manage Your Firewall Rulebase Changes
http://www.post1.com/home/ngps -+- Open Source Python Crypto & SSL
From: Joerg-Cyril Hoehle
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <ufzkpuzfh.fsf@T-Systems.com>
Hi,

this is Common Lisp. So may I point parties to HTML-template
http://www.cliki.net/html-template

David Golden <············@oceanfree.net>:
> - a lot of thinking
>through subtleties of content-replacement and testing  interactions
>with common wysiwig editors has already been done for you.

I haven't looked at TAL but agree with David Golden on the point that
substitution based systems have to be careful about HTML syntax if
they still want to be viewable in the HTML designer's GUI tool. I have
little experience in that area.

"Marc Battyani" <·············@fractalconcept.com> writes:
> "Ng Pheng Siong" <····@netmemetic.com> wrote
> From a TAL example:
> <div tal:repeat="item python:range(10)">
> <p tal:condition="repeat/item/even">Even</p>
> <p tal:condition="repeat/item/odd">Odd</p>
> </div>
> The same (even better) in Lisp:
> `(:div ,@(loop for i below 10 collect (list :p i " is " (if (evenp i) "Even"
> "Odd"))))


Using HTML-template, the example becomes one of
<div><TMPL_LOOP even-odds><p><TMPL_VAR odd></p></TMPL_LOOP></div>

or
</div><!--TMPL_LOOP even-odds -->
<p><!-- TMPL_VAR odd --></p><!-- /TMPL_LOOP --></div>

or, why not
<div><TMPL_LOOP even-odds>
<p><TMPL_IF evenp>Even><TMPL_ELSE evenp>Odd</TMPL_IF></p></TMPL_LOOP></div>

as far as the designer's (HTML) side is concerned.  I don't know how
well/badly these tags or comments interfere with HTML designer's
typical tools.


The Lisp side goes as follows (in my framework):
(tmpl-print
 my-template
 (lambda (loopprinter)
   (loop for i from 0 to 10 do
     (funcall loopprinter (if (oddp i) "Odd" "Even")))))

HTML and Lisp are strictly separate!
(I'm no fanatic, and have been using S-expr -> X/HT/ML generation
as well, e.g. Oleg's SXML).

Regards,
	Joerg Hoehle
TSI ITC-Security Technologiezentrum
From: james anderson
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <3F12A8FA.D13CAB6F@setf.de>
a while back i was curious about tal, so i did a basic implementation to see
how it might behave:

   http://www.cl-xml.org/code/encodings/tal/

it's not complete, but should give one an idea of one way it might work.
it's also not clear what advantage it has for an individual developer over
s-expression based formulations, that is, absent the
division-of-responsibilities argument which is made for tal.

in any case:
- the bnf i based it on may be no longer the most current,
- one needs cl-xml in the 0.949 version,
- i suspect the eol-encodings are mac-os - unix/pc lisps take note,
- it's compiler based rather than interpreted
- should be compatible with mcl/openmcl/allegro/lw/cmucl, but i checked for
mcl only.

...

David Golden wrote:
> 
> 
> 
> On the off-chance someone is inspired to make such a lisp templating
> library, that someone should be aware of a nice HTML templating system
> - Zope page templates.  Zope is a quite powerful python (i.e. fairly
> close to lisp but no cookie) web application server.
> 
> Check out Zope's TAL and METAL template and template-macro systems at
> http://www.zope.org/Documentation/Books/ZopeBook/current/AppendixC.stx
> 
>
From: Marc Battyani
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <besetr$j4c@library2.airnews.net>
"Ignas Mikalajunas" <······@centras.lt> wrote
> > Any solution to this?  Or do you just learn to live
> > with this interspersion of raw, unindented text [or
> > more precisely, text with /its/ own indentation rules]
> > and Lisp code with Lisp indentation?
>
>    I think the best practice is trying not to mix lisp code and html
> in the same file, because weha you are delivering a product you do not
> want designers who use some WYSIWYG editor to be messing with your
> lisp code.

I don't think so. By doing this you loose all the power of Lisp to play with
the HTML.
HTML is a poor programming language and you will have problem as soon as
there is some complexity in the interface.
BTW converting HTML to Lisp is easy. There are several parsers to do this. So
you can have the designers play with their tools and then convert it to Lisp
to play with it. You just need an HTML generation macro such as lml2, htout,
html-gen...

> Or asking the programmer to move that banner to the end of
> teh document, exchange two buttons or change the colors of the
> headlines. Some template lib whould be nice so htm'l files would look
> like this:
> <html>
> <body>
> <table>
> <tr><td>(head-row)</td></tr>
> </table>
> </body>
> </html>
>
> and in lisp you would just write
> (include-template "./bah.html")
> and get the headrow replaced by the output of the function.

I prefer this kind of stuff: (it's a color picker)

(defun std-pick-color-html-fn ()
  (flet ((color-td (r g b)
           (let ((color (format nil "#~2,'0x~2,'0x~2,'0x" r g b)))
             (html:html ((:td :bgcolor color
                              :fformat (:onclick "f42('~a');"
color))"&nbsp;&nbsp;&nbsp;")))))
    (let* ((colors nil))
      (dotimes (r 6)
        (dotimes (g 6)
          (dotimes (b 6)
            (push (list (* r 51) (* g 51) (* b 51)(luminance r g b))
colors))))
      (setf colors (sort colors #'> :key 'fourth))
      (html:html
       (:head
        (:title "Choose a color")
        ((:link :rel "stylesheet" :type "text/css" :href "/pcol.css")))
       (:body
        :br
        (:h1 "Choose a color")
        (:jscript "function
f42(d){window.opener.change_color(d);window.close();};")
        ((:table :class "pcolt" :align "center")
         (loop for x below 18
               for row = (loop repeat 12 collect (pop colors))
               for bl = (round (* 255 (- 1 (/ x 17))))
               do
               (html:html
                (:tr
                 (color-td  bl bl bl)
                 (color-td  bl  0  0)
                 (color-td   0 bl  0)
                 (color-td   0  0 bl)
                 (color-td   0 bl bl)
                 (color-td  bl  0 bl)
                 (color-td  bl bl  0)
                 (loop for (r g b l) in row
                       do (color-td r g b))))))
        :br
        ((:div :align "center")
         ((:a :class "call" :href "javascript:window.close();")
"Close")))))))

Marc
From: Eduardo Muñoz
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <uu19q2i0b.fsf@terra.es>
* "Marc Battyani" <·············@fractalconcept.com>
| "Ignas Mikalajunas" <······@centras.lt> wrote
| > > Any solution to this?  Or do you just learn to live
| > > with this interspersion of raw, unindented text [or
| > > more precisely, text with /its/ own indentation rules]
| > > and Lisp code with Lisp indentation?
| >
| >    I think the best practice is trying not to mix lisp code and html
| > in the same file, because weha you are delivering a product you do not
| > want designers who use some WYSIWYG editor to be messing with your
| > lisp code.
| 
| I don't think so. By doing this you loose all the power of Lisp to play with
| the HTML.
| HTML is a poor programming language and you will have problem as soon as
| there is some complexity in the interface.

And by using lisp directly you have the power of macros (and
function calls, but I dont know if php & co allow this).

Anyone interested in this things may take a look at my
site. Every page has a link at the bottom that will show you
the source of the page (except function calls).


-- 
Eduardo Mu�oz          | (prog () 10 (print "Hello world!")
http://213.97.131.125/ |          20 (go 10))
From: Marc Battyani
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <besma9$ctq@library2.airnews.net>
"Eduardo Mu�oz" <······@terra.es> wrote
>
> * "Marc Battyani" <·············@fractalconcept.com>
> | "Ignas Mikalajunas" <······@centras.lt> wrote
> | > > Any solution to this?  Or do you just learn to live
> | > > with this interspersion of raw, unindented text [or
> | > > more precisely, text with /its/ own indentation rules]
> | > > and Lisp code with Lisp indentation?
> | >
> | >    I think the best practice is trying not to mix lisp code and html
> | > in the same file, because weha you are delivering a product you do not
> | > want designers who use some WYSIWYG editor to be messing with your
> | > lisp code.
> |
> | I don't think so. By doing this you loose all the power of Lisp to play
with
> | the HTML.
> | HTML is a poor programming language and you will have problem as soon as
> | there is some complexity in the interface.
>
> And by using lisp directly you have the power of macros (and
> function calls, but I dont know if php & co allow this).
>
> Anyone interested in this things may take a look at my
> site. Every page has a link at the bottom that will show you
> the source of the page (except function calls).

Nice! You should just set *print-case* to :downcase... ;-)

Marc
From: Eduardo Muñoz
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <uptke2gjo.fsf@terra.es>
* "Marc Battyani" <·············@fractalconcept.com>
| > Anyone interested in this things may take a look at my
| > site. Every page has a link at the bottom that will show you
| > the source of the page (except function calls).
| 
| Nice! You should just set *print-case* to :downcase... ;-)

Done! Talk about rapid development :)


-- 
Eduardo Mu�oz          | (prog () 10 (print "Hello world!")
http://213.97.131.125/ |          20 (go 10))
From: Eduardo Muñoz
Subject: Re: HTML Generating Code Not Pretty / Hard to Read
Date: 
Message-ID: <uoezwkhj0.fsf@terra.es>
* Eduardo Mu�oz <······@terra.es>
| Anyone interested in this things may take a look at my
| site. Every page has a link at the bottom that will show you
| the source of the page (except function calls).

I posted the code that runs my site in the weblog for anyone
interested (a bit late I know :)

BTW, I would appreciate any comments about code style, etc.

-- 
Eduardo Mu�oz          | (prog () 10 (print "Hello world!")
http://213.97.131.125/ |          20 (go 10))