[racket] changing the default language

From: Kartik Agaram (ak at akkartik.com)
Date: Wed Aug 25 14:24:17 EDT 2010

> * If you're talking about running racket, then you can use a flag to
>  set the initial language: "racket -I mzscheme".

'$ racket -l mzscheme -f main.scm' turns out to be just what I wanted. Thanks!

But it's counterintuitive that this doesn't work:

  $ racket -f main.scm -l mzscheme
  main.scm:1:10: #%app: missing procedure expression; probably
originally (), which is an illegal empty application in: (#%app)

What's the right mental model for this? Is the -l causing future files
on the commandline to be in the requested language?

Are there online docs on the commandline flags online? racket --help
says this about -l

  -l <path>, --lib <path> : Like -e '(require (lib "<path>"))'

Is this right?

>> Is there a way to switch the default language to mzscheme ...
>> without getting into a module environment?
> * If you're talking about generating files, then you can just use
>  "#lang mzscheme" at the top to get the (very) old legacy language.
> * And if you're talking about editing in DrRacket, then the language
>  dialog has an "Automatic #lang line" that determines the line that
>  gets inserted into new buffers.

#lang also turns each file into a module, and I have to make sure I
require files in the right order. With generated code this is often


Posted on the users mailing list.