by xkcd-sucks · 3y ago · 0 comments
[0] where different use cases might be satisfied by e.g.
"a text file"
"a file exclusively comprised of alphanumeric UTF16 characters"
"a CSV file"
"a file with tabular data and key-value metadata that calls itself CSV but is not spec-compliant so internally we'll call it CSVprime"
"A file with tabular data written as ASCII text that represents $this_kind_of_measurement"
... etc
If you have any resources on this topic off the top of your head I'd appreciate it if you shared themThat's what allows it to do complex things, eg identify all the flavors of ELF objects even though they share a magic number or determine if something is JSON or CSV without one.
Think about it: A JSON file can also be considered a text file. It could also be some higher level type of file, depending on whether it conforms to some application-specific JSON schema. Thus the kind of file it is has more to do with what you want to do with it; it's not some intrinsic property of the file.
what would happen to type theory if, say, the type of an object has a probability attached to it?
A Curly braces Separated file filled with Values
This is the authors website. Apparently yeah its not part of GNU utils, I had no idea, I knew it came with most Linux systems so I looked for the Debian package and found the site linked above.
Too late to edit!
% file crawl.mjs
crawl.mjs: Java source, ASCII textEdit: yep, the test for Java source is just /^import.*;$/
I wrote a Ruby library that attempts to be good at this https://github.com/okeeblow/DistorteD/tree/NEW%E2%80%85SENSA...
might wish to discuss files containing type information, and data/value information both, thus numerous but different valued files can all be of the same type.
you can get fancier if you want and talk about valid C source files or C source files which contain bugs, etc.
you could consider a file "weakly or adhoc typed" if there is only one or a pair of agents that use that type, and "strongly or standard typed" if there are numerous "different/distinguished" agents that "rely" on that file type.
this was off the top of my head
For example, for CSV files we can use .csv.txt extension, so if shell has no software for CSV files, it will treat them as a plain text, and if it has a software for viewing CSV files, but not for editing or printing them, it will add these verbs from records for txt files.
This is backwards compatible and would require minimal changes to file managers and graphic shells.
Another example: you can easily grep through a JSON file sometimes. But what if that JSON doesn't contain newlines? In that case it would be great if the system knew how to convert the data to a multiline string that makes sense for grep. This cannot be done if the data is "just bytes".
Further, JSON data can be represented with less bytes if you know the structure.