11 ms·
Pushing Swift to the Server
- regularfry 10y agoWow. That "same language connected by an interface schema would have prevented Mars mission loss" thing is a really thin stretch.
- kraigspear 10y agoExactly. I'm a fan of Swift on the server, but this is the best they can do with marketing?
- ssscommunity 10y agoIt's still early, 2017 will be exciting times with Swift 4. That's where we are coming to share more of SSS topics in https://www.facebook.com/ServerSideSwiftCommunity/ https://www.facebook.com/ServerSideSwiftCommunity/
- tyingq 10y agoSimilar for (roughly) "we ran one benchmark and can now say that swift is similar to java in performance and uses half the memory generally, for all things". No reference to the benchmark either.
- Cthulhu_ 10y agoThat's not hard either, given the nature of both languages (native / compiled vs JVM). Yes I know Java can perform better in some situations.
- jayd16 10y agoThe reference was shown in the slide. Here is the link: http://benchmarksgame.alioth.debian.org/u64q/spectralnorm.html http://benchmarksgame.alioth.debian.org/u64q/spectralnorm.ht...
- ssscommunity 10y agoIn addition to reading Swift benchmark code, mixing unsafe C with Swift aren't complicated to learn and offer more performant. In contrast to Adobe AIR + C API (ANE).
- dang 10y agoThe site owner asked us to replace the original URL you had with a static one in the hope of taking some strain off the web server, so we've done that. I hope that's ok.
- unit91 10y agoYeah, the Mars mission loss is also really well-worn at this point. I've heard this example in contexts ranging from cross-org communication, to software APIs, and unit checking (as in SI, USCS, etc.). Now I can add "language X is better than language Y" to that list!
- aub3bhat 10y agoThis submission reminds me of "Satirical hacker news post" """ The Muskonauts figured out why their shit exploded. Hackernews, literally all of whom are actual rocket scientists, wonders if unit tests could have helped. """ Also conveniently forgetting that Computer Scientists are yet to solve types <===> physical dimensions mapping in practical programming language. https://hackage.haskell.org/package/dimensional https://hackage.haskell.org/package/dimensional
- falcolas 10y agoThe Muskonauts figured out why their shit exploded. The Applluminati wants to replace the Muskonauts' shit with their own shit.
- jahewson 10y agoF# units of measure are pretty cool - types for units!
- pducks32 10y agoFoundation's Measurements aren't bad and it's easy to extend them to do arithmetic.
- Cyph0n 10y agoWhat's worse is that the whole "story" wasn't even tied in to the rest of the talk. So basically, the guy spent 10 minutes talking about an interesting anecdote that had almost nothing to do with the rest of the talk.
- echelon 10y agoIs Swift on the server a good idea? I don't own (or plan to own) a Mac. Does Apple support cross-platform tooling? I honestly don't know, but given their history, my default assumption is to be skeptical. Why would you choose this over Go or Rust? (Rust is totally sweet for server dev, and I've spun up a few Rust servers for things.)
- Shank 10y agoThe Swift Open Source community is quite vibrant. They're already building it on Linux + macOS. See: https://github.com/apple/swift https://github.com/apple/swift Edit: They also have a Platform Support page, where they discuss their goals/intentions on cross-platform: https://swift.org/about/#platform-support https://swift.org/about/#platform-support
- vvanders 10y agoThere's quite a few windows developers out there as well for which I don't think we'll see Swift any time soon. In contrast Rust has fantastic windows support. [edit] Yup, no mention of win32 on that page at all.
- hacker_9 10y agoWhy would it matter if it was cross platform if it is running on a server?
- cwyers 10y agoBecause the officially supported platform, macOS/iOS, isn't a server platform anymore.
- Cthulhu_ 10y agoDeveloping on Mac, deploying on Linux, which could be x86 or ARM, etc? MacOS isn't really a server platform, definitely not a cloud OS.
- freehunter 10y ago
- geodel 10y agoIBM, the purveyor of Rational/Websphere suite of Java tools and appservers talking about Java memory usage is sign of changing times. I hope they do better job this time with Swift tools and frameworks.
- pjmlp 10y agoThe times are changing, hence why Java 10 has better support for some form of value types, improved generics, JNI replacement and AOT compilation on its roadmap.
- geodel 10y agoAll good stuff. But I have heard JNI is already multiple times faster than Go's cgo stuff so I wonder what could be improved there.
- pjmlp 10y agoAccording to Mark Reinhold, Sun designed JNI to be hard on purpose, to discourage developers to write native code. He has repeated this a few times at his JavaONE presentations, a bit hard to track down which ones. Thanks to the work of Charles Nutter on adding FFI to JRuby, and the pressure from FinTech to improve Java's mechanical sympathy, a new project was started, project Panama, where binding to native code from Java should be something like P/Invoke on the CLR. Similarly calling into Java APIs from native side should have less ceremony setting up what to call. Additionally there should be a standard support for integrating GPGPU into Java. As it was deemed too complex to be ready by Java 9 timeframe, it ended up being scheduled for 10+ roadmap. For the latest status check "Going Native" at JVM Language Summit 2016. https://www.youtube.com/watch?v=JR1zI5gLhRM&index=13&list=PLX8CzqL3ArzUY6rQAQTwI_jKvqJxrRrP_ https://www.youtube.com/watch?v=JR1zI5gLhRM&index=13&list=PL...
- geodel 10y agoInteresting talk. Go folks also probably want cgo similarly difficult to use. Though for them I guess it will work, as they have already written compiler/GC/runtime/ssl etc in Go plus some asm.
- rndmio 10y agoI'd be interested to know if any developers are investing in swift outside of the Apple ecosystem. Given that the language still seems to be in flux (the v2 -> v3 transition didn't appear seamless), why would you pick it?
- deleted 10y ago[deleted]
- Perignon 10y agoWhy? Why choose Swift over a language with an established framework ala python, ruby, ASP.NET, Node.js ?
- mixmastamyk 10y agoSpeed, types, etc.
- oblio 10y agoPython, Ruby, maybe. Node.JS with Typescript or ASP.NET with C#/F#... I doubt it :)
- mixmastamyk 10y agoCompiled langs are usually somewhat faster than node also, see golang, etc.
- ssscommunity 10y agoAgreed, every languages do established and growth into a mature language. Swift was born and constantly learns every languages for the last 30 years of pros and cons including Rust, Go and Ruby. Swift is built on LLVM (Compiler designer) and CLang which both are developed by the same group but they do not forget children who can learns Swift from young age for robotics, electronics, 3D and many things could be done with Swift. More is need to be done on tooling before Swift will be on par as Java and C ecosystem. In the same analogy, why choose Tesla or electric powered vehicles when other car manufacturers are established? Keep learning and improve it.
- simonh 10y agoMainly because you are already writing your MacOS or iOS app in Swift anyway and might even be able to re-use some code. If you aren't, no real reason for now to be honest.
- coldtea 10y agoWell, neither Python and Ruby (prior to 2005-6) nor Node.js (prior to 2010-11) had any "established frameworks". With this logic we'd still all be using CGI scripts. Besides, Swift is several times faster CPU wise, type safe, and modern...
- TurboHaskal 10y agoIt looks like we're getting Swift EE before Go EE.
- pier25 10y agoSwift is fast and the language is nice and all, but this feels more like propaganda. Let's not forget IBM and Apple have become friends recently.[1] I really don't see Swift becoming a popular full stack solution outside of environments invested in iOS and macOS. Swift can indeed run on a multitude of systems but that doesn't mean it's a good option. For example it's not even close to being ready for Android. It can run, but that's it. Other than that you are on your own. No UI libs, nothing. This leaves you with iOS if you need to run on mobile which is extremely restricted. Want to freely distribute an app among your colleagues on the lab? Fuck you. You have to do all sorts of acrobatics with testing devices, provisioning certificates, etc. In Android you just compile an .apk and send the link to your colleagues to install it, like in any other platform on Earth except iOS. Even macOS. [1] http://www.apple.com/ipad/business/work-with-apple/ibm/ http://www.apple.com/ipad/business/work-with-apple/ibm/
- saurik 10y agoI do not say this to defend Apple, as this is itself a form of "fuck you" "acrobatics" forced on you by Apple, but if you download Cydia Impactor (a program I develop that has a horrible UI which is about to get at least somewhat better in the next couple days), you can drag the IPA file to the device and it will have you log in with your Apple account (even if you are not a registered developer) and can then automate the entire 7-day free provisioning and installation process, helping this use case. Also, while I am leaving a comment: the server space is different from Android in that 1) you don't need a UI and 2) there apparently is a sponsor working on the open source project (and it is my understanding that IBM is actually putting in more time than Apple) to make it useful there: Ruby is a language that is going to be a problem for you building either Android or iOS apps, and yet that is certainly not a reason to claim it would be a bad choice of language for coding a website backend.
- simonh 10y ago> You have to do all sorts of acrobatics with testing devices... A problem completely unheard of in Android land. Ok, so maybe you can find a few situations in which Android might be a better solution that iOS. Congratulations. Android for the win. But there are many, many craptons of successful iOS apps out there that might like to be able to use services running on e.g. Linux. The existence of useful roles for Android devices won't make those go away.
- maxpert 10y agoI recently rewrote a server that I had in Kotlin and really happy with the results. With this I am pleasantly surprised! I already liked the syntax, and now it gives me another reason to try it out. I am not sure though how would it compare with Go.
- always_good 10y agoCtrl-f for "So,". 24 results. You can sound much more professional and less juvenile by dropping the "So," prefix when you speak or write.
- unit91 10y agoWow! I was shocked to see no matches for "also", et al.
- Entangled 10y agoFor Swift on the server you only need an editor like Sublime, Atom, or whatever suits your fancy. That's it, nothing else. Get one of the most popular frameworks like Kitura, Vapor, Perfect, Zewo or the dozens of smaller ones and be ready to deploy to Heroku, Bluemix, AWS, Google Cloud, Digital Ocean in no time. It is that simple, tested, proven, it works, it simply works. In just a couple of weeks I developed a couple of apps in Swift and they're up and running unattended: http://swiftforums.herokuapp.com http://swiftforums.herokuapp.com http://pokerduel.herokuapp.com http://pokerduel.herokuapp.com Repos here: https://github.com/kuyawa https://github.com/kuyawa And the fact that you can also develop for the desktop, mobile, tablets, watch, TV and IoT in one language is a huge advantage. Swift is here to stay.
- themihai 10y agoI think stability and maturity and is what Swift is missing now to qualify for many domains you mentioned(i.e IoT/systems programming)
- kevindqc 10y agoproven?
- PSeitz 10y agoyou always need at least compiler/interpreter to execute your code... unless write bytecode in your editor
- wittedhaddock 10y ago
- fetbaffe 10y agoNo, I don't want to share models between the client and the server. I want an API dependency between them, a code dependency is actually worse. Why should the frontend change when the backend changes it´s abstractions? I want to change them independently, because they have different constraints and dependencies. If you are implementering your database schema in the frontend, you´re doing it wrong. An API is a view against a domain, which in turn is an abstraction above the database. However the client is not aware of the entire domain and shouldn´t be. Only thing that is a good idea to share is the domain language and the API interface, but can be solved easily by other means than share code base. And as soon you throw in another client with an other programming platform, all the benefits is lost anyway.
- wittedhaddock 10y agoAre you suggesting something like http://espresso.caffei.net/ http://espresso.caffei.net/ ?
- bsaul 10y agoI completely agree with the general point, however at the minimum this lets client and server share the same exchanged models ( what the server sends to the client is defined once, as well as the opposite). There may be technologies like protobuf to define those structures in one place, but i can still imagine there are cases where it could be useful ( business rules and validation, etc).
- wtetzner 10y agoYeah, the most obvious benefit is being able to share validation logic across front-end and back-end. All validation is necessary on the back-end for security reasons, but it's convenient for users if it also happens on the front-end, because they don't have to send data to the server before finding out it's invalid.
- omouse 10y agoWhy. Seriously. Why. Whatever happened to domain-specific languages.
- aranajhonny 10y agoThis repo demonstrates deployment of the Kitura web framework using Node.js and Now. https://github.com/aranajhonny/now-swift-example https://github.com/aranajhonny/now-swift-example
- stevehiehn 10y agoHow many projects really have just an ios client? If the argument is to have the client and server the same language then isn't that also an argument for a Java android & Java server?
- ssscommunity 10y agoPerfect team is writing an article for Native iOS and Android development using Swift. To be release soon.