Here is one example.
(make-discrete-histogram
(case- (-r ((n1 integer?)
(n2 (and/c integer?
(=/c n1)))
(dynamic? boolean?))
discrete-histogram?)
(-r ((n1 integer?)
(n2 (and/c integer?
On Mon, Oct 25, 2010 at 10:06 AM, Doug Williams
m.douglas.willi...@gmail.com wrote:
(case- (-r ((r random-source?)
(a real?)
(b (/c a)))
real?)
(-r ((a real?)
(b (/c a)))
real?)))
I'm not sure that
Thanks, that's a great example. The idea (at least from the contract's
point of view) is that there are two different functions with one name
that have two different arities, I think.
So maybe the right way to bring back case- is that contracts that
match functions should come with some way to
But that does hide the intent of the case-lambda usage, which is captured in
the original.
On Mon, Oct 25, 2010 at 8:21 AM, Sam Tobin-Hochstadt sa...@ccs.neu.eduwrote:
On Mon, Oct 25, 2010 at 10:06 AM, Doug Williams
m.douglas.willi...@gmail.com wrote:
(case- (-r ((r random-source?)
I had always assumed that case-lambda just checked alternatives in order
until one matched - like a cond. But, that was just an assumption on my part
and subject to being absolutely wrong. [But, if it is correct I would expect
case- to allow overlapping contracts.]
Another thing I just noticed is
At Fri, 22 Oct 2010 21:31:43 -0600, Doug Williams wrote:
Matthew, would it make more sense to have unsafe-vector-ref (and related
functions) be the more general function and unsafe-vector*-ref be the one
that doesn't work on chaperoned vectors? That is just swap the definitions.
That way user
On Mon, Oct 25, 2010 at 11:28 AM, Doug Williams
m.douglas.willi...@gmail.com wrote:
I had always assumed that case-lambda just checked alternatives in order
until one matched - like a cond. But, that was just an assumption on my part
and subject to being absolutely wrong. [But, if it is correct
At Fri, 22 Oct 2010 21:31:43 -0600, Doug Williams wrote:
Matthew, would it make more sense to have unsafe-vector-ref (and related
functions) be the more general function and unsafe-vector*-ref be the one
that doesn't work on chaperoned vectors? That is just swap the definitions.
That way user
The new case- only supports simple contracts, that's right. If you
have more complex ones that it would be helpful to support (and can
share them), that would help us guide our efforts.
Thanks,
Robby
On Sun, Oct 24, 2010 at 7:04 PM, Doug Williams
m.douglas.willi...@gmail.com wrote:
The main
On Oct 24, 2010, at 8:04 PM, Doug Williams wrote:
On the case- problem, it seems it no longer supports anything but -. Is
there something I am missing there?
This is a current limitation for case- as provided by racket/contract. When I
tackle the conversion of case- to proxies/chaperones, I
On Sun, Oct 24, 2010 at 7:42 PM, Stevie Strickland sstri...@ccs.neu.edu wrote:
On Oct 24, 2010, at 8:04 PM, Doug Williams wrote:
On the case- problem, it seems it no longer supports anything but -. Is
there something I am missing there?
This is a current limitation for case- as provided by
John,
In the FFT with unsafe-vector*-ref, etc substituted for unsafe-vector-ref,
etc, the run times are up to 100% greater. There may be places I can revert
to the unsafe-vector-ref, etc versions, but it would require an analysis of
the code that I don't have the time to do at the moment. I guess
With the #:flat? keyword on the contracts and unsafe-vector-ref, etc, I get
the following run times:
cpu time: 94 real time: 94 gc time: 0
cpu time: 63 real time: 63 gc time: 0
#t
This is essentially the same run times as the 5.0.1 values.
Doug
On Sat, Oct 23, 2010 at 4:26 PM, Doug Williams
I am definitely using unsafe-vector-ref (and -set!) - a lot - with
contracted vectors. So, that is at least part of my problem. And, the newer
code uses many of the newer unsafe operations (like unsafe-fllog). This
weekend I will change all of the vector references and see how everything
runs with
On Thu, Oct 21, 2010 at 1:44 PM, Doug Williams
m.douglas.willi...@gmail.com wrote:
Noel and Neil, were the unsafe-flround and unsafe-fllog problems you saw
just with the newer nightly builds or with the released version of Racket?
[I haven't had any problems with the released versions.]
I downloaded the pre-release version this morning - 10/20 (I believe it was
a build from 10/16). The plot package and plot extensions in the science
collection all work as expected. But, I am getting different numeric answers
for some of my science collection routines (for example, the gamma
Are they typed?
On Oct 20, 2010, at 10:39 AM, Doug Williams wrote:
I downloaded the pre-release version this morning - 10/20 (I believe it was a
build from 10/16). The plot package and plot extensions in the science
collection all work as expected. But, I am getting different numeric
On Oct 20, 2010, at 7:39 AM, Doug Williams wrote:
I downloaded the pre-release version this morning - 10/20 (I believe it was a
build from 10/16). The plot package and plot extensions in the science
collection all work as expected. But, I am getting different numeric answers
for some of
Noel Welsh wrote:
On Wed, Oct 20, 2010 at 3:39 PM, Doug Williams
m.douglas.willi...@gmail.com wrote:
I downloaded the pre-release version this morning - 10/20 (I believe it was
a build from 10/16). The plot package and plot extensions in the science
collection all work as expected. But, I am
The release process for v5.0.2 has begun: the `release' branch was
created for any work that is left and is now bumped to v5.0.1.900. You
can go on using the `master' branch as usual, it is now bumped to
v5.0.2.1 (to avoid having two different trees with the same version).
If you have any
20 matches
Mail list logo