[racket] Detecting 32/64-bit racket

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat Oct 29 10:31:17 EDT 2011

Another not so great way, in Racket, to tell if the current racket is
built as a 64 bit or 32 bit executable (is that what you're wanting?)

  ;; 64bit? : -> boolean
  (define (64bit?) (eq? (expt 2 61) (expt 2 61)))

I don't know if this is promised to always work going forwards, but it
is hard for me to imagine a future where it doesn't work.

Of course, it would be better if there were some documented API that
would make this definitive, but until then you're probably safe with
this.

Robby


Posted on the users mailing list.