I don't think the mutable/immutable issue should be as significant as it
seems here. Using the Any type shouldn't perform better the way you
describe, so we need to look more at what the actual contracts are doing.
Sam
On Dec 2, 2017 6:24 PM, "HiPhish" wrote:
> Now
Now that I think about it, changing the types to be immutable is not really
correct either. There is no reason users should not be able to serialise a
mutable list, vector or hash table, just as they can serialise any mutable
scalar as well.
The result of unpacking bytes could be immutable, but
> The performance is probably because HashTable and Vector values can be
> mutable, so Typed Racket needs to do extra work to protect them.
>
> To test this, I cloned msgpack, removed `Vector` from the `Packable`
> type, and changed `HashTable` to `Immutable-Hashtable`. Change here:
>
On Wednesday, August 30, 2017 at 2:39:04 PM UTC-4, dvanhorn wrote:
>
> How can I make definitions-area examples using the HtDP languages in
> Scribble?
>
> I tried the following, but since the evaluator corresponds to the
> interactions-area, it complains about definitions not being allowed:
>
> This has tanked my performance to the point where the tests for
> non-scalar types (vectors and hashes) time out on the package
> server, and thus fail.
> https://gitlab.com/HiPhish/MsgPack.rkt/commit/0b6cdc7115389db97a8de2a5175c1feb4c939f8f
The performance is probably because HashTable and
Oh right --- instead of making a new exception type, it's possible to
use `require/typed` to give `raise` a different type signature:
```
#lang typed/racket/base
(require/typed racket/base
(raise (All (A) (-> Any A
(with-handlers ((vector? values))
(raise (vector 1 2 3)))
;; '#(1 2 3)
Hello everyone,
A while ago I had written a MessagePack library Racket:
https://pkgs.racket-lang.org/package/msgpack
Yesterday I made a change to narrow down some of the types from `Any`
(which is
wrong) to `Packable`. This has tanked my performance to the point where the
tests for non-scalar
It is a contract that TR uses internally that might be helpful here,
maybe. Or maybe not! :)
Robby
On Sat, Dec 2, 2017 at 3:32 AM, HiPhish wrote:
> What is any-wrap/c? It does not show up in the documentation.
>
> On Friday, December 1, 2017 at 9:17:18 PM UTC+1, Robby
Thank you everyone, I have gotten it up and running now. I'll make a formal
announcement once I get an unrelated performance issue sorted out.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving
What is any-wrap/c? It does not show up in the documentation.
On Friday, December 1, 2017 at 9:17:18 PM UTC+1, Robby Findler wrote:
>
> Why not use any-wrap/c?
>
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group
10 matches
Mail list logo