💾 Archived View for rawtext.club › ~sloum › geminilist › 000884.gmi captured on 2020-09-24 at 02:16:07. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

<-- back to the mailing list

gemini-fmt idea

Martin Keegan martin at no.ucant.org

Tue May 19 20:46:17 BST 2020

- - - - - - - - - - - - - - - - - - - 

On Tue, 19 May 2020, jan6 at tilde.ninja wrote:

Sounds cool, as a tool unrelated to the official spec, just as a utility...
Right now, the verification load is put on the servers anyway, but this could also double as an easy way to get started with writing a gemini server, as you can just take the "verify" part, and not need to re-implement all the checks (and since you can cache the files with some simple checksum, it probably wouldn't be too bad performance-wise to run it as an external executable, even)
for being portable and embeddable, C is also a good choice, mostly because practically every platform has a C compiler, and a LOT of languages have some sort of "CFFI" or similar thing, "C Foreign Function Interface", which lets you call C functions from that language, you can use a C library in python through that, for example...
python3 is probably very much OK for practical usage by humans

For the time being, it'd be a good step forward just to have a tool in*any* language which reliably answered the question whether a file/stringwere conformant with the spec. It'd be nice to be able to say sendfile(readfile()) and know that one's not breaking the strict readingof the spec.

For this, it suffices to have a gemini-check tool rather than a gemini-fmt tool, which presumably would be able to output a new, conformant file.

Mk

-- Martin Keegan, +44 7779 296469, @mk270, https://mk.ucant.org/