Binary encoding is a violation of the laws of Unix.
I've also been pondering a related issue with addressable events. The use of NIP-19 bech32 entities eliminates human-readable information that devs, users, and search engines can all use — another example of why this is a law of Unix.
I'm on a middle ground here, for good reason. Just like the REQ/COUNT extension I built and the general concept behind [TMP](https://njump.me/nevent1qvzqqqqqqypzqnyqqft6tz9g9pyaqjvp0s4a4tvcfvj6gkke7mddvmj86w68uwe0qyghwumn8ghj7mn0wd68ytnhd9hx2tcpz4mhxue69uhhyetvv9ujummjd3ujuer9wchsqgz2f6nyd984hlynths6un90p0v557k5wksdttew77nxqc9whjy08sxggm0g), there are more compact formats that remain human-readable, making indexing and debugging simpler.
I spent a lot of time thinking about alternatives to the current JSON-encoded messages. The only thing required to make the transition — without backward compatibility problems — is to create a secondary listener that speaks a more approachable yet still plaintext format, and instead of just replicating the dumb query language, make a better one that is part of the new protocol encoding extension.
I would invite you to take a look at Orly, which I rearchitected fully to comply with DDD, meaning it would likely be fairly trivial work to add a more extensible endpoint for protocol extensions.
With Nostr, we have some issues with deprecation being difficult to socially coordinate, as well as actually ending the use of deprecated protocols — as we have with Bitcoin. The only way I see it working is if you make the extension's benefits enticing enough to get devs to actually implement on it.
Keeping the structures of the old ways also makes transition easier, as people can just refactor their queries to select the other protocol format if available but keep their code structurally identical. This enables them to extend their client code to adopt the new, better protocol without leaving them stranded.
Login to reply
Replies (1)
I disagree with your first statement there. In Unix, everything is a file, including all devices, which also consist of protocols for driving them which are read and written via binary encodings. You would simply be leaving performance on the table if you chose otherwise. I think, perhaps that you're talking about the philosophy around how shells should be used, in which case, you're actually arguing for writing everything as scripts instead of running binaries. It's kind of irrelevant, I feel. Performance matters, if it didn't, we wouldn't care about the size of blocks in Bitcoin, how long it takes to spin up a node, or the utilization of resources in general. Just my two cents.
But in any case, for sure it's possible to swap out the underlying encoding format, but as you said, when accounting for network effects, it's going to be tough to get any adoption, especially when there's an aggressive push to not accept thought from outside the inner circles here. I'll leave it there.