About a month ago, the changes for the plot overlays were merged into the
main plot repository and will be available in the next Racket release.
Based on feedback from Ben Greenman, the implementation is different than
my original prototype, but it is more flexible -- thanks to Ben for
On 20/03/18 11:56, Philip McGrath wrote:
> Mutable values generally cannot be sent as messages on place channels.
> ("To a first approximation, place channels support only immutable,
> transparent values as messages."
> http://docs.racket-lang.org/reference/places.html The documentation for
>
On 20/03/18 12:50, Philip McGrath wrote:
> The reference section on "Reading Structures" has more relevant details:
> http://docs.racket-lang.org/reference/reader.html#%28part._parse-structure%29
>
> -Philip
>
Thanks for your help on this. I will have a read.
--
Paulo Matos
--
You
Hello,
In a similar comment to my previous thread, I am yet again surprised at
this:
a.rkt:
#lang racket
(provide (struct-out foo))
(struct foo (a b)
#:prefab)
b.rkt:
#lang racket
(require "a.rkt")
(place-message-allowed? (foo 1 2))
This works! However, try to provide in a.rkt foo like
Given your definition of `(struct f (a b) #:prefab #:mutable)`, you will
see that `(equal? (f 1 2) #s(f 1 2))` returns `#false`, because `#s(f 1 2)`
does not evaluate to an instance of your `f` structure type. The printed
form of a structure created with `(f 1 2)` is `'#s((f #(0 1)) 1 2)`.
Per
The reference section on "Reading Structures" has more relevant details:
http://docs.racket-lang.org/reference/reader.html#%28part._parse-structure%29
-Philip
On Tue, Mar 20, 2018 at 6:48 AM, Philip McGrath
wrote:
> Given your definition of `(struct f (a b) #:prefab
Hi,
I was quite surprised by a 'feature' of prefab mutable structures:
#lang racket
(struct f (a b)
#:prefab
#:mutable)
(place-message-allowed? (f 1 2))
(place-message-allowed? #s(f 1 2))
I was expecting both to return true but to my amazement it was not the
case. The one created with
Mutable values generally cannot be sent as messages on place channels. ("To
a first approximation, place channels support only immutable, transparent
values as messages." http://docs.racket-lang.org/reference/places.html The
documentation for `place-message-allowed?` is also specific that only
The same behavior occurs with vectors, the program
(define v (vector 1 2))
(define/contract vc (vectorof integer?) (vector 1 2))
(place-message-allowed? v)
(place-message-allowed? vc)
Produces:
#t
#f
I think the issue here is that both contracted vectors and structs are
wrapped in
Hello all,
On Windows, I noticed that Racket's initialization file is incorrectly set
to %HOMEDIRVE%\%HOMEPATH%\.racketrc.rktl
$ grep 'WINDOWS_INIT_FILENAME' -r .
./racket-master/racket/src/gracket/grmain.c:#define WINDOWS_INIT_FILENAME
"%%HOMEDIRVE%%\\%%HOMEPATH%%\\gracketrc.rktl"
Just read your GitHub link and see the problem goes beyond my simple #:auto
issue. Thanks for that link. I’m pretty green to all the thorny issues when it
comes to dressing primitive datatypes up in fancy bindings and hope the
magicians of indirection can somehow pull a rabbit out of the hat
> On Mar 20, 2018, at 11:51 PM, Alex Knauth wrote:
>
>
>
>> On Mar 19, 2018, at 11:37 AM, David Storrs wrote:
>>
>> This does not work:
>
>> (define user (hash 'name "bob" 'job (hash 'type 'dev 'id 112)))
>> (match user
>> [(hash-table
> On Mar 19, 2018, at 11:37 AM, David Storrs wrote:
>
> This does not work:
> (define user (hash 'name "bob" 'job (hash 'type 'dev 'id 112)))
> (match user
> [(hash-table ('name name) ('job (hash-table 'type type 'id id)))
>(displayln name)
>(displayln type)
On Mar 20, 2018, at 9:21 AM, Kevin Forchione wrote:
>
>
Sorry, wrong example!
>(struct fish (color (weight #:auto)) #:transparent)
>(define marlin (fish 'orange-and-white))
>(define dory (struct-copy fish marlin [color 'blue]))
On Mar 19, 2018, at 2:35 PM, Alexis King wrote:
>
> I’m late to this thread, but perhaps I can clarify some things that I
> don’t think have been made entirely clear.
>
> First of all, you are absolutely correct that structures, at runtime,
> know nothing whatsoever
15 matches
Mail list logo