๐Ÿ’พ Archived View for bbs.geminispace.org โ€บ u โ€บ Gentooshnik โ€บ 20492 captured on 2024-12-17 at 15:28:29. Gemini links have been rewritten to link to archived content

View Raw

More Information

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

Comment by ๐Ÿš€ Gentooshnik

Re: "Rationale FAQ"

In: s/Gemini

I wanted to say "line type is defined by all characters up to the first whitespace, just like commands in Tcl" but decided to actually read the spec before I post...

FML

๐Ÿš€ Gentooshnik [OP]

Oct 06 ยท 2 months ago

10 Later Comments โ†“

๐Ÿšฒ halscode ยท Oct 06 at 20:10:

@stack ... are you not using .startswith("=>") or equivalent to determine line type?

๐Ÿš€ stack ยท Oct 06 at 20:39:

As a minimalist, I would prefer reading a fixed-size datum, knowing it's metadata and dispatch accordingly, prior to even reading the rest. I may have different buffering strategies, or let the handler deal with it. It is conceptually better for small applications and devices.

@Gentooshnik No, the line may also start with a # or ` or > and in case of ` must have two more ``s, and in case of # 0, 1 or 2 more #s optionally followed by space which is usually not displayed, etc... And if it doesn't work out you have to unparse and treat it as text. Then ``` is modal. If you stop to think it is completely nuts to require a different strategy for each type.

You literally could not come up with a dumber way to do this.

And please note that Gemini is my favorite protocol and the only 'social-media' community. It is OK to understand and accept but be critical of the idiotic aspects of things we love and use.

๐Ÿš€ Gentooshnik [OP] ยท Oct 06 at 21:30:

Yes. I think making the whitespace mandatory will fix this. Read the line up until the first whitespace (space, tab, or CR) then you get #, ##, ###, >, =>, ```, and * to dispatch on. If it's neither of these then it's plain text.

IMO fixed size prefix would make it feel like machine-centric format. And even in C it's not that hard to parse the current version of Gemtext with a simple recursive-descent parser. Of course, with mandatory whitespace you wouldn't need anything more than "strcmp(...) == 0" for each option

๐Ÿฆ‚ zzo38 ยท Oct 06 at 22:46:

@stack (20489): I do not think he was on drugs or that he tried really hard to make parsers ugly. You only need to read the first three bytes to figure out the line type; however, I agree that it is still messy, since sometimes one of those first three bytes might be part of the text, and that sometimes there are spaces to skip, and that sometimes a line is shorter than three bytes, etc. Also, the ``` would mean preformatted that other lines after that are not another line type except for ending the preformatted block.

@stack (20495): I agree with that (I would also prefer to read a fixed-size datum; I think that makes more sense and is simpler). (Scorpion file format uses the low nybble of the first byte of a block to indicate the block type, and the explicit length is also specified, allowing to read one block at a time more directly.) (The type of each menu item also is a single byte in Gopher, and with fields separated by tabs.)

@stack (20496): I would not be so sure that "you literally could not come up with a dumber way to do this". Gemini is still much more simpler than parsing HTML, XML, JSON, etc, isn't it?

(Also, the BNF in the Gemini documentation does not quite match the rest of the specification, but that is just a documentation error and is not a real criticism. The main text says "Any line [in pre-formatted mode] which does not begin with the three characters "```" is a text line", but the BNF does not distinguish pre-formatted mode.)

๐Ÿš€ stack ยท Oct 06 at 23:40:

Well, it's not hard to parse, but to some of us non-neurotypicals, it is really annoying. It's like putting square wheels on a car and saying that it's not too hard to compensate for that, with our level of modern tech.

For a system with a leading token type identifier, it is pretty much as bad as it can be -- every type has different sizes, rules, and termination requirements. I am not talking about generic tagging, so I stand by my statement -- that you could not do worse without actual sabotage.

That is, an idiot tasked with this, putting in a genuine effort, would come up with something like this. Hence my drug conjecture.

๐Ÿ•น๏ธ skyjake [mod...] ยท Oct 07 at 04:03:

@stack Neurotypical or not, calling Solderpunk an idiot on drugs is hyperbolic and uncalled for. Parsing the line types is trivial, and when you consider all the other things that Gemini programs have to deal with, it is a total nonissue.

I agree with @Gentooshnik that it is more important that the design is human-centric, because Gemtext is written by humans, mostly in a plain text editor without any assistance. Having to follow a super-strict syntax would make it less pleasant to use, and that would be a much bigger failure in the design.

๐Ÿš€ stack ยท Oct 07 at 04:25:

Note that I did stop way short of calling solderpunk an idiot on drugs! And I do not object to responsible drug use. I merely prefer the drug theory to the alternatives.

The spec was sloppy and details (or lack of considering them) like this typically imply other issues. The choices taken were largely random and arbitrary. Luckily we needed something like this.

Why not use the first character for instance. Maybe 123 for headings, = for URLs, ` forma blockquote, > as before, space or anything else for text.

Or just use markdown, since you already need a library or two to do comms and crypto, and just disallow things you don't like. Minimalism doesn't matter, right?

๐Ÿš€ Gentooshnik [OP] ยท Oct 07 at 08:03:

@stack

Or just use markdown, since you already need a library or two to do comms and crypto, and just disallow things you don't like.

4.4.5 answers exactly your question:

โ€” geminiprotocol.net/docs/faq-section-4.gmi

๐Ÿš€ stack ยท Oct 07 at 16:22:

@gentooshnik, I don't think it actually answers much if you read it carefully.

๐Ÿ’Ž pista ยท Oct 22 at 16:47:

The lack of italic or oblique type is most frustrating

Italic type has been used for a long time to set off titles of works, whereas quotation marks identify the title of an article or section within a work. It also ruins the ability to set off foreign words within a body of type.

Italic can be swapped with underline, though I find it less aesthetically pleasing. But then... we don't have underline either.

I've found that missing feature a headache on many occasions since it's a part of type used to convey information as opposed to just calling attention. It makes it very annoying to reference other works.

Original Post

๐ŸŒ’ s/Gemini

โ€” astrobotany.mozz.us/public/d042d6e56d684136ab0d07b128df0a50/m1

Rationale FAQ โ€” If it doesn't exist already it should be created. There's a discussion at [https link] and people ask lots of questions about Gemtext. Most of them are obvious from the Gemini core design principles but some are not. Here are a few: Why no inline semantic markup? Like <strong> <emphasis> <a> etc. (Nobody actually misses things like fonts...

๐Ÿ’ฌ Gentooshnik ยท 43 comments ยท Oct 05 ยท 2 months ago