Hi, I recently learnt about pijul, mostly from the theoretical pov which interests me the most, even though i’m eager to actually use it to manage some code. Diving into the code (and the autogenerated doc), I noticed that directories seem to exist only implicitly (as some kind of “path” property of “leaves” – the files). Is that true or is there something i missed?
I’m asking this because i’m currently starting a project of distributed filesystem which would bear much similarity with a dvcs and i hope to build it upon libpijul as much as possible. More specifically, the structure i want to represent may contain things that look like files and things that look like directories, but i would like to think of directories as “structured files” that are just mappings from some string keys (filenames) to some id of another structured file. As such, i like the git concept of object which abstracts everything that is version-controllable, eg my structured files.
Translating this into pijul concepts, i think my structured files would map to the actual categorical objects of the file-and-patch category. Is that true? In particular i’m not sure about the categorical account for the concept of repository (are patches applied on a repository/set-of-files or on a file?). Supposing this is true, how much would it take to generalize (and is pijul interested in that) the concept of file to a more abstract “object of any cocomplete category”? In terms of libpijul that would mean to have a trait describing what it means to be patchable for some type (with an associated Patch
type and some helpers to compute pushout, to reduce a patch, etc).
Note that i’m mostly interested about quite concrete instances of this generalization. Pijul treats files conceptually as dynamic arrays of lines (which is probably easy enough to generalize to dynamic arrays of some abstract type T), i would like to add mappings from strings to an abstract type, stacks (eg append-only log), fixed-length arrays, user-defined structs, sets, etc. I think that the concrete representation of the cocompletion of these respective structures (as categories where arrows are the supported operations) isn’t too complicated.
I’d be happy about any thoughts on this subject, if other people are interested in this kind of development, etc.