I hereby claim:
- I am lukeredpath on github.
- I am lukeredpath (https://keybase.io/lukeredpath) on keybase.
- I have a public key ASAUz6CDWah_lWnyO27v-PoWTwHcOye7npHtcYVaBjlwrwo
To claim this, I am signing this object:
enum AppState: Equatable { | |
case featureOne(FeatureState) | |
case featureTwo(FeatureState) | |
case featureThree(FeatureState) | |
} | |
enum AppAction: Equatable { | |
case featureOne(FeatureAction) | |
case featureTwo(FeatureAction) | |
case featureThree(FeatureAction) |
extension Data { | |
// Returns a base64 encoded string, replacing reserved characters | |
// as per https://tools.ietf.org/html/rfc7636#section-4.2 | |
func pkce_base64EncodedString() -> String { | |
base64EncodedString() | |
.replacingOccurrences(of: "+", with: "-") | |
.replacingOccurrences(of: "/", with: "_") | |
.replacingOccurrences(of: "=", with: "") | |
.trimmingCharacters(in: .whitespaces) | |
} |
private func hexString(_ iterator: Array<UInt8>.Iterator) -> String { | |
return iterator.map { String(format: "%02x", $0) }.joined() | |
} | |
let exampleVerifier = "kM83K571n5KFW9u29Xu2qSqgoUwep4I2jZw8FGZg4Yr" | |
let verifierData = exampleVerifier.data(using: .utf8)! | |
// CommonCrypto implementation | |
var buffer = [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH)) | |
_ = verifierData.withUnsafeBytes { CC_SHA256($0.baseAddress, CC_LONG(verifierData.count), &buffer) } |
extension RawRepresentable where Self.RawValue == String { | |
/// Parses out the first matching raw value from a list of possible values, or returns nil. | |
/// | |
/// Example: | |
/// | |
/// enum SomeValues: String, CaseIterable { | |
/// case one | |
/// case two | |
/// } | |
/// |
struct TaggedOutput<Output> { | |
let token: AnyHashable | |
let output: Output | |
} | |
struct Effect<Output>: Publisher { | |
typealias Failure = Never | |
let base: AnyPublisher<TaggedOutput<Output>, Failure> | |
let token: AnyHashable |
2020-08-04 19:56:05.471109+0100 AudioSimulatorBug[5723:385998] libMobileGestalt MobileGestaltCache.c:38: No persisted cache on this platform. | |
2020-08-04 19:56:05.494965+0100 AudioSimulatorBug[5723:385162] [SceneConfiguration] Encoded configuration for UIWindowSceneSessionRoleApplication contained a UISceneDelegate class named "(null)", but no class with that name could be found. | |
2020-08-04 19:56:10.523921+0100 AudioSimulatorBug[5723:385162] HALCADClient::ConnectToServer: failed to find the AHS sub-server port, Error: 0x10004003 | |
2020-08-04 19:56:15.525034+0100 AudioSimulatorBug[5723:385162] HALCADClient::ConnectToServer: failed to find the AHS sub-server port, Error: 0x10004003 | |
2020-08-04 19:56:15.525272+0100 AudioSimulatorBug[5723:385162] HALDefaultDevice::Initialize: couldn't add the default input device listener, Error: 268451843 (\^P) | |
2020-08-04 19:56:20.525255+0100 AudioSimulatorBug[5723:385162] HALCADClient::ConnectToServer: failed to find the AHS sub-server port, Error: 0x10004003 | |
2020-08-04 19:56:2 |
2020-07-23 17:54:20.302611+0100 Poker Clock[15031:1458990] libMobileGestalt MobileGestaltCache.c:38: No persisted cache on this platform. | |
2020-07-23 17:54:25.428029+0100 Poker Clock[15031:1454775] HALCADClient::ConnectToServer: failed to find the AHS sub-server port, Error: 0x10004003 | |
2020-07-23 17:54:30.429086+0100 Poker Clock[15031:1454775] HALCADClient::ConnectToServer: failed to find the AHS sub-server port, Error: 0x10004003 | |
2020-07-23 17:54:30.429312+0100 Poker Clock[15031:1454775] HALDefaultDevice::Initialize: couldn't add the default input device listener, Error: 268451843 (\^P) | |
2020-07-23 17:54:35.430178+0100 Poker Clock[15031:1454775] HALCADClient::ConnectToServer: failed to find the AHS sub-server port, Error: 0x10004003 | |
2020-07-23 17:54:35.430464+0100 Poker Clock[15031:1454775] HALDefaultDevice::Initialize: couldn't add the default output device listener, Error: 268451843 (\^P) | |
2020-07-23 17:54:40.431523+0100 Poker Clock[15031:1454775] HALCADClient::ConnectToServer: failed to find the AHS su |
// full definition omitted: | |
public struct ValidatorOf<Value, Error> { | |
public let validate: (Value) -> Validated<Value, Error> | |
} | |
extension ValidatorOf { | |
static func its<T>(_ transform: @escaping (Value) -> T, _ validator: ValidatorOf<T, Error>) -> Self { | |
validator.pullback(transform) | |
} | |
} |
import UIKit | |
import Validated | |
extension Validated { | |
func mapErrors<LocalError>(_ transform: (Error) -> LocalError) -> Validated<Value, LocalError> { | |
switch self { | |
case let .valid(value): | |
return .valid(value) | |
case let .invalid(errors): | |
return .invalid(errors.map(transform)) |
I hereby claim:
To claim this, I am signing this object: