Re: [racket-dev] [plt] Push #25698: master branch updated
On 11/16/2012 03:31 PM, Ryan Culpepper wrote: On 11/16/2012 04:43 PM, Neil Toronto wrote: (FWIW, you're right about libmpfr not being needed at compile time. Well, it shouldn't be. I used Eli's nifty interaction-fakery code forms in the `math/bigfloat' docs, for example.) If you made bigfloats serializable, you could also use 'make-log-based-eval' from unstable/sandbox as an alternative to 'eval:alts'. I didn't know about this. Thanks! Also, you're a friggin' genius. I know because I thought up exactly the same idea, but you actually went and made it. Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] [plt] Push #25698: master branch updated
On 11/16/2012 04:43 PM, Neil Toronto wrote: On 11/16/2012 02:10 PM, mfl...@racket-lang.org wrote: 9a48e5d Matthew Flatt 2012-11-16 14:03 : | math: avoid import at unnecessary phase | | This repair avoids using at compile time external libraries that | are needed at run time. : M collects/math/private/matrix/matrix-sequences.rkt | 4 +--- > > [...] > collects/math/private/matrix/matrix-sequences.rkt ~ --- OLD/collects/math/private/matrix/matrix-sequences.rkt +++ NEW/collects/math/private/matrix/matrix-sequences.rkt @@ -5,9 +5,7 @@ in-column) (require math/array - (except-in math/matrix in-row in-column) - (for-syntax (except-in math/matrix in-row in-column)) - (for-template (except-in math/matrix in-row in-column))) + (except-in math/matrix in-row in-column)) Was this the only necessary change? If so, it's a little weird, because libmpfr isn't supposed to be loaded until its first export is used. The constants are all delayed (their names are bound to macros that expand to uses of `force'), and every function and delay thunk is wrapped with code that loads the external library. IOW, this: (require math/bigfloat) doesn't load libmpfr, but this does: pi.bf Also, I have no idea what it all has to do with a typed submodule in "math/special-functions.rkt", which is apparently what the error was complaining about. I can't work out the dependency chain. Help? (FWIW, you're right about libmpfr not being needed at compile time. Well, it shouldn't be. I used Eli's nifty interaction-fakery code forms in the `math/bigfloat' docs, for example.) If you made bigfloats serializable, you could also use 'make-log-based-eval' from unstable/sandbox as an alternative to 'eval:alts'. Ryan _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] [plt] Push #25698: master branch updated
On 11/16/2012 03:02 PM, Matthew Flatt wrote: At Fri, 16 Nov 2012 14:43:56 -0700, Neil Toronto wrote: If so, it's a little weird, because libmpfr isn't supposed to be loaded until its first export is used. The constants are all delayed (their names are bound to macros that expand to uses of `force'), and every function and delay thunk is wrapped with code that loads the external library. `math/private/flonum/expansion/expansion-log' has (define-values (log2-hi log2-lo) (bigfloat->fl2 log2.bf)) Oh, good catch. I can definitely identify that as a product of too many late nights. I'll push a fix. Thanks for yours! Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] [plt] Push #25698: master branch updated
At Fri, 16 Nov 2012 14:43:56 -0700, Neil Toronto wrote: > On 11/16/2012 02:10 PM, mfl...@racket-lang.org wrote: > > 9a48e5d Matthew Flatt 2012-11-16 14:03 > > : > > | math: avoid import at unnecessary phase > > | > > | This repair avoids using at compile time external libraries that > > | are needed at run time. > > : > >M collects/math/private/matrix/matrix-sequences.rkt | 4 +--- > > > > [...] > > > > collects/math/private/matrix/matrix-sequences.rkt > > ~ > > --- OLD/collects/math/private/matrix/matrix-sequences.rkt > > +++ NEW/collects/math/private/matrix/matrix-sequences.rkt > > @@ -5,9 +5,7 @@ > >in-column) > > > > (require math/array > > - (except-in math/matrix in-row in-column) > > - (for-syntax (except-in math/matrix in-row in-column)) > > - (for-template (except-in math/matrix in-row in-column))) > > + (except-in math/matrix in-row in-column)) > > Was this the only necessary change? Yes. > If so, it's a little weird, because > libmpfr isn't supposed to be loaded until its first export is used. The > constants are all delayed (their names are bound to macros that expand > to uses of `force'), and every function and delay thunk is wrapped with > code that loads the external library. `math/private/flonum/expansion/expansion-log' has (define-values (log2-hi log2-lo) (bigfloat->fl2 log2.bf)) > Also, I have no idea what it all has to do with a typed submodule in > "math/special-functions.rkt", which is apparently what the error was > complaining about. I can't work out the dependency chain. Help? That was a Racket bug, now fixed. _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] [plt] Push #25698: master branch updated
On 11/16/2012 02:10 PM, mfl...@racket-lang.org wrote: 9a48e5d Matthew Flatt 2012-11-16 14:03 : | math: avoid import at unnecessary phase | | This repair avoids using at compile time external libraries that | are needed at run time. : M collects/math/private/matrix/matrix-sequences.rkt | 4 +--- > > [...] > collects/math/private/matrix/matrix-sequences.rkt ~ --- OLD/collects/math/private/matrix/matrix-sequences.rkt +++ NEW/collects/math/private/matrix/matrix-sequences.rkt @@ -5,9 +5,7 @@ in-column) (require math/array - (except-in math/matrix in-row in-column) - (for-syntax (except-in math/matrix in-row in-column)) - (for-template (except-in math/matrix in-row in-column))) + (except-in math/matrix in-row in-column)) Was this the only necessary change? If so, it's a little weird, because libmpfr isn't supposed to be loaded until its first export is used. The constants are all delayed (their names are bound to macros that expand to uses of `force'), and every function and delay thunk is wrapped with code that loads the external library. IOW, this: (require math/bigfloat) doesn't load libmpfr, but this does: pi.bf Also, I have no idea what it all has to do with a typed submodule in "math/special-functions.rkt", which is apparently what the error was complaining about. I can't work out the dependency chain. Help? (FWIW, you're right about libmpfr not being needed at compile time. Well, it shouldn't be. I used Eli's nifty interaction-fakery code forms in the `math/bigfloat' docs, for example.) Neil ⊥ _ Racket Developers list: http://lists.racket-lang.org/dev