Wire Support For Swift, Part 1
This post was published externally on Cash App Code Blog. Read it at https://code.cash.app/wire-support-for-swift-part-1.
This post was published externally on Cash App Code Blog. Read it at https://code.cash.app/wire-support-for-swift-part-1.
We’ll get to the shrinking, but first let’s motivate the binary in question. Three years ago I wrote the “Surfacing Hidden Change to Pull Requests” post which covered pushing important stats and diffs into PRs as a comment. This avoids surprises with changes that affect binary size, manifests, and dependency trees. Showing dependency trees used…
How many times does the name of a layout file appear in an Android APK? We can build a minimal APK with a single layout file to count the occurrences empirically. Building an Android app with Gradle requires only one thing: an AndroidManifest.xml file with a package. From there we can add a dummy layout…
Command-line programs use color to convey additional information and to look pretty. For example, compare the output of ls with and without the –color flag: The color helps convey information in this compact output that would otherwise only be available in more verbose forms (-l). In addition to color, a program may update existing output.…
I use Docker to run a lot of tools. With the tools all wrapped up in containers, my computers are free of Python and Go and the various other dependencies needed for their use. While this is a nice win for isolation and reproducibility, the user experience is sub-par. To run a tool, I just…
I recently played a minor role in helping add Cast support to an Android app. Both the Android app and Cast display are written in Kotlin. The Android Cast SDK relays JSON strings to the JavaScript SDK which invokes your callback with the deserialized equivalent as a JS object. A multiplatform library holds the model…
I’ve been porting the AndroidX collection library to Kotlin multiplatform to experiment with binary compatibility, performance, tooling, and the different memory models. Some of the data structures in the library use array-based binary trees to store elements. The Java code has a lot of shifts to replace power-of-two multiplications and divides. When ported to Kotlin,…
Note: This post is part of a series on D8 and R8, Android’s new dexer and optimizer, respectively. For an intro to D8 read “Android’s Java 8 support”. For an intro to R8 read “R8 Optimization: Staticization”. Lambda usage in Kotlin feels more pervasive than Java because of the functional nature of the Kotlin standard…
Last year I built a library called Picnic for rendering data tables in monospaced environments like your terminal. Part of rendering the table is calculating what character to use for each wall and each corner separating the cells. Here’s a representative output with a bunch of different corner styles: │ compressed │ uncompressed ├───────────┬───────────┬───────┼───────────┬───────────┬──────── APK…
In 2010 I built a home server with five 2TB drives. It ran Solaris and ZFS for the redundancy and data checksumming to ensure no data could be lost or corrupted. Just 16 months later five 3TB drives were added to the pool. This computer took the 2600-mile trip to live in San Francisco with…