the scary thing about #Plan9 is when in file formats it has stuff like:
file: refers to a file
some-special-string: does a special thing
and that just invites the problem of someone using some-special-string as a file name
pls, anyone who does #programming
do not ever do anything like this
keep your formal grammars unambiguous
if you do not, Ada Lovelace will come down from Programmer Heaven and smite you
@grainloom This is my number-one complaint with calls to ‘just use plain text’, I don’t want to parse poorly-specified, ambiguous schemata.
@Shamar idk, read it in some manpage the other day, not sure which
but similar problems apply to a lot of the system, eg. how basically nothing can handle spaces in file names
(hot take, $ifs should only contain tab and newline, or better yet, there should be no $ifs)
@Shamar this isn't really a Plan 9 specific problem, but it's one of those things that mess up an otherwise nice system
Every programmer continuously does that to users: we restrict what you can do with computers so that you can actually do something.
For example you can't put a 0x0 byte in the middle of a file name. Or a "/" in a domain name.
You are so used to our power you can't see it anymore. And actually most programmers are unaware of it.
But the truth is that we CAN tell you what to do and what not. And that's nothing!
Software programmers dictate how people THINK!
And this was true way before Cambridge Analytica: you perceive and act on the world through the software we write.
Through software we shape your synapses.
It makes sense in historical context, sure, but it doesn't have to always be like this.
And not all limits make you think, some are just practical because an upper bound is often nice to have. Eg. 255 characters per file name is probably a relief for on-disk file system formats.
Like, just having a standard lightweight container format would be enough, so you don't end up writing a parser for every tool.
TSV is nice because you can write an en/decoder in an hour (at most, if your C is rusty. more like 15 minutes otherwise) and it gets you enough structure without sacrificing readability
pure S-expressions are also super easy to parse, just need like... a way to do recursion??? i think? it's been a while since I wrote one (in Lua) but that too only took like 20 m.
Basically it's a matter of habits.
You are used to operating systems that care much more about looking simple that about being simple.
But sometimes few consistent constraints can make a system more predictable and easy to compose.
@Shamar because they are useful
the question is, why would tools use space as a primary field separator
@Shamar like, if you wanna give files meaningful names, you're gonna use spaces
hyphens don't cut it (they have different semantic meaning in language) and underscores are irritating to type and look ugly
I mean, you can't seriously say "but that's harder to learn" when we have just demonstrated how many problems it leads to.
If kids can learn Python in a week, programmers can bear with a teeeensy bit more syntax in their shells.
String literals mean escape rules.
And sometimes they are hard to get right for programmers too.
Every single time programmers are too shy to impose a simple restriction to users' input (or customers' will), they add to the pile of crap another source of complexity.
ｃｙｂｒｅｓｐａｃｅ: the social hub of the information superhighway
jack in to the mastodon fediverse today and surf the dataflow through our cybrepunk, slightly glitchy web portal