Finer points of file formats
Posted: December 24th, 2023, 1:50 pm
I'm writing a Rust library for doing Game of Life stuff, and, in implementing support for the Plaintext and Run Length Encoded file formats, I've encountered some issues with the descriptions on the wiki. Some of these are just areas where the descriptions could be more exact, but there are also some parts of the descriptions that suggest that some or many of the pattern files on conwaylife.com are invalid.
For the plaintext format:
For the plaintext format:
- The format description states that the first line of the file is supposed to be of the form "!Name: Something", but 2540 out of the 3210 .cells files in all.zip lack this line entirely. Is the "!Name" line not actually required?
- Are comments permitted in the middle of a pattern drawing, e.g.:
Code: Select all
!Name: Glider .O. ..O !Ooo, spooky! OOO - Is it permissible for the name header to be of the form "!Name:Something", without any whitespace after the colon?
- Must the space after "!Name:" be the space character (U+0020), or can it be a tab or Unicode whitespace?
- If "!Name:" is followed by more than one space (and/or tab or Unicode whitespace?), are the spaces after the first stripped or included in the name?
- What counts as a newline sequence in this format? The RLE page states that "DOS [i.e., CR LF], Unix [i.e., LF] and Mac [i.e., CR] newline conventions are all acceptable", but the Plaintext page is silent on this.
- When outputting the 0×0 pattern (xs0_0 in Catagolue) in Plaintext format, is there a consensus on whether the drawing should consist of a single blank line or just be empty/absent?
- Are blank lines allowed between the '#' lines and the header? The fireshiprake.rle and tubwithnine.rle files do this.
- Is leading whitespace allowed on lines? The pseudobarberpole_synth.rle file does this.
- What characters are allowed as the "type" letter after the '#' in a '#' line? Must "type" letters always be ASCII alphabetic characters? Are other ASCII letters and/or Unicode alphabetic characters allowed?
- Same questions as above about whitespace after "!Name:" but for the whitespace after "type" letters