💾 Archived View for asquare.srht.site › gemlog › twtxt.txt captured on 2024-12-17 at 10:34:22.
-=-=-=-=-=-=-
# nick = asquare # avatar = assface-skeleton.jpg # link = Gemlog gemini://asquare.srht.site/gemlog/index.gmi 2024-10-12T05:18:16+03:00 I really like that trick Casey Muratori uses in his video lectures, where instead of using a regular whiteboard, he writes on a glass pane placed between himself and the camera. That way he never has to turn his back to the viewer. 2024-10-12T05:26:59+03:00 When you're writing on a whiteboard with your back turned to the audience, you're faced with an awkward choice: do you keep talking, and make life harder for the lip-readers in the audience? Or do you stop talking until you can turn back to face the audience, wasting many seconds of people's precious attention? 2024-10-12T06:25:26+03:00 When I first saw a friend use an Amazon Kindle back in the very early 2010s, I was amazed. Naive, optimistic lil' me imagined a bright future for mobile computing, a future of E-ink displays and battery lifetimes measured in months. What eventually came to pass is a present where E-readers are considered niche products and the dominant form of mobile computer is the "smart" "phone", a device so voraciously power-hungry that you have to recharge it every day. 2024-10-12T06:33:30+03:00 To add further injury to injury, there's now a data leash on top of the energy leash: early E-readers had your E-books as files in on-device storage. Smartphones also have ample on-device storage, yet the typical "app" shuns it, preferring to keep your data in "the cloud", making it hard to do anything productive with your device unless you stay within wi-fi range. 2024-10-12T06:42:04+03:00 For future reference, to timestamp a twtxt entry in Kakoune, select the following: gh!echo -n "$(date -Iseconds)\t"<ret>gl and press "@y . From that point and for the rest of the session, you have that as a macro you can execute with q . 2024-10-12T07:44:37+03:00 If I only read a couple of pages at a time, webcomics can be almost tolerable. But the archive-binge experience is utterly miserable. There's no standard "next page" keybind, you have to locate a button and click it with your mouse. And then you wait for the next page to load, a process that often take multiple seconds. If you're the author of a long-running webcomic, please give us the option of downloading completed past "issues" (episodes, arcs, etc) as CBZ files. 2024-10-12T08:27:48+03:00 Realistically speaking, most webcomic authors aren't reading my twtxt feed and won't start providing CBZs overnight. I'm gonna have to scrape the image files and pack them into CBZ myself. 2024-10-12T08:39:56+03:00 Surprisingly, the scraping is going to be the easy part. And by "easy" I mean "someone else already did the hard part": <https://piperka.net> provides RSS feeds with links to every single page of a webcomic, even long-runners with thousands of pages. For example, here's the feed for Deathbulge: <https://piperka.net/s/rss/5870>. 2024-10-12T08:48:20+03:00 The "packing a bunch of image files into a .CBZ" part, which I expected to be trivial, is actually complicated. There's the question of how the software that reads CBZ files knows how to order the pages. And the answer appears to be "there is no spec, anyone can just do whatever, YOLO". 2024-10-12T09:06:01+03:00 In the case of zathura-cb, the page order is determined by the filenames of the image files inside the zip archive. Fair enough, filenames are easier to work with than something like "order of file headers inside the zip". 2024-10-12T09:11:57+03:00 But how do you compare filenames for sorting? zathura-cb does it with g_utf8_collate_key_for_filename(). Note that this function depends on the current locale. Oy vey. 2024-10-12T09:31:49+03:00 Maybe I should generate EPUBs instead. Compared to CBZs, which consist of just the image files, EPUB requires a fair bit of bureaucratic boilerplate. But in return, you can ask questions like "how are the pages ordered?" and get actual answers: <https://www.w3.org/TR/epub-33/#sec-spine-elem> 2024-10-12T09:41:25+03:00 Another point in favor of epub is that, because epub "content documents" are xhtml rather than naked image files, there's an obvious way to include textual bonus content for comics that have it. (for example, the flavor text that accompanies most pages of <https://killsixbilliondemons.com/>. 2024-10-12T11:17:30+03:00 I'm not privy to the source code of Factorio, but based on <https://factorio.com/blog/post/fff-425>, I conjecture that they might be suffering from Singleton pRNG syndrome. 2024-10-12T11:18:04+03:00 "Enemies (only) behave consistently as long as NOTHING changes. ... changing a tile, adding some ammo to the character, even adding a decorative, all [change] the result." 2024-10-12T11:18:07+03:00 What if, instead of one global, shared, stateful pRNG state, we gave every subsystem in the game its own independent pRNG? 2024-10-12T11:18:10+03:00 What if we didn't even use traditional stateful pRNGs at all, and instead generated random numbers by hashing some unique key of the particular, granular game element that needs randomization? 2024-10-12T11:25:12+03:00 "Moving an enemy, adding or removing a tree," would still affect enemy pathfinding, since these are entities that take up space and block movement. But the spurious dependency on decoratives, or whether the game is saving screenshots, would disappear. 2024-10-12T11:32:33+03:00 For enemy behavior, the key could be (game seed) + (simulation tick) + (position). This key is unique because two enemies cannot occupy the same space. It's not a stable ID, but it doesn't need to be stable, only deterministic and unique. For map decoratives, just (game seed) + (position), since they don't have time-dependent behaviors. 2024-10-12T11:46:34+03:00 "But hash functions are computationally expensive!" I hear you. BLAKE3 is pretty fast for a cryptographic hash function, but can't be as fast as something like PCG, that doesn't need to satisfy hardcore cryptographic requirements. So ... just use PCG <https://www.pcg-random.org/>. 2024-10-12T11:50:13+03:00 Published benchmarks measure 6.7 GiB/s for BLAKE3 <https://github.com/BLAKE3-team/BLAKE3> vs 52.1 GiB/s for PCG <https://www.pcg-random.org/rng-performance.html>. 2024-10-12T11:57:03+03:00 "But wait, PCG is a pRNG, didn't you say we should use hash functions instead of pRNGs?" seedable pRNGs are isomorphic to extendable-output hash functions. Proof is left as an exercise for the reader. 2024-10-12T17:35:57+03:00 (#4w3ilsa) @<movq https://www.uninformativ.de/twtxt.txt> Well, I thought about writing a "proper" announcement post, but what would I put in it other than "oh btw I'm trying twtxt now, here's a url"? An entire gemtext post that basically consists of one sentence and one link seems kind of excessive to me. 2024-10-12T18:30:43+03:00 It's the dwelling place of a forgotten god! It's a heavyweight combat mech! It's the bastard child of Baba Yaga's hut! Hakurei Jinja, deploy! <https://www.youtube.com/watch?v=eQ9hpYYE_g0> (animated music video, 2m31s) 2024-10-12T20:51:21+03:00 Dust Bunny: an anomalous little beast - small and fuzzy, and yet, not cute. It hops around erratically, shedding copious dander as it goes. 2024-10-13T05:29:04+03:00 [DONE] Report hedgehog sightings during night walk. Five total, four seemingly in fair health, one obviously afflicted and malnourished. 2024-10-14T06:21:11+03:00 Say no to cordless peripherals! Real mice have tails! (I just like not having to charge and/or swap out batteries all the time) 2024-10-14T09:37:47+03:00 Remember how we used to joke that the first thing a Windows user should do with Internet Explorer was <https://getfirefox.com>? Well, the first thing a Google Search user should search for is "ripgrep". 2024-10-14T09:48:13+03:00 ripgrep gives you search results that live on your SSD and load faster than it takes your screen to display the next frame. Google search results point to webpages that live in some datacenter halfway across the world. To actually access them you're gonna have to endure an excruciating, cross-continental network round-trip. 2024-10-14T09:55:52+03:00 Here's a picture of R. Adm. Grace Hopper holding up a one-microsecond long spool of wire: <https://ratfactor.com/cards/nanosecond>. Care to imagine how many microseconds it's take to span the entire breadth of the Atlantic ocean twice over? 2024-10-14T10:09:09+03:00 (#4w3ilsa) @<prologic https://twtxt.net/user/prologic/twtxt.txt> :waves: So it seems! I must admit that it surprised me. I did not expect to have anyone following me quite this early. But it's the nice kind of surprise :) 2024-10-14T16:31:29+03:00 > All happy families are alike; each misbegotten web page resolves the favicon url in its own way. -- Leo Tolstoy 2024-10-15T08:05:56+03:00 (#4w3ilsa) @<prologic https://twtxt.net/user/prologic/twtxt.txt> Actually, my twts from the last two days aren't showing up on <twtxt.net>, so I guess that no-one is following me and the reason my earlier twts did show up is that `yarnd` does a one-off fetch of any feed @-mentioned by a pod member. Comments in the code suggest that this is the case, see `internal/server.go`, commit `7dcec70e`, line 468. As the author of that code, can you confirm/deny? 2024-10-15T11:24:47+03:00 Kakoune macro to convert _OneTab_ export in selection to markdown: `shttps?://<ret>i(<esc>f<space>f<space>c)[<esc>gla]<esc><a-a>]dghP` 2024-10-16T09:19:29+03:00 Seen at the pond: a gathering of young mynas practicing their animal impressions. One goes "here's how you do a dove (Spilopelia senegalensis)", then everyone makes dove sounds for a few seconds. When the racket dies down, another myna goes "here's how you do a desaturated dove (Streptopelia decaocto)" and the process repeats. 2024-10-16T09:19:30+03:00 Also seen: an eyeless freak of indeterminate species. Swims in the pond and has long toes, like a duck, but lacks toe-webbings (and eyes), unlike a duck. 2024-10-20T05:24:58+03:00 (#d445wwa) With the help of a large sign listing the names of various animals next to their pictures, I've learned that the eyeless bird was a "moorhen", and that having un-webbed feet is normal for that species. 2024-10-20T05:25:07+03:00 (#d445wwa) I've also seen four other moorhen swimming around, and can verify that both of the two specimens that came close enough for me to get a good look at their faces had eyes. 2024-10-20T05:47:27+03:00 (#d2iwcwq) I'm not using anything that you would recognize as a full-featured client. I upload twts with `hut publish`, "publicise my user agent" with manual `curl` invocations (when I remember to) (thanks to @<movq https://www.uninformativ.de/twtxt.txt> for the informative guide <https://www.uninformativ.de/twtxt-mention.html>), and as for following other people's feeds, I still haven't decided how I'm going to do that. 2024-10-20T06:02:41+03:00 (#d2iwcwq) Probably going to stick to my original plan, which is to implement everything I need by hand. Becaus to me part of the appeal of twtxt is that it's simple enough for it to be feasible to roll your own implementation. 2024-10-20T06:03:00+03:00 (#d2iwcwq) the reason I'm so "unprepared" is that I didn't even know that <https://twtxt.net> existed when I started twting, didn't know about extensions to the original spec, &c. That's why e.g. my first few "yarns" (is that how we call "threads" here?) don't include a `(#subject)` -- I literally didn't know that this feature exists. 2024-10-20T06:12:56+03:00 (#olheqvq) @<aelaraji https://aelaraji.com/twtxt.txt> Always nice to see another person learning the power of `vi`s "language as a user interface" paradigm. :waves: Hello from a happy Kakoune user! 2024-10-21T08:18:10+03:00 So, uh, did anyone but me notice that the last character of a twt hash is always either an `a` or a `q`? Which is the natural consequence of taking the _last_ digit in the base32 representation of a 256-bit hash -- 256 is not evenly divisible by 5 ! That final character is made up of one bit of actual information and 4 bits of padding. 2024-10-21T09:18:17+03:00 (#bh5hvtq) Also, granting for the sake of argument that 32 bits are enough bits for a twt hash to have (are they supposed to be globally unique or per-url unique?), that "truncate the output of `b2sum -l 256` and re-encode in base32" rigmarole is a whole lot of implementation complexity just to save 1 character - `b2sum -l 32` produces perfectly serviceable 8-character base16 hashes with no further massaging of the output. 2024-10-21T11:39:49+03:00 (#bh5hvtq) Idea: instead of rfc-3339 timestamps (20-25 characters, depending on whether you include a timezone offset), use the lower 30 bits of the unix timestamp, encoded in base32 (6 characters). Interpret such "truncated" timestamps as follows: if the feed has a `# since = <rfc-3339 datetime>` metadata header, set the upper 66 bits to the lowest value that'll make the timestamp not earlier than the `since`. Otherwise, take the highest value that'll make it not later than `$NOW`. 2024-10-21T11:49:59+03:00 (#bh5hvtq) And then take advantage of "url fragments" and use those short timestamps to refer to specific twts within a feed, like so: `@<nick url#timestamp>`. You could also use a `(#timestamp)` as a twt subject, and because it's 6 characters rather than 7 a client would be able to tell that it's not supposed to be a hash. 2024-10-21T11:54:12+03:00 (#bh5hvtq) Minor drawback: having to archive your tw.txt file and start a new one every 30 years. (so you don't run out of timestamps) 2024-10-21T12:01:16+03:00 (#bh5hvtq) As a newcomer with not much knowledge of the specification's history, I guess that something like this was already proposed (and rejected, since it's not in the current standard or the extensions). But I do not know how to find records of this past discussion, so if it's not too much trouble, may I ask for a link? 2024-10-22T07:28:44+03:00 (#bh5hvtq) @<prologic https://twtxt.net/user/prologic/twtxt.txt> Thanks for the warm welcome! 2024-10-22T07:33:23+03:00 (#bh5hvtq) I finally figured out that <https://search.twtxt.net> is not the same as <https://twtxt.net/search>. The former is open to the general public, unlike the latter which is only for registered users of `twtxt.net`. Meaning that I finally have some kind of access to an archive of the aforementioned debate. 2024-10-22T07:46:03+03:00 (#bh5hvtq) It's pretty hard to follow though, with the discussion being spread out over so many threads and with the <https://search.twtxt.net> UI displaying threads in a way that's different than how <https://twtxt.net> does. 2024-10-22T07:46:23+03:00 (#bh5hvtq) @<prologic https://twtxt.net/user/prologic/twtxt.txt> _Twt Hash_ isn't location addressed, though. Calculation of the hash takes the content of a twt into account, making it content addressed. That's why it breaks threading if someone edits the first twt in the thread. 2024-10-22T09:40:05+03:00 (#bh5hvtq) @<prologic https://twtxt.net/user/prologic/twtxt.txt> With respect, a client can not identify whether an edit took place. Not unless that same client witnessed both the original twt and the edited one. This won't be the case if a person you're following is joining a thread started by people you aren't following after the first twt of that thread has already been modified. Or if you're knocked offline by a multi-hour power outage that spans then entire time window between a twt getting uploaded and modified. 2024-10-22T09:45:03+03:00 (#bh5hvtq) Speaking only for myself, I'd like threading to work in a way that lets me keep using my flaky home internet connection, rather than spend money on a VPS in some datacenter with a reliable connection. 2024-10-22T09:50:51+03:00 (#bh5hvtq) And I'd like to be able to fetch the feeds of people I don't regularly follow on an as-needed basis, instead of having to pre-emptively discover and fetch every feed in the entire network just in case they might be relevant to a thread in the near future. 2024-10-22T10:00:55+03:00 (#bh5hvtq) Oops, I've typed many words before thinking how to express the same thoughts more succintly. The TL;DR version is: attempting to detect edits from a client's perspective leads to race conditions, and trying to increase your chance to "win the race" leads to wasteful behavior. 2024-10-21T19:10:04+03:00 Shall I play _Factorio: Space Age_ on launch day? Let's go through the checklist: 2024-10-21T19:22:26+03:00 (#iojgzvq) [PASS] Software: the dev team at Wube has released the game on time, gigachads that they are. 2024-10-21T19:22:29+03:00 (#iojgzvq) [PASS] Hardware: I have a computer that (just barely) clears the game's minimum system requirements. 2024-10-21T19:22:32+03:00 (#iojgzvq) [PASS] Time: I have the entire day off. 2024-10-21T19:22:35+03:00 (#iojgzvq) [FAIL] Health: somehow I managed to hurt my ulnar nerve, and must refrain from using the mouse for a few days while my body heals. 2024-10-21T19:22:38+03:00 (#iojgzvq) Conclusion: I will not be playing _Factorio_ this week. 2024-10-27T02:58:43+02:00 (#iojgzvq) Turns out that _Factorio_ got an update two years ago that makes it playable with an X-Box controller - no need for a mouse. I could've been playing the _Space Age_ expansion on launch day despite my injury (already healed, don't worry) if only I'd bothered to check. 2024-10-27T03:12:50+02:00 You know how maps typically include a compass rose to help readers figure out where things are located in relation to each other? I want the anatomical equivalent of a compass rose for the linked drawing, because just by looking at it I can't decipher which anatomical axis (anterior-posterior vs superior-inferior) corresponds to the up-down axis of the drawing. <https://en.wikipedia.org/wiki/Uterus#/media/File:Uterus_image-Photoroom.png> 2024-10-21T19:38:21+03:00 (#d7y2eka) @<movq https://www.uninformativ.de/twtxt.txt> Sounds like we need `mmap` to have a `MAP_PRIVATE_BUT_LIKE_FOR_REAL` flag, that explicitly specifies that changes to the underlying file will _not_ be visible in the mapped region. 2024-10-27T02:23:33+02:00 (#cs3mjwa) @<prologic https://twtxt.net/user/prologic/twtxt.txt> Feeds moving or being mirrored in multiple locations don't inherently create a mess. Things only become messy when an opaque hash is added to the mix. 2024-10-27T02:37:42+02:00 (#cs3mjwa) Suppose that Alice mirrors her feed at <http://example.net/~alice/tw.txt> and <https://example.com/ugc/alice.txt>. Suppose further that Charlie and Carmen reply to one of her twt using url-and-timestamp as the subject, getting 2 different subject strings for the same twt because each one is following her on a different url. 2024-10-27T02:43:43+02:00 (#cs3mjwa) Bob, who follows alice at <http://example.net/~alice/tw.txt>, has configured his client to recognize <https://example.com/ugc/alice.txt> as an alternate source for the same feed. When he fetches Charlie and Carmen's respective feeds, his client can recognize that even though they used different subject strings, both refer to the same twt and can be displayed as a single thread. 2024-10-27T02:52:37+02:00 (#cs3mjwa) Suppose now that Dana and Damien also reply to Alice's twt, but use the _twt hash_ extension to pick their subject string. When Bob gets their replies, his client is unable to figure out that `#b795meh` and `#431barf` refer to the same twt - since hashes are one-way, Bob cannot recover the original urls from the hash and run them through his url-equivalence-checker. 2024-10-27T03:20:43+02:00 (#cukvbaq) An amusing consequence of the hash truncation misdesign: it's possible to just make up hashes for hypothetical examples and be sure that they won't collide with any real hash - just pick anything other than `q` or `a` for the last character. 2024-10-27T03:25:47+02:00 (#cukvbaq) Though actually, it's still pretty easy to create strings that look like hashes even though they can't ever be generated "legitimately". Just use `1`, `8` or `9` anywhere in the string - those digits aren't part of the base32 alphabet. 2024-10-27T03:41:26+02:00 IMHO, the original spec had it right when it said (paraphrased) "just upload your `tw.txt` file wherever". The essence of micro-blogging, as opposed to full-scale blogging, is low friction and low stakes. Imposing a norm that you can't just use any ol' url, looking down on people with insufficently cool urls (as in "Cool URIs don't change" <https://www.w3.org/Provider/Style/URI>), puts up too much of a barrier to entry. 2024-10-30T12:17:25+02:00 (gemini://asquare.srht.site/gemlog/twtxt.txt#2024-10-30T12:17:25+02:00) I was yesterday years old when I learned the correct way to use highlighter pens. 2024-10-30T12:22:58+02:00 (gemini://asquare.srht.site/gemlog/twtxt.txt#2024-10-30T12:17:25+02:00) I recount the complete story in a 573-word shortform post on my gemlog: <gemini://asquare.srht.site/gemlog/highlighter_pen.gmi> 2024-10-30T12:25:49+02:00 (gemini://asquare.srht.site/gemlog/twtxt.txt#2024-10-30T12:17:25+02:00) If you want to read the post, but aren't quite ready to install a gemini browser, it's also reachable through this gemini-to-https portal: <https://portal.mozz.us/gemini/asquare.srht.site/gemlog/highlighter_pen.gmi> 2024-10-30T12:28:31+02:00 (gemini://asquare.srht.site/gemlog/twtxt.txt#2024-10-30T12:17:25+02:00) Don't mind the non-standard twt subject. I'm using this opportunity to test what happens to extant twtxt clients when they encounter arbitrary strings in the twt subject position. 2024-10-30T12:42:17+02:00 (#b795meh) Ok, so <https://twtxt.net> does not "thread" twts with matching but otherwise completely arbitrary subject strings. What will it do with an 8-character string that starts with `#` but isn't a valid twt hash? 2024-10-30T12:42:42+02:00 (#b795meh) Time to find out! 2024-10-30T12:45:49+02:00 (#ahahaha) What if the subject is a valid twt hash, but the twt it refers to was never seen by `yarnd`? 2024-10-30T12:46:09+02:00 (#ahahaha) Will it thread? 2024-10-30T12:54:39+02:00 Oh, wow. That is a frightening level of protocol ossification. 2024-10-30T14:23:38+02:00 (#lci25ga) @<prologic https://twtxt.net/user/prologic/twtxt.txt> Protocol ossification means "loss of [...] evolvability of network protocols." (cf. Wikipedia <https://en.wikipedia.org/wiki/Protocol_ossification>). Related terms: Overfitting, Hyrum's Law <https://www.hyrumslaw.com/>. 2024-10-30T14:49:59+02:00 (#lci25ga) @<prologic https://twtxt.net/user/prologic/twtxt.txt> Sorry, I can't spare the time to write a sufficiently detailed ELI5 today. Already spent all of the time I budgeted for shortform blogging writing about highlighter pens.