Go Down

Topic: Apple swift (Read 16707 times) previous topic - next topic

Ufoguy

#15
Jan 10, 2016, 05:25 pm Last Edit: Jan 10, 2016, 05:26 pm by Ufoguy
Here are reasons not to use Swift:

>> Mac Lock.
>> Fake or psuedo Linux port.
>> Apple and it's agressive abuse of patents.
>> Apple is the enemy of Open Source.
>> iJails
>> Richard Stallman hates Apple the most. ;)
>> Apple Fanboys
If you want to meet a beautiful nurse you must be patient.

Robin2

Here are reasons not to use Swift:
>> Apple Fanboys
I love to read balanced critiques  :)

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

GoForSmoke

I'm reading up on apple's new C language, Swift. It can return from a function multiple values with any combination of data types.

That is all. I'm sold!
Whereas with C we have to resort to passing references and pointers to get more data back.
And then we learn C++ classes and the 'issue' becomes moot.
1) http://gammon.com.au/blink  <-- tasking Arduino 1-2-3
2) http://gammon.com.au/serial <-- techniques howto
3) http://gammon.com.au/interrupts
Your sketch can sense ongoing process events in time.
Your sketch can make events to control it over time.

tah2

Here are reasons not to use Swift:

>> Mac Lock.
>> Fake or psuedo Linux port.
>> Apple and it's agressive abuse of patents.
>> Apple is the enemy of Open Source.
>> iJails
>> Richard Stallman hates Apple the most. ;)
>> Apple Fanboys
I really hate to see total mythology in programming discussions. This is knee-jerk anti-apple open-source zealot nonsense.

You are probably using a Chrome Browser? Chrome was built with Apples open-source webkit, which has become the foundation of 70% of the internet (chrome, opera, safari, and nearly every mobile browser). If you have noticed, nearly every non-JVM new language is compiled by LLVM (rust, julia, go, swift, etc), and Clang is really taking over GCC throughout the industry. Where are these things from? Apple open source.

There is no such thing as iJails. Android is becoming just as locked down. Yes all of the underpinnings are open source... but guess what so is Apples (darwin.org). But the application space is where google derives value (that and by selling your information). Turns out companies and progress require money, and making money requires selling something unique and has customer value. Apple is no different.

carlhung

i also really want i can write swift code for arduino.

pYro_65

I really hate to see total mythology in programming discussions.
Doesn't change the fact that they are an awful company with regards to others trying to make a dollar for themselves. Turns out Apple is very different, they do not understand the value of competition, all they want is to be a monopoly.

Also Android is not locked down at all. Its just missing superuser, which can easily be installed. The phone manufacturers placing their own restrictions on their own phones is little to do with Android itself.

And my own worthless opinion: only suckers buy apple.
Forum Mod anyone?
https://arduino.land/Moduino/

pYro_65

#21
May 26, 2016, 09:27 am Last Edit: May 26, 2016, 09:27 am by pYro_65
You are probably using a Chrome Browser? Chrome was built with Apples open-source webkit, which has become the foundation of 70% of the internet (chrome, opera, safari, and nearly every mobile browser).
And Apple's WebKit is a fork of KHTML...
Forum Mod anyone?
https://arduino.land/Moduino/

FilipeBeck

With Swift you can generate LLVM IR code ( swiftc -emit-ir ) and compile the output with a specific backend (like https://github.com/avr-llvm/llvm)

g01d10x

Hello FilipeBeck,

Just new to Arduino and I have a little programming experience in C, ObjC and now starting into C++, but also starting into swift at the same time. Could you translate your answer for a newbie? Does this mean you can compile swift stuff for an Arduino?

Cheers :)

dally

#24
Oct 24, 2016, 12:33 pm Last Edit: Oct 24, 2016, 01:09 pm by dally






Saint Stallman of the Church of Emacs - Say No to Google and Microsoft -

and … Mr-still-have-beard-cut, No to the Go-Technology?

Seriously ?!?!?!?!?!?

oh well, at least The Go language is interesting
and Apple Swift can be an interesting language
and llvm is supported by Apple. Good!

carlos4242

So they say "those who say it can't be done are overtaken by others... doing it" :)


I have written a simple, early, early phase proof of concept compiler for Swift on the Arduino UNO.


It's super primitive, lacks classes, swift structs, swift strings, string literals, protocols, enums and doesn't have any of the swift standard library (it's too big for an arduino uno anyway) but it's a fun new way to do things.

See my lecture explaining how it works and with a live code demo of Swift running traffic lights on an arduino here: https://skillsmatter.com/skillscasts/10773-swift-for-arduino-an-experimental-compiler

Send me a message on twitter @swiftforarduino if you want to try the compiler.  It's Mac only right now and has loads of bugs and issues but it's fun. :)

The main thing I want now is people to try it and send me bug reports.

Carl

AWOL

Quote
It's Mac only right now and has loads of bugs and issues but it's fun.
If that's  your idea of fun, I can only assume you're a masochist.

Boardburner2

Can you actually ring someone up on one of these and talk to them. ?

Or does Siri do all that for you while you are asleep and do your cardio excercises for you. ?

carlos4242

If that's  your idea of fun, I can only assume you're a masochist.
Haha.  Probably true.

pedrofp

The Swift programming language is the successor of Objective-C, I think it's not a C-family member but a C++-family member.
It has been developed to update the old-fashioned Obj-C and to result more easy and clear in use than it.
I didn't try it yet but voices on its performances are constrasting: someone says that it's faster than Obj-C, someone else says it's slower...
The only thing that it's clear is that it's an Apple-only language, due to the fact that it will run only on MAC/iOS.
There's a lot of misconceptions in this thread, the post I'm quoting here is merely chosen as an example.

First of all, Swift is not all C or a C family language (unlike Objective C or C++, both of which are supersets on C). Swift is a new language from scratch, built to work with LLVM (Low Level Virtual Machine) which is both a that & compiler. LLVM began as an academic project, but has been substantially developed, as open-source, by Apple (the compiler component entirely by Apple but no less open-source than the rest).

Swift is designed to have modern programming features (closures, functions as data, & more), be highly expressive & flexible, & to not be permissive enough to allow prgrammers to inadvertantly do bad things (a huge problem with the whole C family of languages). Thanks to the cleverness of LLVM, Swift can be either compiled to executable code, or run as interpreted scripts.

It's true that Swift was proprietary at launch, but with the release of v2.0 it was made open-source (https://github.com/apple/swift), & with a runtime for UNIX/Linux released. The Apple release runtime is for Intel hardware only, however there are now 3rd party (& open-source) libraries that allow Swift code to be compiled for ARM & compatible processors. There are also open-source efforts to port Swift to Windows, to allow Swift to be used as a server side web language, & in the browser. The last requires the cooprtation of browser vendors by incorporating part of LLVM into their rendering engines.

If you use a Mac od a UNIX/Linux machine for your Arduino development, there is no good reason not to try Swift for Arduino development beyond the bother of learning a new language. As an Arduino newbie, & experienced Apple developer, I'm aiming to use Swift for Arduino development from the get go.

Go Up