Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.
Avoid being a link dump. Try to provide only valuable well tuned information.
Neural network links before starting with transformers.
Sometimes you just have to purge. With Xcode, it helps to completely blow away the Derived Data and SPM Cache directories. These directories contain all of the build artifacts produced by Xcode and resolved Swift packages. When a clean action does not completely reset your build it is time to purge.
These 2 functions can be added to your shell so you can simply run xcpurge
to send Derived Data and SPM Cache to your Trash. You can recover it if necessary.
You likely are now using zsh
with macOS and so you can update ~/.zshrc
to define these functions. What I recommend is creating a folder at ~/.shell
and create a file named ~/.shell/functions
in that folder. Add the functions below to this file. Make sure to also run chmod u+x ~/.shell/functions
and then add source $HOME/.shell/functions
to ~/.zshrc
so your shell has these functions defined. You can then run xcpurge
or trash
like any other command. The first time you run it you will need to grant permission since i
@dynamicMemberLookup | |
struct Partial<Wrapped> { | |
private struct AnyProperty { | |
let keyPath: PartialKeyPath<Wrapped> | |
let value: Any | |
let writer: (inout Wrapped, Any) -> Void | |
init<T>(keyPath: WritableKeyPath<Wrapped, T>, value: T) { | |
self.keyPath = keyPath | |
self.value = value |
import Foundation | |
import SwiftUI | |
extension EnvironmentValues { | |
public func value<T>(_: T.Type = T.self, forKey key: String) -> T? { | |
guard let value = first(where: { name($0, equals: key) }) else { | |
print("No EnvironmentValue with key '\(key)' found.") | |
return nil | |
} |
import Darwin | |
import Foundation | |
import UIKit | |
// https://github.com/xybp888/iOS-SDKs/blob/master/iPhoneOS17.1.sdk/System/Library/PrivateFrameworks/CoreSVG.framework/CoreSVG.tbd | |
// https://developer.limneos.net/index.php?ios=17.1&framework=UIKitCore.framework&header=UIImage.h | |
@objc | |
class CGSVGDocument: NSObject { } |
public protocol NestedCodingKey: CodingKey { | |
var nestedKeys: [String] { get } | |
} | |
@propertyWrapper | |
public struct NestedKey<T: Codable>: Codable { | |
public var wrappedValue: T | |
public init(wrappedValue: T) { | |
self.wrappedValue = wrappedValue |
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |