[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.)
From: |
Peter Feigl |
Subject: |
Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.) |
Date: |
Mon, 16 May 2011 22:56:48 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, May 16, 2011 at 10:44:16PM +0200, Przemysław Soboń wrote:
> > Date: Mon, 16 May 2011 14:26:05 +0200
> > From: =?UTF-8?B?UHJ6ZW15c8WCYXcgU29ib8WE?= <address@hidden>
> >
> > This is because macros in MIT Scheme are a mess, I'm afraid...
> >
> > The rule is that if luser.scm uses a macro defined in definer.scm,
> > then you must load definer.scm before compiling luser.scm.
> >
>
> Hmm, it's a mess, I agree.
> Loading definer.scm before execution of (cf "luser.scm") does not
> help. I load the definer.scm, then compile the luser.scm and get the
> error. I read somewhere that the compiler uses only the predefined
> macros from the Scheme build (let's say included in all.com only). If
> it is like that I have to add my macros to the distribution and
> recompile the compiler. Then it should work.
I've run into this before, I usually solve it as follows:
(define load-files (list "file1" "file2" "file3")) ;; in order
(define (compile-my-system)
(let ((environment (extend-top-level-environment system-global-syntax-table)))
(for-each (lambda (file) (load file environment)) load-files)
(for-each (lambda (file) (compile-file file '() environment)) load-files)))
This loads all your files into the same environment that is then used
to compile your files.
Thanks to Taylor Campbell for explaining to me how this works.
Greetings, Peter
pgp1GYYLMvGoA.pgp
Description: PGP signature
- [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Przemysław Soboń, 2011/05/13
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Taylor R Campbell, 2011/05/13
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Przemysław Soboń, 2011/05/13
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Taylor R Campbell, 2011/05/13
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Przemysław Soboń, 2011/05/16
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Taylor R Campbell, 2011/05/16
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Przemysław Soboń, 2011/05/16
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Arthur A. Gleckler, 2011/05/16
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Przemysław Soboń, 2011/05/16
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Arthur A. Gleckler, 2011/05/17
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.),
Peter Feigl <=
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Przemysław Soboń, 2011/05/16
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Taylor R Campbell, 2011/05/16
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), Przemysław Soboń, 2011/05/16