Actors in Swift: The Problem They Solve and How it Works
4 months ago • 1 min readA couple of days ago, I wrote an article about AsyncGate, built by Matt—a way to solve actor rentrency. Writing it scratched an itch, but it also left me with a bigger question buzzing in the back of my head: what are actors actually for? How do they work under the hood? And why did Swift bother adding them in the first place? 🤔 So I did what any curious developer would do—I went straight to the source and read the actor proposal, SE-0306. And honestly? Best decision I’ve made in a while 😅....
READ POSTHow Do You Build a Mutex That Works with async/await ?
4 months ago • 1 min readA couple of days ago I ran into a really interesting use case: I wanted to protect a method from being called more than once at a time. You might think "actor, done" — but nope, an actor won't save you here. Because of actor reentrancy, the moment your method hits an await and suspends, another task can sneak in and start running the same method. Mutual exclusion across suspension points? Not guaranteed. The classic tool for "only one thing touches this at a time" is a Mutex — in general CS...
READ POSTA Lesson in Patience: From Pasta to Life 🍝
over 1 year ago • 1 min readThis past week, I embarked on a new adventure - cooking classes! While I'll share more about how this decision ties into creativity in my next newsletter, today I want to focus on an unexpected lesson I learned while making fresh pasta. As I stood there learning to mix, knead, and shape the pasta dough, I discovered that the secret to excellent pasta isn't just in the ingredients - it's in the patience. Each step demands its own time: the careful mixing, the rhythmic kneading, and the precise...
READ POSTWe can’t touch that code, it’s callback based
over 1 year ago • 1 min read‘We can’t touch that code — it’s all callback-based!’ Sound familiar? As a developer, you’ve probably heard this countless times, or even said it yourself. Modern Concurrency promises cleaner more maintainable code with its elegant async/await syntax. Yet many teams find themselves stuck with legacy codebase, feeling like they’re forced to choose between modern development practices and stable working systems. But what if you didn’t have to choose? At Klivvr, we faced this exact challenge....
READ POSTThe Key to Growth 📈
over 1 year ago • 1 min readWhen I was about to graduate from Electric Engineering in the last semester I decided to shift my career to be an iOS software engineer. I had no idea how to reach this goal and I wasn't sure if I will make it, the only thing I knew is that this is the one thing I am passionate about and want to spend my time doing. On 2 of February 2023, I started by first swift lesson where I have learned how to print "Hello, World" 😂. Picture of me writing my first swift code on 2 Feb 2023 Now after just 2...
READ POST