[racket] Setting Decimal Number for Defaults for DrRacket

2011-09-21 Thread Scott Hickey
Is there a config file where I can set (read-decimal-as-inexact #f) to be the default for the racket language whenever I run DrRacket? I think someone answered this once before but I can't seem to find the answer. I did try putting this command ~/.racketrc which works for interactive mode for comm

[racket] bitmap% and OpenGL. Maybe bug?

2011-09-21 Thread Ivanyi Peter
Dear All, I am using Racket 5.1 on Windows.I have a program which renders an OpenGL image into a bitmap. The following used to work inPLT-Scheme. (define a (make-object bitmap% 100 100 #f)) (define b (new bitmap-dc% (bitmap a))) (send b get-gl-context) Now it returns #f.Is it a bug or feature?Is

Re: [racket] [rackunit] analyzing results of a test-suite

2011-09-21 Thread Chris
Yes, that's what I was looking for. Brilliant, thanks :-) On 2011-9-21, at 下午10:33, Noel Welsh wrote: > On Wed, Sep 21, 2011 at 8:29 AM, Chris wrote: > >> My first approach hasn't worked very well. I wrapped each module's >> test-cases in a define/provide-test-suite and imported these into a m

Re: [racket] internal define in define

2011-09-21 Thread Sam Tobin-Hochstadt
On Wed, Sep 21, 2011 at 10:24 PM, Robby Findler wrote: > > Did anyone check and see if there are any uses of (define (let () > ...)) in the tree or on planet? I know I've used this idiom, and even more: (define-values (x y) (let () ...)) -- sam th sa...@ccs.neu.edu ___

Re: [racket] internal define in define

2011-09-21 Thread Robby Findler
Yes, that is Racket style these days (as codified in the style guide). Saving the level(s) of indention is great, as far as I'm concerned. As to the original question, tho, it seems like you can usually just put the nested defines next to the original define and unless you have a very big function

Re: [racket] internal define in define

2011-09-21 Thread Greg Hendershott
Is this "let over lambda", instead as "define over lambda"? Actually in general, is the intent that define should be an alternative to let in all cases? Although you pay 2X typing the symbol itself, you save parens and a level of indent? :) On Wed, Sep 21, 2011 at 4:24 AM, David Van Horn wrote:

Re: [racket] [rackunit] analyzing results of a test-suite

2011-09-21 Thread Noel Welsh
On Wed, Sep 21, 2011 at 8:29 AM, Chris wrote: > My first approach hasn't worked very well. I wrapped each module's test-cases > in a define/provide-test-suite and imported these into a main testing module > with a single suite containing all these test-suites. However if I (run-test > all-test

Re: [racket] [rackunit] analyzing results of a test-suite

2011-09-21 Thread Matthias Felleisen
On Sep 21, 2011, at 3:29 AM, Chris wrote: > I'm struggling to get to grips with the API: how do you extract the details > of the failed test-cases from their test-suite? > > At the moment I have a shadow module of test-cases for each actual module. > I'm trying to unify these so that one proc

Re: [racket] internal define in define

2011-09-21 Thread Carl Eastlund
On Wed, Sep 21, 2011 at 4:24 AM, David Van Horn wrote: > The grammar for define includes > >   (define id expr) > > but I wonder if this couldn't be relaxed to > >   (define id body) > > so that you could write things like > >   (define count >     (define i 0) >     (λ () (begin0 i (set! i (add1

[racket] internal define in define

2011-09-21 Thread David Van Horn
The grammar for define includes (define id expr) but I wonder if this couldn't be relaxed to (define id body) so that you could write things like (define count (define i 0) (λ () (begin0 i (set! i (add1 i) David _ For li

[racket] [rackunit] analyzing results of a test-suite

2011-09-21 Thread Chris
I'm struggling to get to grips with the API: how do you extract the details of the failed test-cases from their test-suite? At the moment I have a shadow module of test-cases for each actual module. I'm trying to unify these so that one procedure will run all the tests and bring back details o