Better HN
topnewbestaskshowjobs
Log inSign up

rianmcguire

16 karma · joined Oct 5, 2017 (9y ago) · 6 submissions

Submissions

1.

Bcachefs: Upstreaming, growing the team, and a funding situation update(patreon.com ↗)

28 points · by rianmcguire · 3y ago · 4 comments

comment 4y ago · link · parent

I think your reading of the code is fine - it's not entirely logical.

* Avoiding '.', but using it in the encoding doesn't make any sense, although I'm not sure there was a good reason to avoid it in the first place.

* Avoiding '_' but still using it is somewhat reasonable, because it's used as the sigil to mark the names as alt-base64 encoded.

* The alt-base64 encoding goes out of its way handle case folding (which is a real issue on Windows and macOS) - but the same issue can occur with the unencoded names too, and that's not handled.

* isDirChar permits characters that aren't valid on all platforms, like backslash on Windows.

The Preferences class was introduced in Java 1.4 according to the docs, and there's a bug report[1] referencing the encoding behaviour in the 1.4.0 release, so it's probably been like this since the initial implementation.

> P.S. A minor observation; the alphabet on the URL has a slight typo

Bad search-and-replace. Oops :)

[1] https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4696941

comment 4y ago · link · parent

Revenge of the Titans is using the java.util.prefs.Preferences class from the Java standard library.

Looking at the implementation here: https://github.com/openjdk/jdk/blob/4f607f2adac3798c16a62e90...

If the requested directory name has certain "inappropriate" characters in it, it'll encode it using Base64.byteArrayToAltBase64, which is a non-standard base64 encoding using the alphabet defined here: https://github.com/openjdk/jdk/blob/4f607f2adac3798c16a62e90...

If we decode the directory name using that alphabet: https://gchq.github.io/CyberChef/#recipe=From_Base64('!%22%2...

You can see that it was encoding the text:

  slots_1.80
Nothing to see here, other than some sloppy filename handling in Déjà Dup.

comment 5y ago · link · parent

Here's one: https://www.youtube.com/watch?v=BpNP9b3aIfY

comment 6y ago · link · parent

rss2email: https://github.com/rss2email/rss2email

Prior to that I was using Miniflux, but I wanted to apply some filters to a particular feed and I realised that I already had a tool with advanced features for filtering and organising short messages with a subject and body: email.

comment 8y ago · link · parent

I've got an X270 with the extended battery. Running Linux, it lasts over 20 hours with light use. It weighs less than the 15" MBP I had previously.