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
| func f(code:Void -> Void) { | |
| print("no throw version called") | |
| code() | |
| } | |
| func f<Result>(code:Void throws -> Result) rethrows -> Result { | |
| print("rethrow version called") | |
| return try code() | |
| } |
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
| import Cocoa | |
| class A<T> : NSViewController { | |
| var x:T? = nil | |
| override init?(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { | |
| super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) | |
| } | |
| } | |
| class B : A<NSString> { | |
| override init?(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { |
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
| // xcrun swift generic-link-error.swift | |
| // produces: | |
| // LLVM ERROR: Program used external function '_OBJC_METACLASS_$__TtC4main1A' which could not be resolved! | |
| import Cocoa | |
| class A<X> : NSObject { | |
| override class func keyPathsForValuesAffectingValueForKey(key: String) -> Set<String> { | |
| return super.keyPathsForValuesAffectingValueForKey(key) |
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
| 2015-11-06 11:34:23.731 OmniFocus-Debug[1518:936775] *** Starting OBPerformRuntimeChecks | |
| 2015-11-06 11:34:23.795 OmniFocus-Debug[1518:936775] Method context has conflicting type signatures between class and its superclass: | |
| signature ^{GraphicsContext3D=Iii{RetainPtr<WebGLLayer>=^v}@{HashMap<unsigned int, WebCore::GraphicsContext3D::ShaderSourceEntry, WTF::IntHash<unsigned int>, WTF::HashTraits<unsigned int>, WTF::HashTraits<WebCore::GraphicsContext3D::ShaderSourceEntry> >={HashTable<unsigned int, WTF::KeyValuePair<unsigned int, WebCore::GraphicsContext3D::ShaderSourceEntry>, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<unsigned int, WebCore::GraphicsContext3D::ShaderSourceEntry> >, WTF::IntHash<unsigned int>, WTF::HashMap<unsigned int, WebCore::GraphicsContext3D::ShaderSourceEntry, WTF::IntHash<unsigned int>, WTF::HashTraits<unsigned int>, WTF::HashTraits<WebCore::GraphicsContext3D::ShaderSourceEntry> >::KeyValuePairTraits, WTF::HashTraits<unsigned int> >=^{KeyValuePair<unsigned int, WebCore::GraphicsCont |
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
| CompileC /Users/bungi/Library/Developer/Xcode/DerivedData/OmniFocus-awuidrenlcqzqucuyvzjajjoqbeo/Build/Intermediates/XMLData.build/Debug/XMLDataTestTool.build/Objects-normal/x86_64/XMLDataTestTool_main.o Tests/XMLDataTestTool_main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler | |
| cd /Users/bungi/Source/Omni/clean/OmniGroup/Applications/OmniFocus/XMLData | |
| export LANG=en_US.US-ASCII | |
| /Applications/Xcode-7.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=251 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu99 -fmodules -gmodules -fmodules-cache-path=/Users/bungi/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/bungi/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-m |
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
| XcodeMindWipe () { | |
| rm -rf ~/Library/Developer/Xcode/DerivedData | |
| find . -name $USER.xcuserdatad -o \( -name xcuserdata -o -name "*.xccheckout" \) -print0 | xargs -0 rm -rf | |
| } |
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
| #!/usr/local/bin/python | |
| # coding: utf-8 | |
| import cv2 | |
| import sys | |
| import numpy | |
| from matplotlib import pyplot as plt | |
| from scipy.spatial import distance | |
| """ |
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
| public class Measurement { | |
| public let value: Double | |
| public required init(_ value:Double) { | |
| self.value = value | |
| } | |
| } | |
| public struct Size { | |
| public let width:Measurement |
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
| protocol P { | |
| static var name: String { get } | |
| init(i:Int) | |
| } | |
| class A: P { | |
| static var name: String { | |
| get { return "A" } | |
| } | |
| required init(i:Int) {} |
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/zsh -euf | |
| # NOTE: In order for the -c flag to work, 'main' must not be stripped from the executable. | |
| # If it has been, you'll get the cryptic | |
| # | |
| # dtrace: failed to control pid 82297: process exited with status 0 | |
| # | |
| if [ $# -ne 1 ]; then | |
| echo "usage: $0 [executable-name|app-path|app-identifier]" 1>&2 |