chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] ANN: eping


From: Michele La Monaca
Subject: Re: [Chicken-users] ANN: eping
Date: Thu, 22 Aug 2013 17:53:46 +0200

On Thu, Aug 22, 2013 at 4:54 PM, John Cowan <address@hidden> wrote:

> Your macro will work as far as handling bound and unbound symbols; of
> course, symbols *lexically* bound will not be seen, only global symbols.
> That's the nature of Scheme's eval.

I think eval usage (and limitations) can be avoided: For example:

(define-syntax eping
  (syntax-rules ()
    ((_ h)
     (handle-exceptions exn
       (_eping (symbol->string '|h|))
       (let ((t h)) (_eping t))))))

as regarding (symbol->string '|h|), what you are saying is that in
this context it is equivalent to (symbol->string 'h) and that one
happens to work only because Chicken considers '192.168.0.1 a valid
symbol while in standard Scheme is not. Right? Anyway, it seems to me
quite a limitation that IP addresses are not valid Scheme symbols and
something that should be fixed if it is an artificially imposed
limitation.

> You should go and read "JRM's Syntax-rules Primer for the Merely
> Eccentric" <http://www.phyast.pitt.edu/~micheles/syntax-rules.pdf> to
> get a feel for what syntax-rules macros can and cannot do.  Just stop
> reading when you no longer follow the text: that means you've absorbed
> as much as you can for now.  When you need more, go back to it.

Thanks for the pointer.

Michele



reply via email to

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