The Problems of Transclusion (was Re: More silly text/gemini spec proposals)

Sean Conner sean at conman.org
Sat May 30 03:41:37 BST 2020


It was thus said that the Great poomklao at yahoo.com once stated:
> I have a couple of silly ideas for extra formatting:
> 
> # Images
> 
> Elegant form:
> 
> IMG /static/fun.png "Alt text to display if you're in a terminal"
> 
> Backwards-compatible form:
> 
> => image:/static/fun.png "Image: My cute little cat"

  I'm picking this message as a starting point.  I'm not trying to shame
poomklao for this idea, as people have been wanting something like this for
years [1].  And I promised an email about this earlier to day, when I said:

> NO INLINING OF LINKS ALLOWED

and here is the rational I have for this.

  The idea is technically called "transclusion" and was coined by Ted
Nelson.  "Transclusion" is the automatic inclusion of content into one
document from another one and was meant as a means of presenting a quote
(<blockquote> in HTML) from a particular version of a particular document
(with royalties and all that mess).  We have a very limited form of it on
the Web---the only three mediums that can be directly transcluded are
images, video and sounds, none of which support transclusion themselves. 
You also have a limited from with frames in HTML, but ...

  Like all formal, well specified systems, things tend to go pear shaped [2]
when you allow self-referential references, and that's what transclusion (in
general) brings to the table.  In the Hacker News thread about Gemini [4], a
person brought up transclusion [5] in text/gemini files with the following
syntax:

	<= gemini://example.com/path/to/resource

and for the sake of argument, let's assume this does what it
indicates---that the document at the given link is inserted at that point
into the document being rendered [6].  For the example, let's say we are
obtaining the document <gemini://example.com/document.gemini>, and in that
document you have:

	<= gemini://example.com/document.gemini

  And thus the problem is revealed.  

  "But surely, you can keep track of all transcluded files to prevent this
from happening," you say.  And yes, that is possible.  But as the creator of
the Client Torture Test, I can assure you that I can create an endless
stream of unique documents that transclude an endless stream of unique
documents that transclude an endless stream of unique documents that
transclude an endless stream of unique documents th

Core error-bus dumped.

  Where was I?

  Oh yes, self-referential transclusion, or an infinite amount of
transclusion.

  "But surely, like rediection, you can limit the depth of transclusion,"
you say.  Yes, you can limit the level of transclusion, but that just adds
to the complexity of the implementation.  An implementation would have to
both track the documents being transcluded plus the depth of transclusion.
Unlike rediects, where you just track the number of times you are being
redirected, transclusion is a bit more complex:

	doc1 <= doc2 <= doc3 <= doc4  <= doc5
				      <= doc6
				      <= doc7
			     <= doc8  <= doc9
				      <= doc10
				      <= doc11
			     <= doc12 <= doc13 

  Just limited the depth of transclusion to 5 levels still leads to a
potential 626 documents being transcluded (if I did my math correctly).  And
implementing just one level is annoying for little in return.

  So while I like the idea of transclusion, I have to admit there are issues
when you can possibly transclude documents that transclude other documents.
So in this, I say:

                        NO INLINING OF LINKS ALLOWED!

  -spc

[1]	Starting in the 60s, with Ted Nelson and his Xanadu project.

[2]	English (perhaps an Americanism) for "Situation Normal All Fouled
	Up" [3]

[3]	aka SNAFU.
 
[4]	https://news.ycombinator.com/item?id=23042424

[5]	https://news.ycombinator.com/item?id=23046008

[6]	In the Hacker News comment, the transclusion is meant to be done by
	the server, not the client.  For my argument, it doesn't make a
	difference *who* does the translusion.


More information about the Gemini mailing list