Alex on Nostr: In JavaScript, ES Modules carry state. Some other languages just concatenate imports ...
In JavaScript, ES Modules carry state. Some other languages just concatenate imports together like it's one large file, but in JS a file can have state. Anyway this lead me down a bad path of treating ES modules like "microservices" in Ditto which made it basically impossible to test anything so I rewrote everything.
Published at
2025-02-26 20:29:20Event JSON
{
"id": "7c45ca37762c1c0c6bd1e1117b5794988c92dee2b25aadd92ef46b4ed81ef9e1",
"pubkey": "0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd",
"created_at": 1740601760,
"kind": 1,
"tags": [
[
"e",
"81aeeaf382aa35e0a6b8c46c5ca289506ab6b3ede064b47695487152dc6fe08e",
"wss://gleasonator.dev/relay",
"root",
"0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd"
],
[
"e",
"81aeeaf382aa35e0a6b8c46c5ca289506ab6b3ede064b47695487152dc6fe08e",
"wss://gleasonator.dev/relay",
"reply",
"0461fcbecc4c3374439932d6b8f11269ccdb7cc973ad7a50ae362db135a474dd"
]
],
"content": "In JavaScript, ES Modules carry state. Some other languages just concatenate imports together like it's one large file, but in JS a file can have state. Anyway this lead me down a bad path of treating ES modules like \"microservices\" in Ditto which made it basically impossible to test anything so I rewrote everything.",
"sig": "839ee613b00144287529d7f7f7b4548acb53c9bc373104e31cc885865244bb06d09b87b41a3d3228cb21fa825f75f57eccbc0cfd4db463fcfd5fa3ff3d682f3d"
}