7 ms·
Introducing the IBM Swift Sandbox
- Shivetya 11y agoI am looking for a new language to learn, preferably more PC style platform focused, would this be a good language to learn?
- niutech 11y agoI would recommend learning Julia. It is an easy, fast, powerful general purpose programming language: http://julialang.org http://julialang.org
- JonathonW 11y agoIf you're writing iOS apps, Swift is the language to learn. If you're writing server-side code for Linux/OSX, probably not quite yet. The language is nice, but it's only been available as open-source for a day now... the ecosystem you'd need to be productive in Swift isn't there yet. (On the other hand, if you'd like to be involved in building that ecosystem, now's probably the time to jump in.)
- zyxley 11y agoAt the moment, it seems like it would be really nifty to use in hobbyist or small data-crunching projects to get C-like performance [1] with a saner syntax, less memory management issues, etc. I wouldn't want to use it for anything substantial, but if IBM's already hopping on the bandwagon it seems like a good language to learn for heavier use later on. [1]: http://www.primatelabs.com/blog/2014/12/swift-performance/ http://www.primatelabs.com/blog/2014/12/swift-performance/
- samstave 11y agoIs this IBM link the best first starting point to learn swift -- or should one look to something else as a first entry to swift?
- JonathonW 11y agoOfficial documentation is here [1], with additional documentation and resources (that are more iOS and OSX specific) available here [2]. In particular, the Swift Programming Language ebook isn't a bad starting point. The IBM Swift Sandbox looks like a nice little interactive environment to complement it, though, if you don't have access to a Mac to run Xcode. [1] https://swift.org/documentation/ https://swift.org/documentation/ [2] https://developer.apple.com/swift/resources/ https://developer.apple.com/swift/resources/
- deleted 11y ago[deleted]
- pjmlp 11y agoIf you plan to do native iOS and Mac OS X applications, yes.
- jorgemf 11y agoHave you tried kotlin? It is developed by jetbrains, works in the JVM and you can mix java code and kotlin code in the same project. It is still in beta but it has been developed for more years than swift and both look quite similar. Jet brains said they wanted to release the version 1.0 the the end of this year... Plus it is fully integrated in intelliJ idea
- rdtsc 11y agoWhat do you want to do with the language?: Here are some choices I think are interesting as new languages: Elixir : interpreted / scalability / concurrency / fault tolerance/ friendly community Rust : compiled / close to C speed / memory safety / concurrency TypeScript : compiles to Javascript but with types / runs in the browser Elm : compiles to Javascrtipt / functional / runs in the browser
- praveenster 11y agoYou can probably include Go alongside Rust.
- zeckalpha 11y agoOr TypeScript? Rust and Go are not much alike.
- krisdol 11y agoI'm not even remotely a front end guy but Elm looks so interesting. I really want to play with it
- ihsw 11y agoIt should be noted that there are some caveats to TypeScript, namely that it's type-safety is only compile-time and not at run-time. It is best-effort type-safety. That said, the edge cases are few and far between. TS is a fantastic language to work with.
- djur 11y agoI think the issue you're mentioning isn't so much that TS only enforces type safety at compile time, because that's true of Haskell, OCaml, C++, etc. as well, but that by its nature it can't enforce any type contracts with the large quantity of dynamically-typed JavaScript you're probably going to be dealing with. Of course, this is also an issue when safe Haskell, OCaml, etc. code interacts with compiled C code at runtime as well.
- AndrewGarner 11y agoLook into F#. It's open source. Works on Linux, Mac OS X, Android, iOS, Windows, etc. It has a good ecosystem and tooling built around it already but you can also tap into the C# ecosystem, if necessary. It compares really well to Swift: http://www.slideshare.net/ScottWlaschin/swift-vslanguagex http://www.slideshare.net/ScottWlaschin/swift-vslanguagex but even without that comparison, it's worth a look on its own.
- hmottestad 11y agoIt's on Bluemix!!! Here is my experience with Bluemix: 1. We needed to get bills to send to our accounting department. There is no way to get this out of Bluemix. We needed to contact 5 different people and send 2 different support tickets. 2. At one point we couldn't log into our accounts, the authentication server was down. 3. The docker container doesn't always get internet. Also it sure as hell is guaranteed to not have internet if you restart it. 4. If you use their SAAS databases, then some of them you can connect to from the outside world, but some you can't. And there is no way of knowing which. 5. Just because IBM makes a product available doesn't mean it works. We used NodeRED together with the IBM developed database connectors for DashDB. That connector will timeout after ~24 hours and then not throw any errors when you keep writing to it. Took 3 days to figure this out and fix it. 6. Their deploy system is nice, pity it brings down your service for 5-10 minutes even for deploys that are literally 100 lines of java code. 7. It's painfully slow to push images to their docker hub. Took 3 hours to upload an image with ubuntu and java. And our uplink is 50mbit.
- what-no-tests 11y agoThank you for providing detail into the stench of your experience.
- bitdiddle 11y agoBuy some of the stock, you'll feel better :)
- vizzah 11y agoShouldn't he "short" the stock instead? ;)
- mynewtb 11y agoNice, Testsuite As A Service, I like it!
- parasubvert 11y agoThis might help with the deploy downtime (works on Bluemix , PWS, etc): https://github.com/concourse/autopilot https://github.com/concourse/autopilot
- Apocryphon 11y agoLooks like we're finally seeing the fruits of the Apple-IBM global partnership.
- king_magic 11y agoThis is really cool to see. Really hoping to see something similar appear for Swift on Azure or AWS. Also really hoping to see Swift web frameworks begin to appear, now that Swift is open-sourced & running on Linux.
- SeldomSoup 11y agoAbsolutely. Two days ago (before the open source announcement), I begrudgingly started learning Swift for a school project in iOS development. Now I'm itching to dive into the language.
- sosedoff 11y agoIf you're looking for something similar for other programming languages too, check out https://bit.run/ https://bit.run/. It supports Ruby, JS, Go, Python, Rust, PHP and many more.
- petterrasmussen 11y agoglot.io just added swift support as well https://glot.io/new/swift https://glot.io/new/swift
- coupdejarnac 11y agoWould it be alright for me to embed bit.run in a Swift tutorial site I'm making? My contact info is in my profile.
- melling 11y agoSwift is gaining momentum fast. It has a big advantage because it's arguably the best way to write iOS apps. It'll replace Objective C as a top 5 used language. In fact, a quick check of Tiobe shows Objective C heading down fast with Swift about to pass it on its way up: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://www.tiobe.com/index.php/content/paperinfo/tpci/index....
- fauigerzigerk 11y agoThis seems to be down. I'm getting 500 errors or a blank/blue page. I hope this wasn't supposed to be a demonstration of IBMs scalability prowess.
- msoad 11y agoYup 503 for me
- osipov 11y agojust worked for me...i ran my hello world app http://swiftlang.ng.bluemix.net/?cm_mmc=developerWorks-_-dWdevcenter-_-swift-_-lp#/repl http://swiftlang.ng.bluemix.net/?cm_mmc=developerWorks-_-dWd...
- Tloewald 11y agoSame here. If only it were a brighter shade of blue!
- propogandist 11y agothe service took off faster than expected
- amasad 11y agoI'm also planning on adding support for Swift to https://repl.it https://repl.it once I figure out how to implement a proper REPL with it.
- niutech 11y agoThere has been http://swiftstub.com http://swiftstub.com for a long time.
- matrixagent 11y agoVery cool, can't wait!
- akanet 11y agoWe also just added Swift support over at https://coderpad.io https://coderpad.io for anyone that wants to run swift during interviews. Amjad, I got started filing some issues against codemirror for better Swift support :) https://github.com/codemirror/CodeMirror/issues/3680 https://github.com/codemirror/CodeMirror/issues/3680
- alexpersian 11y agoJust wanted to say that coderpad is fantastic. :)
- AlphaSite 11y agoThere's already a repl?
- amasad 11y agoCan you call it programmatically?
- msoad 11y agoHow funny the server is down. This shows IBM cloud quality somehow. http://m.imgur.com/dGNPBAr http://m.imgur.com/dGNPBAr
- osipov 11y agoreally? it just worked for me http://swiftlang.ng.bluemix.net/?cm_mmc=developerWorks-_-dWdevcenter-_-swift-_-lp#/repl http://swiftlang.ng.bluemix.net/?cm_mmc=developerWorks-_-dWd...
- LeoNatan25 11y ago503 Service Unavailable No server is available to handle this request.
- schnevets 11y agoI wonder if this was announced as a reaction to Swift going open source. I could see some IBM team working on this system as a POC, and suddenly being given an urgent deadline to coincide with the license change. Gain from the momentum and maybe turn a pet project into something bigger. I guess that's the benefit of having tens of thousands of developers...
- mingodad 11y agoI think that you are right on this, when looking at one of the examples (server.swift) it seems that people are paid by characters typed and they forget (or never heard of) the mantra DRY (Don't Repeat Yourself): func fdSet(fd: Int32, inout set: fd_set) { let intOffset = Int(fd / 16) let bitOffset: Int = Int(fd % 16) let mask: Int = 1 << bitOffset switch intOffset { case 0: set.__fds_bits.0 = set.__fds_bits.0 | mask case 1: set.__fds_bits.1 = set.__fds_bits.1 | mask case 2: set.__fds_bits.2 = set.__fds_bits.2 | mask case 3: set.__fds_bits.3 = set.__fds_bits.3 | mask case 4: set.__fds_bits.4 = set.__fds_bits.4 | mask case 5: set.__fds_bits.5 = set.__fds_bits.5 | mask case 6: set.__fds_bits.6 = set.__fds_bits.6 | mask case 7: set.__fds_bits.7 = set.__fds_bits.7 | mask case 8: set.__fds_bits.8 = set.__fds_bits.8 | mask case 9: set.__fds_bits.9 = set.__fds_bits.9 | mask case 10: set.__fds_bits.10 = set.__fds_bits.10 | mask case 11: set.__fds_bits.11 = set.__fds_bits.11 | mask case 12: set.__fds_bits.12 = set.__fds_bits.12 | mask case 13: set.__fds_bits.13 = set.__fds_bits.13 | mask case 14: set.__fds_bits.14 = set.__fds_bits.14 | mask case 15: set.__fds_bits.15 = set.__fds_bits.15 | mask default: break } }
- mikeash 11y agoGiven the unfortunate way fd_set apparently got imported, how else would you do this? The only alternative I see is to throw UnsafeMutablePointer at it, but that brings in the ugly specter of undefined behavior. Note that in Swift you cannot use a variable to address a tuple, so there's no way to use intOffset to access the corresponding field of set.__fds_bits.
- mingodad 11y ago
- asadlionpk 11y agoWe also added support for swift in https://codepad.remoteinterview.io/ https://codepad.remoteinterview.io/ Collaboration enabled REPL is there too (enter 'swift' in the shell).
- pat2man 11y agoSeems a lot slower...
- jacques_chester 11y agoThere was a half-joke on Wednesday that we should do a Swift buildpack for Cloud Foundry.