Grapheme Clusters

One of the things that made Python 2 to 3 upgrades complicated was the new design about how unicode strings should be handled. They caused untold breakage for better unicode - and after all of that dust had settled - you still have len("๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ") is 7 instead of 1. Why did that happen? Just using naive len calls in different programming languages will inform you it has a “length” of:
Read more

Installing Debian on Oracle Cloud Ampere Altra VMs

At the time of writing, Oracle Cloud have a highly generous ‘always free’ tier that includes 4 Ampere Altra vCPUs (the same ARM Neoverse N1 core used in Graviton 2), 24 GB RAM, 200GB block device, and 2x IPv4 addresses. It can be used to create one large VM or 4x small ones. The only available aarch64 templates are for Enterprise Linux distros (Oracle Linux or CentOS). However it is possible to convert a running VM from CentOS to Debian.
Read more

Why not ZFS

ZFS is a hybrid filesystem and volume manager system that is quite popular recently but has some important and unexpected problems. It has many good features, which are probably why it is used: snapshots (with send/receive suppport), checksumming, RAID of some kind (with scrubbing support), deduplication, compression, and encryption. But ZFS also has a lot of downsides. It is not the only way to achieve those features on Linux, and there are better alternatives.
Read more

Hg vs Git

I spent easily 10 000 hours using Mercurial over nearly 10 years. I was, and still am, a huge Hg fan. I switched to Git quite late (some time in 2018) and converted all projects, both home+work, cold turkey. I recently revisited an old Hg project. It was really nostalgic. Hg is easier to use and TortoiseHg is the best GUI for SCM bar none. But Git is simpler. The simplicity is a mind-opener.
Read more

Age of Empires II on Android

Possible methods: Windows version (RDP/Splashtop/Steam Link) Doesn’t really count Windows version (Wine/Exagear) Aoe2 seems to work in exagear, controls are surprisingly good, crashes after a while Nintendo DS version This is a turn-based game like Civ that happens to have the same name, doesn’t really count Playstation 2 version Ps2 core on retroarch android. Somehow worse than emulating the Windows version dont ask me why the buttons default to ABXY instead of the square/circle/triangle though
Read more

Specialized compressors

To compress bin/cue more efficently, prepass with unecm. To compress multiple similar .zip/.iso files more efficiently (e.g. Cyanogen / Windows operating system images), prepass with precomp, then deduplicate+compress with zpaq. Or, prepass with precomp, deduplicate with srep, and finally compress with xz/7z.

On Allocators, Databases, Filesystems, mmap, and flat memory spaces

PART ONE Allocators, databases, and filesystems have one major feature in commmon: they all allow storing arbitrary-sized data within a larger region, and retrieving it by some identifier. The particulars of the region management are largely hidden from the caller. On top of this basic ability, some layers of indirection can be added. Filesystems add support for fragmentation. Databases diverge on this topic; they might fragment for dynamic row formats, but not for fixed.
Read more

Block check latency

When implementing a backup system we may need the client to ask the server if it already has a certain block. There are several ways we can implement this in order to reduce latency impacts; Option 1 Client sends block hash to server Server replies Y/N High latency impact Option 2 Server sends client a list of all block hashes on server Client is then free to stream in new blocks as fast as it can No latency impact Sensitive data release?
Read more

Sevens and Queens

Sevens and Queens is a variation on the card game Hearts. Instead of any heart being worth one point and the Queen of Spades being worth 13: all sevens are worth one point, and all queens are worth two points. All other rules (passing, shooting the moon, no points cards on the first turn etc) are retained. Variations: “Sevens, 11’s and queens”: Variation for six players using a six-handed-500 deck.
Read more

Tichu

Updated 2017-09-13 100 points per round (4 5’s worth 5 each, 4 10’s worth 10 each, 4 kings worth 10 each, + 25 dragon - 25 phoenix) combinations: single - pair - stairs - triple - straight (5+, any suits) - full house - bombs {{ quads - straight flush (5+) }} red joker - Phoenix Worth 0.5 more than the top card Wild (except in bombs) BUT it’s worth -25 in the pile.
Read more