[racket] Checking whether running from DrRacket.

From: Stephen Bloch (bloch at adelphi.edu)
Date: Wed Feb 13 13:16:17 EST 2013

#lang racket
(define (blah x)
  (display x)
  (newline)
  (display x)
  (newline))

(module* main #f
         (blah 7))

In DrRacket, I hit "Run" and it prints 7 twice.
In DrRacket, I choose "Create Executable"->"Stand-alone", then run the resulting binary from the Unix command line, and it does nothing.
In DrRacket, I choose "Create Executable"->"Launcher", then run the resulting shell script, and it prints 7 twice.
In DrRacket, I choose "Create Executable"->"Distribution", it produces a .dmg file, I open this, then find the binary in the "bin" folder and run it, and it does nothing.


Stephen Bloch
sbloch at adelphi.edu



Posted on the users mailing list.