mleku on Nostr: you need to go study the principles of Unix if you don't understand why having the ...
you need to go study the principles of Unix if you don't understand why having the messages in JSON is better..
the default websockets use Flate compression and this is pretty decent at deduplicating the high entropy pubkeys
if you want to make a relay and client that works with a binary format, go make it, but you will have a bad time if its primary support of JSON is not kept fully up to date, interoperability > all
by obscuring data in a binary format you create all kinds of problems with interoperability, debugging, and so on, i'm not saying don't do it, but it's a low priority compared to fully supporting the easy to debug human readable format, even if json is shitty for certain parts of it syntax it's still readable
here's the principles of unix, summarised by Brave's AI:
-----
Write programs that do one thing and do it well: Focus on simplicity and single-purpose tools.
Write programs to work together: Design tools to be modular and interoperable.
*Write programs to handle text streams: Use text as a universal interface for data exchange and processing.*
Additional Principles
From “The Art of Unix Programming” by Eric S. Raymond:
Rule of Clarity: Clarity is better than cleverness.
Rule of Composition: Design programs to be connected with other programs.
Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
Key Concepts
*Plain text: Store data in plain text files.*
Hierarchical file system: Organize files and directories in a hierarchical structure.
Treat devices and IPC as files: Use a file-like interface for device management and inter-process communication.
Use software tools: Prefer small, specialized programs (tools) over monolithic applications.
Command-line interface: Use a command-line interpreter to string together tools and execute tasks.
Notational Conventions
Published at
2024-10-05 04:23:38Event JSON
{
"id": "b11044aa212feeb92cca3ea85708235334d4a6f488b2f4e938f3071bc045445b",
"pubkey": "4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f",
"created_at": 1728102218,
"kind": 1,
"tags": [
[
"e",
"aa9ccc0484ff5e2657e19a67d93de461a8625e396c9f83438e46f278fdb9b123",
"",
"root"
],
[
"e",
"aa9ccc0484ff5e2657e19a67d93de461a8625e396c9f83438e46f278fdb9b123",
"",
"reply"
],
[
"p",
"e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411",
"",
"mention"
],
[
"client",
"noStrudel",
"31990:266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5:1686066542546"
]
],
"content": "you need to go study the principles of Unix if you don't understand why having the messages in JSON is better..\n\nthe default websockets use Flate compression and this is pretty decent at deduplicating the high entropy pubkeys\n\nif you want to make a relay and client that works with a binary format, go make it, but you will have a bad time if its primary support of JSON is not kept fully up to date, interoperability \u003e all\n\nby obscuring data in a binary format you create all kinds of problems with interoperability, debugging, and so on, i'm not saying don't do it, but it's a low priority compared to fully supporting the easy to debug human readable format, even if json is shitty for certain parts of it syntax it's still readable\n\nhere's the principles of unix, summarised by Brave's AI:\n\n-----\n\nWrite programs that do one thing and do it well: Focus on simplicity and single-purpose tools.\nWrite programs to work together: Design tools to be modular and interoperable.\n*Write programs to handle text streams: Use text as a universal interface for data exchange and processing.*\n\nAdditional Principles\n\nFrom “The Art of Unix Programming” by Eric S. Raymond:\n\nRule of Clarity: Clarity is better than cleverness.\nRule of Composition: Design programs to be connected with other programs.\nRule of Separation: Separate policy from mechanism; separate interfaces from engines.\nKey Concepts\n\n*Plain text: Store data in plain text files.*\nHierarchical file system: Organize files and directories in a hierarchical structure.\nTreat devices and IPC as files: Use a file-like interface for device management and inter-process communication.\nUse software tools: Prefer small, specialized programs (tools) over monolithic applications.\nCommand-line interface: Use a command-line interpreter to string together tools and execute tasks.\nNotational Conventions\n\n",
"sig": "d8192898f3f1ead283de4442a2eac9d4c03d60d7fdc2c2b84233536663af1e3470be0e78143240c706d50e34e5d0fe5d7ea1ec01330d05b105cbe2076f8ccacd"
}