[racket] typed racket slow?

From: Manfred Lotz (manfred.lotz at arcor.de)
Date: Wed May 8 12:47:14 EDT 2013

On Wed, 8 May 2013 10:27:09 -0400
Ray Racine <ray.racine at gmail.com> wrote:

> On a tangent, if you run your Racket on Linux (like anyone would use
> anything else :0 ) you can "install" *.rkt files as executables with
> binfmt.
> 
> Very Short (no validation) Path
> 
> 1) Create a shell script runracket.rkt in your racket installation
> bin. i.e. /usr/local/racket/bin/runracket
> #! /bin/sh
> 
> racket -tm $1
> 
> 2) Use your package manager to install binfmt.
> 
> 3) Register .rkt files as executables handled by runracket.  As root:
> 
> a) cd /proc/sys/fs/binfmt_misc/
> b) echo ':RunRacket:E::rkt::/usr/local/racket/bin/runracket:' >
> register
> 
> 4) Have a sherbet.
> 
> Then assuming you have a simple helloworld.rkt file with a "main" your
> Racket file is now just another shell or executable.
> 
> ray at rpr:~$ ./helloworld.rkt
> Hello there.
> 
> Obviously the above should be made more robust, adjusted be installed
> on bootup etc, but that is the basic idea.
> 
> Decent odds a Mac can do this as well.  Better odds Eli has something
> done along these lines polished to perfection. : )
> 
> To remove the entry echo -1 to the entry.
> 
> $ echo -1 RunRacket
> 
> 
> 

Thank you. Didn't know about binfmt. 


But why not just this:

#! racket -t 
#lang racket

(displayln "Hi world!")


I saved it into rscript.sh, changed perms to 755 and it ran without
problem. 


-- 
Manfred




Posted on the users mailing list.