oduwsdl / ORS

Object Resource Stream and CDXJ Drafts
15 stars 2 forks source link

Change character @ to ! to indicate special meta data lines #6

Open ibnesayeed opened 7 years ago

ibnesayeed commented 7 years ago

@johnerikhalse pointed out in the slack channel that using @ as the meta lines prefix does not surface meta lines above the data records when using LC_ALL=C locale.

It is the metadata starting with '@' that doesn't sort right. The meta fields will sort between surts with ip numbers and surts with hostnames.

We should consider changing the special prefix character to ! instead which is the first printable character with the ASCII character code 33, only after the space character.

machawk1 commented 7 years ago

This change has a sound rationale. What was the basis for @ originally?

ibnesayeed commented 7 years ago

What was the basis for @ originally?

@ was chosen due to the primary use case of it being used in CDX files and archive profiles. I thought the first field will almost always be a letter in those cases, but missed the fact that digits have a lower ASCII value than @ which will appear very commonly when IP addresses are SURTed. I did consider that SPACE character was the first one in printable characters, but it was not a good choice as it is very easy miss that or mess up with indentations. I didn't realize that ! was the next character and thought @ is pretty early in the ASCII table. I should have checked the ASCII table before.

johnerikhalse commented 7 years ago

I guess that inspiration from json-ld also influenced the choise of using @.