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

2017-05-24 Thread Ben Greenman
On Wed, May 24, 2017 at 3:56 PM, Philip McGrath wrote: > I think support for this sort of boundry would be a valuable addition to > the generics library. +2, one for me and one on behalf of issue #1440 -- You received this message because you are subscribed to the Google Groups "Racket Users

Re: [racket-users] Convert mouse coordinates in mouse-event% to window coordinates? And also for snip%...

2017-05-24 Thread WarGrey Gyoudmon Ju
Hi, yes, this requirement is not as easy as it looks like. I just listed all the methods that most useful, by reading their docs, you can easily find your algorithm to compute the correct location. I mentioned you snip% does not have its own mouse event object, therefore, you cannot obtain the e

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 contra

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))) > > > (define-syntax

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

2017-05-24 Thread 'John Clements' via users-redirect
Thanks, all! John > On May 24, 2017, at 8:17 AM, Vincent St-Amour > wrote: > > 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, > Rob

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

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

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

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 impl

[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 grou

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

2017-05-24 Thread Robby Findler
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:4