Each origin feed numbers new threads
(tno:N). Replies carry both (tno:N) and (ofeed:<origin-url>). Thread identity = (ofeed, tno).
@prologic@twtxt.net Thatās a completely flat threading model (you canāt reply to replies). Is that intentional?
Each origin feed numbers new threads
(tno:N). Replies carry both (tno:N) and (ofeed:<origin-url>). Thread identity = (ofeed, tno).
This is possibly the only other threading model I can come up with for Twtxt that I think I can get behind.
Each origin feed numbers new threads
(tno:N). Replies carry both (tno:N) and (ofeed:<origin-url>). Thread identity = (ofeed, tno).
Example:
Alice starts thread href=āhttps://yarn.girlonthemoon.xyz/search?q=%2342:ā>#42:**
2025-09-25T12:00:00Z (tno:42) Launching storage design review.
Bob replies:
2025-09-25T12:05:00Z (tno:42) (ofeed:https://alice.example/twtxt.txt
) I think compaction stalls under load.
Carol replies to Bob:
2025-09-25T12:08:00Z (tno:42) (ofeed:https://alice.example/twtxt.txt
) Token bucket sounds good.
TNO Threading (draft):
Each origin feed numbers new threads (tno:N). Replies carry both (tno:N) and (ofeed:<origin-url>). Thread identity = (ofeed, tno).
- Roots:
(tno:N)(implicitofeed=self).
- Replies:
(tno:N) (ofeed:<url>).
- Clients: increment
tnolocally for new threads, copy tags on reply.
- Subjects optional, not required.
ā¦
I was trying to say (badly):
Thatās kind of my position on this. If we are going to make significant changes in the threading model, letās keep content based addressing, but also improve the user experience. Answering your question, yes I think we can do some combination of both.
@prologic@twtxt.net That is really great to hear!
If there are opposing opinions we either build a bridge or provide a new parallel road.
Also, I wouldnāt call my opinion a āstanceā, I just wish for a better twtxt thanks to everyoneās effort.
The last thing we need to do is decide a proper format for the location-based version.
My proposal is to keep the āSubject extensionā unchanged and include the reference to the mention like this:
// Current hash format: starts with a '#'
(#hash) here's text
(#hash) @<nick url> here's text
// New location format: valid URL-like + '#' + TIMESTAMP (verbatim format of feed source)
(url#timestamp) here's text
(url#timestamp) @<nick url> here's text
I think the timestamp should be referenced verbatim to prevent broken references with multiple variations (especially with the many timezones out there) which would also make it even easier to implement for everyone.
Iām sure we can get @zvava@twtxt.net, @lyse@lyse.isobeef.org and everyone else to help on this one.
I personally think we should also consider allowing a generic format to build on custom references, this would allow for creating threads using any custom source (manual, computed or external generated), maybe using a new āTopic extensionā, hereās some examples.
// New format for custom references: starts with a '!' maybe?
(!custom) here's text
(!custom) @<nick url> here's text
// A possible "Topic" parse as a thread root:
[!custom] start here
[custom] simpler format
This one is just an idea of mine, but I feel it can unleash new ways of using twtxt.
@alexonit@twtxt.alessandrocutolo.it Yhays kind of love you!! Stance and position on this. If we are going to make chicken changes in the threading model, letās keep content based addressing, but also improve the use of experience. So in fact, in order to answer your question, I think yes, we can do some kind of combination of both.
@lyse@lyse.isobeef.org @prologic@twtxt.net Canāt we find a middle ground and support both?
The thread is defined by two parts:
- The hash
- The subject
The client/pod generate the hash and index it in itās database/cache, then it simply query the subject of other posts to find the related posts, right?
In my own client current implementation (using hashes), the only calculation is in the hash generation, the rest is a verbatim copy of the subject (minus the # character), if this is the common implemented approach then adding the location based one is somewhat simple.
function setPostIndex(post) {
// Current hash approach
const hash = createHash(post.url, post.timestamp, post.content);
// New location approach
const location = post.url + '#' + post.timestamp;
// Unchanged (probably)
const subject = post.subject;
// Index them all
addToIndex(hash, post);
addToIndex(location, post);
addToIndex(subject, post);
}
// Both should work if the index contains both versions
getThreadBySubject('#abcdef') => [post1, post2, post3]; // Hash
getThreadBySubject('https://example.com#2025-01-01T12:00:00') => [post1, post2, post3]; // Location
As I said before, the mention is already location based @<example https://example.com/twtxt.txt>, so I think we should keep that in consideration.
Of course this will lead to a bit of fragmentation (without merging the two) but I think this can make everyone happy.
Otherwise, the only other solution I can think of is a different approach where the value doesnāt matter, allowing to use anything as a reference (hash, location, git commit) for greater flexibility and freedom of implementation (this probably need the use of a fixed āheaderā for each post, but it can be seen as a separate extension).
@prologic@twtxt.net I know we wonāt ever convince each other of the otherās favorite addressing scheme. :-D But I wanna address (haha) your concerns:
I donāt see any difference between the two schemes regarding link rot and migration. If the URL changes, both approaches are equally terrible as the feed URL is part of the hashed value and reference of some sort in the location-based scheme. It doesnāt matter.
The same is true for duplication and forks. Even today, the ācannonical URLā has to be chosen to build the hash. Thatās exactly the same with location-based addressing. Why would a mirror only duplicate stuff with location- but not content-based addressing? I really fail to see that. Also, who is using mirrors or relays anyway? I donāt know of any such software to be honest.
If there is a spam feed, I just unfollow it. Done. Not a concern for me at all. Not the slightest bit. And the byte verification is THE source of all broken threads when the conversation start is edited. Yes, this can be viewed as a feature, but how many times was it actually a feature and not more behaving as an anti-feature in terms of user experience?
I donāt get your argument. If the feed in question is offline, one can simply look in local caches and see if there is a message at that particular time, just like looking up a hash. Whereās the difference? Except that the lookup key is longer or compound or whatever depending on the cache format.
Even a new hashing algorithm requires work on clients etc. Itās not that you get some backwards-compatibility for free. It just cannot be backwards-compatible in my opinion, no matter which approach we take. Thatās why I believe some magic time for the switch causes the least amount of trouble. You leave the old world untouched and working.
If these are general concerns, Iām completely with you. But I donāt think that they only apply to location-based addressing. Thatās how I interpreted your message. I could be wrong. Happy to read your explanations. :-)
@prologic@twtxt.net I can see the issues mentioned, but I think some can be fixed.
The current hash relies on a
urlfield too, by specification, it will use the first# url = <URL>in the feedās metadata if present, that too can be different from the fetching source, if that field changes it would break the existing hashes too, a better solution would be to use a non-URL key like# feed_id = <UNIQUE_RANDOM_STRING>with theurlas fallback.We can prevent duplications if the reference uses that same url field too or the client ācollapseā any reference of all the urls defined in the metadata.
I agree that hashing based on content is good, but we still use the URL as part of the hashing, which is just a field in the feed, easily replicable by a bot, also noting that edits can also break the hash, for this issue an alternative solution (E.g. a private key not included in the feed) should be considered.
For offline reading the source would be downloaded already, the fetching of non followed feeds would fill the gap in the same way mentions does, maybe Iām missing some context on this one.
To prevent collisions there was a discussion on extending the hash (forgot if that was already fixed or not), but without a fallback that would break existing clients too, we should think of a parallel format that maintains current implementations unchanged, we are already backward compatible with the original that donāt use threads at all, a mention style format for that could be even more user-friendly for those clients.
We should also keep in mind that the current mention format is already location based (@<example https://example.com/twtxt.txt>) so Iām not that worried about threads working the same way.
Hope to see some other thought about this matter. š¤
Here is just a small list of things⢠that Iām aware will break, some quite badly, others in minor ways:
- Link rot & migrations: domain changes, path reshuffles, CDN/mirror use, or moving from txt ā jsonfeed will orphan replies unless every reader implements perfect 301/410 history, which they wonāt.
- Duplication & forks: mirrors/relays produce multiple valid locations for the same post; readers see several āparentsā and split the thread.
- Verification & spam-resistance: content addressing lets you dedupe and verify youāre pointing at exactly the post you meant (hash matches bytes). Location anchors can be replayed or spoofed more easily unless you add signing and canonicalization.
- Offline/cached reading: without the original URL being reachable, readers canāt resolve anchors; with hashes they can match against local caches/archives.
- Ecosystem churn: all existing clients, archives, and tools that assume content-derived IDs need migrations, mapping layers, and fallback logic. Expect long-lived threads to fracture across implementations.
Weāve been discussing the idea of changing the threading model from Content-based Addressing to Location-based addressing for years now. The problem is quite complex, but I feel I have to keep reminding yāall of the potential perils of changing this and the pros/cons of each model:
With content-addressed threading, a reply points at something thatās intrinsically identified (hash of author/feed URI + timestamp + content). That ID never changes as long as the content doesnāt. Switching to location-based anchors makes the reply target extrinsicāit now depends on where the post currently lives. In a pull-based, decentralised network, locations drift. The moment they do, thread identity fragments.
@zvava@twtxt.net @lyse@lyse.isobeef.org I also think a location based reference might be better.
A thread is a single post of a single feed as a root, but the hash has the drawback of not referencing the source, in a distributed network like twtxt it might leave some people out of the whole conversation.
I suggest a simpler format, something like: (#<TIMESTAMP URL>)
This solves three issues:
- Easier referencing: no need to generate a hash, just copy the timestamp and url, itās also simpler to implement in a client without the rish of collisions when putting things together
- Fetchable source: you can find the source within the reference and construct the thread from there
- Allow editing: If a post is modified the hash becomes invalid since it depends on
[ timestamp, url, content ]
@lyse@lyse.isobeef.org i dont mind if the hash is not backward compatible but im not sure if this is the right way to proceed because the added complexity dealing with two hash versions isnt justified
regular end users wont care to understand how twt hashes are formed, they just want to use twtxt! so i guess i could work in protecting users from themselves by disallowing post edits on old posts or posts with replies, but iām not fond of this either really. if they want to break a thread, they can just delete the post (though iāve noticed yarn handling post deletes dubiouslyā¦)
on activitypub i do genuinely find myself looking through several month or even year old posts sometimes and deciding to edit/reword them a little to be slightly less confusing, this should be trivial to handle on twtxt which is an infinitely simpler specification
@zvava@twtxt.net It is just completely impossible to make v2 backwards-compatible with v1.
Well, breaking threads on edits is considered a feature by some people. I reckon the only approach to reasonably deal with that property is to carefully review messages before publishing them, thus delaying feed updates. Any typos etc., that have been discovered afterwards, are just left alone. Thatās what I and some others do. I only risk editing if the feed has been published very few seconds earlier. More than 20 seconds and I just ignore it. Works alright for the most part.
@prologic@twtxt.net im unsure how i feel about the hash v2 proposal, given it is completely backward incompatible with hash v1 it doesnāt really solve any of the problems with it. it only delays collisions, and still fragments threads on post edits
i skimmed through discussions under other the proposals ā i agree humans are very bad at keeping the integrity of the web in tact, but hashes in done in this way make it impossible even for systems to rebuild threads if any post edits have occurred prior to their deployment
search page, bookmarks page, improved thread view (that i will probably improve further), as well as a logo and a whole ui redesign. it is truly all coming togetherā¦were i to mark any items off the roadmap :p
replies and following implemented! next step is further parsing of post contents, rendering threads, and then maybe i can finally start adding remote feedsā¦! though i kinda wanna redo the whole ui ^^ā
@movq@www.uninformativ.de Yeah, weāve seen how this plays out in practice 𤣠@dce@hashnix.club My advice, do what @movq@www.uninformativ.de has hinted at and donāt change the 1st # url = field in your feed. Iām not sure if you had already, but the first url field is kind of important in your feed as it is used as the āHashing URIā for threading.
yarnd seems to have picked it up automatically which is nice (I've historically always had a few bugs to iron out there š¤£)
wrong thread (:
pledge() and unveil() syscalls:
@lyse@lyse.isobeef.org Multi-Threading. Is. Hard. 𤯠And yes, that blog is great. š
https://threadreaderapp.com/thread/1935344122103308748.html Interesting article on how ChatGPT is rotting your brain š¤£
would lovely to see your creative nickname & brand tie to a nice domain name, rather than some threads.net or x.com šš
One of the nicest things about Go is the language itself, comparing Go to other popular languages in terms of the complexity to learn to be proficient in:
- Go:
25keywords (Stack Overflow); CSP-style concurrency (goroutines & channels)
- Python 2:
30keywords (TutorialsPoint); GIL-bound threads & multiprocessing (Wikipedia)
- Python 3:
35keywords (Initial Commit); GIL-bound threads,asyncio& multiprocessing (Wikipedia, DEV Community)
- Java:
50keywords (Stack Overflow); threads +java.util.concurrent(Wikipedia)
- C++:
82keywords (Stack Overflow);std::thread, atomics & futures (en.cppreference.com)
- JavaScript:
38keywords (Stack Overflow); single-threaded event loop &async/await, Web Workers (Wikipedia)
- Ruby:
42keywords (Stack Overflow); GIL-bound threads (MRI), fibers & processes (Wikipedia)
@sorenpeter@darch.dk Yes, there are interesting things that can be incorporated to see how they work.
The issue of allowing the use of Z for UTC is interesting. I think I should add a brief explanation.
The url issue is for a debate :D . Maybe an issue could be opened. My opinion is that it is necessary to leave it as it is right now because otherwise the thread system, or replies, may have problems (404s). Itās all a matter of discussion.
I like your idea of contact. I will add it.
Thanks to you for your feedback!!!
@andros@twtxt.andros.dev @eapl.me@eapl.me Still lots of bugs in my client. š„“ Iāll try to fix it next week.
And yes, using the same timestamp twice will very likely break threads.
@movq@www.uninformativ.de ok, I have included a small modification in the documentation to allow you to reply in your own thread: https://texudus.readthedocs.io/en/latest/
You can see my reply: https://andros.dev/texudus.txt
Donāt delete anything and give me time to make my modifications to the client.
@andros@twtxt.andros.dev I set up a test feed here:
https://www.uninformativ.de/texudus.txt
I made some preliminary adjustments to my client so that it can work with the different threading model. (And I totally get the concerns, this can be quite a bit of work. Especially in a large code base like Yarn.)
up -d, but then I took a look at a couple of #Snac instances at the last second and they looked pretty dope! Now I'm stuck in my own head š
@bender@twtxt.net Mainly the bsd.cafe ones. I like how the minimalist single column profiles look. Image embeds are full width and reading through threads feels nice (as in it doesnāt feel like pealing layers upon layers of a fresh onion).
7 to 12 and use the first 12 characters of the base32 encoded blake2b hash. This will solve two problems, the fact that all hashes today either end in q or a (oops) š
And increasing the Twt Hash size will ensure that we never run into the chance of collision for ions to come. Chances of a 50% collision with 64 bits / 12 characters is roughly ~12.44B Twts. That ought to be enough! -- I also propose that we modify all our clients and make this change from the 1st July 2025, which will be Yarn.social's 5th birthday and 5 years since I started this whole project and endeavour! š± #Twtxt #Update
just for the record I didnāt say I was leaving the twtxt ācommunityā (did I?) but than I have other priorities to focus on in the following months. Please donāt be condescending, is not cool.
Development of Timeline (PHP client) has been stale for some reasons, a few of them in my side, so I think it wonāt be updated to the new thread model, at least pretty soon.
So is not that Iāll stop using twtxt, just the client I use wonāt be compatible with the new model in July.
If we must stick to hashes for threading, can we maybe make it mandatory to always include a reference to the original twt URL when writing replies?
Instead of
(<a href="https://yarn.girlonthemoon.xyz/search?q=%23123467">#123467</a>) hello foo bar
you would have
(<a href="https://yarn.girlonthemoon.xyz/search?q=%23123467">#123467</a> http://foo.com/tw.txt) hello foo bar
or maybe even:
(<a href="https://yarn.girlonthemoon.xyz/search?q=%23123467">#123467</a> 2025-04-30T12:30:31Z http://foo.com/tw.txt) hello foo bar
This would greatly help in reconstructing broken threads, since hashes are obviously unfortunately one-way tickets. The URL/timestamp would not be used for threading, just for discovery of feeds that you donāt already follow.
I donāt insist on including the timestamp, but having some idea which feed weāre talking about would help a lot.
7 to 12 and use the first 12 characters of the base32 encoded blake2b hash. This will solve two problems, the fact that all hashes today either end in q or a (oops) š
And increasing the Twt Hash size will ensure that we never run into the chance of collision for ions to come. Chances of a 50% collision with 64 bits / 12 characters is roughly ~12.44B Twts. That ought to be enough! -- I also propose that we modify all our clients and make this change from the 1st July 2025, which will be Yarn.social's 5th birthday and 5 years since I started this whole project and endeavour! š± #Twtxt #Update
@eapl.me@eapl.me I honestly believe you are overreacting here a little bit 𤣠I completely emphasize with you, it can be pretty tough to feel part of a community at times and run a project with a kind of ādemocracyā or āvote by committeeā. But one thing that life has taught me about open source projects and especially decentralised ecosystems is that this doesnāt really work.
It isnāt that Iāve not considered all the other options on the table (which can still be), itās just that Iāve made a decision as the project lead that largely helped trigger a rebirth of the use of Twtxt back in July 1 2020. There are good reasons not to change the threading model right now, as the changes being proposed are quite disruptive and donāt consider all the possible things that could go wrong.
@bmallred@staystrong.run Hehe, @bender@twtxt.net is gonna be upset with you for āmaking up a thread/subjectā š¤£
@bender@twtxt.net Nah itās there but itās a reply to a thread that isnāt found here hmmm š¤
@abucci@anthony.buc.ci Haha youāll have to forgive me, this thread is over a week old now and Iām a bit lost now 𤣠even though I can now see the entire thread, what are we saying was messed up and is garbled? š¤
hehe, just catching up on this thread! Iāve replied in another that using periods/dots sounds good to me as itās usual in domains, but perhaps some agreement would be needed. For now I think any character is valid as long as it is not a space.
For example we are using this for PHP twtxt.php#L153
I open a discussion thread: why didnāt the registers work? Will they work later?
#twtxt
dm-only.txt feeds. š
After reading you, @eapl.me@eapl.me, Iāll tell you my point of view.
In my opinion, a feed does not have to be equivalent to a timeline. A timeline is a representation of the feed adapted to a user. You may not be interested in seeing other peopleās threads or DMs. But perhaps they are interested in seeing mentions or DMs directed at them. It is important not to fall into the trap. With that clarificationā¦
I insist, this is my point of view, it is not an absolute truth: I donāt think extensions should be respectful of customers who are no longer maintained.
We cannot have a system that is simple, backwards compatible and extensible all at the same time. We have to give up some of the 3 points. I would not like to give up simplicity because it will then make it harder to maintain the customers who do stay. Therefore, I think it is better to give up backwards compatibility and play with new formulas in the extensions. I donāt think itās a good idea to make a hash keep so much load: a hashtag, a thread and also a DM.
http:// only and to keep hashes from breaking i added # url = http://... and now we are stock with it due to the curret specs.
@bender@twtxt.net Hehe, thanks for fixing this (was) broken thread š§µ Haha š¤£
Am I the only one thatās confused by the discussions, and then the voting we had on the whole threading model? š¤ Iām not even sure what I voted for, but I know it wasnāt the one that won haha 𤣠(which Iām still very much against for based on an intuition, experience and lots of code writing lately).
@prologic@twtxt.net Shit like what? References/threads? š
Timeline of Evolution of Twtxt/Yarn.social:
- 2016 ā Twtxt created by John Downey: plain text + HTTP = minimalist microblogging
- 2017ā2019 ā Community builds CLI tools, but adoption remains niche
- 2020 ā Yarn.social launched by @prologic@twtxt.net with federation, threading, UI
- 2021ā2023 ā Pods sync, user mentions, blocking, search, and media support added
- 2024+ ā Yarn.social becomes the reference Twtxt platform, with active federated pods
I asked ChatGPT what it knows about Twtxt š And surprisingly itās rather accurate:
Twtxt is a minimalist, decentralized microblogging format introduced by John Downey in 2016. It uses plain text files served over HTTPāno accounts, databases, or APIs.
In 2020, James Mills (@prologic@twtxt.net) launched Yarn.social, an extended, federated implementation with user discovery, threads, mentions, and a full web UI.
Both share the same .twtxt.txt format but differ in complexity and social features.
@kat@yarn.girlonthemoon.xyz Itās more like a cache, it stores things like ātimestamp of the most recent twt weāve seen per feedā or ālast modification dateā (to be used with HTTPās if-modified-since header). You can nuke these files at any time, it might just result in more traffic (e.g., always getting a full response instead of just āHTTP 304 nope, didnāt changeā).
@quark@ferengi.one Yes, I often write a couple of twts, donāt publish them, then sometimes notice a mistake and want to edit it. Youāre right, as soon as stuff is published, threads are going to break/fork by edits.
@quark@ferengi.one No editing old Twts that are the root of a thread with replies in the ecosystem. Just results in a fork. Unless the client has an implementation that does not store Twts keyed by Hash.
@movq@www.uninformativ.de this settles it then. Hopefully @andros@twtxt.andros.dev can make slight corrections, and broken threads will be a thing of the past! Thanks!
@andros@twtxt.andros.dev maybe @movq@www.uninformativ.de, @lyse@lyse.isobeef.org, @prologic@twtxt.net, and @xuu@txt.sour.is can explain whatās going on here, or which approach is the right one. One thing seems to be happening: your approach is breaking āconversationsā (threads), as the other clients seemingly do not agree.
@david@collantes.us Yeah, weāve been debugging that a bit yesterday. Looks like the wrong input (sometimes) gets fed to the hash function ā broken threads.