Quickstart - Docker
As of Sept 19 2019, swift is at version 5.1
https://hub.docker.com/_/swift and workaround "–privileged" in https://github.com/apple/swift-docker/issues/9
https://swift.org/getting-started/#using-the-repl
Launch the docker image for swift - exit the REPL with ctrl-d
obrienlabs:kubernetes michaelobrien$ docker run -it --name swift --privileged --cap-add sys_ptrace -it --rm swift swift 1> 1 + 2 $R0: Int = 3 2> let numbers = [1,2,3] numbers: [Int] = 3 values { [0] = 1 [1] = 2 [2] = 3 } 3> for n in numbers.reversed() { 4. print(n) 5. } 3 2 1 6> ^D
Swift on OSX
Swift on Windows
https://swift.org/download/#releases