The 6 "levers" in docs/conformance/levers.md are detection infrastructure — they help find gaps faster but don't close them. Building a better microscope doesn't fix the specimen. The actual conformance improvements come from fixing known protocol gaps.
| #!/bin/bash | |
| # Leyline client setup for macOS. | |
| # Patches the Arena client to connect to the Leyline game server. | |
| # | |
| # Usage: | |
| # ./setup.sh on — patch Arena to connect to leyline.games | |
| # ./setup.sh off — restore Arena to stock (removes services.conf) | |
| # | |
| # Override MTGA path: MTGA_PATH="/path/to/MTGA.app" ./setup.sh on |
I suspect most developers are using the libdispatch inefficiently due to the way it was presented to us at the time it was introduced and for many years after that, and due to the confusing documentation and API. I realized this after reading the 'concurrency' discussion on the swift-evolution mailing-list, in particular the messages from Pierre Habouzit (who is the libdispatch maintainer at Apple) are quite enlightening (and you can also find many tweets from him on the subject).
- https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170828/date.html
- https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170904/date.html
- https://twitter.com/pedantcoder
My take-aways are:
Javascript is fun
a = new Date('2019-03-31T00:00:00.000Z');
a.setDate(a.getDate() + 1);
console.log(a);| Firefox macos | Safari macos | chrome macos |
|---|
| #!/usr/bin/env python | |
| import lldb | |
| def process(debugger, command, result, internal_dict): | |
| lldb.debugger.HandleCommand(""" | |
| expr -l swift -- | |
| func $process(_ request: URLRequest) { | |
| func curl(_ request: URLRequest) -> String { | |
| guard let url = request.url?.absoluteString else { |
| struct MinimalDecoder : Decoder { | |
| var codingPath = [CodingKey?]() | |
| var userInfo = [CodingUserInfoKey : Any]() | |
| public func container<Key>(keyedBy type: Key.Type) throws -> KeyedDecodingContainer<Key> { | |
| return KeyedDecodingContainer(MinimalKeyedDecodingContainer<Key>(decoder: self)) | |
| } | |
| public func unkeyedContainer() throws -> UnkeyedDecodingContainer { | |
| return DecodingContainer(decoder: self) |
| // Class Keyword: NSManagedObject is defined in objective-c (not sure if it matters) | |
| // .keywords is CoreData to-many relationship pointing to "Keyword" objects. | |
| // How do I convert .keywords to [Keyword]? | |
| po type(of: keywords) | |
| _NSFaultingMutableOrderedSet | |
| po keywords is NSOrderedSet | |
| true |
| Adyen Test Card Numbers | |
| These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform. | |
| For all cards use the following expiration and CVV2/CVC2/or CID for Amex. | |
| For all cards: | |
| Expiration Dates CVV2 / CVC3 CID (American Express) | |
| 06/2016 OR 08/2018 737 7373 |
A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.
Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer.
In that case, the programmer isn't allowed to say x = true; that would be an invalid program.
The compiler will refuse to compile it, so we can't even run it.
| import Result | |
| import Unbox | |
| public enum Method: String { // Bluntly stolen from Alamofire | |
| case OPTIONS = "OPTIONS" | |
| case GET = "GET" | |
| case HEAD = "HEAD" | |
| case POST = "POST" | |
| case PUT = "PUT" | |
| case PATCH = "PATCH" |