[Top][All Lists]

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

Re: [Gnu-arch-users] Re: Pika 0.1pre3 -- writer, vectors, contributions

From: Tom Lord
Subject: Re: [Gnu-arch-users] Re: Pika 0.1pre3 -- writer, vectors, contributions
Date: Fri, 28 Nov 2003 09:27:27 -0800 (PST)

    > From: Jonathan Walther <address@hidden>

    > Sounds cool; will there be support for POSIX system calls?

Yup.   That's one of a handful of features (and code for that matter)
that I plan to lift more or less wholesale out of Systas Scheme.
Systas also have a very SCSH-like "process notation" (for specifying
complex pipelines of subprocesses) and I'll either bring that it in or
bring in a more rigorously SCSH-compatible version of it.

    > Will this depend on a bunch of other libraries, or will I be
    > able to stick this as a completely self-contained program in the
    > X source tree?

Just libhackerlab with which it is likely to remain bundled for a while.

    > Also, I respect your effort to make Pika completely R5RS compliant, but
    > I dislike hygeinic macros.  After reading Paul Graham, I can see how
    > non-hygeinic macros are useful for some things.  

I intend to provide both.   It is probably a bit hard to follow but if
you read src/scm/notes/spec/* you can see some interesting things:

        ~ alpha-ids
        ~ first class locales and transformers
        ~ first class "bindings"
        ~ the rules for how the macro expander work

The key thing for "non-hygeinic macros" (aka "defmacro-style macros")
is the way transformers are created (out of an arbitrary procedure).
The other three items in that bullet list pertain to how to build 
R5RS's hygeinic constructs on top of defmacro-style macros.

    > I *also* read a paper showing how R5RS "hygeinic" macros really
    > aren't; you can go through some ugly contortions to break the
    > hygeine.

I think you mean Oleg Kiselyov "How to write seeming unhygienic and
referentially opaque macros with syntax-rules" from the Workshop on
Scheme and Functional Programming (2002).

I believe that the paper is basically wrong.  Although some popular
macro expanders happen to have bugs that allow his code to work, R5RS
(while it could be more precisely written) makes it clear that the
code should not work (should not produce the results he's showing).

He hasn't shown how Scheme's hygeinic macros really aren't hygeinic:
he's shown that (a) the language in R5RS is potentially confusing;
(b) a decade of macro implementors have been living with a subtle bug
in their implementations that his code triggers.

I started to write an explanation of how _exactly_ he's wrong but it
quickly got out of hand.  I'll do that separately and post it to
c.l.s. and add it to the design notes for Pika.


reply via email to

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