Chess over ActivityPub
castling.club
castling.club
For example, if HN implemented ActivityPub this comment could be directly replied to by users on Mastodon or PeerTube or any other AP service, directly from that interface. Like email, it just works.
IMO it genuinely represents the way we should be thinking about web applications and services.
In practice, it looks like Mastodon also stores / caches local copies of messages and profiles, pretty much as they are received. (Including thumbnails!)
Still a great tech though. I just wish the authors would think about IRL and not just assume a perfect sphere in a frictionless vaccum.
If HN did implement this then would they have to blacklist bad instances? What is to stop people from spinning up bad instances faster than HN could blacklist? So we'd surely end up with a whitelist which isn't very social.
And for the record, Mastodon's scale is pretty damn big, considerably bigger than HN. There are millions of users.
HN has a very particular culture and that would dilute it.
This was very much an experiment in building something that talks ActivityPub Server-to-Server. Chess happened to be a fun, not too difficult idea to get the experiment going. (The chess parts are largely built on existing work, such as chess.js and icons from the same set Wikipedia uses.)
Feel free to ask anything!
By a GUI client, I mean a frontend that you can log in with your Mastodon/Pleroma/AP account in order to play in real time and/or view other players' games. Possibly integratable into AP-compatible clients.
I'm not sure if clients even have functionality to integrate? Most have an 'open in browser' option that I guess could work, but you'd still need a session with the AP provider. (And those APIs probably all differ too!)
Someone will probably come along and build a GUI that works with the toots. It would be a neat browser plugin project. Are you planning to open source this?
As for open-sourcing, I'm considering it! I'm probably going to wait a little bit until the dust settles, before deciding.
Take the less-than-production-grade code you find in many hobby projects, add in the tendency of HN to tear to shreds (however well-meaning) any code which gets presented, and open sourcing hobby projects can be a recipe for disaster.
Edit: I'm not saying open source is bad (obviously) or that it's always toxic. But it definitely can be.
>add in the tendency of HN to tear to shreds (however well-meaning) any code which gets presented
I don't think HN is this bad unless the code in question is actively doing harm (e.g. bad crpyto). I'll always be more critical of good closed source software than bad open source software.
I think one of the big problems with Facebook and the like is the idea that things can be uploaded to the Web but remain "private". It's an insidious lie IMO, and is one reason I refused to go near it.
Any "revelations" about data brokers, (mis)use, breaches, etc. are just confirmations that the premise itself is flawed (from a user privacy perspective; I know it's a lucrative business proposition).
Attempting to build "privacy" into a decentralised publishing protocol seems to me like a bottomless rabbit hole without any real solution (a bit like DRM). It's perhaps an interesting question in terms of fundamental CS research, but AFAIK no practical implementations exist even in centralised systems, so it seems counterproductive to burden protocols with constraints that aren't actually possible to satisfy.
Even encrypted email only remains private if both parties keep it that way. Privacy can't be "imposed" by an author/"owner". Consider that even proprietary silos like Snapchat have spawned tools to automatically strip their "privacy" features ( e.g. https://drfone.wondershare.com/snapchat/snapchat-screenshot-... ). An open protocol which encourages third-party clients (both human-operated and bots) would be in a much worse situation.
That's absolutely not what I said, and I can't see anything in what I wrote that could be sincerely interpreted into such a weak straw man:
- My only mention of email was descriptive ("Even encrypted email only remains private if both parties keep it that way") not prescriptive ("We should do XYZ")
- The only prescriptive remark I made was to avoid delaying/constraining protocols with requirements that are difficult/impossible to actually implement. I believe that 'private sharing', as found on social media sites, is an example of such an impossible requirement.
- At no point did I say that any existing technology should be "abolished"
Based on this, I'm going to assume that your comment was not made in good faith. Even then, what you say doesn't seem to make much sense. In particular:
- Emails are public. That's why sensitive information like passwords and financial credentials should never be sent via email, unless the email body is encrypted before sending. Email transports are only encrypted opportunistically (STARTTLS), and even if a client/server enforce their connections to be secured, the message may hop between subsequent relays through unencrypted channels before arriving at the recipient. These days there are alternative mechanisms which might provide more security, e.g. composing a message in a browser connected to gmail.com over HTTPS and sending it to another Gmail address, but (a) this isn't "private" since our plaintext is being shared with a third party (Google, who is mining it to profile us; this is also why Facebook's claims of "privacy" are a lie) and (b) it's unlikely that any email protocols or formats would actually be used in such a setting; Gmail/Exchange/etc. are more like self-contained messaging platforms, which interoperate with email.
- I don't understand what "abolish" would even mean, in the context of email. Encrypting emails, whether it's with GPG or pen + paper, is not something that any centralised authority can 'turn off'; it's purely at the whim of the users. If we include steganography as a "privacy aspect" then it's not even possible to know if it's being used or not.
One thing that's kind of cool: Each message and game detail page can also be requested as JSON using the Accept header. For messages, ActivityPub actually requires this. But for castling.club, these documents also include SAN and FEN for the chess moves and board states. And there's a JSON-LD vocabulary to describe it: https://castling.club/ns/chess/v0
That's a very technical advantage, I suppose. And how beneficial that is in practice (outside chess) remains to be seen. :)
One of the first programs was a chess board which would stay up-to-date with all of the previous "moves" in a reply chain.
I guess as a (former) shareholder I probably benefited from twitter's switch from trying to knit together amazing primitives like this in favor of becoming an ads-driven behemoth, but the engineer in me is sad about all of the amazing projects that never released.
The wonderful modular world you saw was only delayed, and now it's going to happen with much cheaper CPU, transfer, and storage.
Blog that describes implementing a trivial ActivityPub server: https://blog.joinmastodon.org/
That article does a nice job explaining the very basics.
I think https://activitypub.rocks/ is meant as the landing site, with a list of implementations.
I think it should be possible. For example, federation in Plemora seems lightning fast on a local instance. (Mastodon is a bit heavier and slower it seems. Then again, I’m currently fighting interop issues with Plemora instances.)
So it seems it should be possible to build a decently responsive messenger with ActivityPub.
That may have really helped with HN load too? That and caching. Pretty much everything is served from nginx cache.
But I was tailing the access log at several points, and HN hugs actually didn’t look that bad in terms of request rate. I can imagine a heavier dynamic site having trouble, though.
But I’m not big on Facebook as a whole. In fact, I deleted my account this year.
I hope this wave of federated services grows to be something amazing. There’s certainly a lot of excitement right now!
The board flipping is because they are technically toot detail pages, and in the toots I thought it’d be better to show the board from the side of the player whose turn it is?
Though I’ve also found, while waiting for the other player, planning ahead is also difficult because of this.
Maybe it just needs to show both, side by side, always?
Needs some work, but I guess it works :). https://mastodon.technology/@temporal/100503996824375029
It seems like a good place to start as any. Putting it on top of TCP seems like an optimisation, that can always come later if necessary.
Does anyone know what kind of protocol Wordfeud (Scrabble clone) uses?
Next in your ChessOver episodes, try Chess over XML over TCP with XMPP Pubsub!