3 ms·
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? Like literally what
by newbie789 7y 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?
Like literally what does it do? I'm assuming there is a theoretical use case, even if as a toy project just for shits and giggles but I'm completely at a loss.
- saagarjha 7y agoNot sure I can bring it down to the level of a five year old, but here’s something that might help: regular expressions need to be evaluated to see if they match, and how you do that is you build up a state machine called a DFA that essentially looks like “if I see an ‘a’, then I should go to a state that will look for the letters ‘b’ or ‘c’”. What this project does is encode those transitions in the filesystem, so that the states are directories. If you see a particular letter, you basically “cd” into that letter and you’ll be in the next state.