This one should work
changes:
* gl-init: initialized matrixes
* gl-handlekey: check if key set
* on-paint: remove refresh, it triggered on-paint again -> inifinite,
nonstop redraw
Tobias
#lang racket
(require sgl
sgl/gl-vectors
racket/gui)
(define WIDTH
On Wed, Aug 1, 2012 at 1:09 PM, Jay McCarthy wrote:
> I've recently started a blog about interesting Racket programs and
> features...
>
> http://jeapostrophe.github.com/
>
> I just finished a series on continuation marks, and before that one on
> using continuations to implement threads... you m
On 08/01/2012 11:40 AM, Michael Wilber wrote:
...
Fascinating. I wonder if your machine has better floating point hardware
So maybe this is just something to watch out for on older chips.
9000ms vs 350ms is a surprising difference! That's got to be software
floating-point.
I know my floatin
On 2012-08-01 12:40:04 -0600, Michael Wilber wrote:
> Fascinating. I wonder if your machine has better floating point hardware
> So maybe this is just something to watch out for on older chips.
FWIW, on an AMD Phenom II X2 555:
subnormal addition:
cpu time: 1668 real time: 1680 gc time: 0
cp
Very nice!
On Wed, Aug 1, 2012 at 12:09 PM, Jay McCarthy wrote:
> I've recently started a blog about interesting Racket programs and
> features...
>
> http://jeapostrophe.github.com/
>
> I just finished a series on continuation marks, and before that one on
> using continuations to implement thre
(oops, forgot to cc: the list)
Oh wow, that's interesting. Your code on my computer:
subnormal addition:
cpu time: 8156 real time: 8171 gc time: 0
cpu time: 9009 real time: 9035 gc time: 0
cpu time: 7740 real time: 7765 gc time: 0
cpu time: 7276 real time: 7288 gc time: 0
cpu time: 10643 real tim
Oh whoops, you're right. (expt 2 -1050) is an exact number so I'm taking
a big performance hit from using exact numbers.
But (expt 2.0 -1000) is inexact. To keep it from quitting
instantaneously, I added a few 0s to the definition:
(define (test value)
(let loop ([count 1000] [x value])
Thanks ... was show stopper.
On Wed, Aug 1, 2012 at 1:45 PM, Sam Tobin-Hochstadt wrote:
> This looks like something that should work -- I'm not sure why TR
> thinks that `Nothing` is the right type to infer for the second
> parameter to the `Collection` type. However, changing the last line
> to
I wonder how out-of-date the advice is to avoid subnormal numbers. I
don't see any slowdown in my tests. I've written what I think is a good
test program, and I have some experience with squeezing floating-point
performance out of Racket. Can we get others on the mailing list to run
it and repo
This looks like something that should work -- I'm not sure why TR
thinks that `Nothing` is the right type to infer for the second
parameter to the `Collection` type. However, changing the last line
to:
(((inst Collection-append D C) coll) elem))
makes it typecheck.
On Wed, Aug 1, 2012 at 12:1
But why ...
(time-it (exact->inexact (expt 2 -1050)) test)
0 - 1
(time-it (exact->inexact (expt 2 -1000)) test)
0 - 0
... and ...
(time-it (expt 2 -1050) test_2)
26 - 28
(time-it (expt 2 -1000) test_2)
3 - 4
(time-it (expt 2 -1050) test)
26 - 28
(time-it (expt 2 -1000) test)
3 - 4
The following gives an error of "Expected Nothing, but got D in elem."
Type checking error?
#lang typed/racket/base
(struct: (D C) Collection ([append : (D -> Void)]
[build: (-> C)]))
(: List-Builder (All (D) -> (Collection D (Listof D
(define (List-Builder)
On Wed, Aug 1, 2012 at 12:09 PM, Jay McCarthy wrote:
> I've recently started a blog about interesting Racket programs and features...
>
> http://jeapostrophe.github.com/
>
> I just finished a series on continuation marks, and before that one on
> using continuations to implement threads... you may
I've recently started a blog about interesting Racket programs and features...
http://jeapostrophe.github.com/
I just finished a series on continuation marks, and before that one on
using continuations to implement threads... you may find it
interesting :)
Jay
--
Jay McCarthy
Assistant Profes
So here's something fun to look out for in your own programs.
On my slower 32-bit machine, very small numbers are much slower than
slightly less small numbers.
> (time-it (expt 2 -1000))
126 - 235
> (time-it (expt 2 -1050))
1187 - 2071
On my faster 64-bit machine, the performance difference is a
15 matches
Mail list logo