[racket] using planet from embedded application
Gabor,
Thanks for elaborating :). Bypassing planet, and using `(require (file
...)) ` works fine.
One thing I've noticed is that the (file ...) form only accepts a
string, and not another expr which evaluates to a string. Eg: this
doesn't work:
(require (file (string-append "/A/B/C/" "file.ss")))
Strange ... (for me, at least)
Thanks again!
--
Regards,
Imran Rafique
(skype: imran_rafique)
On 28 March 2011 07:02, gabor papp <gabor.lists at mndl.hu> wrote:
> 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:
> http://planet.racket-lang.org/package-source/untyped/net-repl.plt/1/0/
> 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.
>
> best,
> gabor
>