chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] CVS update: hygienically unhygienic


From: felix
Subject: Re: [Chicken-users] CVS update: hygienically unhygienic
Date: Sat, 14 Dec 2002 22:37:10 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

Peter Keller wrote:

This means the following:

1) `define-macro' is now available in combination with `-hygienic'
2) The Chez module system is fully supported. Unfortunately not with
  separate compilation. But still pretty handy.
3) `(define-syntax x (lambda (y) ...))' can now be abbreviated to
  `(define-syntax (x y) ...)' [seems to be getting fashionable
  in PLT circles]


Will define-syntax still work normally too?

(define-syntax disp
        (syntax-rules ()
                ((_ bar)
                        (display bar))))


Yep. Everything should work as normal.

I've never seen the other kind of usage for define-syntax.


It looks like this:

(define-syntax (when x)
  (syntax-case x ()
    [(_ x y ...) #'(if x (begin y ...))] ) )

The old version (and the default implementation) is this:

(define-syntax when
  (lambda (x)
    (syntax-case x ()
      [(_ x y ...) #'(if x (begin y ...))] ) ) )

Just a little less to type. But of course this is not used if
you stick to `syntax-rules'. It's only an abbreviation for
`syntax-case' macros.



After updating to the current sources, and making, I got this:

make[1]: *** No rule to make target `psyntax-chicken.pp', needed by 
`syntax-case.c'.  Stop.


I forgot some files. But I checked them in right after the first commit.
It should work now. Otherwise simply remove the dependency for that file.


So, is there a lesson to be learned here? To ask a hard question, is the method that chicken uses to compile scheme scalable?


A good question. I say it is. The way literals are created at run-time
is safe and simple. But large literals blow up the toplevel procedure
considerably. And large C functions blow up GCC compile times.

Yet, I don't find a better compilation strategy for Scheme than the
one Chicken uses: the alternative (a driver loop - used for example
by Gambit) is IMHO problematic: you generate large functions
(in fact I got reports from failed GCC compiles with Gambit 4.0:
the use of computed gotos in the new release create a huge number
of control-flow edges... which make compilation times excessively
long when string optimizations are used). Chicken generates
(besides the toplevel procedure) many small functions.

Cross module calls are very cheap. Orders of magnitudes cheaper
than under Gambit. So dynamically loaded code and separate compilation
scales actually *much* better under Chicken.

Chicken is actually faster than Gambit in many mixed mode arithmetic
benchmarks - but this is of course simple if you have only two numeric
types, Gambit has more dispatching overhead since it supports the
full numeric tower.

So what have we left: the "cheaters" (:-) Bigloo and Stalin - and
both have no full support for tail-calls and/or first class continuations
('nuff said).

Chicken now compiles on OpenBSD. Thanks to Steve Elkins!


MAC OSX! MAC OSX! :)

Huh? AFAIK Chicken works fine under the current Mac OS X.
But not version 10.2 (Jaguar). There are some libtool problems, I think.


cheers,
felix




reply via email to

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