[racket-dev] Any notion of ".jar" files for Racket?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Mar 7 13:45:49 EST 2012

At Tue, 6 Mar 2012 14:51:45 -0500, Danny Yoo wrote:
> On Tue, Mar 6, 2012 at 2:44 PM, Tony Garnock-Jones <tonyg at ccs.neu.edu> wrote:
> > On 03/06/2012 02:14 PM, Danny Yoo wrote:
> >>
> >> The Java folks have a notion of ".jar" files that pack a collection of
> >> class files into a single archive, but also make it possible to load
> >> classes directly out of .jars without an intermediate unpacking stage.
> >>  .plt archives can serve a role to pack files together.   Does Racket
> >> have a mechanism for loading modules out of them without unpacking?
> >
> > Python and Erlang both support a similar thing, fwiw.
> Yup; I'm familiar with the Python side of things: they've got
> `zipimport` to import libraries from zip files:
>     http://docs.python.org/library/zipimport.html

If you don't need this functionality enabled by default, you could
install a `load/use-compiled' handler that similarly recognized paths
into a ".zip" file.

I must admit, though, I'm disappointed if we can't rely on an
OS-supplied filesystem to provide a good filesystem abstraction. Maybe
there's some OS-level extension you could use to mount a file in an
existing filesystem as a new filesystem (like Mac OS X's mounting of
".dmg" files)?

Posted on the dev mailing list.