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)
  (syntax-case stx ()
[(_ (x ...) e ...)
 #`(letrec ([L (lam '(x ...)
'(e ...)
(*env)
(lambda (x ...)
  (syntax-parameterize ([*env
 (lambda (stx)
   (syntax-case stx ()
 [(_) #`(append '(x ...) 
(lam-environment L))]))])
e)
  ...))])
 L)]))
(define-syntax-parameter *env
  (syntax-rules () [(_) '()]))
(struct lam (parameters bodies environment closure) #:property prop:procedure 3)

(define-syntax (new-mb stx)
  (syntax-case stx ()
[(_ e ...)
 #'(#%module-begin
(let ([v e])
  (if (lam? v)
  `(let (,@(map (lambda (x) `(,x --some-value--)) (lam-environment 
v)))
 (lambda ,(lam-parameters v) ,@(lam-bodies v)))
  v))
...)]))



> On May 24, 2017, at 3:41 PM, Vityou  wrote:
> 
> 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
>>>  (rename-out
>>>   (new-lambda lambda)
>>>   (new-mb #%module-begin)))
>>> 
>>> 
>>> (define-syntax (new-lambda stx)
>>>   (syntax-case stx ()
>>> [(_ (x ...) e ...)
>>>  #'(lam '(x ...) '(e ...) (lambda (x ...) e ...))]))
>>> 
>>> 
>>> (struct lam (parameters bodies closure) #:property prop:procedure 2)
>>> 
>>> 
>>> (define-syntax (new-mb stx)
>>>   (syntax-case stx ()
>>> [(_ e ...)
>>>  #'(#%module-begin
>>> (let ([v e])
>>>   (if (lam? v)
>>>   `(lambda ,(lam-parameters v) ,@(lam-bodies v))
>>>   v))
>>> ...)]))
>>> 
>>> 
>>> 
>>> 
>>> ;; - - - 
>>> 
>>> 
>>> 
>>> #lang s-exp "new-lang.rkt” ;; new-lang-client.rkt 
>>> 
>>> 
>>> ((lambda (x) x)
>>>  (lambda (y) y))
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On May 23, 2017, at 10:03 PM, Vityou  wrote:
>>> 
>>> 
>>> On Tuesday, May 23, 2017 at 7:17:18 PM UTC-6, Matthias Felleisen wrote:
>>> Why do you interpret S-expressions instead of re-mapping lambda and #%app? 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On May 23, 2017, at 9:14 PM, Vityou  wrote:
>>> 
>>> I might be able to do something like this, but what I'm looking for is 
>>> something that will be able to show the variables available to it in 
>>> adition to its source.  I'll probable have to do something like what you 
>>> did with the struct accept add a field with its available variables and 
>>> modify #%app to add to its known variables.
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Racket Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to racket-users...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>> 
>>> I dont know what I could map lambda to that would let it retain and print 
>>> its known variables besides a list.
>> 
>> That's probably good enough for most cases, but I tried to add a struct 
>> field to record the lexical content, I can't fin a way to mimic evaluating 
>> the body of the function in the struct, this is the closest I got:
>> 
>> (define-syntax (new-app stx)
>>  (syntax-case stx ()
>>[(_ f x)
>> #'(let ([result (#%app f x)])
>> (if (lam? result)
>> (struct-copy lam
>>  result
>>  [lex (cons `(,(lam-parameter f) ,(if (lam? x)
>> `(λ 
>> (,(lam-parameter x)) ,(lam-body x))
>> x))
>>   (lam-lex f))])
>> result))]))
>> 
>> It sort of works, but it just blindly tacks on info if the result is a 
>> struct.  ((lambda (x) x) (lambda (y) y) results in (function (lambda (y) y) 
>> (x (lambda (y) y)))
> 
> I was able to get it to work by processing updating the list parts of the 
> struct "In parallel" with the normal evaluation by applying the old s-exp 
> processing functions to the correct part of the struct:
> 
> (define-syntax (new-app stx)
>  (syntax-case stx ()
>[(_ f x)
> #'(let ([result (#%app f x)])
> (if (lam? result)
> (struct-copy lam
>  result
>  [lex (third (eval `((λ 

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 contract
  promised: dict?
  produced: 'not-a-new-dict
  in: the _r result of
  (->i
   ((d (dict-implements/c dict-set))
(k (d) (dict-key-contract d))
(value (d) (dict-value-contract d)))
   (_r dict?))
  contract from: /racket/dict.rkt
  blaming: /racket/dict.rkt
   (assuming the contract is correct)
  at: /racket/dict.rkt:190.2


I understand the reasons you explain for why blame is being assigned the
way it is, but my intuition before I encountered this was that the module
defining a generic interface could specify a contract for a generic method
and make the module supplying the actual implementation responsible for
satisfying the range part of the contract. In terms of boundaries, I guess
I wanted a boundry between the caller of a generic method and the
implementor of the method, where the contract could be specified by the
author of the interface without taking responsiblity for bad third-party
implementations. It looks like racket/dict wanted to write a contract like
that, too.

The class system's interfaces specify contracts of the kind I had in mind.
For example:

#lang racket

(module string-server racket
  (provide can-be-string<%>)
  (define can-be-string<%>
(interface ()
  [to-string (->m string?)])))
(module buggy racket
  (require (submod ".." string-server))
  (provide buggy%)
  (define buggy%
(class* object% (can-be-string<%>)
  (super-new)
  (define/public (to-string)
'not-a-string
(require (submod "." buggy))
(send (new buggy%) to-string)


blames buggy% in the error message (though it blames the class, not the
module, so this is presumably a different sort of boundry).

I think support for this sort of boundry would be a valuable addition to
the generics library.

-Philip

On Tue, May 23, 2017 at 10:31 AM, Vincent St-Amour <
stamo...@eecs.northwestern.edu> wrote:

> Hi Philip,
>
> I don't think you can express the contract boundary you have in mind
> using the generics library as it is.
>
> The blame you see for both contracts makes sense. In the first case,
> `string-server` is not protecting itself from bad inputs (uses `any/c`)
> yet promises to return a string. It rightly gets blamed when that
> doesn't happen.
>
> In the second case, `string-server` does protect itself (using
> `can-be-string/c`), but it protects itself against its callers, who now
> have the responsibility to pass it something reasonable. It doesn't
> (passes the `buggy` struct along), so it rightly gets blamed.
>
> To get the contract boundary that you want, I think you'd want to wrap
> the `buggy` constructor with a contract that makes it commit to
> producing a valid `can-be-string`. You could do this either when you
> export it from the `buggy` module, or by "laundering" it through a
> submodule before getting it to the main module. That way, it should end
> up being blamed.
>
> This is not a great solution, because you'd have to do this for every
> instance of the generic interface, but the class of boundaries you have
> in mind cannot currently be described, I think.
>
> Vincent
>
>
>
>
> On Mon, 22 May 2017 22:31:25 -0500,
> Philip McGrath wrote:
> >
> > I'm running into trouble in trying to give contracts to methods from
> generic interfaces (in the sense of racket/generic) that assign blame to
> the implementor of a bad method implementation. This seems like it's
> probably a common problem, so I'm
> > hoping a solution exists.
> >
> > For an example, consider the following:
> >
> >  #lang racket
> >
> >  (module string-server racket
> >  (require racket/generic)
> >  (provide gen:can-be-string
> >  can-be-string?
> >  (contract-out
> >  [to-string
> >  (-> any/c
> >  string?)]
> >  ))
> >  (define-generics can-be-string
> >  (to-string can-be-string)
> >  #:fast-defaults
> >  ([string?
> >  (define (to-string str)
> >  str)])))
> >
> >  (module buggy racket
> >  (require (submod ".." string-server))
> >  (provide (struct-out buggy))
> >  (struct buggy ()
> >  #:methods gen:can-be-string
> >  [(define (to-string this)
> >  'not-a-string)]))
> >
> >  (require (submod "." string-server)
> >  (submod "." buggy))
> >
> >  (to-string (buggy))
> >
> > This program raises an exception as expected, but blames the
> string-server module rather than the buggy module.
> >
> > The string-server module can deflect blame from itself by changing the
> contract of to-string to
> > (-> (can-be-string/c [to-string (-> any/c string?)]) string?), but the
> result is even worse: now the error blames the enclosing module.
> >
> > The closest thing I've found to a solution is to abandon racket/generic
> and use a struct type property with a guard that performs lots of checks
> 

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
> >  (rename-out
> >   (new-lambda lambda)
> >   (new-mb     #%module-begin)))
> > 
> > 
> > (define-syntax (new-lambda stx)
> >   (syntax-case stx ()
> >     [(_ (x ...) e ...)
> >      #'(lam '(x ...) '(e ...) (lambda (x ...) e ...))]))
> > 
> > 
> > (struct lam (parameters bodies closure) #:property prop:procedure 2)
> > 
> > 
> > (define-syntax (new-mb stx)
> >   (syntax-case stx ()
> >     [(_ e ...)
> >      #'(#%module-begin
> >         (let ([v e])
> >           (if (lam? v)
> >               `(lambda ,(lam-parameters v) ,@(lam-bodies v))
> >               v))
> >         ...)]))
> > 
> > 
> > 
> > 
> > ;; - - - 
> > 
> > 
> > 
> > #lang s-exp "new-lang.rkt” ;; new-lang-client.rkt 
> > 
> > 
> > ((lambda (x) x)
> >  (lambda (y) y))
> > 
> > 
> > 
> > 
> > 
> > 
> > On May 23, 2017, at 10:03 PM, Vityou  wrote:
> > 
> > 
> > On Tuesday, May 23, 2017 at 7:17:18 PM UTC-6, Matthias Felleisen wrote:
> > Why do you interpret S-expressions instead of re-mapping lambda and #%app? 
> > 
> > 
> > 
> > 
> > 
> > On May 23, 2017, at 9:14 PM, Vityou  wrote:
> > 
> > I might be able to do something like this, but what I'm looking for is 
> > something that will be able to show the variables available to it in 
> > adition to its source.  I'll probable have to do something like what you 
> > did with the struct accept add a field with its available variables and 
> > modify #%app to add to its known variables.
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> > 
> > I dont know what I could map lambda to that would let it retain and print 
> > its known variables besides a list.
> 
> That's probably good enough for most cases, but I tried to add a struct field 
> to record the lexical content, I can't fin a way to mimic evaluating the body 
> of the function in the struct, this is the closest I got:
> 
> (define-syntax (new-app stx)
>   (syntax-case stx ()
> [(_ f x)
>  #'(let ([result (#%app f x)])
>  (if (lam? result)
>  (struct-copy lam
>   result
>   [lex (cons `(,(lam-parameter f) ,(if (lam? x)
>  `(λ 
> (,(lam-parameter x)) ,(lam-body x))
>  x))
>(lam-lex f))])
>  result))]))
> 
> It sort of works, but it just blindly tacks on info if the result is a 
> struct.  ((lambda (x) x) (lambda (y) y) results in (function (lambda (y) y) 
> (x (lambda (y) y)))

I was able to get it to work by processing updating the list parts of the 
struct "In parallel" with the normal evaluation by applying the old s-exp 
processing functions to the correct part of the struct:

(define-syntax (new-app stx)
  (syntax-case stx ()
[(_ f x)
 #'(let ([result (#%app f x)])
 (if (lam? result)
 (struct-copy lam
  result
  [lex (third (eval `((λ (,(lam-parameter f)) 
,(lam-body f))
,(if (lam? x)
 `(λ (,(lam-parameter x)) 
,(lam-body x))
 x))
  (lam-lex f)))])
 result))]))

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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)))
> 
> 
> (define-syntax (new-lambda stx)
>   (syntax-case stx ()
>     [(_ (x ...) e ...)
>      #'(lam '(x ...) '(e ...) (lambda (x ...) e ...))]))
> 
> 
> (struct lam (parameters bodies closure) #:property prop:procedure 2)
> 
> 
> (define-syntax (new-mb stx)
>   (syntax-case stx ()
>     [(_ e ...)
>      #'(#%module-begin
>         (let ([v e])
>           (if (lam? v)
>               `(lambda ,(lam-parameters v) ,@(lam-bodies v))
>               v))
>         ...)]))
> 
> 
> 
> 
> ;; - - - 
> 
> 
> 
> #lang s-exp "new-lang.rkt” ;; new-lang-client.rkt 
> 
> 
> ((lambda (x) x)
>  (lambda (y) y))
> 
> 
> 
> 
> 
> 
> On May 23, 2017, at 10:03 PM, Vityou  wrote:
> 
> 
> On Tuesday, May 23, 2017 at 7:17:18 PM UTC-6, Matthias Felleisen wrote:
> Why do you interpret S-expressions instead of re-mapping lambda and #%app? 
> 
> 
> 
> 
> 
> On May 23, 2017, at 9:14 PM, Vityou  wrote:
> 
> I might be able to do something like this, but what I'm looking for is 
> something that will be able to show the variables available to it in adition 
> to its source.  I'll probable have to do something like what you did with the 
> struct accept add a field with its available variables and modify #%app to 
> add to its known variables.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> I dont know what I could map lambda to that would let it retain and print its 
> known variables besides a list.

That's probably good enough for most cases, but I tried to add a struct field 
to record the lexical content, I can't fin a way to mimic evaluating the body 
of the function in the struct, this is the closest I got:

(define-syntax (new-app stx)
  (syntax-case stx ()
[(_ f x)
 #'(let ([result (#%app f x)])
 (if (lam? result)
 (struct-copy lam
  result
  [lex (cons `(,(lam-parameter f) ,(if (lam? x)
 `(λ 
(,(lam-parameter x)) ,(lam-body x))
 x))
   (lam-lex f))])
 result))]))

It sort of works, but it just blindly tacks on info if the result is a struct.  
((lambda (x) x) (lambda (y) y) results in (function (lambda (y) y) (x (lambda 
(y) y)))

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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]: 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 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 group and stop receiving emails from it, send an 
> >> email to racket-users+unsubscr...@googlegroups.com.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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]: 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 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 group and stop receiving emails from it, send an 
>> email to racket-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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:
> Hello,
>
> sorry, but the problem says "that it doesn't understand "open location" (with 
> or without the ">" sign.
> I get the usage: osascript [-l language] [-e script] [-i] [-s {ehso}] 
> [programfile] [argument ...].
>
> Thank you
> Jürgen Dabel
> Schrobenhausen
>
>
>
> -Original-Nachricht-
> Betreff: Re: [racket-users] Can't get Dr Racket Documentation
> Datum: 2017-05-24T15:34:16+0200
> Von: "Robby Findler" 
> An: "j.da...@t-online.de" , 
> "racket-users@googlegroups.com List" 
>
> I'm sorry, you must remove the greater than sign. (I don't actually
> speak German, but I think that that's what the error message is
> currently saying.)
>
> Robby
>
>
> On Wed, May 24, 2017 at 8:14 AM, j.da...@t-online.de
>  wrote:
>> Hello,
>>
>>
>>
>> I get the same answer:
>>
>>
>>
>> Last login: Wed May 24 09:02:46 on console
>>
>> Juergens-iMac:~ jdabel$ /usr/bin/osascript -e 'open location >
>> "file:///Applications/Racket%20v6.9/doc/index.html"'
>>
>> 0:13: execution error: «script» versteht die Nachricht „open location“
>> nicht. (-1708)
>>
>> Juergens-iMac:~ jdabel$
>>
>>
>>
>> Thank you,
>>
>>
>>
>> Jürgen dabel
>>
>> Schrobenhausen
>>
>>
>>
>>
>>
>>
>>
>> -Original-Nachricht-
>>
>> Betreff: Re: [racket-users] Can't get Dr Racket Documentation
>>
>> Datum: 2017-05-23T22:39:52+0200
>>
>> Von: "Robby Findler" 
>>
>> An: "j.da...@t-online.de" 
>>
>>
>>
>>
>>
>>
>>
>> Ah -- my apologies: the command was supposed to be only on a single line
>> with only a single space after the word "location" and the open quote
>> character. Can you try that again?
>>
>>
>> Robby
>>
>> On Tue, May 23, 2017 at 10:01 AM j.da...@t-online.de 
>> wrote:
>>>
>>> Hello,
>>>
>>> thank you!
>>>
>>> I get:
>>>
>>> Last login: Tue May 23 10:53:08 on console
>>> Juergens-iMac:~ jdabel$  /usr/bin/osascript -e 'open location
>>> > "file:///Applications/Racket%20v6.9/doc/index.html"'
>>> 0:13: execution error: «script» versteht die Nachricht „open location“
>>> nicht. (-1708)
>>> Juergens-iMac:~ jdabel$
>>>
>>> Jürgen
>>>
>>> -Original-Nachricht-
>>> Betreff: Re: [racket-users] Can't get Dr Racket Documentation
>>> Datum: 2017-05-23T15:36:15+0200
>>> Von: "Robby Findler" 
>>> An: "Jürgen Dabel" 
>>>
>>> What happens if you open up a terminal window and paste this command in?
>>>
>>>/usr/bin/osascript -e 'open location
>>> "file:///Applications/Racket%20v6.9/doc/index.html"'
>>>
>>> Robby
>>>
>>>
>>> On Sun, May 21, 2017 at 4:34 AM,   wrote:
>>> > I get an error when trying to get Help Desk or Dr Racket Documentation
>>> > from the menu. I get following error:
>>> >
>>> > Thank you
>>> > Juergen Dabel
>>> > Schrobenhausen
>>> > Germany
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> > Groups "Racket Users" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> > an email to racket-users+unsubscr...@googlegroups.com.
>>> > For more options, visit https://groups.google.com/d/optout.
>>
>> 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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 group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.