chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: hart.egg


From: Graham Fawcett
Subject: [Chicken-users] Re: hart.egg
Date: Mon, 5 Mar 2007 19:08:38 -0500

Hi Hans, I had a bit of time tonight, so I've checked an updated Hart
into SVN. (Can anyone please tell me how to get a new egg built?)

On 3/5/07, Hans Bulfone <address@hidden> wrote:
- when using the compiler, (use hart) is not enough to make the
  extension available because most of the functions in
  hart-support are needed at macro-expansion time.
  (actually it seems only html-escape and vector-for-each* are
  needed at runtime, the rest at compile-time)

I ended up just adding (use hart-support) into hart.scm. This seems to
address the problem in the interpreter and compiler both.

- i'm a little concerned about possible name-clashes because
  you are using short names like parse, emit and for.
  perhaps you could do something like:
(declare (export hart-parse hart-html-escape hart-vector-for-each*))

Good point. I've renamed almost all of the functions to hart-* and
added an appropriate (declare (export ...)).

also, i'd probably consider defining for as a function and
calling it in parse-keyword-form instead of expanding to
the (for ...) form, but then you'd have to use some other
looping construct in emit-tag.

I've kept the (for) macro but renamed it to (hart-for) instead. The
hart keyword is still (for: ...) which makes sense. This should
prevent collisions.

- i'd like hart (and therefore probably parse / hart-parse) to take multiple
  hart forms so i can do this:

  (hart
    (raw: "<!DOCTYPE html PUBLIC .....\n")
    (html
      (body
        ...

Agreed. Coming soon. :-) Until then you could do:

 (hart (let: () (raw: "<!DOCTYPE...") (html ...)))

- imho a (scheme: ...) hart-form would be nice, that causes the
  given scheme form to be evaluated and the result discarded,
  so i can do this:

  (hart
    (some-big-html-page ...)
    (for: (contact contacts)
      (scheme: (print-contact-as-html contact))))

  (define (print-contact-as-html contact)
    (hart
      ... contact html ...))

Great point! I've added (scheme: ...).

- the documentation on 
http://www.call-with-current-continuation.org/eggs/hart.html
  is incorrectly formatted, the <enscript> tags in the examples do not
  work correctly, they seem to be outputted as-is.

Oh, I see. I originally added the documentation via the wiki, where it
looks fine; I'm not sure what happened when it got transmogrified over
into call-cc.org/eggs. Either way, I have a lot of
documentation-updating to do now :-) so I'll fix it when I'm there.

i think that's all for now :)

Keep it coming, Hans! I've really enjoyed using Hart myself, and I'm
glad to know that someone else is enjoying it too. Your suggestions
have been first-rate.

Cheers,
Graham




reply via email to

[Prev in Thread] Current Thread [Next in Thread]