All Projects → danielpi → Swift Playgrounds

danielpi / Swift Playgrounds

Licence: mit
Learning Swift by working through example code in playgrounds

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Swift Playgrounds

jscore-playground
JavaScriptCore example for Swift Playgrounds
Stars: ✭ 17 (-91.46%)
Mutual labels:  playground, swift-playgrounds
Playgrounds
Better playgrounds that work both for Objective-C and Swift
Stars: ✭ 2,586 (+1199.5%)
Mutual labels:  playground, swift-playgrounds
Playground
Instantly create Swift playgrounds from the command line
Stars: ✭ 391 (+96.48%)
Mutual labels:  playground, swift-playgrounds
Julia Set Playground
A Swift playground that generates beautiful Julia set fractal images.
Stars: ✭ 236 (+18.59%)
Mutual labels:  playground, swift-playgrounds
Playgroundbook
Tool for Swift Playground books
Stars: ✭ 257 (+29.15%)
Mutual labels:  playground, swift-playgrounds
Awesome Swift Playgrounds
A List of Awesome Swift Playgrounds
Stars: ✭ 3,521 (+1669.35%)
Mutual labels:  playground, swift-playgrounds
Audiokit
Swift audio synthesis, processing, & analysis platform for iOS, macOS and tvOS
Stars: ✭ 8,827 (+4335.68%)
Mutual labels:  playground, swift-playgrounds
Rd3
Playground for React & D3.js
Stars: ✭ 128 (-35.68%)
Mutual labels:  playground
Lbac Swift
Let's Build a Compiler by Jack Crenshaw translated to Swift Playgrounds
Stars: ✭ 156 (-21.61%)
Mutual labels:  swift-playgrounds
Pulsesensorplayground
A PulseSensor library (for Arduino) that collects our most popular projects in one place.
Stars: ✭ 126 (-36.68%)
Mutual labels:  playground
Vuep.run
🏃 An online playground for Vue2.0
Stars: ✭ 125 (-37.19%)
Mutual labels:  playground
Testdrive
Quickly try out any Swift pod or framework in a playground
Stars: ✭ 1,612 (+710.05%)
Mutual labels:  playground
Whats New In Swift 4
An Xcode playground showcasing the new features in Swift 4.0.
Stars: ✭ 1,860 (+834.67%)
Mutual labels:  playground
What The Filter
A visual playground to JavaScript array & object transformations.
Stars: ✭ 128 (-35.68%)
Mutual labels:  playground
Swift Adventures In Monad Land
A Swift adventure with Optionals, Monads, bananas and squirrels
Stars: ✭ 166 (-16.58%)
Mutual labels:  playground
Numsw
Swift library like numpy, playgrounds notebook like jupyter.
Stars: ✭ 126 (-36.68%)
Mutual labels:  swift-playgrounds
Xgen
A Swift package for generating Xcode workspaces & playgrounds
Stars: ✭ 178 (-10.55%)
Mutual labels:  playground
Web Maker
A blazing fast & offline frontend playground
Stars: ✭ 2,029 (+919.6%)
Mutual labels:  playground
Coredataplaygrounds
Exploring Core Data through Swift playgrounds
Stars: ✭ 139 (-30.15%)
Mutual labels:  playground
Layer5
Layer5, the service mesh company, representing every service mesh
Stars: ✭ 137 (-31.16%)
Mutual labels:  playground

Swift Playgrounds

Some experiments with Playgrounds in XCode 8.2 using the Swift programming language.

The Swift Programming Language Book

I have been working through all the examples in the book Apple Inc. “The Swift Programming Language.” iBooks. https://itunes.apple.com/au/book/swift-programming-language/id881256329?mt=11. Each .playground file in the project relates to a chapter from the Swift Programming Language book.

I have implemented this as a single XCode project that contains a playground file for each chapter of the language reference book. I'm finding it quite useful to have this project open when I am writing Swift code as I can use the project wide search functionality to lookup any Swift features or syntax that I am unsure about (so long as I can remember the words to look for)

Below is a list of each of the files within the project (this is also a list of the chapters of the book that I have worked through).

  • A Swift Tour contains the code from the "Swift Tour" chapter. It touches on most of the unusual features of the language and is easy to search through to find examples. It is a large file and does tend to give the swift interpreter a rather hard time.

Chapters from the Language guide. Each chapter goes into depth about its particular subject.

  • The Basics This chapter covers basic value types like Strings, Ints, Bools and floats. The notation for exponent values in float literals is interesting. Comments are covered (nested /* */ comment blocks). TypeAlias is covered as are tuples. Optionals are touched on and assertions are mentioned.
  • Basic Operators Arithmetic, remainder, increment, decrement, comparison, unary, ternary, range (closed and half-closed) and logical operators. There are examples of all of them.
  • Strings And Characters Some details about Unicode literals (multi-byte characters). The countElements() function for finding the length of a string. Concatenating strings, Comparing strings and Interpolating strings (not much on splitting or parsing strings).
  • Collection Types
  • ControlFlow
  • Functions
  • Closures
  • Enumerations
  • Classes And Structures
  • Properties
  • Methods
  • Subscripts
  • Inheritance
  • Initialization
  • Deinitialization
  • Automatic Reference Counting
  • Optional Chaining
  • Type Casting
  • Nested Types
  • Extensions
  • Protocols
  • Generics
  • Advanced Operators

Using Swift with Cocoa and Objective-C Book

There are six playground files that work through the code in the “Using Swift with Cocoa and Objective-C.” iBook. https://itunes.apple.com/au/book/using-swift-cocoa-objective/id888894773?mt=11. They are listed below. The example from this book didn't translate as well to the playgrounds as the previous book examples did.

  • Basic Setup
  • Interacting With Objective-C-
  • Writing Classes With Objective C Behaviour
  • Working With Cocoa Data Types
  • Adopting Cocoa Design Patterns
  • InteractingWith C

Swift Standard Library

The documentation for the Swift Standard Library can be found at the following link https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/SwiftStandardLibraryReference/. There is a wealth of information contained in the standard library doc and it is nicely organised so that it is easy to experiment with in a playground environment. I have attempted to extend the examples somewhat to try and show off some of the other features of the standard library.

  • String
  • Array
  • Dictionary
  • NumericTypes
  • Protocols
  • FreeFunctions
  • Undocumented

Swift Blog

The Swift blog contains several articles detailing interesting information about the developing language.

  • 2014-08-15 Value and Reference Types
  • 2014-08-05 Boolean
  • 2014-07-28 Interacting with C Pointers
  • 2014-07-23 Access Control

NSHipster

Lots of great articles delving into the finer points of Cocoa programming. The recent articles on Swift are always interesting to go through

  • 2014-08-08 Swift Literal Convertibles Shows how you can create types of your own that can be written as literals when you use them.

What next?

Here are some links to other projects around the web that I would also like to implement

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].