Re: Loop macros (was: Re: macro definition for continue and break)

2022-09-14 Thread Damien Mattei
thank you, i had a look directly on the web site, but since a few days i'm just using a single 'repeat ... until macro of my own (directly inspired from Pascal :-) if i do not mistake... and where i can put local define or just make mutations. ;; scheme@(guile-user)> {i <+ 5} ;; scheme@(guile-user

Re: Loop macros (was: Re: macro definition for continue and break)

2022-09-13 Thread Maxime Devos
On 13-09-2022 16:25, Damien Mattei wrote: do you have any examples of use? that illustrate the features ,just with the code it is not easy. "git grep -F let^" inside the repo. More specifically, parse-expandable from (gnu gnunet config parser), though there are other uses too. OpenPGP_0x4

Re: Loop macros (was: Re: macro definition for continue and break)

2022-09-13 Thread Damien Mattei
do you have any examples of use? that illustrate the features ,just with the code it is not easy. Regards, Damien On Mon, Sep 12, 2022 at 10:57 PM Maxime Devos wrote: > > > On 12-09-2022 21:19, Linus Björnstam wrote: > > If you want a bit more advanced looping you could have a look at my > goof-

Re: macro definition for continue and break

2022-09-13 Thread Damien Mattei
interesting , i was just intending to have syntax and features a bit like C in fact.Your syntax goes beyond, Racket for too, i do not know Chibli scheme. Regards, Damien On Mon, Sep 12, 2022 at 9:20 PM Linus Björnstam wrote: > If you want a bit more advanced looping you could have a look at my >

Re: Loop macros (was: Re: macro definition for continue and break)

2022-09-12 Thread Linus Björnstam
I would say it is mostly an extension of foof-loop with the addition of subloops. It is also written mostly in syntax-rules, which makes is portable. I am not happy with the extensibility outside the possibility to add :for and :acc clauses, since it is pretty darn awful do do any changes to the

Loop macros (was: Re: macro definition for continue and break)

2022-09-12 Thread Maxime Devos
On 12-09-2022 21:19, Linus Björnstam wrote: If you want a bit more advanced looping you could have a look at my goof-loop: https://git.sr.ht/~bjoli/goof-loop It currently does not support a break or continue clause, but adding one should not really be a problem. A good thing is that it does

Re: macro definition for continue and break

2022-09-12 Thread Linus Björnstam
If you want a bit more advanced looping you could have a look at my goof-loop: https://git.sr.ht/~bjoli/goof-loop It currently does not support a break or continue clause, but adding one should not really be a problem. A good thing is that it does not rely on mutation for anything except higher

Re: macro definition for continue and break

2022-09-04 Thread Jean Abou Samra
Hi, Adding back the list in CC. Le 04/09/2022 à 12:49, Damien Mattei a écrit : hello jean, yes (thank you for your help) i'm a sorcerer's apprentice that always push to later the understanding of literals in syntax-rules, but by instinct i finally succeed in making works the weird thing :-)

Re: macro definition for continue and break

2022-09-04 Thread Jean Abou Samra
Le 04/09/2022 à 10:19, Damien Mattei a écrit : my previous question ,clearly more, is : (define-syntax for/bc (syntax-rules (continue break) ((_ (init test incrmt) b1 ...) (call/cc (lambda (break) (let () init (let loop () (when test (call/cc (lambda (continue) b1 ..

macro definition for continue and break

2022-09-04 Thread Damien Mattei
my previous question ,clearly more, is : (define-syntax for/bc (syntax-rules (continue break) ((_ (init test incrmt) b1 ...) (call/cc (lambda (break) (let () init (let loop () (when test (call/cc (lambda (continue) b1 ...)) incrmt (loop) is there a way to make working