Re: [racket-dev] Any notion of .jar files for Racket?
At Tue, 6 Mar 2012 14:51:45 -0500, Danny Yoo wrote: On Tue, Mar 6, 2012 at 2:44 PM, Tony Garnock-Jones to...@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)? _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Any notion of .jar files for Racket?
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. Tony _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Any notion of .jar files for Racket?
On 03/06/2012 01:14 PM, Danny Yoo wrote: One of the things I'm encountering on the Brown network file system, is that the number of files loaded by DrRacket causes some strain on their systems. I checked with the admins here, and by their count, opening up DrRacket or doing things with 'raco make' can open about a thousand files at startup time. You can trace this on a Mac with dtrace like so: sudo dtrace -n 'syscall::open*:entry /execname == DrRacket/ { printf(%s,copyinstr(arg0)); }' drracket-files then open DrRacket. On Linux, the right invocation is something like: strace -e trace=open -e signal=none drracket On my system, DrRacket 5.2.1 opens almost 1800 files to start. The vast majority (1376) are .zo files, and another 133 are uncompiled .rkt files from the Racket distribution. -- Brian Mastenbrook br...@mastenbrook.net http://brian.mastenbrook.net/ _ Racket Developers list: http://lists.racket-lang.org/dev
Re: [racket-dev] Any notion of .jar files for Racket?
Brian Mastenbrook wrote at 03/06/2012 03:43 PM: On my system, DrRacket 5.2.1 opens almost 1800 files to start. The vast majority (1376) are .zo files, and another 133 are uncompiled .rkt files from the Racket distribution. It gets much faster once the files are in OS caches, which helps with successive invocations of the command-line tools. The uncached accesses going over NFS could be especially painful, such as if you are running a copy of DrRacket from a slow NFS home dir. (I feel for anyone who has to use NFS nowadays, such as some university communal computers are no doubt still set up to use. NFS and AFS were great 20 years ago, at least when the servers and the network were non-flaky and not oversaturated. Today, we usually want to be using our own computer with a local copy of files (or a USB flash drive with communal computers), not having every file access go out to centralized server. Popular SCM systems like Git and Subversion are good ways to replicate most of our files among systems, and permit disconnected operation in between. I'd still offer students an NFS dir they're free to use, especially new students working from lab computers, but encourage them to use their own local storage for most things. And I'd provide a big Git server with private accounts, which students may use for coursework if they wish.) -- http://www.neilvandyke.org/ _ Racket Developers list: http://lists.racket-lang.org/dev