<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>I was thinking of turning of type checking and the translation of types into contracts. (Unless I misunderstand your mini language, I think you're cheating in a more fundamental manner "-) </div><div><br></div><br><div><div>On Nov 3, 2012, at 11:41 AM, Jay McCarthy wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I have a little language for doing this:<div><br></div><div><a href="https://github.com/jeapostrophe/exp/tree/master/tr-cheat">https://github.com/jeapostrophe/exp/tree/master/tr-cheat</a><br></div><div><br></div><div>run</div>
<div><br></div><div><a href="https://github.com/jeapostrophe/exp/blob/master/tr-cheat/tr-cheat-use.rkt">https://github.com/jeapostrophe/exp/blob/master/tr-cheat/tr-cheat-use.rkt</a><br></div><div><br></div><div>to see the SEGFAULT</div>
<div><br></div><div>:)</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 3, 2012 at 9:20 AM, Matthias Felleisen <span dir="ltr"><<a href="mailto:matthias@ccs.neu.edu" target="_blank">matthias@ccs.neu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On Nov 3, 2012, at 11:13 AM, Neil Toronto wrote:<br>
<br>
> On 10/29/2012 07:03 AM, Matthias Felleisen wrote:<br>
>><br>
>><br>
>> On Oct 29, 2012, at 12:31 AM, Neil Toronto wrote:<br>
>><br>
>>> I wouldn't mind changing the API; it would be nice to have things like `points' accept sequences anyway. I haven't put much thought into what would be in the sequences, though.<br>
>><br>
>><br>
>> Question: can you change the API for the Typed version and support both APIs for the Untyped one? -- Matthias<br>
><br>
> More easily than the other way around. Also, that would work around the covariance problem with vectors. I could change the contract to accept a sequence of vectors or lists, and use the type (Sequenceof (List Real Real)).<br>
><br>
> I still need a `->*' type constructor, because most plot functions have 2-5 optional arguments and 10-20 arguments altogether. For the largest functions, a `case->' type would be huge and easy to get wrong. Also, I'm morally opposed to types that don't fit on my screen.<br>
><br>
> I'll get around to submitting a formal request, after I get this Poisson distribution quantile function working...<br>
><br>
> Neil ⊥<br>
><br>
<br>
<br>
</div></div>Last night Sam, Tony and I had a discussion on TR/R boundaries<br>
for his "racket on a router" project. Tony ported his software<br>
from Racket to Typed Racket and stopped halfway in between. The<br>
'framework' (aka kernel) is now in TR and the 'user program' aka<br>
'client' lives in R. I had predicted that the boundary between the<br>
two would cause a severe performance and Tony has now confirmed<br>
this conjecture. (We are talking factors not small percentages.)<br>
<br>
As you get racket/math ready for production, I think you too should<br>
measure the performance hit from going across the boundary. If it<br>
is bad, we should consider including both a typed and an untyped<br>
variant where the latter is generated from the former (I believe<br>
you are working in TR so that's why I wrote the last sentence).<br>
That is, when the library is installed the Untyped one should be<br>
generated by disabling types and type checking.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- Matthias<br>
<br>
</font></span><br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jay McCarthy <<a href="mailto:jay@cs.byu.edu" target="_blank">jay@cs.byu.edu</a>><br>Assistant Professor / Brigham Young University<br><a href="http://faculty.cs.byu.edu/~jay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>"The glory of God is Intelligence" - D&C 93<br>
</div>
</blockquote></div><br></body></html>