miguelfreitas / twister-html

twister HTML + Javascript User Interface
MIT License
229 stars 138 forks source link

p2p shortener as a *client-side* feature/standard #262

Open thedod opened 9 years ago

thedod commented 9 years ago

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

[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:]

slr commented 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.

thedod commented 9 years ago

:+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 #nth 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/...

ghost commented 9 years ago

Is consensus or traffic in support of this needed, or is it straight to PR?

black-puppydog commented 9 years ago

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. :/

thedod commented 9 years ago

"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:.

black-puppydog commented 9 years ago

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.

thedod commented 9 years ago

@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:

Retraocactively, the entire twister history is a "shortener"

slr commented 8 years ago

ok, URL shortener is coming finally — as a daemon side feature. you may learn details and discuss it there.