Koot [mailto:jos.k...@gmail.com]
Sent: lunes, 14 de septiembre de 2015 14:09
To: 'Benjamin Greenman'; 'Racket Users'
Cc: jos.k...@gmail.com
Subject: RE: [racket-users] values considered harmful
In the last line split&flip receives 0, but it needs a pair.
The following wotk
))
(cons a b) ; -> (1 . 0)
In this case I don't see a fault in racket/base
Jos
_
From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com]
On Behalf Of Benjamin Greenman
Sent: domingo, 13 de septiembre de 2015 7:58
To: Racket Users
Subject: [racket-users] value
I've pushed a repair.
At Sun, 13 Sep 2015 07:44:40 -0600, Matthew Flatt wrote:
> Thanks for the help!
>
> When the optimize converts
>
> (let-values ([(X ...) (values M ...)])
>)
>
> to
>
> (let ([X M] ...)
>)
>
> it incorrectly attaches a virtual timestamp to each "[X M]" b
Thanks for the help!
When the optimize converts
(let-values ([(X ...) (values M ...)])
)
to
(let ([X M] ...)
)
it incorrectly attaches a virtual timestamp to each "[X M]" binding
that corresponds to the timestamp after the whole `(values M ...)`.
So, the optimizer loses the fa
Bonjour,
The bytecode generated is:
(begin
(module test
(require (lib "racket/base.rkt"))
(provide)
(module configure-runtime
(require '#%kernel (lib "racket/runtime-config.rkt"))
(provide)
(print-as-expression '#t))
(define-values
(_split&flip)
What's really strange to me is that many versions of this program raise
the expected "car: contract violation" error. For example, try changing
the buggy line to `(values x y)` or `(values x x)` or even `(values (+
y) (+ x))`.
Yeah, that's strange. I can confirm a segfault with v6.2 on Linux x8
Something bad happened. I was using values and pairs, made a small mistake,
and wound up with a segfault (on v6.2 and v6.2.900.16). Here's a minimal
example:
#lang racket/base
(define (split&flip xy)
(define-values (x y) (values (car xy) (cdr xy)))
(values y x)) ;; My mistake: x should be a p
7 matches
Mail list logo