I could try and and seed a few things out of plot into TR that I have an immediate need for. require/typed, optional args, opaque, typing Snips as Class ... I can handle.<div><br></div><div>This one however ...</div><div>
<div>Suggestions on how one would type the following?</div><div><br></div><div>renderer-tree : (treeof (or/c renderer2d? nonrenderer?))<br><div><br><div class="gmail_quote">On Thu, Aug 9, 2012 at 3:27 PM, Neil Toronto <span dir="ltr"><<a href="mailto:neil.toronto@gmail.com" target="_blank">neil.toronto@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 08/09/2012 12:52 PM, Ray Racine wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Noticed here <a href="http://www.ccs.neu.edu/home/samth/adapt/Current_Status.html" target="_blank">http://www.ccs.neu.edu/home/<u></u>samth/adapt/Current_Status.<u></u>html</a><br>
</blockquote>
<br>
I had no idea someone had been assigned. Cool!<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That the Plot collection still awaits porting to TR. Has any partial<br>
work been done, maybe languishing in a github repo somewhere, that can<br>
be leveraged?<br>
</blockquote>
<br></div>
Are you volunteering? :)<br>
<br>
It's only possible now that TR has support for keyword arguments.<br>
<br>
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<br>
<br>
(Listof (Vectorof Real Real))<br>
<br>
then applying `points' to<br>
<br>
'(#(0.0 1.0) #(1.0 2.2))<br>
<br>
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".)<br>
<br>
I can think of two solutions right now:<br>
<br>
1. Wait for a Const type constructor or similar.<br>
<br>
2. Change the contract of `points' to accept lists of pairs, sequences or a specialized data type.<br>
<br>
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.<br>
<br>
Neil ⊥<br>
<br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/<u></u>users</a><br>
</blockquote></div><br></div></div></div>