pleroma.debian.social

pleroma.debian.social

Jonathan Dowland | @jmtd@pleroma.debian.social

Principal Software Engineer on #OpenJDK #RedHat. #Debian developer (dormant). Computer Science PhD student. Amateur Computing historian (Computer Science and H/W, esp. Commodore Amiga). Guerilla archivist.

Here is a template. If you follow this template for your binary file format's magic number, you will be doing it better than a depressingly large number of senior software engineers.

First eight bytes of the file:

0xDC 0xDF X X x x (0x01 0x00 | 0x00 0x01)

0xDC 0xDF are bytes with the high bit set. Together with the next two bytes, they form a four-byte sequence that cannot appear in any valid ASCII, UTF-8, Corrected UTF-8, or UTF-16 (regardless of endianness) text document. This is not a perfectly bulletproof declaration that the file does not contain text, but it should be strong enough except maybe for formats like PDF that can't decide if they're structured text or binary.

X X x x: Four ASCII alphanumeric characters naming your file format. Make them clearly related to your recommended file name extension. I'm giving you four characters because we're running out of three-letter acronyms. If you don't need four characters, pad at the end with 0x1A (aka ^Z).

The first two of these (the uppercase Xes) must not have their high bits set, lest the "this is not text" declaration be weakened. For the other two (lowercase xes), use of ASCII alphanumerics is just a strong recommendation.

0x01 0x00 or 0x00 0x01: This is to be understood as a 16-bit unsigned integer in your choice of little- or big-endian order. It serves three functions. In descending order of importance:

  1. It includes a zero byte, reinforcing the declaration that this is not a text file.

  2. It demonstrates which byte ordering will be used throughout the file. It does not matter which order you choose, but you need to consciously choose either big- or little-endian and then use that byte order consistently throughout the file. Yes, I have seen cases where people didn't do that.

  3. It's an escape hatch. If one day you discover that you need to alter the structure of the rest of the file in a totally incompatible way, and yet it is still meaningfully the same format, so you don't want to change the name characters, you can change the 0x01 to 0x02. We both hope that day will never come, but we both know it might.

I can hardly believe it’s been a decade since Pratchett died. I might start a partial re-read of discworld.

@Mycroft @NanoRaptor isn’t that a skinny puppy song?

I might have a White Goth T Shirt problem
A collection of white goth tee shirts

@GyrosGeier @cstross @MishaVanMollusq I don't know if Hamilton has any connection to the localities connected by the (real) A1(M), but when "The Great North Road" came out he did a double-act signing tour with Stephen Baxter, who (probably coincidentally) does.

@GyrosGeier @cstross @MishaVanMollusq I’m utterly convinced that book references the A1(M) deliberately.

The PineNote is here! I'm planning on making a hands on video to share my experience. Let me know if you have any questions you want me to try and answer. I don't plan to do technical tests but open to collaborating on it.

First impression, feels like a quality and sturdy device. Feels good in the hand, the texture is a kinda soft grippy plastic. Pen felt good, the writing friction seems ok, I don't want to make any software qualifications until I update the device but still happy with the out-of-box experience. The wake from sleep time is essentially instant.

@PINE64 great work on the PineNote, I'm very impressed with the hardware!

Edit 2: there's renewed interest in this post, feel free to check out the first impressions video (~6 mins, which has a good bit of usage footage), in case that post isn't visible to you.

Edit: Link to blog post with thoughts after day one. Since I'm on a single user instance most people may not see the thread with info that hasn't been boosted, the post has all of it.

#Pine64 #PineNote #OpenHardware #OpenHardware #FOSS

A PineNote e-ink tablet with a pen on it is placed on a black mat with white grids along a collection of various coins down the side for a size comparison. The coins are (top to bottom):
Canadian 2 dollars
Mexican 10 pesos
Japanese 500 ten
UK 1 pound
US 25 cents

@purpleidea does that component still use bugzilla? I thought everything moved to JIRA

When I submit this thesis I’m going to need to remember how to relax again

@mirabilos For the Moon project, IDK. I might prefer not to rule myself out ;) Also, did it actually land in the end? I can't recall

Pleased to discover the Journal of Functional Programming has an rss (or atom) feed https://www.cambridge.org/core/journals/journal-of-functional-programming

Must remember to add “my code is on the Moon and Mars” to my CV

Got a problem on my VPS where the https logs are suddenly much larger. Without looking I’m pretty sure what the culprit is

correct answer might be "stop procrastinating"

can anyone recommend me some good FOSS/tech-related mailing lists to subscribe to?

@inthehands while you’re sleeping, your Tesla on autopilot will go and collect refugees from the Mexican border and transport them to safety in the US

The new-ish Bitwarden UX is so much worse than it used to be. Argh

the RNG gods have looked down on me favourably. Got two exotics in the current expedition so far #nomanssky

@chrisamaphone I’m 30% through it atm

My Fediverse instance was down over the weekend, I'm glad it's back! A good reminder to back up my data.

»