Swift Talk

A weekly video series on Swift programming.

Subscribers-Only

Subscribers Only

#58 Red-Black Trees 31:51

Building on the binary search tree code from episode #56, we implement red-black trees as self-balancing tree data structures and benchmark their performance.

Subscribers-Only

Subscribers Only

#56 Binary Search Trees 27:00

In this episode, we implement a binary search tree as an alternative to the sorted array from the last episode. We benchmark the performance of insertion and lookup in both data structures, with some surprising results.

Subscribers-Only

Subscribers Only

#54 UI Elements with Callbacks 16:27

We refactor a declarative wrapper around stack views we wrote in episode #7. Instead of wrapping UI controls to provide an interface with callbacks, we write a dedicated target-action class.

Subscribers-Only

Subscribers Only

#52 Deleting Code with Swift 4 11:49

We look at how we can delete code we wrote in previous episodes by taking advantage of some of the new features in Swift 4.

Subscribers-Only

Subscribers Only

#50 Server-Side Swift: Interfacing with PostgreSQL (Part 2) 25:14

We continue to build our PostgreSQL wrapper. This time, we add the possibility of using queries with properly escaped parameters. To achieve this, we have to dive deep into Swift's unsafe pointer APIs.

Subscribers-Only

Subscribers Only

#48 Server-Side Swift: Interfacing with PostgreSQL 28:50

We start writing a lightweight wrapper around the libpq C library to interface with PostgreSQL.

Subscribers-Only

Subscribers Only

#46 Combined Class and Protocol Requirements 15:59

We look at multiple ways to create variables that have a class type but also conform to a protocol.

  1. Classes
  2. Protocols
  3. UIKit
April 21, 2017
Subscribers-Only

Subscribers Only

#44 Setting Up a Swift Server-Side Project 24:33

In this first episode about server-side Swift applications, we set up our development environment using Docker and the Swift Package Manager.

Subscribers-Only

Subscribers Only

#42 Thread Safety (Reactive Programming #5) 23:36

We make our Signal implementation thread-safe by safeguarding the access to shared resources.

Subscribers-Only

Subscribers Only

#40 Signal Ownership and Subscriptions (Reactive Programming #4) 16:28

We add the ability to map over signals and control subscriptions in a more fine-grained manner. Along the way, we improve the signal ownership model and implement the concept of disposables.

Subscribers-Only

Subscribers Only

#38 Custom Collections: IndexSet as Sequence 14:08

In this episode, we make a custom collection conform to Sequence. This allows us to efficiently iterate over the elements, and we gain all the useful functionality of Sequence.

Subscribers-Only

Subscribers Only

#36 Futures (Reactive Programming #2) 17:30

We look at implementing a Futures type that we can use instead of callbacks. This is the first step toward a simple implementation of a reactive library.

Subscribers-Only

Subscribers Only

#34 Reactive Programming 26:12

We take a look at reactive programming and see how it challenges us to think differently.

Subscribers-Only

Subscribers Only

#32 Array, ArraySlice & Collection (Collections #1) 15:16

We show how to make an extension on array available to other collections: first, we implement it for array slices, then we implement it as a protocol extension for all collections.

Subscribers-Only

Subscribers Only

#30 Interfaces 16:07

We talk about the importance of types and interfaces as tools to express your intent precisely and to set the proper boundaries.

  1. Architecture
  2. Generics
  3. Types
December 30, 2016
Subscribers-Only

Subscribers Only

#28 Typed Notifications (Part 2) 18:02

We extend the typed notifications code from the last episode to custom notifications and discuss an alternative protocol-based approach.

Subscribers-Only

Subscribers Only

#26 Generic Table View Controllers (Part 2) 23:30

We show how you can build a generic, type-safe table view controller that can display different types of items using multiple cell classes.

Subscribers-Only

Subscribers Only

#24 Delegates & Callbacks 15:29

We discuss the pros and cons of delegates versus callback functions and why delegate protocols are always class only.

Subscribers-Only

Subscribers Only

#22 Command Line Tools with Swift 17:17

We show how we build simple command line tools leveraging the Cocoa frameworks. We use the Swift Package manager to include dependencies in our project.

  1. Package Management
  2. Command Line
October 28, 2016
Subscribers-Only

Subscribers Only

#20 Understanding Value Type Performance 18:51

In this episode we wrap NSMutableData in a struct while maintaining value semantics. Then we implement copy-on-write to make it efficient and discuss how the standard library uses the same approach.

  1. Copy-on-Write
  2. Structs
  3. Value Types
October 14, 2016
Subscribers-Only

Subscribers Only

#18 Adding Search to the Ledger GUI App 16:00

In this episode, we implement search functionality for our Ledger GUI app. In the process, we leverage several aspects we've talked about before, such as connecting view controllers, managing application state, and parsing user input.

  1. Architecture
  2. Parsing
September 30, 2016
Subscribers-Only

Subscribers Only

#16 Building Parser Combinators (Part 2) 21:30

We continue to implement some of the more challenging parts of parser combinators. Join us for mental gym session part two!

Subscribers-Only

Subscribers Only

#14 Growing Trees with Classes and Structs 28:11

We build a tree structure beginning with a flat array of Ledger account names. We first implement the tree using a class, and then we refactor it to a struct and discuss the differences and tradeoffs involved.

Subscribers-Only

Subscribers Only

#12 Evaluating Transactions 25:43

We evaluate transactions using the code from the previous episode. We need continuous refactoring to keep our code simple and clean.

Subscribers-Only

Subscribers Only

#8 Networking: POST Requests 18:40

We extend the networking code from the first episode to support POST requests. Besides using Swift's enums with associated values and generics, we get to implement a map function on a custom data type.

Subscribers-Only

Subscribers Only

#6 Generic Table View Controllers 19:42

We explore how Swift's generics can be used to create a simple, reusable table view controller. As a welcome side effect, this process helps us keep our view controller code clean.

Subscribers-Only

Subscribers Only

#4 Rendering CommonMark (Part 2) 18:33

We continue building the CommonMark renderer we started in episode #2. This time, we add customizable styles using structs and inout parameters.

Subscribers-Only

Subscribers Only

#2 Rendering CommonMark 23:15

We create attributed strings from CommonMark. We continually refactor our code to make the central logic short and understandable.