If you’ve looked at Recent Changes on this wiki, or on other Oddmuse wikis, you might have noticed that some of the edits are from people identified by a four-coloured “flag” of some kind. If you select the “flag” you’ll see that every colour belongs to a number. What’s up with this?
A long time ago, the wiki saved both the user-supplied username and the user’s hostname when they edited a page. The idea was that we wanted to somehow identify the people that were editing pages: by a self-selected name (that wasn’t and still isn’t protected by a password), if they wanted to, and by the hostname, for “technical reasons”. What technical reasons? Most importantly, for banning: spammers and vandals would leave behind their hostnames and administrators could then use these to ban them.
One of the problems was that people would edit a wiki page from work and discover that their employer’s hostname was suddenly in the logs – forever associated with their edits. Removing those meant find my contact information, sending me mail, me going to the server and manually editing two, three or more files. It was cumbersome.
The second iteration no longer did a reverse lookup and simply used the IP number. With the General Data Protection Regulation (GDPR), it was understood that IP numbers are just as delicate as hostnames. Indeed, with a simple whois call, I’d look up hostnames all the time to see whether my sites were being bombarded by requests from a particular Internet service provider (ISP) in China, or a particular company in the United States.
So IP numbers can only be stored for what is absolutely necessary, and clearly protecting wikis from spam and vandalism is a necessity. But once a decent period of time has passed – a few days at most! – it was time to delete those IP numbers from the logs.
Now we have arrived at the third iteration: we don’t want hostnames, we don’t want IP numbers, but we still want a way to know whether one person edited ten pages, or each of the ten pages was edited by a different person. This is important for peer review: If I look at two or three edits and they all make sense, I can be chill about the remaining seven or eight edits by the same person. It also helps to get a sense of “presence” if I can look at the list of changes for today and see that there was just one person (me), or whether it was two of us, or five.
What I’m doing in the code is I’m taking the IP number of people making an edit, use it to compute a number, and take the first four octal digits (in the range from 0–7) as the “flag”. This being octal has the benefit that on old terminals, people had eight colours to choose from: black, red, green, yellow, blue, magenta, cyan, white.
_█**█**█**█**█**█**█__█_←(the last one is white)
When I worked on this for Oddmuse, thinking that those eight colours were going to be shown on the web, I felt that black was pretty harsh so I picked a different set of colours: red, orange, yellow, green, blue, indigo, violet, white.
_█**█**█**█**█**█**█__█_←(the last one is white)
The longer I stare at these colours, the unhappier I am. Indigo is the colour of blue jeans but this *█* looks purple! I think I’m going to be using the RGB colour from the “classic rainbow colour” flag.
_█**█**█**█**█**█**█_
The rainbow flag is driving me nuts. I should also switch white and black depending on theme used.
I had to make some changes to Elpher so it would use the xterm-color package instead of ansi-color...
Elpher Screenshot with Brutalist Dark theme
Long story short: that’s why the colours in the Gemini and the web version of the wiki don’t match. 😅
After some changes, I’m happy to report that the web and Elpher with the xterm-color library (and my patch which uses it) show the same colours.
By default, Elpher uses ansi-color which cannot handle 24bit colours.
But sadly, AV-98 now breaks, because it probably folds lines before considering how many characters don’t count because they belong to escape sequences:
All of this is *much* trickier than I thought.
#Wikis
(Please contact me if you want to remove your comment.)
⁂
Webmention: https://www.zylstra.org/blog/2020/08/14785/
https://www.zylstra.org/blog/2020/08/14785/
– Ton Zijlstra 2022-11-01 04:46 UTC