I hereby claim:
- I am tkrajacic on github.
- I am tkrajacic (https://keybase.io/tkrajacic) on keybase.
- I have a public key ASDDk0yO8dsOScUPzSZFboau5TQpfjkNH_Ca1sSmT-1Jvgo
To claim this, I am signing this object:
| Date/Time: 2013-02-25 14:03:47 +0100 | |
| OS Version: 10.8.2 (Build 12C3006) | |
| Architecture: x86_64 | |
| Report Version: 11 | |
| Command: TextMate | |
| Path: /Applications/TextMate.app/Contents/MacOS/TextMate | |
| Version: 2.0-alpha.9385 (9385) | |
| Parent: launchd [150] |
| Process: ruby [45753] | |
| Path: /Users/USER/*/ruby | |
| Identifier: ruby | |
| Version: 0 | |
| Code Type: X86-64 (Native) | |
| Parent Process: zsh [44956] | |
| User ID: 501 | |
| Date/Time: 2013-07-18 13:06:50.654 +0900 | |
| OS Version: Mac OS X 10.8.4 (12E55) |
| Process: Xcode [27882] | |
| Path: /Applications/Xcode-Beta.app/Contents/MacOS/Xcode | |
| Identifier: com.apple.dt.Xcode | |
| Version: 6.1 (6304) | |
| Build Info: IDEFrameworks-6304000000000000~4 | |
| Code Type: X86-64 (Native) | |
| Parent Process: launchd [204] | |
| Responsible: Xcode [27882] | |
| User ID: 501 |
| var value : String = "Test" { | |
| didSet { | |
| print("Changed Item Value") | |
| } | |
| } | |
| let newValue = "Test" | |
| private func changeIfNew<T: Comparable>(inout current: T, new: T) { | |
| // This evaluates to false (as current == new) and the loop is skipped yet the property observer is still triggered | |
| if current != new { |
I hereby claim:
To claim this, I am signing this object:
| * thread #19, queue = 'nio.nioTransportServices.connectionchannel', stop reason = breakpoint 2.1 | |
| * frame #0: 0x000000010000727a NIOTest`TPLinkResponseDecoder.channelRead(ctx=0x00006000026241e0, data=NIO.NIOAny @ 0x00007000084e7bd0, self=0x000060000024f5c0) at TPLinkResponseDecoder.swift:25 | |
| frame #1: 0x00000001000080d9 NIOTest`protocol witness for _ChannelInboundHandler.channelRead(ctx:data:) in conformance TPLinkResponseDecoder<A> at <compiler-generated>:0 | |
| frame #2: 0x0000000100469e72 NIO`ChannelHandlerContext.invokeChannelRead(data=NIO.NIOAny @ 0x00007000084e7bd0, self=0x00006000026241e0) at ChannelPipeline.swift:1285 | |
| frame #3: 0x000000010046e2a1 NIO`ChannelHandlerContext.fireChannelRead(data=NIO.NIOAny @ 0x00007000084e7bd0, self=0x0000600002624180) at ChannelPipeline.swift:1098 | |
| frame #4: 0x0000000100013d4b NIOTest`TPLinkEncryptionHandler.channelRead(ctx=0x0000600002624180, data=NIO.NIOAny @ 0x00007000084e7fe0, self=0x0000600000005490) at TPLinkEncryptionHandler.swift:20 | |
| frame #5: 0x000 |
| // From objc.io's app architecture book | |
| // https://github.com/objcio/app-architecture | |
| import Foundation | |
| extension NSObjectProtocol where Self: NSObject { | |
| func observe<Value>(_ keyPath: KeyPath<Self, Value>, onChange: @escaping (Value) -> ()) -> Disposable { | |
| let observation = observe(keyPath, options: [.initial, .new]) { _, change in | |
| // See: https://bugs.swift.org/browse/SR-6066 | |
| let newValue = change.newValue ?? (nil as Any? as! Value) |
| import Foundation | |
| public final class PersistedArray<T: Codable> { | |
| private var array: [T] { | |
| didSet { | |
| do { | |
| try save() | |
| } catch { | |
| print("\(error)") | |
| } |