[racket] mzScheme and Collection Path

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Oct 11 10:09:13 EDT 2014

At Wed, 8 Oct 2014 15:08:30 +0200, Chrakhan Barzanji wrote:
> hi,
> i want to write a html code in DrRacket with <!--
> mzscheme="..(schemecode).." --> to beable to read a data 'dynamicly'!
> i have read that the html data should be saved in the collection Folder
> named "doc"!
> but some thing is going wrong! I don't have Doc folder in Collects and when
> i try to copy the doc folder, which is outside the Collects folder in
> Racket folder i get the access denied errornr5!
> any idea how to create in scheme with html an on the fly document, so that
> i can interactivly change data and get results!

Are you trying to use the `browser` collection's web browser? That
library implements a browser that is old and limited, so I wonder if
it's really what you want to use. You might be more interested in using
a modern browser and serving context via a web server (as implemented
with the `web-server` collection).

In the latest version, "<!-- MZSCHEME..." has been changed to "<!--
RACKET...", and the documentation says

  The RACKET forms are disabled unless the web page is a file: url that
  points into the doc collection.

The "doc" collection went away years ago, so that part of the
documentation makes no sense. I see that the code was adapted to enable
"<!-- RACKET..." anywhere within the parent of the parent of the main
"collects" directory.

Even that adjustment broke with the directory-structure reorganization
in version 6.0. I'll also fix up the implementation to make it do
something sensible, but mostly I'll fix the current docs to clarify
that the `browser` library is not especially useful.

Meanwhile, my guess is that you're using v5.x or even v4.x. For that
version, you do need to put the HTML source in the Racket installation
directory. It makes sense that you don't have write permission to the
installation directory, though, unless you're running with
administrator privileges. If you really want to use `browser`, I think
you'll have to work with a Racket installation (possibly a separate on
in your home directory) that you can write to.

Posted on the users mailing list.