I just released my latest book - this one is on Async coding in Swift. I can continue the pre-pub price of $20 until my other distributors release it later this week.

If you buy one book this year - well it should be something more personally meaningful - but if you buy, say, seven - this should definitely be one of them.

https://editorscut.gumroad.com/l/async

The Curious Case of the Async Cafe

This is it - your introduction to all you need to use async await and friends."I laughed, I cried, it moved me - eventually" - a fake Chat Bot review we made upSwift's solution to asynchronous and concurrent code is now part of the language itself. The new syntax is easier to read and follow the logical flow of what in the past was complicated, fragmented, or deeply nested. With async/await you'll focus on tasks instead of threads or even queues."The Curious Case of the Async Cafe" is a quirky fast-paced tour of the components of modern concurrency in Swift including async, await, Tasks, using continuations to replace and wrap delegates and closure-based APIs, AsyncSequences and AsyncStreams, structured concurrency using async let and Task Groups, and, of course, actors. Updated for Xcode 14 and Swift 5.7 and tested on Apple Silicon. ContentsChapter 1: Async, Await, and TaskWe BeginErrorsThe (too) Big SleepIntroducing async / awaitTaskAsync and ErrorsTestingBe CarefulChapter 2: ContinuationsThe Delegate PatternDelegate to ContinuationsMultiple ContinuationsUnsafe ContinuationsThrowing ContinuationsClosures and CallbacksAsync AlternativesAsync WrappersRefactoringsURLSession and Closures with ErrorsChapter 3: AsyncSequences and AsyncStreamsNotificationsIntroducing AsyncStreamSequences of NotificationsSendable and Actor BoundariesTransforming AsyncSequencesSequence PipelinesCombineAsyncStream ContinuationsContinuous DeliveryAsyncAlgorithmsChapter 4: Structured ConcurrencyUnstructured Async CallsAsync LetCancelling TasksTask ValuesUnstructured App Store SearchTaskGroupsSequences of TaskGroupsAsyncImageChapter 5: ActorsOn and Off the Main ActorShared Mutable StateActorsSuspending and ReentrancyNonisolated MembersCommunication between ActorsGlobal ActorsTaskLocalCreating Distributed ActorsUsing Distributed ActorsEpilogue

Gumroad
@dimsumthinking Just purchased it!
@objectref Thank you
Async Cafe book of @dimsumthinking has the BEST explanation for Actors that I have ever read anywhere. If you need to understand correctly and deeply this thing, buy his book #swift
@objectref Thanks Anthony - that means a lot
@objectref bought it yesterday, but I just barely skimmed through. Can't wait to get to read it @dimsumthinking
@CanIntoSpace @dimsumthinking I read most content in 2 days but the Actors part is what impressed me the most!
@objectref yeah, I'm pretty excited about that part. I never used them extensively, so I'd like to understand how they work @dimsumthinking
@CanIntoSpace @dimsumthinking Coming from #golang to #swift again, Actors are really changing my way of thinking about isolated execution
@dimsumthinking Instapurchase. Have been waiting for this, Daniel. See you on the other side.
@dimsumthinking Almost done with the first chapter. Great read so far. I’m slowly progressing from knowing how to use async to why.
@ohennig thank you- that’s my goal
@dimsumthinking 23 days later I’m only on chapter three, but I had to go back to an old project and rewrite a lot of the code, based on what I’ve learned so far.
@ohennig As much as I love the sequences and streams material in Ch 3 - I think you're really going to like the structured concurrency stuff coming in Ch 4
@dimsumthinking I was just taking a break to prepare dinner for my family, but I guess they can wait a bit longer…
@dimsumthinking Turns out the family didn’t want to starve, so I’m still on chapter 3, but I found a ā€typoā€ in section 3.
The last } in the NotificationsReceiver deinit isn’t marked for deletion when we switch to Task.
I hope it’s ok to file a bug report this way. If not, please let me know.
Still think it’s a great book. 😊
@ohennig I'm always grateful to get corrections - I have a link in the book to https://github.com/editorscut/ec013async/issues as it makes it easier for me to track to make sure I've actually made the corrections. As to the other matter - family and food come before this book. I've checked and the book has been corrected for the next update. Thank you again
Issues Ā· editorscut/ec013async

Contribute to editorscut/ec013async development by creating an account on GitHub.

GitHub
@dimsumthinking In that case I’ll feel proud that I could make a small ā€œcontributionā€, less than two years in my swift journey.

@dimsumthinking Found one more at the end of 3/7. makeAsyncIterator returns some AsyncIteratorProtocol instead of just AsyncIterator.

I tried my best to figure out on my own why the code from the book wouldn't compile, but I had to look at the finished code from github.

@ohennig thanks I’ll look for the issue you filed when I get home

@dimsumthinking Let me know if you would like me to mail suggestions instead?

In chapter 4/3 under isCancelled, you refer to NumberVendor, but we previously put nextPair() in EntryController.

@ohennig Thank you - I thought I’d pointed you at https://github.com/editorscut/ec013async/issues which is the best place to make suggestions. Here is fine or email but I am likely to lose the corrections where in github I mark them when addressed
Issues Ā· editorscut/ec013async

Contribute to editorscut/ec013async development by creating an account on GitHub.

GitHub
@dimsumthinking oh, I’m sorry. The link was truncated so I didn’t realize you referred to the issues section. šŸ¤¦ā€ā™‚ļø
@ohennig No problem - I appreciate your help
@dimsumthinking You weren't wrong about chapter 4, but 5 was a real gold mine.
I only have the last section left, but I know I'll revisit this book many times.
@dimsumthinking Is there/will there be a printed version?
@tammofreese I agreed to let the prags distribute my book so that we would have paper versions but they say they don’t do it for third parties so sorrry no
@dimsumthinking Sad to hear that, thanks for the fast answer though!