From: James Fenn Date: 2001-01-27T04:53:04+09:00 Subject: [ruby-talk:9953] Re: Miniturising libraries on linux >> I have been thinking about how to go about putting ruby in a >> limited resource enviroment (a PDA) >What a great idea. Can I ask which particular platform or machine you have >in mind? Well the agenda VR3 will be my test environment but should be useful on any linux PDA or older computer. But a lot of the more expensive PDAs wont need to use horrible compression hacks because the have quite a lot more resources (all though it might come in handy for people cramming in as much as possible.) --- Different post --- >To get a tar.gz file you tar, and then gzip. What is >being talked about here is gzip and then tar. If you >have many small similar files then taring and gzipping >will give substantially better compression. But if >you gzip and then tar, then the outside world has a >tar file and you can extract any individual file by >itself. --- AND --- >2. Execution time. This is in "quadratic time". This means that if you >have twice the files, you quadruple your time. This can be improved by >switching to another format: > > (a) usual file hierarchy but with support for .gz > (b) tar archive, not gzipped, but containing only .gz files > (c) .zip file Right, of course, so now I am using gz.tar files (zip isn't on the VR3s default distrobution). >3. Not using a temporary file. This would require a change to the >built-in "require" method itself. ---AND--- >> In "require" you can perhaps store the name of the file previously loaded, >> this to avoid to extract twice the same file. >> >Okay, just look in $" So I figure I can stick the dumping of the file to std out in backticks and have that passed to eval. But now I will have to keep track of all the previously required files myself or maybe can I add to $". Thanks everyone for all your posts, they have been very useful.