Open thedod opened 9 years ago
but who needs yet another language?
looks like declaring links as
[text](link)
is a common practice.
and I suggest to not invent new URI scheme just for that reference. also why do you use inverted inheritage? I suppose
@thedod/2180
@thedod/2180#1
is enough if we want to have this.
:+1: I like this notation, because it covers both twists and links (of course, we should explicitly say #0
to indicate it's the link and not the twist). If the #n
th link is inside a [text](url)
pattern, client knows what to use as link text. Otherwise, text can be an abbreviated url like domain.tld/...
Is consensus or traffic in support of this needed, or is it straight to PR?
I would only support this if we raise the char limit quite a bit (2048 or above) because some links can be quite long and would still be shortened with 3rd party tools by the users. That's exactly why we had that discussion in the first place. :/
"In real life"(TM), Tahoe-LAFS can create urls that are >140 chars (not by much, usually), and maybe there are systems that keep lots of important stuff in the query string, but I've yet to see a "real life" url longer than 242 chars, and [A long url](
...242 chars...)
is exactly 256 :wink:.
Yeah, but if the urls take up any considerable amount (in percent) of the allowed chars then people have an incentive to use shorteners. Which is happening now and it would also happen when the char limit is 1000 and the links "only" 100. I just think 3rd party shorteners are generally bad because they break the internet. Adding this functionality directly into twister would alleviate this since there would not be a point of failure/monitoring/censorship. But if someone want to write a 900 char message with a 120 char url, they can and will shorten it, if twister provides that functionality or not.
@black-puppydog But that's exactly the purpose of this issue. Use a twist as an "unhosted shortening service" (especially now that @slr has introduced markup).
If the twist is long enough to hold [
some title](
the url)
(i.e. 256, maybe 512), that twist is a shortener, and for 3 links:
@tasty/2273#0
: live@tasty/2273#1
: cartoon@tasty/2273
: @tasty/2273 (only we wouldn't need twisterio on a client :wink:)Retraocactively, the entire twister history is a "shortener"
@thedod/2355
is @thedod/2355@thedod/2355#0
is www.youtube.com/... (well, nobody would expect a sensible title for that link :laughing:)ok, URL shortener is coming finally — as a daemon side feature. you may learn details and discuss it there.
The need for p2p url-shortening is as old(?) as twister. We kept thinking of markups and "url payloads" to the twist's json, while it's as easy as inventing a language.
"Declaring" a link
4:20 clock #url https://zzzen.com/420/
(only 1 per twist, also declares link text)Refence
t://2180.thedod
would mean this twist.u://2180.thedod#1
would mean the 2nd link in that twist. (#0
can be omitted, of course. Usually 1 link per twist anyway)Link text
u://
link can be raw url with...
for path:https://dubiousdod.org...
^\s*(.*)\s+#url\s+(
<a valid url>)\s*$
(e.g.ĎÚβĨŐÚŚ Dod #url https://dubiousdod.org
) then the first matched group is the text.[If it looks like a spoofed shortened URL (e.g.
https://cnn.com... #url https://cnn.evil.com/gotcha
) user should be warned with nasty css :tongue:]