Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The Zip filesystem stuff is wonderful change to see: it takes a number of techniques that were common in the community (if you had the right tools and knew how to use them) for building standalone applications, and makes them part of the basic toolkit in a standard way. It's a truly excellent change, and I'm glad to see it.


Can you explain what zip filesystem is?


A handler for treating .zip (and .jar and .tar ...) files as if they were a volume mounted at /home/user/foo.zip - e.g. https://github.com/openjdk/jdk/blob/jdk-21-ga/src/java.base/...

It may be easier to reason about when thinking of the way $(mount -o loop) works with .iso files -- a file that is a container for other files that one can mount as if it were a filesystem

I was expecting pathlib in Python <https://docs.python.org/3/library/pathlib.html> to have one since a lot of Python distributions ship the standard library in .zip files but evidently not. Python gonna Python in that way

Firefox actually used to ship with that same "jar:" protocol handler, too, and I made good use of it for reading the javadoc html which was shipped inside zip files and was indescribably easier than trying to manage all the .html files in a Java 8 SDK distribution. They made heavy use of this because a lot of their internals were in .xpi formats (which is also a .zip file) but they recently dropped it because Firefox gonna Firefox^W double down on some random shit other than making a sane browser


Python has something kinda like VFS support just as a very special case for importing stuff and reading associated data files, see Anchor ("mount point") and Traversable ("virtual Path") in https://docs.python.org/3.12/library/importlib.resources.abc... - the actual implementation is done in finders et al (https://docs.python.org/3.12/library/importlib.html#module-i...)


Emacs implements something like this too! It’s pretty useful to be able to just enter a tarball and work with the files in it.

It looks like https://github.com/cybernoid/archivemount provides a similar experience in the shell, although one would have to mount the file first.


they should do the same but for git repositories too


not .tar


I'm not a TCL user, but from the description of wduquette is sounds similar to Python's zipapp

https://docs.python.org/3/library/zipapp.html


The definition of "standalone application" is a bit stronger - what's always been possible with "Tclkits" has been to embed the application code in an interpreter binary and distribute that, and the new core zipfs supports that as well.


Yes, exactly. You can package up your entire scripted application, plus all resources, into a single executable, and distribute that single file.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: