Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
Lower the barrier of entry to adopting and understanding TypeScript. North star.
Understand the TypeScript Codebase enough to provide useful API documentation and fix bugs. Validated by having a more comprehensive set of tools for people to understand how the language and tooling works.
Make contributing to TypeScript easier, and reduce the amount of work maintainers need to do. Validated probably by the number of open PRs, and the number of external contributors per release.
Make it easier to people wanting to build tooling around TypeScript. Validated by seeing more usage of tools like the community discord, people shipping tools with TypeScript support by default etc.
/*: | |
Joe Groff: | |
> In a lot of the ways people use dictionaries/maps/hashtables, there's a type dependency between | |
> the keys and values, but most mainstream typed languages provide homogeneously-typed maps. | |
> Are there any that try to preserve more interesting type relationships between key and value? | |
> https://twitter.com/jckarter/status/1278739951568314368 | |
> As one example, it's common for specific keys to be associated with specific types, like in | |
> {"name": "Tanzy", "age": 13}, "name" should always map to a string, and "age" to a number. |
import Foundation | |
enum LexingError: Error, Equatable { | |
case syntaxError(String) | |
case unexpectedEOF | |
} | |
enum ParsingError: Error { | |
case expected(String) | |
case unexpectedToken(Token) |
import ContactTracing | |
extension CTExposureDetectionSession { | |
func addPositiveDiagnosisKeys(batching keys: [CTDailyTracingKey], completion: CTErrorHandler) { | |
if keys.isEmpty { | |
completion(nil) | |
} else { | |
let cursor = keys.index(keys.startIndex, offsetBy: maxKeyCount, limitedBy: keys.endIndex) ?? keys.endIndex | |
let batch = Array(keys.prefix(upTo: cursor)) | |
let remaining = Array(keys.suffix(from: cursor)) |
import Foundation | |
import Ink | |
func tidy(_ inputStr: String) -> String { | |
let task = Process() | |
task.launchPath = "/usr/local/Cellar/tidy-html5/5.6.0/bin/tidy" | |
task.arguments = ["--show-body-only", "yes", "--show-info", "no", "--show-warnings", "no", "--show-errors", "0"] | |
let input = Pipe() | |
let output = Pipe() |
import UIKit | |
#if canImport(SwiftUI) && DEBUG | |
import SwiftUI | |
struct UIViewControllerPreview<ViewController: UIViewController>: UIViewControllerRepresentable { | |
let viewController: ViewController | |
init(_ builder: @escaping () -> ViewController) { | |
viewController = builder() | |
} |
addmedia | |
addphoto | |
addvideo | |
appinfo | |
boot | |
bootstatus | |
clone | |
create | |
darwinup | |
delete |
# ... don't do this | |
import sys | |
from types import ModuleType | |
def callme(): | |
print("lol I'm a module") | |
class CallableModule(ModuleType): | |
def __call__(self, *args, **kwargs): |
#!/usr/bin/swift sh | |
import Foundation | |
import PromiseKit // @mxcl ~> 6.5 | |
import Swifter // @mattdonnelly == b27a89 | |
let swifter = Swifter( | |
consumerKey: "FILL", | |
consumerSecret: "ME", | |
oauthToken: "IN", | |
oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html" |