Search
123 results for “simontatham”
-
For those who want some of the geeky details and links:
I found this web page describing the _in-memory_ format of an Amiga keymap, in the form of a struct definition containing pointers to sub-tables: https://wiki.amigaos.net/wiki/Keymap_Library#Details_of_the_Keymap_Structure
The on-disk format wraps up that in-memory data layout into the same file format used by Amiga executables, containing a code hunk for the struct itself and its subsidiary tables, and a relocation hunk to fix up the internal pointers between those objects once the OS has decided where to load it. So I needed the format of the Amiga Hunk object/executable format too: http://amiga-dev.wikidot.com/file-format:hunk
But comparing those against existing keymap files, there was a missing piece. The 'struct KeyMap' described in the first page started 14 bytes after the beginning of the code hunk. What's in those first 14 bytes?
I found the answer in that Scala keymap editor that I hadn't been able to build. Regardless of that, it was helpful anyway, because reading its source code told me that those 14 bytes are a linked-list node + metadata structure, containing zeroed-out 'pred' and 'succ' fields which I assume are filled in by the OS after loading into memory, and more importantly, a pointer to a NUL-terminated string _naming_ the keymap, which of course I needed to edit so that my new keymap had its own distinct name. https://github.com/weiju/fatma/blob/063185672474114c67a0505fc87a98193522d783/src/main/scala/org/dmpp/os/devices/KeymapWriter.scala#L198
I didn't end up needing to write my own software tool to decode and encode keymap files (though it probably wouldn't have been too hard, given all that). The changes I wanted to make to the 'gb' keymap were small enough that I could just tweak the tables by hand with a hex editor. Changing the keymap name was the hardest part, because it changed the length of the hunks in the file, but still easy enough to do by hand for a one-off.
Previous thread in which I describe bugs in Linux AFFS support and fixes I submitted to adflib and the Linux kernel: https://hachyderm.io/@simontatham/114040807878945101
-
@simontatham I find endoflife.date extremely useful for such information, it has almost all projects (and some hardware like smartphones too) and one can guess most URLs:
-
@simontatham I find endoflife.date extremely useful for such information, it has almost all projects (and some hardware like smartphones too) and one can guess most URLs:
-
@simontatham I find endoflife.date extremely useful for such information, it has almost all projects (and some hardware like smartphones too) and one can guess most URLs:
-
@simontatham I find endoflife.date extremely useful for such information, it has almost all projects (and some hardware like smartphones too) and one can guess most URLs:
-
@simontatham I find endoflife.date extremely useful for such information, it has almost all projects (and some hardware like smartphones too) and one can guess most URLs:
-
@simontatham The more mail you answer, the more mail you get. The lesson is...
Anyway, I saw the below quote 10+ years ago and created my own motivational poster out of it, to look at whenever I felt I was sinking into my inbox. It helped put things into perspective.
-
This from Larry Wall (of Perl fame) seems relevant...
The Three Virtues [Paraphrased]
1) #Laziness - The quality that makes you go to great effort to reduce overall energy expenditure.
2) #Impatience - Because you are impatient, you will build systems and shortcuts for your daily work.
3) #Hubris - You have the confidence that you can do better than the status quo.
-
This from Larry Wall (of Perl fame) seems relevant...
The Three Virtues [Paraphrased]
1) #Laziness - The quality that makes you go to great effort to reduce overall energy expenditure.
2) #Impatience - Because you are impatient, you will build systems and shortcuts for your daily work.
3) #Hubris - You have the confidence that you can do better than the status quo.
-
@simontatham It also implies the existence of mantleutils and crustutils. #GeologyJoke #GeekJoke
-
@simontatham greatness averted, we could have had #derive #async_trait #strum #tokio #command #cfg #serde
-
@simontatham greatness averted, we could have had #derive #async_trait #strum #tokio #command #cfg #serde
-
@simontatham greatness averted, we could have had #derive #async_trait #strum #tokio #command #cfg #serde
-
@simontatham greatness averted, we could have had #derive #async_trait #strum #tokio #command #cfg #serde
-
@simontatham greatness averted, we could have had #derive #async_trait #strum #tokio #command #cfg #serde
-
CW: spoiler for a more interesting answer
@simontatham this works in the opposite direction too, so you can convert Gray code to binary with
value ^= (value>>16)
value ^= (value>>8)
value ^= (value>>4)
value ^= (value>>2)
value ^= (value>>1)
The procedure as usually described uses a 32-iteration for loop for that. -
@simontatham
(and yes, I grabbed a quick set of unicode emoji/symbol ranges and wrote a #Python script that expanded them all to their individual code-points, iterated over them checking if 0x20 was set and if not-0x20 was also among the code-points; and if so, emitted the unicodedata.name() of both characters for quick evaluation) 🤓 -
@simontatham This doesn't quite scan:
The square root of 2 is irrational
Say teachers both local and national
If it's v over u,
Square and count powers of two,
They're different but can't be so dash it all! -
@simontatham @ajlanes @VoquiLeibbrandt Thnx - great tool, compiled here out of the box.
BTW: I don't mind you showing off a little if something like #putty or #tweak is the result 😏
btrees are indeed useful - I learned about them when programming efficient data access using C-ISAM many years ago. -