The design of littlefs
36 points by nortti
36 points by nortti
Unsure about the tagging here, but none of the tags I thought to try for this ("file systems", "architecture", "systems programming", "embedded", "microcontrollers") exist on Lobsters.
Not directly related to littlefs, but I've never seen such high quality ASCII diagrams before. I couldn't find out whether the author used a diagramming tool to produce them.
i asked one of the maintainers about this years ago. this is what they said:
"The ascii diagrams were created by hand with Vim's block edit mode (ctrl-v). It lets you edit a text file more as a grid."
I discovered svgbob (demo) a couple years ago. It's great at turning ascii-art diagrams into images (and there's also a typst plugin).
To create the diagram, I use vim, often in visual block mode. I lay a few boxes and that gives me the size of the diagram. After a few edits, I fill the "edit zone" with spaces. Once that is done, edits are typically done in "replace" mode so that they don't shift content. If I want to move a block and extend the arrows leading to it, I'll visually select a line or column, copy it and past it as needed.
It's almost as fast as visual mouse-based tools but once the diagram gets less simple, it's much faster and not a headache. In addition, you can version-control it, have no trouble with exports (the day I needed exports from google docs, I had to redo everything instead), integrates well and degrades to ascii diagrams.
My only annoyance is that text is sometimes aligned surprisingly relative to boxes I draw around. Maybe a monospace font would help, I need to try it.