Re: [racket-users] can `impersonate-hash` really filter out hash keys?

2017-06-30 Thread Matthew Butterick
That's a good suggestion. Yes, that will be smoother. > On Jun 30, 2017, at 10:31 AM, Philip McGrath wrote: > > If it doesn't absolutely have to be a hash, you can definitely make dict-ref > and dict-iterate-key etc. work differently. -- You received this message

Re: [racket-users] can `impersonate-hash` really filter out hash keys?

2017-06-30 Thread Philip McGrath
If it doesn't absolutely have to be a hash, you can definitely make dict-ref and dict-iterate-key etc. work differently. -Philip On Fri, Jun 30, 2017 at 12:15 PM, Matthew Butterick wrote: > > > On Jun 30, 2017, at 10:07 AM, Robby Findler > wrote:

Re: [racket-users] can `impersonate-hash` really filter out hash keys?

2017-06-30 Thread Matthew Butterick
> On Jun 30, 2017, at 10:07 AM, Robby Findler > wrote: > > Maybe you could make the impersonator (it would be a chaperone, really > in what I'm suggesting) signal an error if it gets one of the private > keys and then hand out only the hashes with the impersonator

Re: [racket-users] can `impersonate-hash` really filter out hash keys?

2017-06-30 Thread Robby Findler
Maybe you could make the impersonator (it would be a chaperone, really in what I'm suggesting) signal an error if it gets one of the private keys and then hand out only the hashes with the impersonator around it, keeping the "raw" one around for code that is allowed to access the private keys?

[racket-users] can `impersonate-hash` really filter out hash keys?

2017-06-30 Thread Matthew Butterick
I'd like to make a hash impersonator that has "private" keys that can be reached by `hash-ref`, but which are not reported by `hash-keys` and other operations that iterate over all keys. The docs for `impersonate-hash` [1] say that you can "use `key-proc` to filter keys extracted from the