C based vector and bytevector copy

2022-02-02 Thread Stefan Israelsson Tampe
Hi all, I have streamlined my c-based superfast vector copy lib in stis-supervectors to get a self contained c-file that generates *vector-copy! that handles all types of bytevectors and SCM vectors, can have different directions can have different endianes and can have arbitrary intervals like py

Re: reserved-keyword in macro

2022-02-02 Thread Vijay Marupudi
Hi Damien, I tried to run the code you provided. I ran - (define-syntax <- (syntax-rules ($bracket-apply$) ((_ ($bracket-apply$ container index) expr) (let ((value expr)) ;; to avoid compute it twice (cond ((vector

Re: reserved-keyword in macro

2022-02-02 Thread Damien Mattei
i suppose it has something to see with this: "A literal matches an input expression if the input expression is an identifier with the same name as the literal, and both are unbound13 . " as $bracket-apply$ is already bind

Re: reserved-keyword in macro

2022-02-02 Thread Damien Mattei
really,nothing have an idea? seems $bracket-apply$ is bind to the variable var of the third case in the macro instead of ignored in the first case... but why? (it the same thing if i change the patterns order) On Wed, Feb 2, 2022 at 2:02 PM Damien Mattei wrote: > sorry i miss copy to mailing lis

Fwd: reserved-keyword in macro

2022-02-02 Thread Damien Mattei
sorry i miss copy to mailing list... -- Forwarded message - From: Damien Mattei Date: Wed, Feb 2, 2022 at 12:09 PM Subject: Re: reserved-keyword in macro To: Maxime Devos thanks maxim ,it works so my problem come from elsewhere scheme@(guile-user)> (define-syntax macro (synt

Re: reserved-keyword in macro

2022-02-02 Thread Maxime Devos
Damien Mattei schreef op wo 02-02-2022 om 11:13 [+0100]: > (define-syntax macro >   (syntax-rules () > ((_ arg1 arg2) code1) > ((_ reserved-keyword arg) code2))) The rules are matched in-order, so when the first rule matches, the second rule is ignored. I suggest: (define-syntax macro (syntax-

reserved-keyword in macro

2022-02-02 Thread Damien Mattei
hello, what is the best way to use a reserved keyword in a macro (a keyword for me not already used in scheme): if i have multiple patterns in a macro,for example: (define-syntax macro (syntax-rules () ((_ arg1 arg2) code1) ((_ reserved-keyword arg) code2))) now if i call the macro with (macro r