Questions tagged [ibm-swift-sandbox]

The IBM Swift Sandbox is an online tool that allows users to write, execute, and share Swift code. Users can use the Sandbox to write up solutions to Swift-related questions and post them as part of their answers, or use it to share their specific coding issues. It is recommended that this tag be used for questions that pertain specifically to how the Sandbox executes Swift code, and not for generic Swift questions that use the Sandbox as a reference.

The IBM Swift Sandbox is an online tool that allows users to write, execute, and share Swift code. Users can use the Sandbox to write up solutions to Swift-related questions and post them as part of their answers, or use it to share their specific coding issues.

It is recommended that this tag be used for questions that pertain specifically to how the Sandbox executes Swift code, and not for generic Swift questions that use the Sandbox as a reference.

Note that the Sandbox executes Swift code on Linux instead of OS X, and so if an issue arises in the Sandbox and not Xcode, it may be due to differences in the language implementation. In cases like this, the tag should still be used, but appropriate tags such as should be added once the cause is discovered.

References

11 questions
4
votes
2 answers

IBM Swift Sandbox: Running NSURLSession: Error running code: unknown error code 132

I am trying to execute the following script: import Foundation class TestURLSession{ var session: NSURLSession! func run(){ session = NSURLSession.sharedSession() let url = NSURL(string: "http://www.veenex.de/tmp/json") let request =…
clex
  • 465
  • 2
  • 7
  • 19
3
votes
0 answers

Behavior of NSNumber(value:) in Xcode compared to Open Source Swift Distribution

Constructing an NSNumber with the value UInt8.max yields different results in Xcode 8 than it does with the open source build of Swift 3.0 on Linux. Xcode 8: print(NSNumber(value: UInt8.max)) // 255 (__NSCFNumber = Int16(255)) Swift 3.0 on…
JAL
  • 41,701
  • 23
  • 172
  • 300
2
votes
3 answers

How to seed rand() in IBM Swift Sandbox?

I am new to StackOverflow so please correct me if there is a better way to post a question which is a specific case of an existing question. Alberto Barrera answered How does one seed the random number generator in Swift? with let time =…
adazacom
  • 443
  • 3
  • 9
1
vote
1 answer

Do you know of a useful web sandbox for Swift?

I miss IBM's Swift sandbox. I loved being able to try out quick ideas without have to fire up the Xcode monster. I have been trying to use https://iswift.org/playground but because one can't use import, there just isn't much I can do with it. Or,…
adazacom
  • 443
  • 3
  • 9
1
vote
1 answer

Inconsistent behavior with String removingPercentEncoding:

I am seeing inconsistent behavior with the open source release of Swift 3 compared with the version that shipped with Xcode 8 with the String instance method removingPercentEncoding: let testString = "valid àæ" let escapedString =…
JAL
  • 41,701
  • 23
  • 172
  • 300
0
votes
1 answer

How can I plot data from a Swift sandbox?

I am practicing with Swift 3.x and I need to plot some data. The problem is that I only really have IBM's online Swift sandbox to work with. The purpose of the plotting is to understand how single-precision code is affected by summations: I wrote…
whatwhatwhat
  • 1,991
  • 4
  • 31
  • 50
0
votes
1 answer

What is the timeout on IBM's Swift Sandbox?

I'm running into an issue where attempting to run code on IBM's Swift Sandbox is causing some sort of internal timeout. Swift Ver. 3.0.1 (Release) Platform: Linux (x86_64) Error running code: WARNING: Your kernel does not support swap limit…
JAL
  • 41,701
  • 23
  • 172
  • 300
0
votes
1 answer

Unable to save or load my code in the IBM Swift Sandbox

Whenever I attempt to Save Code of mine, the Sandbox gets stuck on "Saving Snapshot" with the little dots jiggling below. Also, when I attempt to Load Code that is something other than the sample code tab, it just says "Loading". I've tried various…
Tim
  • 3
  • 2
0
votes
1 answer

"unknown error code 132" with IBM Swift Sandbox

(I'm pretty new to this, so tips on the general form of this post and my code are greatly appreciated!) I've been playing around with Swift in the IBM Sandbox, and I can't seem to get around the following problem: func fillPossibilityMatrix() { …
0
votes
3 answers

Using IBM Swift Sandbox and rangeOfCharacterFromSet

I am trying swift on IBM's new Swift online Sandbox. The following script is not running on that sandbox: http://swiftlang.ng.bluemix.net/ import Foundation func palindromTest(s: String) -> Bool{ let lower = s.lowercaseString let letters =…
clex
  • 465
  • 2
  • 7
  • 19
0
votes
2 answers

IBM Swift Sandbox cannot resolve call to CoreFoundation function

I'm mucking around with the beta of the IBM Swift Sandbox; does anyone know why I'm getting the following error for the code below?: LLVM ERROR: Program used external function 'CFAbsoluteTimeGetCurrent' which could not be resolved! // A…
John Reynolds
  • 79
  • 1
  • 2
  • 10