Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-17 Thread Neil Toronto
On 10/01/2012 02:06 PM, Sam Tobin-Hochstadt wrote: On Mon, Oct 1, 2012 at 2:26 PM, Neil Toronto wrote: * `math/base' re-exports `racket/math', but with extra constants (like `phi.0') and functions (like `power-of-two?'). It also exports improved hyperbolic functions, such as a new `sinh' that

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-05 Thread Matthias Felleisen
I think this idea is worth exploring. Sam and Eli should implement it. On Oct 5, 2012, at 8:39 AM, Eli Barzilay wrote: > Yesterday, Matthias Felleisen wrote: >> >> I know >> >> What I mean is an _abstraction mechanism_ inside of TR. Possibly >> something that nobody else has. > > +18.59 >

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-05 Thread Eli Barzilay
Yesterday, Matthias Felleisen wrote: > > I know > > What I mean is an _abstraction mechanism_ inside of TR. Possibly > something that nobody else has. +18.59 And a quick reminder -- below is the ancient hack I once did for such things, maybe something like this would be easier now. Possibly m

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-04 Thread Matthias Felleisen
On Oct 4, 2012, at 5:34 PM, Sam Tobin-Hochstadt wrote: > On Thu, Oct 4, 2012 at 5:31 PM, Matthias Felleisen > wrote: >> >> On Oct 1, 2012, at 2:26 PM, Neil Toronto wrote: >> >>> >>> (case-> (Zero -> Zero) >>> (Flonum -> Flonum) >>> (Real -> Real) >>> (Float-Complex ->

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-04 Thread Sam Tobin-Hochstadt
On Thu, Oct 4, 2012 at 5:31 PM, Matthias Felleisen wrote: > > On Oct 1, 2012, at 2:26 PM, Neil Toronto wrote: > >> >> (case-> (Zero -> Zero) >> (Flonum -> Flonum) >> (Real -> Real) >> (Float-Complex -> Float-Complex) >> (Complex -> Complex)) >> >> I haven't bee

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-04 Thread Matthias Felleisen
On Oct 1, 2012, at 2:26 PM, Neil Toronto wrote: > > (case-> (Zero -> Zero) > (Flonum -> Flonum) > (Real -> Real) > (Float-Complex -> Float-Complex) > (Complex -> Complex)) > > I haven't been able to give it a type as specific as the type of the `sinh' > exp

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-04 Thread Sam Tobin-Hochstadt
On Mon, Oct 1, 2012 at 6:49 PM, Neil Toronto wrote: > > This is similar to the testing code I wrote, and it also exhibits quadratic > behavior. The `apply*' macro generates the simplest deep expression > possible. It's used to repeatedly apply a function with the simplest > one-argument floating-p

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-02 Thread J. Ian Johnson
;Sam Tobin-Hochstadt" To: "J. Ian Johnson" Cc: "dev" , "Neil Toronto" Sent: Tuesday, October 2, 2012 10:02:50 AM GMT -05:00 US/Canada Eastern Subject: Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome On Tue, Oct 2, 2012 at 9:55 A

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-02 Thread Sam Tobin-Hochstadt
; To: "Neil Toronto" > Cc: "" > Sent: Tuesday, October 2, 2012 9:44:13 AM GMT -05:00 US/Canada Eastern > Subject: Re: [racket-dev] Math library initial commit almost ready; comments > on issues welcome > > On Mon, Oct 1, 2012 at 9:44 PM, Neil Toronto

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-02 Thread J. Ian Johnson
er 2, 2012 9:44:13 AM GMT -05:00 US/Canada Eastern Subject: Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome On Mon, Oct 1, 2012 at 9:44 PM, Neil Toronto wrote: > The only bit that bothers me is the (begin (not (flonum-wrapper? x)) ...) > stuff left lying a

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-02 Thread Sam Tobin-Hochstadt
On Mon, Oct 1, 2012 at 9:44 PM, Neil Toronto wrote: > The only bit that bothers me is the (begin (not (flonum-wrapper? x)) ...) > stuff left lying around after TR's optimizer eliminates the branches in the > expansions of `fw+'. IIRC, they cause futures to sync, but I'm going to > believe that the

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-01 Thread Neil Toronto
On 10/01/2012 06:29 PM, Sam Tobin-Hochstadt wrote: On Mon, Oct 1, 2012 at 6:49 PM, Neil Toronto wrote: #lang typed/racket (: plus (Flonum Flonum -> Flonum)) (define (plus a b) (+ a b)) (module provider racket (require (submod "..")) (provide inline-plus) (define-syntax-rule (inlin

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-01 Thread Sam Tobin-Hochstadt
On Mon, Oct 1, 2012 at 6:49 PM, Neil Toronto wrote: > On 10/01/2012 04:20 PM, Sam Tobin-Hochstadt wrote: >> >> On Mon, Oct 1, 2012 at 6:08 PM, Neil Toronto >> wrote: >>> >>> On 10/01/2012 02:06 PM, Sam Tobin-Hochstadt wrote: On Mon, Oct 1, 2012 at 2:26 PM, Neil Toronto wrote:

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-01 Thread Neil Toronto
On 10/01/2012 04:20 PM, Sam Tobin-Hochstadt wrote: On Mon, Oct 1, 2012 at 6:08 PM, Neil Toronto wrote: On 10/01/2012 02:06 PM, Sam Tobin-Hochstadt wrote: On Mon, Oct 1, 2012 at 2:26 PM, Neil Toronto wrote: My timing tests also show that typechecking is apparently quadratic in the depth of e

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-01 Thread Sam Tobin-Hochstadt
On Mon, Oct 1, 2012 at 6:08 PM, Neil Toronto wrote: > On 10/01/2012 02:06 PM, Sam Tobin-Hochstadt wrote: >> >> On Mon, Oct 1, 2012 at 2:26 PM, Neil Toronto >> wrote: >> PR 13098 isn't really fixable, in some sense. There's just more data >> there with broader types, so it will always take longer

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-01 Thread Neil Toronto
On 10/01/2012 02:06 PM, Sam Tobin-Hochstadt wrote: On Mon, Oct 1, 2012 at 2:26 PM, Neil Toronto wrote: PR 13098 isn't really fixable, in some sense. There's just more data there with broader types, so it will always take longer than for more specific types. All of the things I'd do to fix the p

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-01 Thread Sam Tobin-Hochstadt
On Mon, Oct 1, 2012 at 2:26 PM, Neil Toronto wrote: > * Compile time. It currently takes 1m20s to compile `math' without docs on > my beefy laptop. That's down from 2m30s, with the reduction from replacing > general functions with flonum-specific functions in over half of the flonum > code (e.g.

Re: [racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-01 Thread Robby Findler
On Mon, Oct 1, 2012 at 1:26 PM, Neil Toronto wrote: > I think I'm about a week away from having the math library's initial commit > ready. It just needs some more docs and test cases. > > Here are the high-level issues, for which I'm soliciting comments, > suggestions, questions, and answers: > >

[racket-dev] Math library initial commit almost ready; comments on issues welcome

2012-10-01 Thread Neil Toronto
I think I'm about a week away from having the math library's initial commit ready. It just needs some more docs and test cases. Here are the high-level issues, for which I'm soliciting comments, suggestions, questions, and answers: * Compile time. It currently takes 1m20s to compile `math' w