TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Regex2fat: Turn your favorite regex into FAT32

397 pointsby beefhashabout 5 years ago

24 comments

rwmjabout 5 years ago
If you think this is crazy, check out the VVFAT driver in qemu[1]. At first sight it seems simple enough - turn a host directory into a virtual FAT filesystem which is presented to the guest.<p>The clever&#x2F;insane thing is it supports writes. It is able to &quot;reverse&quot; those block level operations from the guest to modify the source filesystem on the host.<p>It was written by the ever exceptional Fabrice Bellard. EDIT: No it wasn&#x27;t, it was written by Johannes Schindelin, thanks for the clarification in replies.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;qemu&#x2F;qemu&#x2F;blob&#x2F;master&#x2F;block&#x2F;vvfat.c" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;qemu&#x2F;qemu&#x2F;blob&#x2F;master&#x2F;block&#x2F;vvfat.c</a>
评论 #22881921 未加载
评论 #22884548 未加载
评论 #22885713 未加载
评论 #22885217 未加载
评论 #22881656 未加载
bryan_wabout 5 years ago
This reminds me of that Lewis black bit, &quot;If it weren&#x27;t for my horse, I never would have spent that year in college&quot;.<p>I saw the words, but my brain couldn&#x27;t process them, no matter how many times I tried.<p>If I die of an aneurysm, regex2fat will probably be the reason why
评论 #22883096 未加载
评论 #22888668 未加载
评论 #22886969 未加载
yjftsjthsd-habout 5 years ago
&gt; Q: Should I use this in production^w^w anywhere?<p>&gt; A: No, but I can&#x27;t stop you.<p>The motto of so many of the best projects:)
评论 #22885939 未加载
sunsuabout 5 years ago
All In: &quot;Haha OS-driven regex engine go brrrrr&quot;
评论 #22880400 未加载
评论 #22885201 未加载
wmuabout 5 years ago
There&#x27;s the first issue: &quot;`regex2fat` is nine characters long&quot; (<a href="https:&#x2F;&#x2F;github.com&#x2F;8051Enthusiast&#x2F;regex2fat&#x2F;issues&#x2F;1" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;8051Enthusiast&#x2F;regex2fat&#x2F;issues&#x2F;1</a>) :)
评论 #22888716 未加载
评论 #22883610 未加载
duskwuffabout 5 years ago
This is a horrifying abuse of a filesystem, and I love it.
a_cabout 5 years ago
Hey thanks for the project! I (thought I) know what regex is, and I (thought I) know what FAT32 is. But Bamm! putting the two together, the whole sentence makes no sense to me.<p>This is genius.
acheronabout 5 years ago
Now you have... quite a few problems.
ozzmotikabout 5 years ago
&gt;Q: NOOOOOOOOOOO!!! YOU CAN&#x27;T TURN A DFA INTO A FAT32 FILE SYSTEM!!!! YOU CAN&#x27;T JUST HAVE A DIRECTORY WITH MULTIPLE PARENTS!!! YOU ARE BREAKING THE ASSUMPTION OF LACK OF LOOPERINOS NOOOOOOOOO<p>&gt;A: Haha OS-driven regex engine go brrrrr<p>i absolutely love little toy things like this that probably shouldn&#x27;t exist but do regardless, and even more so I love it when they close on a silly and playful note like this. this is a rather interesting concept and it reminds me a lot of the idea of glitterbombing from more occult&#x2F;esoteric circles of the internet (performing acts of obscurity and aloof strangeness to degrade the meaning of consensual reality and expose people to a perspective of life they otherwise would not spend much time engaging in, sorta conceptually similar to Zen koans)
评论 #22887818 未加载
Alohaabout 5 years ago
This strikes me as a project that was created while drunk or high, probably high, possibly both.
评论 #22881441 未加载
评论 #22881193 未加载
codegladiatorabout 5 years ago
Can I parse HTML with this ?
评论 #22883522 未加载
评论 #22883764 未加载
m463about 5 years ago
A while back I had a car stereo that would read USB drives in fat (fat32) format, but it had a terrible user interface, and searching&#x2F;traversing was a chore.<p>I thought it would be a cool idea to hack the filesystem to allow you to have directories of albums or genres or artists all cross-linking to the same music files.<p>I now see my &quot;big dreams&quot; were actually limited in scope.
jimrandomhabout 5 years ago
I think this could also be built out of symlinks in a Linux filesystem. This would be slightly more practical (though, of course, still not practical at all).
评论 #22880822 未加载
评论 #22882636 未加载
superasnabout 5 years ago
What happens if I my regex contains aux.h?
评论 #22880461 未加载
评论 #22884596 未加载
评论 #22882145 未加载
Darkphibreabout 5 years ago
I read this first as &quot;Turning your Registry into FAT32&quot; and thought... oh, no. You do <i>not</i> want to do that.<p>Regex though... this is humorous.
newbie789about 5 years ago
This is a very stupid question and I apologize in advance, but could somebody explain to me (as if I were a five year old) what this does?<p>Like literally what does it do? I&#x27;m assuming there is a theoretical use case, even if as a toy project just for shits and giggles but I&#x27;m completely at a loss.
评论 #22887802 未加载
buildbotabout 5 years ago
This is hilarious! I was excited hoping that it was a fuse file system that let you mount a view of another file system with regex though, something that would be a pretty useful tool.
评论 #22882544 未加载
russtrotterabout 5 years ago
I love these kinds of projects! Any description of it that has me cackling by the 2nd sentence is gonna be a gem. Good thing i brought my FAT32 driver.
sonofgodabout 5 years ago
&#x2F;A&#x2F;A&#x2F;A&#x2F;A&#x2F;A&#x2F;A&#x2F;A&#x2F;A&#x2F;A&#x2F;A&#x2F;A&#x2F;A&#x2F;A&#x2F;H&#x2F;H&#x2F;H&#x2F;H&#x2F;MATCH
jra_sambaabout 5 years ago
James Cain did something similar on Windows using his user-space SMB2 server.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=tDUL3wEs2ew" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=tDUL3wEs2ew</a><p>You could also write a Samba VFS module that does the same thing with incoming filenames.
Rokidabout 5 years ago
What is this? I&#x27;m so curious but nothing of this rings a bell with me. I mean I know what a regular expression is, and I&#x27;ve formatted several USBs to FAT32, but DFAs and everything in between have me Googling like crazy, still in the dark though.
评论 #22881633 未加载
评论 #22881318 未加载
评论 #22881963 未加载
bryanrasmussenabout 5 years ago
did you ever think you wanted your favorite regex as Fat32? Because if you did you have two problems.
flingoabout 5 years ago
Great.<p>Now someone build one that can compile new regexes in fat32.
afortyabout 5 years ago
Love the readme.<p>haha regex engine go brrrrr