TIL about Conflict-free replicated data type. There’s Swift implementation CRDT.

Read how to add tag-based navigation to site on Jekyll: Adding and Displaying Tags on Jekyll Posts.

TIL difference between categories and tags in Jekyll.

Read Adding post tagging to jekyll’s Minima theme. Ended up copying a lot from this Jekyll install. But not yet tagging. Will finish tagging soon.

Since working on PR [stdlib] Add to Unsafe[Mutable]RawBufferPointer implementation of _custom[Last]IndexOfEquatableElement I am thinking that fix width integer types in Swift miss initializer repeating byte. It’s quite common operation in bit twiddling. And one has to write something like

let mask = UInt64(0x7f7f_7f7f_7f7f_7f7f)

or

var mask = UInt64(0)
withUnsafeMutableBytes(of: &mask) {
    _ = $0.initializeMemory(as: UInt8.self, repeating: 0x7f)
}

Both compile into one or two assembly instructions when optimization is tirned on. Latter is more condenced but likely to make mistake at quite long literal. Former is longer to write. Former works for any fixed width integer type and the only way to write generic code.

Would be so nice to have initiliser like let mask = UInt64(repeatingByte byte: 0x7f7f) for byte both UInt8 and Int8. This could be nice short Swift evolution proposal.