💾 Archived View for rawtext.club › ~sloum › geminilist › 001283.gmi captured on 2020-09-24 at 01:59:15. Gemini links have been rewritten to link to archived content

View Raw

More Information

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

<-- back to the mailing list

Three month spec freeze

Sean Conner sean at conman.org

Wed Jun 3 02:07:56 BST 2020

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

It was thus said that the Great Martin Bays once stated:

* Tuesday, 2020-06-02 at 19:26 +0000 - solderpunk <solderpunk at SDF.ORG>:
But if anybody thinks they see a real problem with the design of
anything currently in the protocol, in principle now is the time to
mention it.
One little thing that's bothered me ever since first reading the spec,
and which I can't see being discussed before (sorry if I missed it):
there seems to be no way to quote a line starting with "```". So for
example there's no way to present in a preformatted text block a gemini
document which contains "```" lines.

I don't really have a horse in this race (I don't really care) but let metell you about an interesting feature of Lua.

Lua has three forms of strings. The first type is with the double quote:

"This is a string.\n"

The second form is with the single quote:

'This is also a string.\n'

These types of strings allow certain characters to be escaped and areidentical in nature, except that the double quote needs to be escaped in astring in double quotes, and the single quote needs to be escaped in astring in single quotes. The third type is what I want to talk about:

[[This too, is a string.]]

This type of string can expand beyond a single line, and it taken as-is. There is no escaping of characters though. So '\n' is NOT translated to theLF character. But there *is* a feature of these strings to include the '[['and ']]' in the string being formed:

[=[This is a Lua string: [[This is a string.]] See?]=]

And if *that* needs to be quoted as a string?

[==[[=[This is a Lua string: [[This is a string.]] See?]=]]==]

And so on. The format is:

'[' '='* '[' <data> ']' '='* ']'

where the number of '=' match (not sure how to express that).

I'm just throwing this out there.

-spc