Files
manual_slop/docs/twitter/2063733456144597200/thread_data.json
T
ed 0d51c3541d fix(twitter_threads): strip trailing slashes from --media-dir and --output
Path objects with trailing separators (e.g. './media/') intermittently
failed to glob on Windows after download_media.py had just finished
writing the directory. Normalize via rstrip('/\\\\') before Path()
re-wrapping so the CLI is forgiving regardless of OS path quirks.

Repro: gallery-dl ran + immediate render with trailing slash on the
just-created media/ dir -> glob returned nothing -> markdown emitted
no ![Media N] lines. Removing the trailing slash fixed it; this makes
both work.
2026-07-26 21:12:20 -04:00

206 lines
8.2 KiB
JSON

{
"root_post_id": "2063733456144597200",
"posts": [
{
"post_id": "2063638204394181034",
"author": "NOTimothyLottes",
"handle": "NOTimothyLottes",
"text": "Error codes, many APIs get these so wrong. For example aliasing the same code with multiple meaning so the user has zero idea what actually went wrong and what needs fixing. Here is what I do -> thread",
"timestamp": "2026-06-07 15:04:23",
"media_urls": [],
"reply_to_id": null,
"quote_of_id": null,
"metrics": {
"reply_count": 3,
"repost_count": 4,
"like_count": 47,
"view_count": 8479
}
},
{
"post_id": "2063638960790737206",
"author": "NOTimothyLottes",
"handle": "NOTimothyLottes",
"text": "I have a force no-inline exit point which prints\nERROR[__line__]:__code__ \nWhere 'line' is the line number macro __LINE__ passed in from the source, and 'code' is the specific error code. This exits with error code set to 'line'. Thus easy to find termination point in source.",
"timestamp": "2026-06-07 15:07:23",
"media_urls": [],
"reply_to_id": "2063638204394181034",
"quote_of_id": null,
"metrics": {
"reply_count": 1,
"repost_count": 0,
"like_count": 12,
"view_count": 1060
}
},
{
"post_id": "2063640590730842264",
"author": "NOTimothyLottes",
"handle": "NOTimothyLottes",
"text": "Function also scales 'line' by 100, and places the version in the lower digits. So know which release version (I'm not doing more than 100 post-release updates). Note all my source is in a single file (including shader source), so I don't need a file in the error print out",
"timestamp": "2026-06-07 15:13:52",
"media_urls": [],
"reply_to_id": "2063638960790737206",
"quote_of_id": null,
"metrics": {
"reply_count": 1,
"repost_count": 0,
"like_count": 12,
"view_count": 987
}
},
{
"post_id": "2063642010649530377",
"author": "NOTimothyLottes",
"handle": "NOTimothyLottes",
"text": "I use force inline macros (I_ in my code) that wrap error checks like testing if a win32 call errors with a null pointer (Err0), and uses builtin expect assuming no error to filter through another no-inline (N_) function to GetLastError and exit if fail, otherwise return pointer",
"timestamp": "2026-06-07 15:19:30",
"media_urls": [
"https://pbs.twimg.com/media/HKOGypaW4AEU4Xl?format=png&name=orig"
],
"reply_to_id": "2063640590730842264",
"quote_of_id": null,
"metrics": {
"reply_count": 1,
"repost_count": 0,
"like_count": 8,
"view_count": 689
}
},
{
"post_id": "2063642518168739956",
"author": "NOTimothyLottes",
"handle": "NOTimothyLottes",
"text": "Which means I can simply wrap the calls to WIN32 with a specific Err function and it auto does terminal error checks for cases that shouldn't happen in practice, but if it does happen at least I get instant ability to know where and why",
"timestamp": "2026-06-07 15:21:31",
"media_urls": [],
"reply_to_id": "2063642010649530377",
"quote_of_id": null,
"metrics": {
"reply_count": 1,
"repost_count": 0,
"like_count": 6,
"view_count": 592
}
},
{
"post_id": "2063642851284529466",
"author": "NOTimothyLottes",
"handle": "NOTimothyLottes",
"text": "The defines I use for context",
"timestamp": "2026-06-07 15:22:51",
"media_urls": [
"https://pbs.twimg.com/media/HKOIKxeXYAALKO_?format=png&name=orig"
],
"reply_to_id": "2063642518168739956",
"quote_of_id": null,
"metrics": {
"reply_count": 1,
"repost_count": 0,
"like_count": 7,
"view_count": 564
}
},
{
"post_id": "2063643677440831673",
"author": "NOTimothyLottes",
"handle": "NOTimothyLottes",
"text": "And if this is new, what I do for imports is using a M_(name) macro which imports WIN32 symbols as \"void name(void)\" functions, which I typecast to the correct type at the exact point of call. Means I don't need any system headers or header like code in my code :)",
"timestamp": "2026-06-07 15:26:08",
"media_urls": [
"https://pbs.twimg.com/media/HKOIsxFXgAA_z35?format=png&name=orig",
"https://pbs.twimg.com/media/HKOIx20XMAAtIoB?format=png&name=orig",
"https://pbs.twimg.com/media/HKOI3rPWEAAZ9t0?format=png&name=orig"
],
"reply_to_id": "2063642851284529466",
"quote_of_id": null,
"metrics": {
"reply_count": 2,
"repost_count": 0,
"like_count": 8,
"view_count": 544
}
},
{
"post_id": "2063644292711690546",
"author": "NOTimothyLottes",
"handle": "NOTimothyLottes",
"text": "At least for WIN32 I do use standard in EXE dynamic linking since Windows doesn't have the Linux .SO nightmare problem. On Linux I only link to libdl and dlopen and dlsym everything else. In theory that gives portability due to ABI and common libdl naming.",
"timestamp": "2026-06-07 15:28:34",
"media_urls": [],
"reply_to_id": "2063643677440831673",
"quote_of_id": null,
"metrics": {
"reply_count": 1,
"repost_count": 0,
"like_count": 8,
"view_count": 790
}
},
{
"post_id": "2063644866127552521",
"author": "NOTimothyLottes",
"handle": "NOTimothyLottes",
"text": "The result of all this is \"keeping it simple\". For the most part I don't do any runtime dynamic creation of 'things' so all my error checks are init time (low cost) only and fail just results in this common Err() with printed {line,code} exit path.",
"timestamp": "2026-06-07 15:30:51",
"media_urls": [],
"reply_to_id": "2063644292711690546",
"quote_of_id": null,
"metrics": {
"reply_count": 1,
"repost_count": 0,
"like_count": 9,
"view_count": 747
}
},
{
"post_id": "2063671989991264586",
"author": "OZ",
"handle": "winning_tactic",
"text": "Is the error centrally located? e.g. whatever GetLastErr does? I'm motivated to spend some time prettying my own usage, but I keep errors at the call sites, but do a lot of the same action, but the cost is every call is a macro to the real call that handles the rigamarole. green thread based so centrally located is a problem, even though we could do off the curr_tsk register\nhttps://gitlab.com/qsrc.net/Lampyr/-/blob/dev/rt/file.h?ref_type=heads#L61\nthen you have to do this kind of jumping through hoops because no one wants to set it up themselves.\nhttps://gitlab.com/qsrc.net/Lampyr/-/blob/dev/rt/mem.h?ref_type=heads#L10\nYou certainly have a lot of helper macros and single letter api about them, which I like. tasteful yet foreign.",
"timestamp": "2026-06-07 17:18:38",
"media_urls": [],
"reply_to_id": "2063644866127552521",
"quote_of_id": null,
"metrics": {
"reply_count": 1,
"repost_count": 0,
"like_count": 0,
"view_count": 97
}
},
{
"post_id": "2063730754861822129",
"author": "NOTimothyLottes",
"handle": "NOTimothyLottes",
"text": "@winning_tactic These are all for errors that kill the application. GetLastError is like the WIN32 version of error number from libc (figure out why an allocation that returned zero failed).",
"timestamp": "2026-06-07 21:12:08",
"media_urls": [],
"reply_to_id": "2063671989991264586",
"quote_of_id": null,
"metrics": {
"reply_count": 1,
"repost_count": 0,
"like_count": 0,
"view_count": 28
}
},
{
"post_id": "2063733456144597200",
"author": "OZ",
"handle": "winning_tactic",
"text": "@NOTimothyLottes I see!",
"timestamp": "2026-06-07 21:22:52",
"media_urls": [],
"reply_to_id": "2063730754861822129",
"quote_of_id": null,
"metrics": {
"reply_count": 0,
"repost_count": 0,
"like_count": 0,
"view_count": 11
}
}
],
"source_url": "https://x.com/winning_tactic/status/2063733456144597200"
}