TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The File Filesystem (2021)

346 点作者 wegwerff大约 1 年前

22 条评论

PMunch大约 1 年前
Oh this is cool! I recently wrapped libfuse in Nim and after porting the &#x27;hello&#x27; filesystem example I made one which is more or less exactly this. However my version you pipe data and have to provide a mountpoint, then when it&#x27;s done it writes the result over stdout. That means you can inline it in a pipe chain but also that you have to make sure to grab the output.<p>At the moment I&#x27;m exploring other stuff which could be made into file systems. I&#x27;ve got a statusbar thing for the Nimdow window manager which allows you to write contents to individual files and it creates a bar with blocks on them as the output. It makes it super easy to swap out what is on your bar which is pretty neat.<p>Another tool I&#x27;ve made is a music player. It uses libvlc and when given a folder it reads all the media with ID3 tags and sets up folders like &#x27;by-artist&#x27;, &#x27;by-album&#x27;, etc. Each file is named as &#x27;&lt;track number&gt; - &lt;song title&gt;&#x27; and contains the full path to the actual file. To play a song you cat one of these files into &#x27;control&#x2F;current&#x27; and write the word play to &#x27;control&#x2F;command&#x27;. There&#x27;s a bit more to it like that like a playlist feature and some more commands, but that&#x27;s the basic idea. The goal is to have a super-scriptable music player.
评论 #40227972 未加载
评论 #40225800 未加载
评论 #40221696 未加载
RetroTechie大约 1 年前
Useful enough that it should be an OS-level standard feature, imho.<p>Unix-like OSes allow mounting disk images to explore their contents. But there&#x27;s many more file formats where exploring files-inside-files is useful. Compressed archives, for one. Some file managers support those, but (imho) application-level is not the optimal layer to put this functionality.<p>Could be implemented with a kind of driver-per-filetype.
评论 #40215928 未加载
评论 #40219626 未加载
评论 #40217080 未加载
评论 #40215839 未加载
评论 #40225726 未加载
评论 #40215919 未加载
评论 #40225276 未加载
评论 #40216709 未加载
jasonpeacock大约 1 年前
You can also mount your git commits as a filesystem:<p><a href="https:&#x2F;&#x2F;jvns.ca&#x2F;blog&#x2F;2023&#x2F;12&#x2F;04&#x2F;mounting-git-commits-as-folders-with-nfs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jvns.ca&#x2F;blog&#x2F;2023&#x2F;12&#x2F;04&#x2F;mounting-git-commits-as-fold...</a><p>(previously: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38527866">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38527866</a> )
评论 #40214891 未加载
paulgb大约 1 年前
This is really neat, but when I saw the headline I got excited that it was something I have been looking for &#x2F; considering writing, and I figure the comments here would be a good place to ask if something like this exists:<p>Is there a FUSE filesystem that runs in-memory (like tmpfs) while mounted, and then when dismounted it serializes to a single file on disk? The closest I can find are FUSE drivers that mount archive files, but then you don&#x27;t get things like symlinks.
评论 #40216812 未加载
评论 #40216763 未加载
评论 #40220124 未加载
评论 #40216686 未加载
评论 #40216799 未加载
compressedgas大约 1 年前
Also the Parts-of-file File System: <a href="https:&#x2F;&#x2F;www.usenix.org&#x2F;conference&#x2F;2005-usenix-annual-technical-conference&#x2F;parts-file-file-system" rel="nofollow">https:&#x2F;&#x2F;www.usenix.org&#x2F;conference&#x2F;2005-usenix-annual-technic...</a>
alephaleph大约 1 年前
Reminds me of Omar Rizwan&#x27;s TabFS &lt;<a href="https:&#x2F;&#x2F;omar.website&#x2F;tabfs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;omar.website&#x2F;tabfs&#x2F;</a>&gt;
sambeau大约 1 年前
Ha. I did this back in 2003. It&#x27;s surprisingly fast, and makes it simple to do granular locking.<p>I used it as a per-user database for a web-templating language for a giant web-site building tool.
purple-leafy大约 1 年前
When I saw the title I thought it was a meme.<p>But wow what a clever idea. Not sure id ever need to reach for it personally as I do most data processing in a higher level language, but I can imagine people can find use cases.<p>Nice out of the box thinking
freeney大约 1 年前
This looks awesome, I need to give it a try asap. I can very well see myself using this to navigate or search inside JSON files
Edmond大约 1 年前
If you&#x27;re intrigued by this then Solvent-Configr might be of interest: <a href="https:&#x2F;&#x2F;aws.amazon.com&#x2F;marketplace&#x2F;pp&#x2F;prodview-i3ym46leenag4" rel="nofollow">https:&#x2F;&#x2F;aws.amazon.com&#x2F;marketplace&#x2F;pp&#x2F;prodview-i3ym46leenag4</a><p>It uses file system mechanics to model objects, meaning you can design object based solutions that support file system style navigation.<p>Demo: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;XgTgubZQPHw" rel="nofollow">https:&#x2F;&#x2F;youtu.be&#x2F;XgTgubZQPHw</a>
qazxcvbnm大约 1 年前
What happens if your JSON key has a slash?
timrobinson333大约 1 年前
It&#x27;s an interesting idea but I think the usefulness would be greatly enhanced if it could handle json arrays; most needed json structures contain array elements in my experience
评论 #40228267 未加载
planede大约 1 年前
Hmm, this opens the possibility to also commit these files as directory structures. I wonder how this would affect merges and conflicts.
chuckadams大约 1 年前
Neat. Now how about a filesystem that takes a directory of files and exposes it as a single json file? You could call it the Filesystem File, and mount it in the File Filesystem if you wanted...
sigmonsays大约 1 年前
this is cool but it&#x27;s fuse.. which is not so cool.<p>these days i reach for jq.. I&#x27;ve recently became interested in duckdb too.<p>Using a tool that is specialized for the format is usually more ideal than a generic one treating everything as files.<p>There is a lot in JSON that can&#x27;t be represented in a flexible way as files and directories. For instance, what if a key has &quot;&#x2F;&quot; in it.. What happens to lists and their order when you re-serialize How are hashes represented.. how can you tell if a parent is a object or a list.. inserting a item into a list is a ton of error prone renames.. the list goes on<p>(edited for formatting)
willlma大约 1 年前
This reminds me of [pry](<a href="https:&#x2F;&#x2F;pry.github.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pry.github.io&#x2F;</a>) for Ruby that allows you to cd into other scopes
isoprophlex大约 1 年前
For fuck&#x27;s sake! Not everything needs to be a file!<p>(This is a joke. I love the idea and execution.)
评论 #40215419 未加载
评论 #40215374 未加载
secwang大约 1 年前
remind me of djb&#x27;s envdir
agumonkey大约 1 年前
All I see is a generic tree walk mechanism, here implemented in folders&#x2F;files, but in plan9 it&#x27;s .. plumber ?
ThinkBeat大约 1 年前
No XML, Excel,PDF or CSV support yet.
评论 #40219106 未加载
waldrews大约 1 年前
Could this be used in Windows by exposing a Samba file share from WSL or Docker?
yjftsjthsd-h大约 1 年前
I would gently suggest naming it filefs or something; ffs already means <a href="https:&#x2F;&#x2F;man.freebsd.org&#x2F;cgi&#x2F;man.cgi?ffs(7)" rel="nofollow">https:&#x2F;&#x2F;man.freebsd.org&#x2F;cgi&#x2F;man.cgi?ffs(7)</a><p>That said - good idea&#x2F;approach; seems like an excellent way to cleanly extend the unix approach to structured file formats:)
评论 #40214698 未加载
评论 #40215119 未加载
评论 #40215086 未加载
评论 #40224724 未加载
评论 #40214755 未加载