[racket] Current advice on making a 'script'

From: Norman Gray (norman at astro.gla.ac.uk)
Date: Thu Jan 15 06:20:59 EST 2015

Jens Axel, hello.

> On 2015 Jan 14, at 21:45, Jens Axel Søgaard <jensaxel at soegaard.net> wrote:
> 
> Perhaps the demodularizer could be used to produce a single .zo file,
> and the script could simply start it?
> 
>    http://docs.racket-lang.org/raco/demod.html?q=raco

That looks like the sort of thing I was after -- a .jar-like thing.  I can't work out the magic to launch the resulting object at the command-line, but given Jay's remark about it being 'not yet reliable', I suspect that's a 'here be dragons' flag, so perhaps a curiosity for later.

Jon Zeppieri wrote:

> Does the PLTCOLLECTS environment variable help here? I mean, as an
> alternative to inlining all of the required modules in the script
> itself or using `raco link` to set up local packages? Or have I
> misunderstood the problem?

Slightly -- the goal was to find a way of obtaining or constructing a single-file object that didn't make reference to any files outside a standard Racket installation.  That is, something like the output of 'raco exe' but without the overhead of the embedded executable.

The output of 'raco demod' looks pretty much like what I was looking for but couldn't find (or at least is merely a bit of scripting away from that), but (a) that's neither advertised nor fully stable, nor really what it seems intended for, and (b) 'raco exe' is supported, and the portion of the executable that's installed doesn't bloat it beyond convenience, so I think that's what I'll stick with.

All the best,

Norman


-- 
Norman Gray  :  http://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK



Posted on the users mailing list.