rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Swift Programing language on Raspberry Pi

Mon Aug 18, 2014 2:11 am

What do you the Raspberry Pi community think of Swift and do you think it will ever be available for the Raspberry Pi? If you don't know what swift is check it out. https://developer.apple.com/swift/
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

glossywhite
Posts: 129
Joined: Sun Nov 03, 2013 8:05 pm

Re: Swift Programing language on Raspberry Pi

Mon Aug 18, 2014 3:16 am

#1 Swift is great

#2 I very much doubt it - why would Apple do that?

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: Swift Programing language on Raspberry Pi

Mon Aug 18, 2014 2:31 pm

rpiswag wrote:If you don't know what swift is check it out. https://developer.apple.com/swift/
...which says "Swift is an innovative new programming language for Cocoa and Cocoa Touch." and obviously they're Apple-exclusive technologies.
However that page also says Swift uses LLVM, which is an open-source compiler, so I guess in theory there's no reason it couldn't run on the Pi, as long as you removed all the bits that talk to Apple-exclusive APIs...

glossywhite
Posts: 129
Joined: Sun Nov 03, 2013 8:05 pm

Re: Swift Programing language on Raspberry Pi

Mon Aug 18, 2014 3:09 pm

AndrewS wrote:
rpiswag wrote:If you don't know what swift is check it out. https://developer.apple.com/swift/
...which says "Swift is an innovative new programming language for Cocoa and Cocoa Touch." and obviously they're Apple-exclusive technologies.
However that page also says Swift uses LLVM, which is an open-source compiler, so I guess in theory there's no reason it couldn't run on the Pi, as long as you removed all the bits that talk to Apple-exclusive APIs...
Xcode (and therefore, Swift) only works on Mac OS X, as its aim is to help devs to write iOS & Mac apps quicker and more efficiently. Unless someone has a way of getting Mavericks and/or Yosemite running on a Pi, I'd just forget about it completely. Apple are in business to make money, and money partially comes from people writing apps, which is sped up dramatically by coding in Swift. There is NO incentive for them to port it to anything outside Apple products, but that doesn't mean that some amazing person won't get part of it working on a Pi as "proof of concept", but the concept would need a decent reason to exist, I'd imagine.

interestedindividual
Posts: 23
Joined: Tue Jun 25, 2013 7:56 am

Re: Swift Programing language on Raspberry Pi

Tue Jun 09, 2015 2:59 pm

Following the latest announcement from apple it looks like swift IS set to come to linux and so probably will land on the raspberry pi later this year!

mikerr
Posts: 2789
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Swift Programing language on Raspberry Pi

Tue Jun 09, 2015 3:16 pm

Swift will apparently be open-sourced later this year, so watch this space.
https://developer.apple.com/swift/blog/?id=29
Android app - Raspi Card Imager - download and image SD cards - No PC required !

rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Re: Swift Programing language on Raspberry Pi

Tue Jun 09, 2015 7:01 pm

Yay!!!!!! :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: Swift Programing language on Raspberry Pi

Tue Jun 09, 2015 10:09 pm

Take the raspberry off your wall and put up an apple. Then sell all of your RPis and buy a Mac. That will allow you to use Swift as much as you want.
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

Heater
Posts: 13908
Joined: Tue Jul 17, 2012 3:02 pm

Re: Swift Programing language on Raspberry Pi

Tue Jun 09, 2015 10:11 pm

Great stuff. Always good to have yet another programming language we can have "language war" debates about.
Memory in C++ is a leaky abstraction .

rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Re: Swift Programing language on Raspberry Pi

Wed Jun 10, 2015 3:31 am

Ok! I love Python 3 because it colour codes your code for your which helps people like me to make understanding code much easier.
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

adlambert

Re: Swift Programing language on Raspberry Pi

Wed Jun 10, 2015 6:43 am

Yes, Apple are open sourcing Swift so it won't be too long before it's on Linux and hopefully subsequently to ARM and the Pi.

It's not just available on Apple, it's already been implemented on Windows where you can target .net or other if you prefer. All for free, installs inside Microsoft VS 2013 Community edition (also free).

http://elementscompiler.com/elements/silver/

I try a lot of languages, but always finding myself going back to my comfortable old jacket C / C++. However, Swift as a cross platform language could tempt me away.

adlambert

Re: Swift Programing language on Raspberry Pi

Wed Jun 10, 2015 6:47 am

rpiswag wrote:Ok! I love Python 3 because it colour codes your code for your which helps people like me to make understanding code much easier.
It's not python 3 that colour codes your code, it's the dev environment / IDE and many IDEs or even simple editors do it for any language.

rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Re: Swift Programing language on Raspberry Pi

Wed Jun 10, 2015 1:34 pm

Thanks!
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

jonathan68
Posts: 10
Joined: Mon Jun 08, 2015 2:36 am

Re: Swift Programing language on Raspberry Pi

Sat Jun 13, 2015 12:15 am

This looks promising:

http://arstechnica.com/apple/2015/06/ap ... ces-swift/

perhaps in a few months we can revisit this topic!

SimonBlake
Posts: 11
Joined: Fri Feb 13, 2015 4:33 pm

Re: Swift Programing language on Raspberry Pi

Fri Dec 04, 2015 3:38 pm

Well, it's now a few months later, and indeed there is now a version of Swift for Ubuntu. Unfortunately, it's currently x86 only, though. But it's a start!

There's a new website at https://swift.org/ that is very interesting.

Simon

res1233
Posts: 6
Joined: Fri Dec 11, 2015 9:56 am

Re: Swift Programing language on Raspberry Pi

Fri Dec 11, 2015 5:45 pm

Good News! I'm at the final stretch of building Swift for armv7 on a raspberry pi 2. I'm not certain if it can be built for earlier versions, but I have all the dependencies in place, and it seems to be building. I'll keep you updated! :D
Last edited by res1233 on Sat Dec 12, 2015 2:30 pm, edited 1 time in total.

Miguel Salinas
Posts: 2
Joined: Mon Mar 02, 2015 5:24 am

Re: Swift Programing language on Raspberry Pi

Fri Dec 11, 2015 7:40 pm

Awesome! Keep us updated! And if you don't mind, can you post instructions or even the build?

res1233
Posts: 6
Joined: Fri Dec 11, 2015 9:56 am

Re: Swift Programing language on Raspberry Pi

Sat Dec 12, 2015 3:24 am

Miguel Salinas wrote:Awesome! Keep us updated! And if you don't mind, can you post instructions or even the build?
Certainly. Once the build is complete, I'll run the tests and if they pass (or at least mostly pass) I'll post the steps here.

res1233
Posts: 6
Joined: Fri Dec 11, 2015 9:56 am

Re: Swift Programing language on Raspberry Pi

Sun Dec 13, 2015 7:49 am

I'm having an issue which may take some time to fix. It requires changing a bit of code, and I don't really know the codebase too well. I'll keep trying!

User avatar
Jim Manley
Posts: 1600
Joined: Thu Feb 23, 2012 8:41 pm
Location: SillyCon Valley, California, and Powell, Wyoming, USA, plus The Universe
Contact: Website

Re: Swift Programing language on Raspberry Pi

Sun Dec 13, 2015 6:14 pm

res1233 wrote:I'm having an issue which may take some time to fix. It requires changing a bit of code, and I don't really know the codebase too well. I'll keep trying!
Are you building Swift for Linaro (ARM version of Ubuntu) or Raspbian, or first Linaro and then maybe Raspbian? Very interesting to see this happening! Good luck!
The best things in life aren't things ... but, a Pi comes pretty darned close! :D
"Education is not the filling of a pail, but the lighting of a fire." -- W.B. Yeats
In theory, theory & practice are the same - in practice, they aren't!!!

res1233
Posts: 6
Joined: Fri Dec 11, 2015 9:56 am

Re: Swift Programing language on Raspberry Pi

Sun Dec 13, 2015 9:04 pm

Jim Manley wrote:
res1233 wrote:I'm having an issue which may take some time to fix. It requires changing a bit of code, and I don't really know the codebase too well. I'll keep trying!
Are you building Swift for Linaro (ARM version of Ubuntu) or Raspbian, or first Linaro and then maybe Raspbian? Very interesting to see this happening! Good luck!
I'm building it 100% on raspbian. It should be fairly trivial to port to Linaro once I'm done though. Fundamentally, they're the same OS.

res1233
Posts: 6
Joined: Fri Dec 11, 2015 9:56 am

Re: Swift Programing language on Raspberry Pi

Mon Dec 14, 2015 3:02 am

It's funny, I was sitting around having lunch and then suddenly I realized the code I had to change, and like magic, it works! :D I now have it built, but the executables aren't working yet.

christyluo
Posts: 1
Joined: Mon Dec 07, 2015 3:41 am

Re: Swift Programing language on Raspberry Pi

Mon Dec 14, 2015 8:22 am

rpiswag wrote:What do you the Raspberry Pi community think of Swift and do you think it will ever be available for the Raspberry Pi? If you don't know what swift is check it out. https://developer.apple.com/swift/
Swift plays an important role in computer operation.

Squar0L
Posts: 3
Joined: Sun Dec 16, 2012 12:25 am

Re: Swift Programing language on Raspberry Pi

Mon Dec 14, 2015 5:31 pm

Swift now can say "Hello World" on Android. Just saying... what are we waiting for?

https://github.com/SwiftAndroid/swift and http://romain.goyet.com/articles/runnin ... n_android/

mister.koz
Posts: 1
Joined: Fri Jan 08, 2016 11:38 am

Re: Swift Programing language on Raspberry Pi

Fri Jan 08, 2016 11:41 am

res1233 wrote:It's funny, I was sitting around having lunch and then suddenly I realized the code I had to change, and like magic, it works! :D I now have it built, but the executables aren't working yet.
I know I'm late to this thread but any more news? :D I'm planning a pretty performance heavy project on a pi and i'd like to use swift2!
More codez.

Return to “General discussion”