Re: [racket-users] making a language that can return the body of a function

2017-05-24 Thread Matthias Felleisen
Don’t eval. This is a bit crude but it now your lam-s keep track of your environment, too. #lang racket ;; new-lang.rkt (provide #%app #%datum #%top-interaction (rename-out (new-lambda lambda) (new-mb #%module-begin))) (require racket/stxparam) (define-syntax (new-lambda stx)

Re: [racket-users] Contracts for generic interfaces (or struct type properties?)

2017-05-24 Thread Philip McGrath
I was interested after getting your reply in what racket/dict does, it it seems to get blamed for bad implementations of the dict-set method: (struct bad-dict () #:methods gen:dict [(define (dict-set this k v) 'not-a-new-dict)]) (dict-set (bad-dict) 'a #t) dict-set: broke its own

Re: [racket-users] making a language that can return the body of a function

2017-05-24 Thread Vityou
On Wednesday, May 24, 2017 at 12:05:19 PM UTC-6, Vityou wrote: > On Tuesday, May 23, 2017 at 8:21:59 PM UTC-6, Matthias Felleisen wrote: > > Try to start with this:  > > > > > > > > > > > > #lang racket ;; new-lang.rkt  > > > > > > (provide > >  #%app > >  #%datum > >  #%top-interaction > >

Re: [racket-users] making a language that can return the body of a function

2017-05-24 Thread Vityou
On Tuesday, May 23, 2017 at 8:21:59 PM UTC-6, Matthias Felleisen wrote: > Try to start with this:  > > > > > > #lang racket ;; new-lang.rkt  > > > (provide >  #%app >  #%datum >  #%top-interaction >  (rename-out >   (new-lambda lambda) >   (new-mb     #%module-begin))) > > >

Re: [racket-users] immutable hash table references?

2017-05-24 Thread Vincent St-Amour
I believe we used red-black trees. Matt Might has a nice writeup on functional red-black trees: http://matt.might.net/articles/red-black-delete/ Vincent On Wed, 24 May 2017 10:14:11 -0500, Robby Findler wrote: > > But it was a different balanced binary tree before. There are many > things

Re: [racket-users] immutable hash table references?

2017-05-24 Thread Robby Findler
But it was a different balanced binary tree before. There are many things it could be that would behave similarly. Robby On Wed, May 24, 2017 at 10:05 AM, Stephen Chang wrote: > I believe Racket uses HAMTs [1] for immutable hash tables. > > [1]:

Re: [racket-users] Can't get Dr Racket Documentation

2017-05-24 Thread Robby Findler
Well, I'm not sure what to do about that. This script works well for me. What version of the operating system are you using? (You can find that from the "About this Mac" menu item in the apple menu) Robby On Wed, May 24, 2017 at 10:06 AM, j.da...@t-online.de wrote: >

Re: [racket-users] immutable hash table references?

2017-05-24 Thread Stephen Chang
I believe Racket uses HAMTs [1] for immutable hash tables. [1]: http://lampwww.epfl.ch/papers/idealhashtrees.pdf On Wed, May 24, 2017 at 11:01 AM, 'John Clements' via users-redirect wrote: > I’m introducing hash tables to students in a first-year class. Is there a > handy

[racket-users] immutable hash table references?

2017-05-24 Thread 'John Clements' via users-redirect
I’m introducing hash tables to students in a first-year class. Is there a handy reference for the implementation of immutable hash tables? Is this in Okasaki? John -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this