Author: Chris Lattner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # update.sh | |
| # | |
| # Copyright ©2017–2019 Jeremy David Giesbrecht. | |
| # | |
| # Soli Deo gloria. | |
| # | |
| # Licensed under the Apache Licence, Version 2.0. | |
| # See http://www.apache.org/licenses/LICENSE-2.0 for licence information. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @NSApplicationMain | |
| class AppDelegate: NSObject, NSApplicationDelegate { | |
| var window: NSWindow? | |
| func applicationDidFinishLaunching(_ aNotification: Notification) { | |
| // Insert code here to initialize your application | |
| mainWindowController = MainWindowController() | |
| mainWindowController?.showWindow(self) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // UserDefaults+Codable.swift | |
| // Converter UltraLight | |
| // | |
| // Created by Brent Royal-Gordon on 8/31/17. | |
| // Copyright © 2017 Architechies. All rights reserved. | |
| // MIT-licensed, go nuts with it. | |
| // | |
| import Foundation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Name of the resource we're selectively copying | |
| GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist | |
| # Get references to dev and prod versions of the GoogleService-Info.plist | |
| # NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually) | |
| GOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Dev/${GOOGLESERVICE_INFO_PLIST} | |
| GOOGLESERVICE_INFO_PROD=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Prod/${GOOGLESERVICE_INFO_PLIST} | |
| # Make sure the dev version of GoogleService-Info.plist exists | |
| echo "Looking for ${GOOGLESERVICE_INFO_PLIST} in ${GOOGLESERVICE_INFO_DEV}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // watsonkitty playground | |
| import Cocoa | |
| protocol CapnSwiftyReader { | |
| } | |
| protocol CapnSwiftyBuilder { |
- Proposal: SE-XXXX
- Authors: Chris Lattner, Joe Groff
Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.
This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // First, let's test out the basic design. This is basically just an | |
| // HList. | |
| // This recurses to the right because that makes subscripting simpler, | |
| // at the cost of making appending impossible to generalize. | |
| public protocol TupleProtocol: RandomAccessCollection | |
| where Index == Int, IndexDistance == Int, Element == Any | |
| { | |
| associatedtype First | |
| associatedtype Rest //: TupleProtocol |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Actor.Swift | |
| // | |
| // Copyright (c) 2017 Robert Brown | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is |