[racket] Command line Racket equivalent of DrRacket's Racket | Run (CTRL+T or F5)?

From: Eduardo Bellani (ebellani at gmail.com)
Date: Mon Dec 13 12:43:57 EST 2010

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

For racket in emacs, I would advise you to try geiser:

http://www.nongnu.org/geiser/

See you

On 12/13/2010 03:19 PM, Greg Hendershott wrote:
> I feel like I'm missing something obvious here.
> 
> Using Racket interactively from the command-line, how do I get a
> similar result as choosing Racket | Run (e.g. CTRL+T or F5) in
> DrRacket?
> 
> Meaning: All the expressions in the file are evaluated, and afterward
> you have a prompt to do some more interactive things (or just type
> "(exit)").
> 
> For instance if I have test.rkt which is
> 
> #lang scheme
> (define (foo)
>   (displayln "I am foo."))
> (foo)
> 
> then here's what happens at the OS command line:
> 
> [1] "racket test.rkt"
> Runs it: Yes.  Racket prompt: No (Racket exits automatically).
> [2] "racket -i test.rkt"
> Runs it: No.  Racket prompt: Yes.  Typing "foo" at prompt: "reference
> to undefined identifier: foo"
> [3] "racket -i -f test.rkt"
> Runs it: No.  Racket prompt: Yes.  Typing "foo" at prompt: "reference
> to undefined identifier: foo"
> [4]  "racket _______ "
> Runs it: Yes.  Racket prompt: Yes.  Typing "foo" at prompt: "#<procedure:foo>"
> 
> What is ____ in for 4?
> 
> 
> P.S. As more background, I want to be able to do this from the command
> line. So that's why I put the question that way.  But also, I'm
> interested in trying to use Racket from Emacs. At the moment the only
> thing I really want now is "get the same thing as pressing F5 in
> DrRacket". And (again maybe I'm missing something obvious, or botched
> the config) neither Racket nor Geiser seem to provide just quite that.
> So I was looking at binding F5 to mode-compile and setting the correct
> Racket flags ... that I haven't figured out yet, because apparently
> I'm a numskull.
> 
> Thank you.
> _________________________________________________
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/users


- -- 
Eduardo Bellani

omnia mutantur, nihil interit.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0GW10ACgkQSbLl0kCTjGm+NQCfS5Qx/QLF0NoI+lWC1Ev37Zuc
hLQAniIlTHQPUZ15hmd0RBrzMij6KiS5
=Nfln
-----END PGP SIGNATURE-----


Posted on the users mailing list.