[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: |
Przemysław Soboń |
Subject: |
Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.) |
Date: |
Mon, 16 May 2011 23:23:38 +0200 |
>> >
>> > 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
This is something that solves my problems with macros. I will check
that tomorrow as it is quite late at my timezone now :)
Thanks a lot,
Przemek
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.), (continued)
- 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, 2011/05/16
- Re: [MIT-Scheme-devel] MIT-Scheme 9.0.1 performance problem. (cont.),
Przemysław Soboń <=
- 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