Swift is now opensource, and it’s interesting to see Craig Federighi talk about it. This is Apple doing right, considering FaceTime is long overdue to being an open standard. People are nitpicking on Apple’s Open Source tagline, but really, this is akin to nitpicking on Mark Zuckerberg donating 99% of his Facebook stock to his new limited liability corporation charity (key: don’t look a gift horse in the mouth).
Apple has chosen to put Swift on Github, and they’ve ensured that it wasn’t just an initial commit, but you’re seeing a lot of history. And it’s the right choice clearly, for engagement — 1,275 watching, 18,884 stars, 2,139 forks, 51 pull requests currently, but most interestingly a lot of accepted code. Even simple things along the lines of “fixing typos” (see commits, eg. d029f7e5ae84cf8f6c12907f9ed0ac0a694881aa, e8b06575d26a684f415af95143ec576a6aa5168d, etc.).
Swift has open source documentation — like all good open source projects are supposed to have. They use Sphinx and its in the source tree. This is something I’d wish to see from MySQL (docs copyright Oracle, online, but you can take it offline too via PDF) or MariaDB (friendly licensed Knowledge Base), but so far only Percona Server has gotten this right.
But besides just the documentation and contribution pages, I learned something new from one commit in particular — the existence of nproc, part of coreutils. I immediately hopped onto IRC to chat with Nirbhay (our resident MariaDB Galera Cluster expert), because in scripts/wsrep_sst_xtrabackup.sh, we do this via a get_proc() function. We should be focusing on modernising/standardising our codebase, shouldn’t we?
There is a lot we at MariaDB Corporation and the MariaDB Foundation can learn from Swift being opensource and how Apple deals with the community at large. Here’s hoping we get the best practices from it and implement it in due time.