Ned Batchelder on Nostr: Remember that #Python dicts can have tuples as keys! Consider a dict with (x,y) keys ...
Remember that #Python dicts can have tuples as keys! Consider a dict with (x,y) keys instead of nested lists for a grid. It simplifies sparse grids, "resizes" are automatic, it doesn't matter where (0,0) is, and you can use negative positions:
Published at
2024-05-13 11:30:52Event JSON
{
"id": "3ffd7575327503ebe5eeb107b6550d02bc3c46eeb5ec94f5ae743b99c6893b2c",
"pubkey": "3c1a5dbc82cfc12f65f6bd9e283d71bd4a6f1ca853640666cfd5c856037806b1",
"created_at": 1715599852,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"proxy",
"https://hachyderm.io/users/nedbat/statuses/112433551925287037",
"activitypub"
]
],
"content": "Remember that #Python dicts can have tuples as keys! Consider a dict with (x,y) keys instead of nested lists for a grid. It simplifies sparse grids, \"resizes\" are automatic, it doesn't matter where (0,0) is, and you can use negative positions:\n\nhttps://media.hachyderm.io/media_attachments/files/112/433/551/760/419/210/original/995353a6b9000982.png\n\nhttps://media.hachyderm.io/media_attachments/files/112/433/551/786/793/854/original/ccd9a84b47e396e8.png",
"sig": "d09236981b81e80173f38e4878297a56105506bbfbec44f37c66b19c416560c8b07867c9dc1156af5d441cab93b20b84603310e7638906ebbf848a953fc4d654"
}