[racket] using planet from embedded application

From: gabor papp (gabor.lists at mndl.hu)
Date: Mon Mar 28 03:02:36 EDT 2011

hi Imran,

> Could you elaborate a little?
i used the mysql package, so it might be different in your case. i
suggest that you go to the planet page of the module and download the
source manually:
save the files into a folder, called for example 'netrepl'.
then put your main file in the folder where the 'netrepl' directory
resides. now in your file you can use
(require (file "netrepl/net-repl.ss"))

try this from racket first, then vim.

the problem is that modules usually require other planet libraries, so
you need to do this iteratively. as i see net-repl requires some files
from the unlib module, that you will need to download as well. it is
also required that you modify the module source where it uses (require
(planet ... forms.

if you are done with this, and all the files are saved locally, it
should work from racket. if it still does not work from vim, you need to
copy the compiled files from the cache as i described in my previous
mail to a folder called 'compiled'. for example, the mysql module has
three files: format.ss, info.ss, main.ss. so i put the compiled files
format_ss.zo. info_ss.zo, main_ss.zo in a folder 'compiled' under the
'mysql' folder. i'm using osx where the racket cache folder is in
~/Library/Racket/<racket version>/cache, probably it's something similar
in other operating systems.

one more thing, which is important. when you copy the .zo files, use 'cp
-p', which preserves file times. otherwise the embedded racket in vim
might try to recompile the source files, which will fail.

i hope it helps.


Posted on the users mailing list.