Positional arguments are terrible and so are json in json

Reply to this note

Please Login to reply.

Discussion

Interacting with json always involves arguments. Jerk.

I’m surprised people are upset by this. It’s literally the simplest encoding that you can do for encoding variable data into nostr tags

let parts = split(“ “, max: 1)

it parts.count != 2 return null

let name = parts[0]

let value = parts[1]

Me among Devs

It's all simple, string encoded json is simple, numbered arrays are simple, space separated arguments, but it's just messy, and the total is a lot of stuff. Json has arguments, keys, values. No need to add extra simpleness to it.

This is not per se against you, but the overall protocol is overloaded with simple stuff and as a result it's no longer simple.

This is much simpler than most other things on nostr. Content parsing is not simple.

Things on nostr that are much more complicated than this:

- Binary TLV bech32 mentions

- #[ 0] content parsed indexed mentions

- mention parsing and its interaction with nip10 threads

- encrypted dm spec and its interaction with p tag mentions (metadata leakage)

This is an obscure optional image metadata optimization that is trivial to parse and is not at all required. You’re either trolling or have never written any nostr code to know what is simple or not.

Not getting into spec debates on here anymore, feel free to open an issue on the repo if you feel so strongly about this.

Debate is good, and as I said before, it's not at your proposal per se. I've written nostr code, and there's all kinds of oddities in different specs, almost every NIP has it's own peculiarities.

I guess it's the result of loose organisation of protocol changes. There's a lot of different flavours of doing stuff and it's messy. But somehow it works, most of the time.

The imeta proposal is interesting, please don't let my reaction on an unimportant detail deter you from debating more on here.

I understand what you are saying and I also dislike multiple layers of encoding. It deviates from standards which can cause confusion for other developers and multiple encodings can be leveraged for exploitation vectors and attack obfuscation.