Swift

Raspberry Pi & PHP & Swift

I may have mentioned in previous posts that I’m working on a PHP port of my MonoPi and jsRPi frameworks for the Raspberry.  The project is WELL underway and a great deal of progress has been made. The core and some of the extensions are already done and I’m now beginning work on the “Components” and “Devices” portions of the framework.  Also, I just read a really interesting article about getting Apple’s Swift compiler running on the Raspberry Pi 2 (will also work on the Pi 3).  I’ve been wanting to try out Swift for a while now but none of my Macs are new enough to run new enough versions of XCode to get the Swift toolchain.  However, Apple recently open-sourced Swift, and luckily plenty of people have already gotten to work porting it to other platforms such as Linux and now there is a working port for the ARM7 architecture under Linux.

This pleases me.

One of the things the article mentions is a need for libraries that allow access to Raspberry Pi hardware such as GPIOs….

Well… As you can imagine, this is a bit like the perfect storm for me.  I get to learn and code in Swift *and* port my framework to Swift at the same time. Boom. So now how am I going to go about this?  Well since I can’t really use my Mac for the dev work, I *can* use my PC running Linux and thankfully this fella built an Atom addon for Swift dev and debug that I can use for exactly that. I am so excited I can barely stand it.  Now I gotta hurry up and get this damn PHP port done so I can start on it.

 

UPDATE: Turns out you can do unit testing in Swift under Linux too.  Apparently, Apple also open-sourced XCTest.

Wednesday, April 6th, 2016 Hardware, PHP, Programming, Raspberry Pi, Swift No Comments