[racket] Port of Plot collection to TR

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Aug 9 17:38:00 EDT 2012

Middle Ground has always been mine. "Radical" is the middle name -) 


On Aug 9, 2012, at 5:28 PM, Ray Racine wrote:

> Little Any is my new best friend.
> 
> On Thu, Aug 9, 2012 at 4:50 PM, Matthias Felleisen <matthias at ccs.neu.edu> wrote:
> 
> You can use wider types. It is one thing to be able to formulate types at all and another to formulate the most descriptive ones, right?
> 
> 
> On Aug 9, 2012, at 3:27 PM, Neil Toronto wrote:
> 
> > On 08/09/2012 12:52 PM, Ray Racine wrote:
> >> Noticed here http://www.ccs.neu.edu/home/samth/adapt/Current_Status.html
> >
> > I had no idea someone had been assigned. Cool!
> >
> >> That the Plot collection still awaits porting to TR.  Has any partial
> >> work been done, maybe languishing in a github repo somewhere, that can
> >> be leveraged?
> >
> > Are you volunteering? :)
> >
> > It's only possible now that TR has support for keyword arguments.
> >
> > There's one issue that could cause problems: some renderer-producing functions, like `points', accept lists of vectors as arguments. If the data argument to `points' had a nice, general type like
> >
> >   (Listof (Vectorof Real Real))
> >
> > then applying `points' to
> >
> >   '(#(0.0 1.0) #(1.0 2.2))
> >
> > wouldn't typecheck. The problem is that TR thinks `points' might change that 0.0 to 0, which would make the original argument type (Listof (Vector Float Float)) incorrect. It thinks Bad Things could happen. (Technically, a vector is "invariant".)
> >
> > I can think of two solutions right now:
> >
> > 1. Wait for a Const type constructor or similar.
> >
> > 2. Change the contract of `points' to accept lists of pairs, sequences or a specialized data type.
> >
> > I think the contract of `points' should be changed anyway, so users can send it any kind of sequence. Might as well make it current-TR-friendly at the same time.
> >
> > Neil ⊥
> >
> > ____________________
> > Racket Users list:
> > http://lists.racket-lang.org/users
> 
> 
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4373 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20120809/48b5d0b0/attachment.p7s>

Posted on the users mailing list.