yarnd
(which powers Yarn.social pods like twtxt.net) does have an API, however that API is designed for clients to interact with the pod and the user's account and feed. e.g: there is a command-line client called yarnc
and I used to maintain a mobile native app (using Flutter).
@doesnm@doesnm.p.psf.lt It is the same API that yarnc
the command-line client uses.
@movq@www.uninformativ.de Thatās so damn cool mate! I went through the code, but this lowlevel stuff is really not my favorite cup of tea. Having said that, it was actually really nice to see the abstractions and APIs work together and how things are getting indeed very readable in the userland programs. Thatās easy to track in this extremely tiny OS implementation. Excellent work, keep on hacking!
Now, you just have to quickly add a network stack and then can write a twtxt client for it! ]:->
@andros@twtxt.andros.dev What do you mean by API? yarnd
(which powers Yarn.social pods like twtxt.net) does have an API, however that API is designed for clients to interact with the pod and the userās account and feed. e.g: there is a command-line client called yarnc
and I used to maintain a mobile native app (using Flutter).
What use-case did you have in mind?
xt
out there? Does anyone know? I did not find anything for "xt/0.0.1".
@prologic@twtxt.net Hmm, whatās this Emacs client you heard about?
@movq@www.uninformativ.de Unfortunately, there is no feed URL or nick in the User-Agent, it just consists of āxt/0.0.1ā, thatās it. And this client was only active from mid-November until the end of the month.
Itāll probably remain a mystery, weāll never know.
Once again I glimpsed at my twtxt feed access log. Now Iām wondering: is there a twtxt client named xt
out there? Does anyone know? I did not find anything for āxt/0.0.1ā.
I found 2 active Registries: tilde.instite and twtxt.envs.net . I think that is missing a repository or system for them to find each other. It is easy to share registry users. Your work is awesome! Maybe you are supporting twtxt with the pod and software around them. I am very busy with the Emacs client, but I like to work creating my own version of Registry using Django.
@emmanuel@wald.ovh Btw I already figured out why accessing your web server is slow:
$ host wald.ovh
wald.ovh has address 86.243.228.45
wald.ovh has address 90.19.202.229
wald.ovh
has 2 IPv4 addresses, one of which is dead and doesnāt respond.. Thatās why accessing your website is so slow as depending on client and browser behaviors one of two things may happen 1) a random IP is chosen and ½ the time the wrong one is picked or 2) both are tried in some random order and ½ the time its slow because the broken one is picked.
If you donāt know what 86.243.228.45
is, or itās a dead backup server or something, Iād suggest you remove this from the domain record.
@prologic@twtxt.net No Iām not trying to standardize the domains themselves xD I was just hinting at filtering cases where nick
is identical to a level of a domain; in order to show shorter format nicks within clients, i.e: @nick.domain.ltd
or @nick.ltd
instead of a @nick@nick.domain.ltd
or @nick@nick.ltd
. Just like what @sorenpeter@darch.dk already did with the nick = domain
case. (unless Iām missing the point)
i always thought that i needed geodns to make a multi-region setup work at all, but it turns out all we really need is one rfc https://datatracker.ietf.org/doc/html/rfc8305 and its not even rare to see implemented on clients
nick = _@domain.tld
in the twtxt.txt?
What should the advantage be to nick = _
compared to just not defining a nick and let the client use the domain as the handle?
What is not intuitive is that you put something in the nick field that is not to be taken literary. The special meaning of _
is only clean if you read the documentation, compared to having something in nick that makes sense in the current context of the twtxt.txt.
If NICK = DOMAIN then only show @DOMAIN
So instead of @eapl.me@eapl.me it will just be @eapl.me
@doesnm@doesnm.p.psf.lt So the user should then set nick = _@domain.tld
in the twtxt.txt?
It seems more intuitive and userfriendly to just use: nick = domain.tld
and have then convention for clients to render the handle as @domain.tld instead of @domain.tld@domain.tld
For a feed with no nick defined (eg. https://akkartik.name/twtxt.txt) it will also be simpler and make more sense to just use the domain as the nick and render it as @domain.tld
and going back to a handle you could input in your client to look for the user/file, like @nick@domain.tls
I think Webfinger is the way to go. It has enough information to know where to find that nickās URL.
@prologic@twtxt.net does that webfinger fork made by darch work OK with yarn as it is now? (Iāve never used it, so Iām researching about it)
https://darch.dk/.well-known/webfinger/
@lyse@lyse.isobeef.org Hmmm:
Could not fetch: HTTPError('403 Client Error: Forbidden for url: https://uplegger.eu/twtxt.txt')
š¤
Thanks @bender@twtxt.net for the feedback. I fixed and expanded the article. Iām sorry for my poor interaction. Furthermore, Iām reading and writing while programming a client in Emacs.
@xuu@txt.sour.is is there anything stopping in clients from supporting this as an optional feature?
@prologic@twtxt.net What IRC client is that?
@bender@twtxt.net Well, so far, Iām using the standard web client. Havenāt found a great client yet. 𫤠Mastodon/Fediverse is also very different from twtxt, there are way more images/videos that Iād like to see ā a TUI client like toot wouldnāt work for me.
Dunno, maybe Iāll make some changes in this area after christmas. Try self-hosting again or something like that ā¦
Yes it work: 2024-12-01T19:38:35Z twtxt/1.2.3 (+https://eapl.mx/twtxt.txt; @eapl)
:D
The .log is just a simple append each request. The idea with the .cvs is to have it tally up how many request there have been from each client as a way to avoid having the log file grow too big. And that you can open the .cvs as a spreadsheet and have an easy overview and filtering options.
Access to those files are closed to the public.
Maybe realize webmention in my feed? (receiving). Sending maybe will be implemened in WIP clientā¦
@aelaraji@aelaraji.com You could use https://lyse.isobeef.org/tmp/twthash.py to generate twt hashes. I cobbled that together in order to generate test data for my client.
but for real, i really want that sword and Iām perfectly content running my daily dev stuff using an rpi. i actually used to do client work on an old rpi laptop kit, i only stopped using that baby because the battery controller let the battery go flat.
i am working on very smol deployments, where a server may use two or so replicated sqlite databases instead of a db server like postgres to seamlessly move from single to multi-node arrangements as needed. there is a clear performance limit here, but the goal is not to serve a huge number of clients. just to do as much as possible with a small number of useful components that can be upgraded to handle up to medium size workloads, without difficult data conversions or migrations. scaling beyond that point should be done via federation.
@bender@twtxt.net My made-up rule is to keep at least three full months in the main feed and when rotating, I create one feed per month.
@doesnm@doesnm.p.psf.lt There is no real recommendation I think. But if you hit half a MiB or so, it might be worth considering to rotate in order to keep the network traffic low. People with bad connectivitiy might appreciate it. I want to implement HTTP range requests in my client rewrite at some point in time (but first, it has to become kinda usable, though).
Ouiii, jāai de nouveau internet! En fait, #sfr a changĆ© lāarmoire, a dĆ©branchĆ© tout le monde sans prĆ©venir personne, et maintenant les autres fournisseurs doivent venir rebrancher leurs clients. Cāest malhonnĆŖte⦠Bref, si3t.ch et puffy.cafe sont de retour
@sorenpeter@darch.dk Section 7 on emojis: Exactly that, itās an avatar for text interfaces. The metadata name needs tweaking, but thatās a cool idea. If I implemented this in my client, Iād make the text avatar overridable by the user, though. Otherwise Iād probably only see boxes for everbody in my terminal. :-D
Thank you, @eapl.me@eapl.me! No need to apologize in the introduction, all good. :-)
Section 3: Iām a bit on the fence regarding documenting the HTTP caching headers. Itās a very general HTTP thing, so there is nothing special about them for twtxt. No need for the Twtxt Specification to actually redo it. But on the other hand, a short hint could certainly help client developers and feed authors. Maybe itās thanks to my distroās Ngninx maintainer, but I did not configure anything for the Last-Modified
and ETag
headers to be included in the response, the web server just already did it automatically.
The more that I think about it while typing this reply, the more I think your recommendation suggestion is actually really great. It will definitely beneficial for client developers. In almost all client implementation cases Iād say one has to actually do something specifically in the code to send the If-Modified-Since
and/or If-None-Match
request headers. There is no magic that will do it automatically, as one has to combine data from the last response with the new request.
But I also came across feeds that serve zero response headers that make caching possible at all. So, an explicit recommendation enables feed authors to check their server setups. Yeah, letās absolutely do this! :-)
Regarding section 4 about feed discovery: Yeah, non-HTTP transport protocols are an issue as they do not have User-Agent
headers. How exactly do you envision the discovery_url
to work, though? I wouldnāt limit the transports to HTTP(S) in the Twtxt Specification, though. Itās up to the client to decide which protocols it wants to support.
Since I currently rely on buckketās twtxt
client to fetch the feeds, I can only follow http(s)://
(and file://
) feeds. But in tt2
I will certainly add some gopher://
and gemini://
at some point in time.
Some time ago, @movq@www.uninformativ.de found out that some Gopher/Gemini users prefer to just get an e-mail from people following them: https://twtxt.net/twt/dikni6q So, it might not even be something to be solved as there is no problem in the first place.
Section 5 on protocol support: Youāre right, announcing the different transports in the url
metadata would certainly help. :-)
Section 7 on emojis: Your idea of TUI/CLI avatars is really intriguing I have to say. Maybe I will pick this up in tt2
some day. :-)
@sorenpeter@darch.dk on 4 for gemini if your TLS client certificate contains your nick@host could that work for discovery?
@eapl.me@eapl.me here are my replies (somewhat similar to Lyseās and Jamesā)
Metadata in twts: Key=value is too complicated for non-hackers and hard to write by hand. So if there is a need then we should just use #NSFS or the alt-text file in markdown image syntax

if something is NSFWIDs besides datetime. When you edit a twt then you should preserve the datetime if location-based addressing should have any advantages over content-based addressing. If you change the timestamp the its a new post. Just like any other blog cms.
Caching, Yes all good ideas, but that is more a task for the clients not the serving of the twtxt.txt files.
Discovery: User-agent for discovery can become better. Iām working on a wrapper script in PHP, so you donāt need to go to Apaches log-files to see who fetches your feed. But for other Gemini and gopher you need to relay on something else. That could be using my webmentions for twtxt suggestion, or simply defining an email metadata field for letting a person know you follow their feed. Interesting read about why WebMetions might be a bad idea. Twtxt being much simple that a full featured IndieWeb sites, then a lot of the concerns does not apply here. But thatās the issue with any open inbox. This is hard to solve without some form of (centralized or community) spam moderation.
Support more protocols besides http/s. Yes why not, if we can make clients that merge or diffident between the same feed server by multiples URLs
Languages: If the need is big then make a separate feed. I donāt mind seeing stuff in other langues as it is low. You got translating tool if you need to know whats going on. And again when there is a need for easier switching between posting to several feeds, then itās about building clients with a UI that makes it easy. No something that should takes up space in the format/protocol.
Emojis: Iām not sure what this is about. Do you want to use emojis as avatar in CLI clients or it just about rendering emojis?
Righto, @eapl.me@eapl.me, ta for the writeup. Here we go. :-)
Metadata on individual twts are too much for me. I do like the simplicity of the current spec. But I understand where youāre coming from.
Numbering twts in a feed is basically the attempt of generating message IDs. Itās an interesting idea, but I reckon it is not even needed. Iād simply use location based addressing (feed URL + ā#ā + timestamp) instead of content addressing. If one really wanted to, one could hash the feed URL and timestamp, but the raw form would actually improve disoverability and would not even require a richer client. But the majority of twtxt users in the last poll wanted to stick with content addressing.
yarnd actually sends If-Modified-Since
request headers. Not only can I observe heaps of 304 responses for yarnds in my access log, but in Cache.FetchFeeds(ā¦)
we can actually see If-Modified-Since
being deployed when the feed has been retrieved with a Last-Modified
response header before: https://git.mills.io/yarnsocial/yarn/src/commit/98eee5124ae425deb825fb5f8788a0773ec5bdd0/internal/cache.go#L1278
Turns out etags with If-None-Match
are only supported when yarnd serves avatars (https://git.mills.io/yarnsocial/yarn/src/commit/98eee5124ae425deb825fb5f8788a0773ec5bdd0/internal/handlers.go#L158) and media uploads (https://git.mills.io/yarnsocial/yarn/src/commit/98eee5124ae425deb825fb5f8788a0773ec5bdd0/internal/media_handlers.go#L71). However, it ignores possible etags when fetching feeds.
I donāt understand how the discovery URLs should work to replace the User-Agent
header in HTTP(S) requests. Do you mind to elaborate?
Different protocols are basically just a client thing.
I reckon itās best to just avoid mixing several languages in one feed in the first place. Personally, I find it okay to occasionally write messages in other languages, but if that happens on a more regularly basis, Iād definitely create a different feed for other languages.
Isnāt the emoji thing ājustā a client feature? So, feed do not even have to state any emojis. As a user Iād configure my client to use a certain symbol for feed ABC. Currently, I can do a similar thing in tt
where I assign colors to feeds. On the other hand, what if a user wants to control what symbol should be displayed, similar to the feedās nick? Hmm. But still, my terminal font doesnāt even render most of emojis. So, Unicode boxes everywhere. This makes me think it should actually be a only client feature.
@Codebuzz@www.codebuzz.nl you replied to me, but the reply was just an @, nothing else (the whole handle was missing).
There are no web mentions here, and no notifications. It isnāt Mastodon; if you want to see if someone wrote something new, or replied to you, you need to open your client.
@bender@twtxt.net @prologic@twtxt.net Iām not exactly asking yarnd to change. If you are okay with the way it displayed my twts, then by all means, leave it as is. I hope you wonāt mind if I continue to write things like 1/4
to mean āfirst out of fourā.
What has text/markdown
got to do with this? I donāt think Markdown says anything about replacing 1/4
with ¼, or other similar transformations. Itās not needed, because ¼ is already a unicode character that can simply be directly inserted into the text file.
Whatās wrong with my original suggestion of doing the transformation before the text hits the twtxt.txt file? @prologic@twtxt.net, I think it would achieve what you are trying to achieve with this content-type thing: if someone writes 1/4
on a yarnd instance or any other client that wants to do this, it would get transformed, and other clients simply wouldnāt do the transformation. Every client that supports displaying unicode characters, including Jenny, would then display ¼ as ¼.
Alternatively, if you prefer yarnd to pretty-print all twts nicely, even ones from simpler clients, thatās fine too and you donāt need to change anything. My 1/4
-> ¼ thing is nothing more than a minor irritation which probably isnāt worth overthinking.
@sorenpeter@darch.dk I run Weechat headless on a VM and mostly connect via mobile or dwsktop. I use the android client or gliwing bear. Work blocks all comms on their always on MitM VPN so I cant in office anymore. So I just use mobile.
its offline atm, but my usual setup basically makes my xmpp server into a bouncer (biboumi) and my xmpp client just does its normal thing to read the irc backlog as server-side message history.
@Codebuzz@www.codebuzz.nl Speed is an issue for the client software, not the format itself, but yes I agree that it makes the most sense to append post to the end of the file. Iām referring to the definition that itās the first url =
in the file that is the one that has to be used for the twthash computation, which is a too arbitrary way of defining something that breaks treading time and time again. And this is the case for not using url+date+message = twthash.
Ya know; Rather than being an asshole and getting all angry, just be reasonable and reach out to the community or folks fetching (or trying) your feed.
Most clients respect caching if your feed is transported Iāve HTTP.
Otherwise you can add the # refresh
hint to clients on your feed.
No need to be an obnoxious ass and flood your own feed. That will just get you permanarely unfollowed and ignored.
THE LAST HUMAN POST ON THIS FEED IS MORE THAN FOUR YEARS OLD. PERHAPS TWTXT CLIENTS SHOULD THEN FETCH THE FEED VERY RARELY.
I know no client support it (yet) - but it could be the future š
@2024-10-08T19:36:38-07:00@a.9srv.net Thanks for the followup. I agrees with most of it - especially:
Please nobody suggest sticking the content type in more metadata. š
Yes, URL can be considered ugly, but they work and are understandable by both humans and machines. And its trivial for any client to hide the URLs used as reference in replies/treading.
Webfinger can be an add-on to help lookup people, and it can be made independent of the nick by just serving the same json regardless of the nick as people do with static sites and a as I implemented it on darch.dk (wf endpoint). Try RANDOMSTRING@darch.dk
on http://darch.dk/wf-lookup.php (wf lookup) or RANDOMSTRING@garrido.io
on https://webfinger.net
@doesnm@doesnm.p.psf.lt Agree. salty.im should allow the user to post multiple brokers on their webfinger so the client can find a working path.
gemini calls the request-response cycle a transaction in the spec. since trasactions are not cached, we have this problem where we canāt tell if anything was updated without fetching it and we canāt indicate how often a client should expect the content to be valid. the most common solution right now to just to keep requesting the resource until it changes or stops existing, which isnāt ideal. this sort of update notification model is interesting because it re-frames your thinking into something more like event sourcing. you end up needing to add an event queue and dispatch to the server, which is a bit more complex on the server side than plain static files, but the client stays the same. iām curious to see what kind of systems could be built on this gemini message queue concept.
@movq@www.uninformativ.de iām sorry if I sound too contrarian. Iām not a fan of using an obscure hash as well. The problem is that of future and backward compatibility. If we change to sha256 or another we donāt just need to support sha256. But need to now support both sha256 AND blake2b. Or we devide the community. Users of some clients will still use the old algorithm and get left behind.
Really we should all think hard about how changes will break things and if those breakages are acceptable.
These collisions arenāt important unless someone tries to fork. So.. for the vast majority its not a big deal. Using the grow hash algorithm could inform the client to add another char when they fork.
@doesnm@doesnm.p.psf.lt twt
probably isnāt the best client Iām afraid. It doesnāt really cache twts by their key (hash) to display threads properly. Jenny however does š
Only with dovecot xD. For mail im use android native mail client and not mutt. And jenny display some errors with found some files and /tmp dir (android dont have /tmp)
@prologic@twtxt.net YES James, it should be up to the client to deal with changes like edits and deletions. And putting this load on the clients, location-addressing with make this a lot easier since what is says it: Look in this file at this timestamp, did anything change or went missing? (And then threading will not break;)
Diving into mblaze, I think Iāve nearly* reached peek email geek.
Just a bunch of shell commands I can pipe together to search, list, view and reply to email (after syncing it to a local Maildir).
EXAMPLES at https://git.vuxu.org/mblaze/tree/README
So far Iām using most of the tools directly from the command line, but I might take inspiration from https://sr.ht/~rakoo/omail/ to make my workflow a bit more efficient.
*To get any closer, I think Iād have to hand-craft my own SMTP client or something.
Yes, that is exactly what I meant. I like that collection and ātwtxt v2ā feels like a departure.
Maybe thereās an advantage to grouping it into one spec, but IMO that shouldnāt be done at the same time as introducing new untested ideas.
See https://yarn.social (especially this section: https://yarn.social/#self-host) ā It really doesnāt get much simpler than this š¤£
Again, I like this existing simplicity. (I would even argue you donāt need the metadata.)
That page says āFor the best experience your client should also support some of the Twtxt Extensionsā¦ā but it is clear you donāt need to. I would like it to stay that way, and publishing a big long spec and calling it ātwtxt v2ā feels like a departure from that. (I think the content of the document is valuable; Iām just carping about how itās being presented.)
why can we both have a format that you can write by hand and better clients?
Some more arguments for a local-based treading model over a content-based one:
The format:
(#<DATE URL>)
or(@<DATE URL>)
both makes sense: # as prefix is for a hashtag like we allredy got with the(#twthash)
and @ as prefix denotes that this is mention of a specific post in a feed, and not just the feed in general. Using either can make implementation easier, since most clients already got this kind of filtering.Having something like
(#<DATE URL>)
will also make mentions via webmetions for twtxt easier to implement, since there is no need for looking up the#twthash
. This will also make it possible to make 3th part twt-mentions services.Supporting twt/webmentions will also increase discoverability as a way to know about both replies and feed mentions from feeds that you donāt follow.
#fzf is the new emacs: a tool with a simple purpose that has evolved to include an #email client. https://sr.ht/~rakoo/omail/
Iām being a little silly, of course. fzf doesnāt actually check your email, but it appears to be basically the whole user interface for that mail program, with #mblaze wrangling the emails.
Iāve been thinking about how I handle my email, and am tempted to make something similar. (When I originally saw this linked the author was presenting it as an example tweaked to their own needs, encouraging people to make their own.)
This approach could surely also be combined with #jenny, taking the place of (neo)mutt. For example mblazeās mthread tool presents a threaded discussion with indentation.