I also think that Racket's model is not helpful. Moreover, an empty
inner parameterize "(parameterize () ...)" would be optimized away by
Racket, so it also depends on optimization.
We shouldn't compare it too closely with the traditional
implementation of parameters through dynamic-wind, I think
You're right. Racket also gives a:1 b:1 c:1.
So in Racket, a new parameterization is made during the dynamic extent of
reset, other parameterizations is also kept. But if no new
parameterization occurs, the parameterization at the moment of reset is not
kept.
In srfi-226 ref impl, reset (or cal
Am Sa., 19. Nov. 2022 um 08:04 Uhr schrieb Shiro Kawai :
>
> Yup, that nested parameterize example gives different results.
> Racket, Gauche-release: a:1 b:1 c:2
> Srfi-226 ref.impl. , Gauche-HEAD: a:1 b:1 c:1
Can you recheck? The nested parameterize (with the N parameterization
inside reset) gi
Yup, that nested parameterize example gives different results.
Racket, Gauche-release: a:1 b:1 c:2
Srfi-226 ref.impl. , Gauche-HEAD: a:1 b:1 c:1
The Racket model is explainable with dynamic-wind setting/resetting dynamic
values of specified parameters (and that's how Gauche-release handles them)
Am Sa., 19. Nov. 2022 um 01:04 Uhr schrieb Shiro Kawai :
>
> I'm inclined to the reference implementation behavior; the last example you
> show seems very confusing, especially that the dynamic value of m retrieved
> in seemingly the same dynamic environment (on the prompt) is affected by the
>
I'm inclined to the reference implementation behavior; the last example you
show seems very confusing, especially that the dynamic value of m retrieved
in seemingly the same dynamic environment (on the prompt) is affected by
the parameterization of unrelated parameters. In general you wound't know
Am Fr., 18. Nov. 2022 um 22:12 Uhr schrieb Marc Nieper-Wißkirchen
:
>
> At first sight, Racket's behavior looks strange (tested with 8.2):
>
> This expression
>
> (let ((m (make-parameter 0))
> (n (make-parameter 0)))
> (define k
> (parameterize ((m 1))
> (call-with-continuation-p
At first sight, Racket's behavior looks strange (tested with 8.2):
This expression
(let ((m (make-parameter 0))
(n (make-parameter 0)))
(define k
(parameterize ((m 1))
(call-with-continuation-prompt
(lambda ()
(parameterize ()
((call-with-composable-co
Here is an example using only the primitives:
(let ((m (make-parameter 0)))
((parameterize ((m 4))
(call-with-continuation-prompt
(lambda ()
((call-with-composable-continuation
(lambda (k)
(abort-current-continuation (default-continuation-prompt-tag)
Racket v8.6 behaves the same way.
On Fri, Nov 18, 2022 at 9:29 AM Shiro Kawai wrote:
> I used Racket v7.2, and here's the full transcription. I'm going to check
> with the newest Racket.
>
> shiro@scherzo:~/src/srfi-226$ racket
> Welcome to Racket v7.2.
> > (require racket/control)
> > (define
I used Racket v7.2, and here's the full transcription. I'm going to check
with the newest Racket.
shiro@scherzo:~/src/srfi-226$ racket
Welcome to Racket v7.2.
> (require racket/control)
> (define (print . xs) (for-each display xs) (newline))
> (define m (make-parameter 0))
> (define c #f)
> (defi
Thanks for the report, Shiro!
I have to investigate Racket's behavior. In 11.3.2 of the Racket
reference, it says: "If a continuation is captured during the
evaluation of parameterize, invoking the continuation effectively
re-introduces the parameterization, since a parameterization is
associated
It seems that there's a disagreement in how a delimited continuation
captures dynamic environment, between Racket and srfi-226.
Suppose the following code:
```
(define (print . xs) (for-each display xs) (newline))
(define m (make-parameter 0))
(define c #f)
(define (foo)
(parameterize ((m 1)
13 matches
Mail list logo