Watched some videos from dotSwift conferences:

  • short video from dotSwift 2017 Subclassing structs. Title is misleading.

  • Marin Todotov’s talk from dotSwift 2017 RxSwift on iOS. debounce(_:, scheduler:) is nice! I like how Marin defines what RxSwift is:
    1. Sync-like async code
    2. With functionalaspect
  • small talk from dotSwift 2017 IOT and iOS. Nothing new.

  • talk Scientific Swift from dotSwift 2019. Curious. Nice reminder about Accelerate framework from the talk:
          import Accelerate
    
          extension Array where Element == Double {
              func sin() -> [Double] {
                  var values = [Double](repeating: 0, count: count)
                  var selfie = self
                  var selfieCount = Int32(count)
                  vvsin(&values, &selfie, &selfieCount)
                  return values
              }
          }
    
          // Playing with it in playground found that vectorised (SIMD) calculations of sin differ from scalar one. Difference is subtle, but it exists:
    
          let a = Array(stride(from: -1.0, to: 1.0, by: 0.1))
          let diff = zip(a.map(sin), a.sin()).map{ $0-$1 }
          print(diff)
          // printed this for one run (because of random input results differ between runs)
          // [0.0, 1.1102230246251565e-16, -1.1102230246251565e-16, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.1102230246251565e-16, 0.0] 
    
  • talk High performance systems in Swift. Good reminder about isKnownUniquelyReferenced(_:). Talk is mostly about implementing reference semantic for classes to speed up copying.

Working on this PR found that some nice Swift libraries for mapping objects exist (more could be found in awesome-ios):