Wierd and Wonderiful Webbery

Alaric B. Williams alaric@abwillms.demon.co.uk
Fri, 2 May 1997 21:03:12 +0000


On  1 May 97 at 13:39, lispos@math.gatech.edu wrote:
 
> > Yeah... but you can't do much with only HTML!
 
> But if you change the web server to dynamically generate HTML and GIFS
> with tight and fast execution in the server,
> then you can do a whole lot more.

Well, that's the kind of thing I'm aiming at, but this push/pull
batch-oriented type of interaction isn't totally amazing, and 
embedded code still is handled rather kludgily, from what I
gather.

> I am going to write a SilkScript source code single-stepper that will run
> completely using just the web browser interface.
> I know I can do it.  Can you?

Yeah, the URL includes a "thread ID" to differentiate multiple
debugging sessions, and the returned page includes both a machine
state dump with clickable links to expand upon stuff, and buttons
to prompt the next step to be taken etc.
 
> My perspective and experience is that hackers develop and improve what they use.
> If you're developing using emacs, you'll be hacking and improving
> emacs. If you're developing using a HTML-based web-browser interface,
> then you'll be hacking and improving it.

True. IMHO, a really good intermediate interface is needed (as a library
at the HTTP server) to automate the creation of interaction threads
with unique handles in the URLs and things like that, so we can write
stuff like:

(http-send-href "Run my program" (http-interaction (lambda (handle)
     (http-interaction-page handle ...)    -- returns the number of the link clicked,
                                           -- and the values of any form fields
     ...do something...

     (http-interaction-page handle ...)    
)))

without all the baggage getting in the way.

> > Some better syntax for HTML than the raw string would be nice... perhaps:
> > (make-html :title "blah" :base-url "blah" 
> >    :body '(
> >      (H1 "fnarg")
> >      (P "My name is " (B "Alaric") ", and I live in a " (A :href "house.htm" :text "house!"))
> >      ...

> That's not too bad.  I not sure about using the same 
> single letters that HTML does.

No, I wouldn't, personally!

> SilkScript supports them, but I've never used them in the code I've written.

My faintly LISPy FAQ formatter, FaX, used to generate the old OpenDOS
FAQ spoke of below, uses codes like bold, em, etc.

A string is defined as either an atomic string:

"Hello"

or a list of strings like so:

(string "Hello " "World")

or a modifier:

(bold "this is in bold")

so we write:

(string "I am " (bold "very") " angry!")

Originally, I used M4 macros to automate this:

"I am __BOLD__(very) angry"

but the horribleness of M4 made it hard - M4 is pretty cool,
unless whitespace is important. I usually had too many spaces
turning up in the resulting source, and with the plain syntax,
"you know what you're getting"!

I'll send you the C sources of FaX if you want, it's a bit primitive,
but it works and it's interesting.
 
> ;;
> ;; SilkScript form example
> ;;

Yup, that's the kind of tool I'm groping at! Excellent!


ABW
--
Alaric B. Williams (alaric@abwillms.demon.co.uk)

   ---<## OpenDOS FAQ ##>---

Plain HTML: http://www.delorie.com/opendos/faq/
            http://www.deltasoft.com/faq.html

Fancy HTML: http://www.deltasoft.com/faq0000.html