Swift Foundation contains a lot of useful functions on collection types. In the context of this blog post we are interested in map(_:) and prefix(while:). Map is used for transforming collection elements and prefix(while:) for getting a sequence containing initial elements until the predicate is true. In some cases the predicate used in the prefix(while:) can be expensive, or we just want to combine the information in prefix and map functions. One of such examples is when we use NSRegularExpression. More specifically, let’s take an example of processing a list… Read more Adding prefixMap for expensive operations in Swift →
Signal Path version 2.4 is out. This time it is a smaller release concentrating on optimizing file accesses when playing audio or just scrolling through the file.
In the previous blog post Reading data from a file with DispatchIO I built a small FileReader which enabled reading data from a file for random byte ranges. Signal Path uses… Read more Building a memory cache for a file reader in Swift →
Signal Path is an app which works with large files, even in several gigabytes. The app reads ranges from the file and visualizes the data. Signal Path heavily relies on… Read more Reading data from a file with DispatchIO →
Signal Path just got a new feature which was requested by users. Happy to announce that Signal Path 2.3 includes a audio replay feature. Now users can record audio and… Read more Signal Path 2.3 for macOS, iOS and iPadOS →
I was looking at formatters provided by Foundation framework and this time I would like to put some attention on MeasurementFormatter. Like the name says, it is used for creating… Read more Measurement, Unit, Dimension, and MeasurementFormatter on iOS →
Many apps use Core Data for persistence and also need to import data from a server. Imported items typically have a unique identifier which can be used for identifying them.… Read more Importing items from network to a Core Data store →
I have been writing a new blog post at least every second week and therefore in 2020 I have published total of 27 blog posts. It is time to take… Read more Most visited blog posts in 2020 →