{"id":3137,"date":"2015-12-06T08:04:22","date_gmt":"2015-12-06T13:04:22","guid":{"rendered":"http:\/\/www.bytebot.net\/blog\/?p=3137"},"modified":"2015-12-06T08:04:22","modified_gmt":"2015-12-06T13:04:22","slug":"learnings-from-swift-becoming-opensource","status":"publish","type":"post","link":"https:\/\/www.bytebot.net\/blog\/archives\/2015\/12\/06\/learnings-from-swift-becoming-opensource","title":{"rendered":"Learnings from Swift becoming opensource"},"content":{"rendered":"<p><a href=\"https:\/\/swift.org\/\">Swift<\/a> is now <a href=\"https:\/\/developer.apple.com\/swift\/blog\/?id=34\">opensource<\/a>, and it&#8217;s interesting to see Craig Federighi <a href=\"http:\/\/arstechnica.com\/apple\/2015\/12\/craig-federighi-talks-open-source-swift-and-whats-coming-in-version-3-0\/\">talk about it<\/a>. This is Apple doing right, considering FaceTime is <a href=\"https:\/\/www.bytebot.net\/blog\/archives\/2012\/11\/29\/facetime-long-overdue-to-be-an-open-standard\">long overdue<\/a> to being an open standard. People are nitpicking on Apple\u2019s Open Source <a href=\"https:\/\/developer.apple.com\/opensource\/\">tagline<\/a>, 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\u2019t look a gift horse in the mouth).<\/p>\n<p>Apple has chosen to put <a href=\"https:\/\/github.com\/apple\/swift\/\">Swift<\/a> on Github, and they\u2019ve ensured that it wasn\u2019t just an initial commit, but you\u2019re seeing a lot of history. And it\u2019s the right choice clearly, for engagement \u2013 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 \u201cfixing typos\u201d (see <a href=\"https:\/\/github.com\/apple\/swift\/commits\/master\">commits<\/a>, eg.\u00a0<a href=\"https:\/\/github.com\/apple\/swift\/commit\/d029f7e5ae84cf8f6c12907f9ed0ac0a694881aa\">d029f7e5ae84cf8f6c12907f9ed0ac0a694881aa<\/a>, <a href=\"https:\/\/github.com\/apple\/swift\/commit\/e8b06575d26a684f415af95143ec576a6aa5168d\">e8b06575d26a684f415af95143ec576a6aa5168d<\/a>, etc.).\u00a0<\/p>\n<p>Swift has open source <a href=\"https:\/\/github.com\/apple\/swift\/tree\/master\/docs\">documentation<\/a> \u2013 like all good open source projects are supposed to have. They use <a href=\"http:\/\/sphinx-doc.org\/\">Sphinx<\/a>\u00a0and its in the source tree. This is something I\u2019d wish to see from MySQL (docs copyright Oracle, <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/\">online<\/a>, but you can take it offline too via PDF) or MariaDB (friendly licensed <a href=\"https:\/\/mariadb.com\/kb\/en\/\">Knowledge Base<\/a>), but so far only Percona Server has gotten this <a href=\"https:\/\/github.com\/percona\/percona-server\/tree\/5.6\/doc\/source\">right<\/a>.<\/p>\n<p>What else did Swift do right? Focus on user contributions \u2013 the <a href=\"https:\/\/swift.org\/contributing\">Contributing<\/a> page is a breath of fresh air. And don\u2019t forget the <a href=\"https:\/\/swift.org\/community\/#code-of-conduct\">code of conduct<\/a> for participating in the project.<\/p>\n<p>But besides just the documentation and contribution pages, I learned something new from one <a href=\"https:\/\/github.com\/apple\/swift\/commit\/f4c341275b103a6baf7aa8d31c199a05b3d3b0bc\">commit<\/a> in particular \u2013 the existence of <a href=\"https:\/\/www.gnu.org\/software\/coreutils\/manual\/html_node\/nproc-invocation.html\"><tt>nproc<\/tt><\/a>, part of <tt>coreutils<\/tt>. I immediately hopped onto IRC to chat with <a href=\"https:\/\/twitter.com\/nirbhay_c\">Nirbhay<\/a> (our resident\u00a0MariaDB Galera Cluster expert), because in <tt>scripts\/wsrep_sst_xtrabackup.sh<\/tt>, we do this via a <tt>get_proc()<\/tt> function. We should be focusing on modernising\/standardising our codebase, shouldn\u2019t we?<\/p>\n<p>There is a lot we at\u00a0<a href=\"https:\/\/mariadb.com\/\">MariaDB Corporation<\/a> and the\u00a0<a href=\"https:\/\/mariadb.org\/\">MariaDB Foundation<\/a> can learn from Swift being opensource and how Apple deals with the community at large. Here\u2019s hoping we get the best practices from it and implement it in due time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Swift is now opensource, and it&#8217;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\u2019s Open Source tagline, but really, this is akin to nitpicking on Mark Zuckerberg donating 99% of his Facebook stock to his [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1064,23,1503],"tags":[147,1052,1775,1774,283,1376,1773],"class_list":["post-3137","post","type-post","status-publish","format-standard","hentry","category-mariadb-databases","category-mysql","category-tech","tag-apple","tag-mariadb","tag-mysql","tag-nproc","tag-opensource","tag-percona-server","tag-swift"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p4vJD-OB","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"amp_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/3137","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/comments?post=3137"}],"version-history":[{"count":1,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/3137\/revisions"}],"predecessor-version":[{"id":3138,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/3137\/revisions\/3138"}],"wp:attachment":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/media?parent=3137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/categories?post=3137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/tags?post=3137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}