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

Re: loading additional code

Wojciech Sobczuk <sopel@freebsd.hbz.pl> writes:

> well, the main reason is to learn programming Scheme while doing
> something interesting.

Sounds like a good reason:-) Sooner or later I need to find a project
like that myself.

> ...

> *AND* i need a nice environment to complete two large web projects
> (and i also need to convince others that it's better than PHP which
> 'everyone knows')..

If the group here will pardon some slightly off topic comments, I
think you need to look at what people like about PHP - to wit, that
it's easy to get aquainted with and start using, especially for people
who don't have a lot of programming experience, or for those who have
seen a little bit of this and that and want to get started quickly.

It also has a lot of powerful libraries at this point in time,
although that's not something you can do a lot about.

Furthermore, it's available for systems like Apache and Internet
Explorer, which most people are likely to have available.

> > Documents containing <( ... )> or <% ... %> are not weel-formed
> > XML document, while <?mzwebscheme s-expr ?> is proper XML PI
> > (prod. 16 of W3C XML Rec.).  Which makes it possible to use
> > XML/XHTML processing/editing tools on the documents containing <?
> > but not <( or <% . So, this formalism gives something.  Shorter
> > PITarget (say, 'mz' instead of 'mzwebscheme') may be more
> > developer friendly.

Exactly... you can edit <? ?> with emacs, for example, and it won't
mess up psgml mode.

> i'm tired of excessively formalized systems like J2EE in which one
> spends more time writing up the formal documents/classes than doing
> the actual programming.

There does seem to be a couple of groupings of web systems, which
gravitate towards the quick and easy camp (PHP, mod_dtcl) and the
clean but pain-in-the-neck camp (java, zope).  I personally think it's
easier to go from the first and impose a bit of discipline, than to go
the route of many in the second, and start implementing "little
languages" (see things like velocity, or your $ substitution mentioned

> > Using XML element abd dedicated namespace may be a solution also.
> > <mz:scm> S-expr </mz:scm>

Elegant, but slightly less immediate for "hey, let's add a bit of
dynamic information to the web page, boss" type of applications.

> > I do agree that one-liner
> > <h1><(+ 2 2)></h1>

> > is looking more pleasant than 
> > <h1><?mzwebscheme (+ 2 2)?></h1>
> > or
> > <mz:scm>(+ 2 2)</mz:scm>

You would output it automatically, ommitting the (display ....) ?

> so.. i don't really know where should we place the border between
> html and scheme - to make it both usable, to some extent, by html
> people and place as little code as possible in the html document
> itself.

Right, this is the way to go.  I wonder if it's possible to severely
limit the scheme commands that you have access to in the web page?  Or
would that be too ugly?  On the other hand, one of the things people
like about PHP is that they can start simply and work their way up,
because you're giving them a real language, and not just a few toy

> 	<mz:printtag "abc" "def">

> (define printtag
>   (lambda (args)
>     (for-each (lambda (arg) (request-parameter arg)) args)))

> so the above html code would be compiled into:
> (printtag "abc" "def")
> and nicely executed.

> the problem here is that we're not standards compliant (no tag
> parameter names - but there must be a simple, and standards
> compliant, way to represent a list inside a HTML tag??

I don't like things like this, they tend to impose too much structure,
require you to learn a 'little language' in any case, and don't give
you the real language you are using.

David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/