Just got bitten by the no-semicolon before self-invoking function issue with JavaScript Standard Style:

```javascript
// All good
obj.method()
;(async function () {})()

// The sky will fall
obj.method()
(async function () {})()
```

The second will give you the wonderfully cryptic error:

```
TypeError: obj.method() is not a function. (In 'obj.method() (function () {})', 'obj.method() ' is undefined)
```

Maybe JavaScript Standard Style should enforce ;(function(){})()

PS. Don’t ask me why I’m using Markdown in my toot. Ask, rather, why your Mastodon client of choice does not support it… *hint, hint* ;)

Aral Balkan @aral

I hope ActivityPub will be kept as simple as possible (think TCP/IP for federation) and semantic extensions will occur in message space.

Markdown is one extension. (If enough people start using it, clients can pave the cow paths.)

Another might be editable toots.

Imagine a toot:

/update mastodon.ar.al/@aral/100141440 replace "hint, hint" with "hint, hint, hint"

A human reading that can understand it. If a client supports it, they can actually update the toot.

Editable toots, anyone?

CC @Gargron

· Web · 2 · 7

I’d suggested a similar thing for Twitter ages ago when they were thinking of coming out with their “annotations” feature to add extensible metadata to tweets. Back then I called it Twitterformats. Maybe what we need are Mastodonformats.

The beauty of such an approach is you don’t need to keep bloating the core protocols. You can add protocols in a decentralised manner. Clients, including the official one, can pave the cow paths & start supporting the most popular by default/others via plugins.

@mikeburns Thanks, just posted a comment with links to my toots in case it helps :)

@aral You could send an AP update, it's in the vocabulary. Supporting that in Mastodon is another question, you would lose immutability of toots (so harder to cache the most requested resource), and it's a very abuseable feature (edit a popular toot about kittens to instead make it some political message), combatting which would require saving diffs of changes and presenting them in the API/UI and even then sneaky edits could mislead people. In my opinion it's easier to just not do that

@Gargron Was just one possible application of in-message semantics. I personally feel ActivityPub is bloated as is. Every message can convey not just natural language but metadata/ semantics. So you could implement editable updates just via what exists today. Or a message view that displays a chess board in response to chess moves stated in the message body.

PS. I hear there’s some sort of controversy afoot so no worries about getting back to me if you’re dealing with that. Was just musing :)

@aral That starts getting real hairy real fast. Markdown is mostly fine for formatting, but it is ill-defined and breaks down around the edges when you want to do anything interesting with it. For example, we could play a game, where I hand you arbitrary character sequences and you provide a function that will always properly escape them for either a code block or perhaps for plain running text. Who do you think would win? :-D

@varx @aral Isn't CommonMark supposed to solve the 'ill defined' problem?

@MatejLach @aral ABNF or bust. (Or other machine-readable context free grammar.) If we can't each throw it into our favorite parser-generators and have different implementations that have identical behavior, the whole exercise is vaguely pointless.

@aral For matters of correctness (like post editing) as opposed to "soft" languages (such as most formatting) I think it's essential to have a clear level-distinction between content and command.

(And that's before we even get into issues like people writing terrible custom parsers for natural-language-like protocols...)

@Gargron Dude, just read up. So sorry you’re getting flak. You can never make everyone happy and I’m seriously impressed with how much you do to try and do that anyway. Lots of love + positive vibes!

@Gargron @aral

On the other hand, if someone solves post-hoc editing of distributed messages in an accountable, transparent, performant way, I think they'll just have invented distributed Github.

So, you know, that would be cool.

@varx

Anyway, the thing about something like this is that no permission is required. Anyone can start experimenting with adding semantics to the content of messages and any client can start adopting representations of those semantics.

So the idea’s out there. Have fun. Make lovely things :)

@aral @Gargron Hooray for editable posts.

It's crucial if we want to have large and serious articles in the Fediverse.

It's not that important for Mastodon per se (because it's microblogging, it's throwaway shit), but when we get something like Wordpress or Livejournal join the club, we _need_ the editing.

We can also show GIT-style diffs in the interface to show how exactly the post was edited, to avoid abuse.