Read post Capture lists in Swift: what’s the difference between weak, strong, and unowned references?.

Read Wikipedia article Tail recursion about TCA (= tail call optimisation) in some programming languages.

Passed over Enumeration chapter in The Swift programming language guide.

Having this definition from chapter above:

    enum ArithmeticExpression {
        case number(Int)
        indirect case addition(ArithmeticExpression, ArithmeticExpression)
        indirect case multiplication(ArithmeticExpression, ArithmeticExpression)
    }

it is interesting to check real limitation (in regards of stack usage) of recursive implementation of following function:

    func evaluate(_ expression: ArithmeticExpression) -> Int {
        switch expression {
        case let .number(value):
            return value
        case let .addition(left, right):
            return evaluate(left) + evaluate(right)
        case let .multiplication(left, right):
            return evaluate(left) * evaluate(right)
        }
    }

Interesting to do something like in post Tail Recursion, Objective-C, and ARC . Hint for future self: -S key of swiftc is for producing Assembly output swiftc -S main.swift. Different -O options might be needed to experiment with different optimisation levels.

By the way, blog dev etc is not get updated but anyway has many interesting posts, like No parameters. That’s it: () (in (Objective-)C) in a function type declaration means unspecified parameters, not no parameters! This post I will reference when I fix seeing returning mutable collections from method/functions declared immutable return value Mutable Return Values. Very good explanation about self sizing view Auto Layout and Views that Wrap. Especially good is explained Why it doesn’t “just work”. In snippet from example interesting that [super layoutSubviews] is called twice.

    - (void)layoutSubviews {
        [super layoutSubviews];

        CGFloat availableLabelWidth = self.label.frame.size.width;
        self.label.preferredMaxLayoutWidth = availableLabelWidth;

        [super layoutSubviews];
    }

This Subclassing Delegates is also interesting.

And this Timers, Clocks, and Cocoa I could reference when seeing misused timers in apps.

Passed over Closures chapter of The Swift programming language guide.

Post INVERTED EXPECTATIONS mentions useful but barely mentioned property isInverted of XCTestExpectation:

    let notificationExpectation = expectation(forNotification: NSNotification.Name.SomeNotification, object: obj, handler: nil)
    notificationExpectation.isInverted = true
    // exercise your code and wait for the expectation
    wait(for: [notificationExpectation], timeout: 1.0)

Watched quite old talk Convolutional Neural Networks with Metal & Swift 2017 iOS 11 talk and 2018 iOS 12 talk to which I came over keras_mnist_demo repo to which I came exploring who left “🍀” comment in my PR. It did worth spending time watching.