Swift for Linux, on a Mac

This is what a computer linux hacker looks like

This is what a computer linux hacker looks like.

I’ve been working with Swift for Linux, as part of a bunch of teaching material, as well as some conference talks that we’re working on. It’s not super easy to figure out, from searching, the best way to install Swift and Linux, if you’re a Mac user who wants to have a go with it. Here’s what I’ve found.

As it turns out, after extensive research, my feeling is that the best way to run Swift on Linux (on a Mac) is using Vagrant and VirtualBox. I’ve looked at a variety of options, including setting it up manually in a VM, using Docker for Mac, and so on, but this turned out to be the easiest way to do it, and maintain it.

To get Swift on Linux running, on your Mac:

  1. Download and install VirtualBox.
  2. Download and install Vagrant.
  3. Make sure you have Git installed, and clone the following repository: https://github.com/IBM-Swift/vagrant-ubuntu-swift-dev.git
  4. Once you’ve cloned the repository, change directory into it: vagrant-ubuntu-swift-dev
  5. Run the command: vagrant up
  6. Wait. The vagrantfile included in the repository you cloned, which tells Vagrant what to do, downloads Ubuntu 15.10, the Swift prerequisites, the prerequisites for libdispatch, the Swift concurrency library, the Sphinx documentation system, and then clones the Swift repository and creates a script that allows you to build Swift. (This might take a while, and will download a few gigabytes of stuff.)
  7. Once Vagrant is done, you can run the following command to connect to the Linux installation: vagrant ssh
  8. Then, once in Linux, run the following script to build Swift: /vagrant/swift-dev/swift/utils/build-script (This might also take a while, depending on the speed/capabilities of your computer.)
  9. You can then run the following command to verify Swift is up and running: swift –version
  10. You can then create some .swift files, and compile them with the swiftc command.

Easy! Hope that was helpful to someone.

Building Swift Applications

We’re running online Swift programming training with our publisher, O’Reilly Media, in a week or two (July 20 and 21, US West Coast time). You can learn more and register over on the O’Reilly website. We’re really excited! Attendees will all receive an electronic copy of our new Swift programming book, Learning Swift.Building Swift Applications

/dev/world/2016

/dev/world/2016 tickets are now on sale! /dev/world is a fabulous iOS and OS X (and associated ecosystem) developer conference that played no small part in kickstarting many parts of my career, and for the last few years I’ve been helping to organise the event.

/dev/world/2016 runs in Melbourne on August 29-31, 2016. The conference covers developing on and for iOS and OS X, using Swift to Objective-C, and everything in between. We’re selling our best-priced early bird tickets right now over at devworld.com.au

We’ll be announcing more and more sessions, workshops, and feature presentations over the coming week. I’d love to see you in Melbourne! Let me know if you have any questions, or would like to sponsor the event.

/dev/world/2016

Online Swift Training + Book

Learning SwiftWe’re running iOS Development with Swift (programming) training online for O’Reilly Media in July. Registration is now open, and we’d love to have you aboard! Over two days, we’ll take you from no Swift to enough Swift for iOS apps, and an understanding of how to use the iOS frameworks. You can learn more, or register on the O’Reilly website. Attendees of the online training also receive a copy of new book, Learning Swift.

If you just want a discounted copy of our latest book, Learning Swift, you can currently buy the ebook at 50% off through O’Reilly’s Swift sale! Use the code WKLSWFT (works until 5 AM San Francisco time, on June 11).

IA Summit 2016: How Do I Game Design?

At the beginning of May, Jon and I visited Atlanta, Georgia, for IA Summit 2016. This is the second time we’ve attended at the IA Summit: last time was in 2012, in New Orleans. This year, we presented the latest iteration of our game design talk, “How Do I Game Design?”. Games!

As promised during our talk, here’s links to a couple of the things we talked about:

A video of an earlier version of this talk was captured at OSCON 2015, and you can find it on YouTube. You can also find the slides from the IA Summit 2016 version on Speaker Deck.

Game Night at IA Summit 2016I really enjoyed our second visit to the IA Summit, and definitely hope to come back next year! A particular highlight of the conference was the games night, which is quite unique to the IA Summit –– I love it! Highlights from the talks include:

  • Léonie Watson’s keynote about accessibility and inclusion, which featured a slide deck composed of movie quotes.
  • Lisa Welshman’s keynote on how design can impact real human beings.
  • Jesse James Garrett’s 7-in-1 closing keynote on… well, everything the IA industry needs to know?
  • Dan Ramadan’s talk on “Taxonomies, Tags, and Trajectories at the BBC”
  • Jorge Arango’s talk on “Placemaking Lessons from the Magic Kingdom”
  • Stephen Anderson’s talk on “How To Design A Concept Model”

… but everything I attended was amazing. There’s lots of great photos of the event, not taken by me, online here. Thanks to the organisers, volunteers, speakers, and attendees for putting on an amazing event!

IA Summit 2016 was one of the most diverse-feeling, inclusive conferences I’ve ever been to, and the community –– while, as game designers, we only really sit on the intersection of it and many other communities –– is incredibly welcoming and friendly.

Atlanta was also an amazingly friendly city, with a lot of interesting attracting (oh my, go and visit the Georgia Aquarium!) I’m looking forward to getting an opportunity to revisit it in the future! I’m also really looking forward to venturing to Vancouver, for IA Summit 2017.

Melbourne iOS Developer Training

We’ll be running our fantastic 2-day iOS developer training in Melbourne next month! Join us on the 2nd and 3rd of May, and learn all you need to know for iOS development. Only a few tickets left! Everyone gets an electronic copy of our new  book, Learning SwiftEmail me if you have any questions.

Secret Lab Developer Training

iOS Developer Training in Melbourne

Secret Lab Developer TrainingHello! We’re running our famous iOS Developer Training again in Melbourne, on May 2 and May 3 this year. We’ll be teaching the latest iOS app development techniques, with Swift. We’re taking expressions of interest, which require no commitment, and will get you a discount code for when registrations actually open! If you have any questions, feel free to email me. Check it, and register your interest, over at the Secret Lab site: http://www.secretlab.com.au/training/ios-mel-2016

Swift is open source!

… and I’ll have more to say on that topic soon! In the mean time:Learning Swift

More soon!