Making GNU tools for just because is no problem. If you take the trouble to add it to a distribution, it's up to the distribution to make sure that the alternatives available for the same job are presented, after they've decided which is their choice.
A relational database is not a project that could be finished on a Friday afternoon. But we might think that though there are robust ones and replicable ones, and robust replicable ones, we're just looking at words which don't mean much to a curious programmer.
A filesystem can also be added to the list of options a distribution presents. A robust filesystem can recover from severe crashes. Once we have a filesystem that some might call crash proof there are those who will suggest that unsafe removal is an option, as if it's someone else's business to know that there is such a thing as a dirty flag.
This puts us on the side of murderers, plain and simple.
Once you have a filesystem, and it is called robust, making use of umount becomes a bit tedious. But there is potentially the risk of Kernel memory corruption, besides data loss.
Electromechanical locks and key-buttons went out with video cassette recorders.
In this state of things, a user needs an advisor. At present I'm just a g'advisor because advisors proper make sure to align their opinions before giving advice. Only advisors know why this is imperative. Opinions will vary in terms of what to do with removable disks in an ill-thought out operating system, connected with connectors that are designed to be baby-proof.
GNU-Linux's official filesystem is robust. But there were those who just couldn't get enough of the bleeding edge; and a filesystem which involved a murder.
Which puts us on red alert.
Speeding up fsck after a crash is a feature which has been a delight to me. Memory can become corrupted but that's either a broken computer, or a bug in an app, lib, or the Kernel. Now you know who to ask?
This webdoc is a matter of trying to focus my thoughts. Any chance reader might know about tools with rules of not touching them. A tool without a rule is one that no-one touches. A data file, such as one we intend to describe, is one in which corruption can occur; which is everything except a text file. File formats do not all need a dirty flag; but they are the kinds of files which are written with pens.
Not intending to make a tool with a rule, the testing of which amounts to crash scenario planning, we wave our hands as if we're blessing a font, and tip our hat to those who know the history of absolution. The water is pure; I take that on trust.
The dirty flag, which must get set whenever the file is opened, and reset when it is closed (noting that errors while attempting to do the reset write will be ignored), to us simply means, throw it away.
Which is something like an egg, isn't it?
Our file format, which we have yet to name, because that would be like naming an egg before cracking it, requires, for the sake of good behaviour, an arbitrary sequence of bytes called file magic, which well-behaved programmers make letters. A file format without a name is hardly one we can put a version to.
Wanting to put my own name somewhere, as a signal perhaps, I considered using 'brianjonnes' as the file magic, but, besides being a signal of hopefulness on the matter of reproduction, the signal was intended to be for one who didn't care much for technological progress and looked wistfully at pairs of hobos.
Do not forget a murder that tars all GPL programmers with the same brush; thus 'gplmurderers' seems to be more appropriate.
The dirty flag can simply be a matter of making the last letter of the magic a capital.
Recalling that our lists work with cyclers, which start at home, not at start, our first list is the list of free blocks, and this is considered to be corrupt if it does not move one way through the file. This suggests that different types of cyclers will be called for, but we don't need to make use of cyclers when we're dealing with the library code itself. Our first allocation, then, simply contains an opt-fad to the first free block.
It must be noted that while it increases the size of structures, the lib's read routine must be given an allocation address. Allocation of blocks always ensures that there is one free at the end. The next allocation is the list of lists, which is followed by a user block.
Now we need to look at two things, but to save the reader the hassle, we'll flip a coin and describe them one after the other.
It is up to the app to maintain file integrity: the lib will have rules which allow the app to do so, but most of these will be unwritten ones while our lib only attracts spiders.
There is such a thing as a multiply-linked list. This very much has to do with what most people consider indexing: the maintaining of things in an order. This suggests to us that we aught to include in our master list the number of edges to each vertex, considering the list as an undirected graph; we therefore might have lists which can only have one element.
The app or user block will allow a user of the lib to know which list is which.
An allocation, or allocation block, is about the simplest thing in the world but we need to choose the size of the size unless we intend to show off fancy foot-work and then wonder how we're going to test something which supposedly will work for arbitrarily sized numbers. For write_file_at and read_file_at syscalls, the file position needs a size. Thus the system must have a limitation by design. In a file which stores addresses, the file size increases according as the address size increases. Trying to do something fancy with address sizes, we'd still have to be reasonable: we would still have to choose a maximum number that isn't too big. Instead of choosing a reasonable number that isn't too big or too small.
At present, sixteen bits would be enough. But that's how I feel about color screens, too. It would be a technical challenge to avoid using the C type which was originally equivalent to the machine word, but which, for technical reasons, has effectively been standardized as thirty-two bits. It was foreseen that Kernels would need to be able to support files much larger than that, so that this was again doubled, for the purpose of file addresses, in the course of the history of Unix. But before we get to a fraction of the limit that thirty-two bits gives us, we will most certainly have to have contemplated index trees. In fact we will have to be within one degree of perfection.
And then we might just start all over again :'-|
The size of a file address is given as a number of bytes, so that we have, for instance, a fad4 typedef or struct. If an address may at times be such that we know it is not pointing to anything, convention has it that we select something, such as nought, and call it nothing. Prefering not to call something nothing, and bytes not being worth their weight in gold, we may instead indicate explicitly when a fad is not pointing to anything: if we have a compass we will cover it when we've hit the lode-stone rock.
But this is where we first come to contemplate the optional type constructor. A fad is in or out. A perfect language might allow us to randomize synonymns.
But I'm not a child who cries that it didn't ask for to have a master.
We learn when crying is just attention seeking. In fact, I gather we learnt this before we could talk.