Damus
[DEPRECATED] nextwave profile picture
[DEPRECATED] nextwave
@nextwave

New Account: npub145z4thm7mae9xth3ag498dsrvvj6dnuau4jnrd8rjkn5fedvqx7qrkgem6

Relays (4)
  • wss://relay.damus.io/ – read & write
  • wss://nos.lol/ – read & write
  • wss://relay.primal.net/ – read & write
  • wss://relay.orly.dev/ – read & write

Recent Notes

mleku · 1w
Bitcoin is compact because the data is immutable and has to be stored by all nodes. Nostr only has to store data where people need it — size is not as important when eliminating redundancy is cheap ...
[DEPRECATED] nextwave profile picture
> Bitcoin is compact because the data is immutable and has to be stored by all nodes. Nostr only has to store data where people need it — size is not as important when eliminating redundancy is cheap and pipelined, adding mere microseconds of latency.

I get your point, and for the size of the network it's probably not that important. But I would argue that all resources from a design point of view should be considered to be at a premium at all times. Squeezing everything you can out of a resource is good. Efficiency is good. It's why the standard fuel economy of light vehicles has now reached 25 MPG. This is in line with the Bitcoin point of view, and I think it applies to everything.

> I'm not disagreeing in principle with the benefits of binary encoding. But between SIMD hex codecs and hash functions, flate compression, and the broad support without any of the complexities that gRPC/protobuf ties you to as a developer, I would argue to skip the "use a good existing format" step.

Fair enough. Though, I disagree with the notion that there are complexities in protobufs. Paying careful attention when designing formats actually avoids future complexities like the ones we're talking about right now. The formats are immutable, and only need to be compiled once per target language.

> Signature verifications, however, are problematic. A canonical encoding used to create the signature is necessary, no matter how you wire- or disk-encode it. It's the biggest friction point for Nostr moving to a better, binary format.

But that's the crux of my argument. Everything is downstream from here. Everything would be simpler and more efficient if that was designed correctly. It avoids having to have conversations at all about lookaheads in JSON codecs. It would abide by the principle that the simpler mechanism lasts longer. As I'm sure you're aware too, transforming formats isn't really possible when signatures are involved without having to do work the other way for verifications.
1
mleku · 1w
On the last point, I have some ideas for how to make a hybrid version that validates against a different hash. It flips its position as an appendage afterwards, and why not, it could be binary in both cases, this is not fatal to any wire or disk format. This does mean an extra 64 characters for tex...
mleku · 1w
No, I'm not muddling things up. Binary encodings are trivially improving performance compared to real-world WebSockets + compression for bandwidth and processing. I know that while many canonical impl...
[DEPRECATED] nextwave profile picture
But I'm not talking specifically about the benchmarks for the encoder. There are other considerations like bandwidth (which you did mention via compression), storage, and signature verifications. Also, formatting binary into plaintext is pretty trivial for supporting development and diagnostics. I'm just trying to get at there being a reason why a bitcoin transaction, for example, is submitted and read raw. If that goes against your principles, I'm not really sure where to go from here.

Other than that, nothing you said was controversial. I'm not advocating for tearing it all down, it is what it is, I'm just pointing out that there are significant legacy costs that I personally have no appetite for, and is not sticky for me, which could have been avoided with careful thought at the initial stages.

But seriously though, best of luck with it. I'm convinced you will make significant improvements.
1
mleku · 1w
Bitcoin is compact because the data is immutable and has to be stored by all nodes. Nostr only has to store data where people need it — size is not as important when eliminating redundancy is cheap and pipelined, adding mere microseconds of latency. I'm not disagreeing in principle with the benef...
mleku · 1w
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...
[DEPRECATED] nextwave profile picture
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.
1
mleku · 1w
No, I'm not muddling things up. Binary encodings are trivially improving performance compared to real-world WebSockets + compression for bandwidth and processing. I know that while many canonical implementations of JSON are suboptimal, the one I made is so fast it competes closely with binary encodi...
mleku · 1w
Also, I have developed a lot of ways to get around the limitations of NIP-01. Buried in NIP-01 there is a little section talking about extensions, which are distinguished by the underscore prefix—li...
[DEPRECATED] nextwave profile picture
I'm not going to attempt to steel man my case here, because it wouldn't matter if I did. It's a fundamental issue that cannot resolved without nuking everything.

But it seems obvious to me that using a binary encoding format (think protocol buffers, though I'm not pushing a particular format here) would be superior in every way, and I suspect that their rationale for using a stringified format was more about prioritizing a vision where reaching as many people as possible, under the assumption that the browser was the dominant model for access, trumped common sense design for the protocol. I just don't trust their judgement.
1❤️1
mleku · 1w
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 ...
mleku · 1w
I'm not sure what would be better. JSON is simple, but its literary-style syntax is more expensive to parse than a format that uses sentinels and terminal markers. I'm not familiar enough with alternative encoding schemes, but TOML would have been better. The other issue is the query syntax, which...
Catty_McCatface · 44w
Oh yay! I missed you 😊 I’ve been a bit scarce myself lately, been focusing on self improvement a lot irl. But all ok. How are you?