blog · git · desktop · images · music · contact & privacy · gopher


twtxt

2020-10-13

twtxt is an idea from 2016 and there was a thread about it on nixers.net in 2017. The goal is to build a decentralized microblogging social network. If you want to participate, you have to host a file called twtxt.txt somewhere. Actually, you can call it anything you like, it just has to follow the format of the spec.

And that’s it.

If people want to “follow” you, they can add the URL of your twtxt to their client.

And that’s it.

Pretty awesome, right? Let me re-iterate:

While keeping up with other people’s feeds is a bit more involved, creating a new “twt” is as simple as it can be:

printf '%s\t%s\n' "$(date +%FT%T%:z)" "hello world!" >>twtxt.txt

Systems which are as simple as this invite you to write your own software. And, of course, that’s what I did:

https://uninformativ.de/git/twtxt-tools

You probably shouldn’t use that, though, it’s very much tailored to my setup (that’s the point). And maybe I throw it away tomorrow and start over. But, for example, the idea of “auto avatars” is kind of nice, I think. I also thought about writing a twtxt client as a WeeChat plugin.

And here’s my twtxt file via gopher or https.

As you can see, there is a bunch of metadata at the top. That’s entirely optional. The spec doesn’t even mention it. following = lines are a nice way to publish who you’re following, for example.

My only gripe with the format is: They should have chosen one way to express timestamps. Currently, it says “RFC 3339 date-time string”, which leaves a couple of options. Why not chose one of them? Or why not use UNIX timestamps? When implementing your client, this can be a bit annoying.

RSS/Atom and twtxt are pretty much identical at the core: You host a file, other people poll it. twtxt could have been built on top of RSS/Atom. But as I said, simplicity is key here. twtxt is much more fun to play with, because you don’t have to deal with XML and then those two complex standards built on top of XML.

At the moment, there are not a lot of active users. twtxt.net was launched recently, which is basically “twtxt as a service” and which would make it easier for “ordinary people” to join the party. It’s still young, so we’ll have to wait and see how it fares.

Either way, twtxt in general is just a toy currently. But a nice one. :)

On discoverability

Here’s one thing that twtxt can’t do: You cannot actively reply to someone else’s post. I mean, you can put it in your file, but the other person won’t be notified about it. She probably won’t even know you exist.

There’s a list of working feeds:

https://github.com/mdom/we-are-twtxt

That still doesn’t solve the problem. If users don’t follow you, they will never know about you. That’s the same problem that blogs have. In the blogosphere, we tried to solve that via Pingback, which some blogs – like this one – simply don’t care about.

It’s an issue – and a feature. You won’t be bothered by random strangers who try to sell you pills.

twtxt addresses the issue by introducing the concept of a registry:

https://twtxt.readthedocs.io/en/stable/user/registry.html

It’s kind of “optional”. If you don’t care about strangers, you don’t have to query the registry servers. But you can, if you like.

I think I like this approach, but of course, I’ve just begun using twtxt, so we’ll see. I mean, we’re talking about microblogging here. That’s inherently ego-centric. I want to post my stuff and follow a bunch of (more or less) entertaining people. That’s it. Microblogs are not a good platform for thoughtful discussions – use newsgr^W forums for that. For chats, use IRC. Microblogs are for “mhhh, nice coffee 🍮️”, “OH: GNU Positioning System”, or quickly sharing an interesting article.


— Update: Whoops, totally forgot about that. There’s another discovery mechanism other than registries: twtxt clients are supposed to send the user’s identity as HTTP user agent (it’s optional).

In your access.log, it looks like this:

www.uninformativ.de 1.2.3.4 - - [18/Oct/2020:07:15:33 +0200] "GET /twtxt.txt HTTP/1.1" 200 8852 "" "twtxt/1.2.3 (+http://foo.sdf.org/twtxt/twtxt.txt; @nickname)"

One reason why I forgot about that is that I use OpenBSD httpd. It doesn’t log user agents by default, but you can turn it on:

server {
    log style combined
    ...
}

If you can access your logs easily, then this is really cool and surely superior to registries. On the other hand, not everybody has direct log access (think GitHub hosting) and it doesn’t work via Gopher, because there’s no user agent. So, for non-tech people, something like twtxt.net is probably a much better alternative.

Comments?