Re: [racket-users] Re: hashcons

2020-09-14 Thread Tony Garnock-Jones
On Mon, 14 Sep 2020 at 14:18, Hendrik Boom wrote: > I would, ideally, only use hashcons on those cons-cells which had > themselves > been hashconsed, so eq? would suffice. > The challenge is checking to see whether a new allocation is required. Checking `eq?` of the cdr suffices, but seldom is

Re: [racket-users] Re: hashcons

2020-09-14 Thread Hendrik Boom
On Mon, Sep 14, 2020 at 01:11:34AM -0700, Tony Garnock-Jones wrote: > On Sunday, September 13, 2020 at 12:41:15 AM UTC+2 hen...@topoi.pooq.com > wrote: > > > True, but that would require rewriting list, and quasiquote, ans > > others like that to use the hashcons. > > > > Not impossible. > >

Re: [racket-users] Re: hashcons

2020-09-14 Thread Tony Garnock-Jones
On Sunday, September 13, 2020 at 12:41:15 AM UTC+2 hen...@topoi.pooq.com wrote: > True, but that would require rewriting list, and quasiquote, ans > others like that to use the hashcons. > > Not impossible. > One potentially useful trick is to write a function `canonicalize` which deeply

Re: [racket-users] Re: hashcons

2020-09-12 Thread Hendrik Boom
On Sat, Sep 12, 2020 at 01:23:24PM -0700, jackh...@gmail.com wrote: > Not automatically, but you can make your own wrapper function around cons > that interns them using a weak hash table and then you can use that wrapper > function everywhere. True, but that would require rewriting list, and

[racket-users] Re: hashcons

2020-09-12 Thread jackh...@gmail.com
Not automatically, but you can make your own wrapper function around cons that interns them using a weak hash table and then you can use that wrapper function everywhere. On Thursday, September 10, 2020 at 7:34:37 PM UTC-7 hen...@topoi.pooq.com wrote: > Is there a way to run Racket so that