Re: escaping from a recursive call

2022-11-09 Thread Damien Mattei
oui bonne illustration du probléme... yes good explanation of problem... it's not simple, hope my macro is ok, for now all my code compile and run the same way ! :-) (but still no speed up :-( ) merçi Damien On Thu, Nov 10, 2022 at 5:57 AM wrote: > On Wed, Nov 09, 2022 at 08:20:31PM -0500, Olivi

Re: escaping from a recursive call

2022-11-09 Thread Damien Mattei
yes Olivier, i had found the Guile doc and i was asking myself, but the doc is quite "succint" without a lot of explanation and i'm asking if it exists more documentation and if it is or will be standardised in any R?RS... and i'm asking too how can it be integrated in my macro 'def to be used in

Re: escaping from a recursive call

2022-11-09 Thread tomas
On Wed, Nov 09, 2022 at 08:20:31PM -0500, Olivier Dion via General Guile related discussions wrote: > On Wed, 09 Nov 2022, Damien Mattei wrote: > > good... thank, it works, i do not know a lot about 'prompts , a good > > explanation is here: > > > > https://stackoverflow.com/questions/29838344/wh

Re: escaping from a recursive call

2022-11-09 Thread Olivier Dion via General Guile related discussions
On Wed, 09 Nov 2022, Damien Mattei wrote: > good... thank, it works, i do not know a lot about 'prompts , a good > explanation is here: > > https://stackoverflow.com/questions/29838344/what-exactly-is-a-continuation-prompt In the Guile manual: Top > API Reference > Control Mechanisms > Prompts

Artanis: Referring to pub from SXML templates

2022-11-09 Thread Luis Felipe
Hi, Artanis documentation shows examples of HTML templates that use commands like <@css filename.css %>, but how do I get the path to the "pub" directory from my SXML templates? --- Luis Felipe López Acevedo https://luis-felipe.gitlab.io/ publickey - luis.felipe.la@protonmail.com - 0x12DE1598

Re: escaping from a recursive call

2022-11-09 Thread Zelphir Kaltstahl
Hello Damien, On 11/9/22 18:18, Damien Mattei wrote: but in the general case , i want a macro that can do it on any function (i'm not sure it can be done because the continuation have to be captured just before the call to the function and be inlined at the good place) On Wed, Nov 9, 2022

Re: escaping from a recursive call

2022-11-09 Thread Damien Mattei
good... thank, it works, i do not know a lot about 'prompts , a good explanation is here: https://stackoverflow.com/questions/29838344/what-exactly-is-a-continuation-prompt i personally find a solution too: (define-syntax def (lambda (stx) (syntax-case stx () ;; multiple definitions w

Re: escaping from a recursive call

2022-11-09 Thread Olivier Dion via General Guile related discussions
On Wed, 09 Nov 2022, Damien Mattei wrote: > but in the general case , i want a macro that can do it on any function > (i'm not sure it can be done because the continuation have to be captured > just before the call to the function and be inlined at the good > place) I'm not aware of any cont

Re: escaping from a recursive call

2022-11-09 Thread Damien Mattei
but in the general case , i want a macro that can do it on any function (i'm not sure it can be done because the continuation have to be captured just before the call to the function and be inlined at the good place) On Wed, Nov 9, 2022 at 5:52 PM Olivier Dion wrote: > On Wed, 09 Nov 2022,

Re: escaping from a recursive call

2022-11-09 Thread Olivier Dion via General Guile related discussions
On Wed, 09 Nov 2022, Damien Mattei wrote: > i need a way to escape not only the current call of a recursive function > (it is already done) but alls: > > example: > > (def (foo n) > (cond ((= n 0) 'end0) > ((= n 7) (return 'end7)) > (else (cons n (foo {n - 1}) Is that what you want?

escaping from a recursive call

2022-11-09 Thread Damien Mattei
i need a way to escape not only the current call of a recursive function (it is already done) but alls: example: (def (foo n) (cond ((= n 0) 'end0) ((= n 7) (return 'end7)) (else (cons n (foo {n - 1}) cheme@(guile-user)> (foo 5) (5 4 3 2 1 . end0) scheme@(guile-user)> (foo 10) (10 9

Re: speed difference between Guile and Racket (and Python)

2022-11-09 Thread Damien Mattei
sorry for my late answer but i needed to test again (and modify code a bit) a few precision: -the code is perheaps hard to // : recursive algo versus imperative one -only a portion of code is //( i // the unification of minterms because it was really long to compute,but perheaps there are other bot