Quantcast
Channel: Airspeed Velocity
Browsing latest articles
Browse All 10 View Live

My Talk at Swift Summit

Earlier in the year, I spoke at Swift Summit, and the video has just been posted. I also added some annotations to the slides with more info, credits and further links, which you can find here on...

View Article


Changes to the Swift Standard Library in 2.0 beta 1

OK don’t panic – it might look like a lot has changed, but not really. It’s more… transformed. For the better. Nothing the migration assistant shouldn’t be able to handle. By far the biggest change in...

View Article


Image may be NSFW.
Clik here to view.

Protocol extensions and the death of the pipe-forward operator

So a while back I wrote about using some functional programming techniques in Swift to solve the Luhn credit card checksum problem. One of the suggestions in the article was defining and using |> to...

View Article

A persistent tree using indirect enums in Swift

UPDATE: now conforms to Swift 2.1b2 Suppose you want an ordered set. Set is great and all, but it’s unordered. You could always use a Set anyway, and sort the contents when needed. Or you could use an...

View Article

Changes to the Swift standard library in 2.0 betas 2..

So, I was waiting for enough library changes across a few betas to justify posting something, and then all of a sudden lots of stuff changed! So let’s start with: Flat Map Missed from my 2.0b1 changes...

View Article


Image may be NSFW.
Clik here to view.

Linked lists, enums, value types and identity

UPDATE: now conforms to Swift 2.1b2 Following on from the previous post, here’s some more on building collections from enums. For our book on Swift, we wrote a simple linked list example to use in a...

View Article

Image may be NSFW.
Clik here to view.

Arrays, Linked Lists and Performance

Patient: Doctor doctor, it hurts when I do this. Doctor: Well, don’t do that. On twitter, I wrote: Your reminder that building arrays with reduce, while fun, is accidentally quadratic. I was surprised...

View Article

Collection Indices, Slices, and Generics

I missed posting about the last couple of releases of Swift before it was open sourced, but now that I have some time to write a couple of posts over the holidays, here’s a one about this sentence in...

View Article


Generic Collections, SubSequences and Overloading

So, you’ve figured out the whole indices versus distances situation, and now you’re feeling pretty happy and you start trying out some more generic collection algorithms. And before long you smack your...

View Article


Image may be NSFW.
Clik here to view.

Writing A Generic Stable Sort

One more post on writing generic algorithms. Let’s take a non-trivial non-generic algorithm and write a generic version. We’ll port a Java implementation of merge sort, and also look at some other...

View Article
Browsing latest articles
Browse All 10 View Live