What I'm Thinking

Firstly you need to setup your environment to use the new Xcode 6 sudo xcode-select --switch /Applications/Xcode6-Beta4.app/Contents/Developer Next you can now use this in the top of your Swift scripts #!/usr/bin/env xcrun swift -i Now it’s playtime! [peacock@trashcan ~]$ cat helloworld.swift #!/usr/bin/env xcrun swift -i println("Hello, World") [peacock@trashcan ~]$ ./helloworld.swift Hello, World
This is Swift’s REPL (Read-Evaluate-Print Loop) which lets us execute code interactively. alias swift='/Applications/Xcode6-Beta4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift' Note: You can alternatively set the DEVELOPER_DIR environment variable, or of course add this to your PATH. This allows such things as: [peacock@trashcan ~]$ swift Welcome to Swift! Type :help for assistance. 1> let seats = 7 seats: Int = 7 2> let family = 3 family: Int = 3 3> var extraSpace = (seats - ... Read More

Unicode support
12 July 2014

In Swift we can let π = 3.14159