[Prev][Next][Index][Thread]

Re: Generating HTML with Dylan



On Wednesday, June 13, 2001, at 03:00  pm, Chris Double wrote:

> I'm interested in approaches others have come up with and any comments
> on the above...too ugly or lispy for Dylan maybe? The advantages are
> it's nice and concise.

It is nice and concise.

There's some CGI stuff at Dylan World:
	http://www.dylanworld.com/
And an HTML library at the Gwydion ftp site:
	ftp://berlin.ccc.de/pub/gd/contributions/

The only alternatives I can think of are:

html( head(), body( p( b( "Hello world" ) ) ) );

or

html
	head
	end head;
	body
		p
			b
				"Hello world"
			end b;
		end p;
	end body;
end html;

Both use more Dylanish syntax (function call syntax and block syntax). 
This is more an ideological gain than an aesthetic one. :-)

> The libraries are functional developer only at this stage btw. There
> is no real reason that dom-builder can't work under Gwydion Dylan asit
> uses common-dylan. But it does use dynamic-bind and a thread
> variable. Taking these out and it almost compiled with GD so there is
> hope and I'll eventually head that way.

Thread variables should compile in d2c: I put "thread" in as a dummy 
word for variables, and d2c only ever has one thread anyway.

There's a dynamic bind macro in the core DUIM libraries for d2c in 
gd/src/duim/utils/fun-dev-compat.dylan , and a dummy version that 
actually compiles accompanies it. :-)

- Rob.



References: