Swift 6 Concurrency (Part 5)
We abstract all database accesses in a class to avoid switching isolating contexts all the time.
Episode 428 · Nov 08
Swift is a complex language. While many of the more advanced features and oddities stay out of sight in everyday iOS development, studying these aspects provides many learning opportunities. This collection covers some of the lesser-known aspects of the Swift language.
62 Episodes · 21h59min
We abstract all database accesses in a class to avoid switching isolating contexts all the time.
Episode 428 · Nov 08
We add a SQLite persistency layer to the project and, once again, run into several concurrency errors.
Episode 427 · Nov 01
We refactor the code to take a snapshot of the web view into the common SwiftUI reader pattern.
Episode 426 · Oct 25
We add a web view to the project and try two different methods to take a snapshot asynchronously.
Episode 425 · Oct 18
We start a new macOS project to explore Swift 6's concurrency features.
Episode 424 · Oct 11
We show some more use cases for structural programming, like generating random values.
Episode 384 · Dec 08 2023
We adapt our existing macros to support the new separation between types and values.
Episode 383 · Dec 01 2023
We restructure our library to separate the structure of types from their values.
Episode 382 · Nov 24 2023
We add support for enums to our structural programming library.
Episode 381 · Nov 17 2023
We use our structural programming library to generate SwiftUI forms for arbitrary structs.
Episode 380 · Nov 10 2023
We use Swift macros to generate the structural representation of structs.
Episode 379 · Nov 03 2023
We introduce a concept called structural programming and take the first steps toward an implementation.
Episode 378 · Oct 27 2023
We continue the macro implementation with generating getters and setters for the observed properties.
Episode 365 · Jul 28 2023
We implement a macro to automatically generate the code necessary for observation.
Episode 364 · Jul 21 2023
We make one-time observation calls work by working with observer IDs.
Episode 363 · Jul 14 2023
We begin reimplementing Swift's new observation mechanism by tracking access to observable objects.
Episode 362 · Jul 07 2023
To conclude this series, we render the result of our attributed string builder to a PDF file.
Episode 342 · Feb 10 2023
We add support for Markdown and make it styleable using a custom stylesheet.
Episode 341 · Feb 03 2023
We add support for images and SwiftUI embeds to our attributed string builder.
Episode 340 · Jan 27 2023
We add modifiers to apply various kinds of attributes and integrate Swift syntax highlighting.
Episode 339 · Jan 20 2023
We refactor the attributed string builder to support joining with a configurable separator.
Episode 338 · Jan 13 2023
We begin implementing an attributed string builder to replace the legacy infrastructure for rendering our books.
Episode 337 · Jan 06 2023
We build a UI for creating chains of async algorithms and visualizing the results.
Episode 307 · Jun 03 2022
We refactor our code to support combining multiple async algorithms.
Episode 306 · May 27 2022
We add support for more algorithms, like zip and combineLatest, and clean up our code.
Episode 305 · May 20 2022
We add drag gestures to make the input streams interactive.
Episode 304 · May 13 2022
We transform arrays of events into async streams, run the merge algorithm on them, and visualize the result.
Episode 303 · May 06 2022
We start a new project to visualize the algorithms from the new Swift Async Algorithms package.
Episode 302 · Apr 29 2022
We add cancelation to the AsyncStream-based interface of our web crawler.
Episode 290 · Feb 04 2022
We refactor our web crawler to report its results via an AsyncStream instead of an observable object.
Episode 289 · Jan 28 2022
We use Swift's manual continuation APIs to replace a Task.sleep in our web crawler.
Episode 288 · Jan 21 2022
We parallelize the web crawler using a task group and an actor for synchronization.
Episode 287 · Jan 14 2022
We start implementing a concurrent web crawler to experiment with task groups and actors.
Episode 286 · Jan 07 2022
We bridge between URLSession's delegate methods and an async version of the delegate protocol.
Episode 284 · Dec 10 2021
We experiment with modeling delegate callbacks as events in an AsyncStream.
Episode 283 · Dec 03 2021
We explore ways to bridge between the old and new concurrency worlds using tasks and continuations.
Episode 282 · Nov 26 2021
We start implementing a download manager as a sample project for exploring Swift's new concurrency model.
Episode 281 · Nov 19 2021
We look at the two different ways async streams can be used and how this relates to memory usage.
Episode 272 · Sep 17 2021
We leverage async/await to write synchronous parsing functions for asynchronous streams of data.
Episode 271 · Sep 10 2021
We build two more async sequences: one to flatten sequences of data, and another one to parse XML.
Episode 270 · Sep 03 2021
We dive into Swift's new async APIs and implement async sequences for chunking and decompressing data.
Episode 269 · Aug 27 2021
We show a parsing technique that we use for many parsing tasks in our day-to-day work.
Episode 170 · Sep 20 2019
We refactor our string interpolation code to allow concatenation of multiple interpolated SQL queries.
Episode 144 · Mar 22 2019
We use Swift 5's new string interpolation API to automatically insert placeholders in SQL queries.
Episode 143 · Mar 15 2019
We add support for arrays by implementing an unkeyed decoding container and use custom decoding logic for dates and URLs.
Episode 116 · Aug 31 2018
We implement a custom XML decoder that allows us to decode responses from an XML API using Decodable.
Episode 115 · Aug 24 2018
We're using Swift's Mirror and Decodable APIs to generate database queries for structs in our Swift Talk backend project.
Episode 114 · Aug 17 2018
We discuss many considerations and techniques for working with optionals.
Episode 93 · Mar 23 2018
We use Swift's pointer APIs to read a text file and split it into lines without using Swift's collection and string types.
Episode 92 · Mar 16 2018
We implement a concurrent version of the map method for arrays.
Episode 90 · Mar 02 2018
We look at how to work with ranges in a mixed Swift String/NSString environment.
Episode 80 · Dec 15 2017
We benchmark the CSV parsing code from the previous episode and refactor it to become an order of magnitude faster.
Episode 79 · Dec 08 2017
We write a simple CSV parser as an example demonstrating how to work with Swift's String and Substring types.
Episode 78 · Dec 01 2017
We clean up our layout code by introducing helper functions that leverage Swift's key paths.
Episode 75 · Nov 10 2017
Brandon Kase joins us to show how Swift's type system can be leveraged to check file paths at compile time.
Episode 71 · Oct 13 2017
Swift 4's new features lets us delete code we've written in previous episodes.
Episode 52 · Jun 02 2017
We look at multiple ways to create variables that have a class type but also conform to a protocol.
Episode 46 · Apr 21 2017
Mutating a nested untyped dictionary can be a challenge. To solve it we discuss the mutability of value types and the concept of l-values.
Episode 31 · Jan 06 2017
We refactor a class hierarchy using a protocol and discuss the differences between both approaches.
Episode 29 · Dec 16 2016
We talk about a familiar but surprisingly tricky problem: splitting an array into groups of elements. We discuss the pros and cons of our own solutions along with the solutions people sent us via Twitter!
Episode 23 · Nov 04 2016
We can change structs by mutation, functional chaining, and inout parameters. We discuss how they differ at the call site and why they’re all equivalent.
Episode 21 · Oct 21 2016
We use copy-on-write to write an efficient struct wrapper around NSMutableData and discuss how the standard library uses the same approach.
Episode 20 · Oct 14 2016