Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Matthias Felleisen
On Dec 17, 2012, at 12:59 AM, Neil Toronto wrote: On 12/16/2012 06:41 PM, Eli Barzilay wrote: 10 minutes ago, Neil Toronto wrote: I think I'd rather have a convention in Typed Racket that (require foo) imports `foo/typed' when it exists. +14. I think it came up in the past, but I don't

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Asumu Takikawa
On 2012-12-17 09:54:36 -0500, Matthias Felleisen wrote: It has serious performance implications for untyped modules that require plot -- and these should not be hidden. My understanding (possibly wrong), was that the typed submodule would only be required from another typed module in this

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Sam Tobin-Hochstadt
On Mon, Dec 17, 2012 at 12:59 AM, Neil Toronto neil.toro...@gmail.com wrote: On 12/16/2012 06:41 PM, Eli Barzilay wrote: 10 minutes ago, Neil Toronto wrote: I think I'd rather have a convention in Typed Racket that (require foo) imports `foo/typed' when it exists. +14. I think it came

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Eli Barzilay
20 minutes ago, Sam Tobin-Hochstadt wrote: On Mon, Dec 17, 2012 at 12:59 AM, Neil Toronto neil.toro...@gmail.com wrote: On 12/16/2012 06:41 PM, Eli Barzilay wrote: 10 minutes ago, Neil Toronto wrote: I think I'd rather have a convention in Typed Racket that (require foo) imports

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Robby Findler
I've long thought something along these lines is a good idea, but perhaps what I think is a good idea isn't what Matthias and Sam think is the bad idea. I think that it makes sense for 'require' in typed-racket to look in a different place than 'require' in untyped racket looks so that one can

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Matthias Felleisen
When Neil created his library, I proposed that he create one piece of source code and 'generate' both the typed and untyped module from it. If we foresee this kind of library to become more common, we should probably provide the capability as an abstraction from TR. -- Matthias On Dec

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Robby Findler
I think TR does have some of this facility already. Robby On Mon, Dec 17, 2012 at 2:41 PM, Matthias Felleisen matth...@ccs.neu.eduwrote: When Neil created his library, I proposed that he create one piece of source code and 'generate' both the typed and untyped module from it. If we

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Sam Tobin-Hochstadt
On Mon, Dec 17, 2012 at 3:27 PM, Robby Findler ro...@eecs.northwestern.edu wrote: I've long thought something along these lines is a good idea, but perhaps what I think is a good idea isn't what Matthias and Sam think is the bad idea. I think that it makes sense for 'require' in typed-racket

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Matthias Felleisen
I don't think so. What it has is a declaration that says don't check the types. What I am proposing is -- check the types -- and generate an untyped version from this file. #lang typed/racket #:check-and-generate untyped-foo.rkt (: x Integer) (define x 10) would generate #lang

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Matthew Flatt
At Mon, 17 Dec 2012 15:51:38 -0500, Sam Tobin-Hochstadt wrote: On Mon, Dec 17, 2012 at 3:27 PM, Robby Findler ro...@eecs.northwestern.edu wrote: I've long thought something along these lines is a good idea, but perhaps what I think is a good idea isn't what Matthias and Sam think is the bad

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Robby Findler
I don't understand Matthias's performance comments. If, in TR (require plot) actually gives me a typed version of the library and in R (require plot) gives me the untyped version of the library, then I am avoiding the performance the untyped/typed performance overhead properly. If, on the other

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Eric Dobson
It is getting exactly the same file as R, except there is a special file in the TR code that gives types to some bindings (all of the ones from racket). Your new module's bindings are not in this file. https://github.com/plt/racket/blob/master/collects/typed-racket/base-env/base-env.rkt On Mon,

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Robby Findler
For the purposes of this conversation, I don't think it is fair to stop after the comma in your sentence, Eric. :) Robby On Mon, Dec 17, 2012 at 3:29 PM, Eric Dobson eric.n.dob...@gmail.comwrote: It is getting exactly the same file as R, except there is a special file in the TR code that

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Matthias Felleisen
My understanding is that -- Neil created a single file P, I believe it is typed -- he tells you to load plot/typed/ for the typed version -- he tells you to load plot/ for the untyped version Somewhere in this arrangement a call in some untyped client to a function f from P will cross a

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Neil Toronto
On 12/17/2012 02:44 PM, Matthias Felleisen wrote: My understanding is that -- Neil created a single file P, I believe it is typed -- he tells you to load plot/typed/ for the typed version -- he tells you to load plot/ for the untyped version Somewhere in this arrangement a call in some

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Matthias Felleisen
On Dec 17, 2012, at 5:43 PM, Neil Toronto wrote: On 12/17/2012 02:44 PM, Matthias Felleisen wrote: My understanding is that -- Neil created a single file P, I believe it is typed -- he tells you to load plot/typed/ for the typed version -- he tells you to load plot/ for the untyped

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Neil Toronto
On 12/17/2012 03:55 PM, Matthias Felleisen wrote: On Dec 17, 2012, at 5:43 PM, Neil Toronto wrote: On 12/17/2012 02:44 PM, Matthias Felleisen wrote: My understanding is that -- Neil created a single file P, I believe it is typed -- he tells you to load plot/typed/ for the typed version

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Matthias Felleisen
On Dec 17, 2012, at 6:10 PM, Neil Toronto wrote: `plot' is written in untyped Racket. There's no performance problem with typed plots at all; in fact, using `plot/typed' from TR code ends up checking exactly the same contracts for the same plots. `plot/typed' is just another end-user

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Neil Toronto
On 12/17/2012 04:32 PM, Matthias Felleisen wrote: On Dec 17, 2012, at 6:10 PM, Neil Toronto wrote: `plot' is written in untyped Racket. There's no performance problem with typed plots at all; in fact, using `plot/typed' from TR code ends up checking exactly the same contracts for the same

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Matthias Felleisen
Okay. I propose we figure out how to allow people programming in Typed Racket, and deploy two copies of the code without performance overhead for either T or U code. _ Racket Developers list: http://lists.racket-lang.org/dev

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Robby Findler
That is what I meant to be asking for. I put too much of what I guess would be a good approach into my messages, tho. Sorry about that. Robby On Mon, Dec 17, 2012 at 5:44 PM, Matthias Felleisen matth...@ccs.neu.eduwrote: Okay. I propose we figure out how to allow people programming in Typed

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Sam Tobin-Hochstadt
I, perhaps unsurprisingly, disagree. If `listt.rkt` re-provided everything from `list.rkt`, then it would continue to work. These decisions are made entirely on the basis of the particular identifiers involved -- which module is loaded has nothing to do with it. But regardless of exactly how

Re: [racket-dev] Typed versions of untyped collections

2012-12-17 Thread Robby Findler
Fine. I give up. Robby On Mon, Dec 17, 2012 at 7:55 PM, Sam Tobin-Hochstadt sa...@ccs.neu.eduwrote: I, perhaps unsurprisingly, disagree. If `listt.rkt` re-provided everything from `list.rkt`, then it would continue to work. These decisions are made entirely on the basis of the particular

Re: [racket-dev] Typed versions of untyped collections

2012-12-16 Thread Neil Toronto
Changing the subject line for wider appeal. On 12/16/2012 06:41 PM, Eli Barzilay wrote: 10 minutes ago, Neil Toronto wrote: I think I'd rather have a convention in Typed Racket that (require foo) imports `foo/typed' when it exists. +14. I think it came up in the past, but I don't know why