swift

(discord/swift/2018/03/16/0) 関数の返り値の型としてvoidコンテキストの挙動について

概要 discord ios dev #swift 2018/03/16 関数の返り値の型としてvoidコンテキストの挙動について log rintaro - 2018/03/16 Rubyで「そのメソッドがvoid contextで呼ばれた否か」がとれるといいんだが…(Perlだととれる)。— FUJI Goro (@__gfx__) 2018年3…

(discord/swift/2018/03/15/0) tryとthrowをwrapしたrecover拡張について

概要 discord ios dev #swift 2018/03/15 tryとthrowをwrapしたrecover拡張について log omochimetaru - 2018/03/15 @lovee こんなのできた public func recover<R>(_ f: () throws -> R, ifError: (Error) -> R) -> R { do { return try f() } catch let error</r>…

(discord/swift/2018/03/14/0) Enum{n}Convertibleについて

概要 discord ios dev #swift 2018/03/14 enumを型定義により実現するパターンについて log omochimetaru - 2018/03/14 @tarunon 完全にこれが欲しくなってきた https://forums.swift.org/t/automatically-derive-properties-for-enum-cases/10843 ↑これの i…

【WIP】apple/swift - stdlib/public/runtime コードリーディング(全体)

概要 ErrorObject.h CFRuntimeBase SwiftErrorHeader SwiftError type errorConformance hashableBaseType hashableConformance getIndirectValue getValue swift_allocError swift_deallocError ErrorValueResult swift_getErrorValue swift_errorRetain sw…

malcommac/Hydra コードレビュー2 (then)

概要 前回HydraのPromiseについてコードを読んでいった 今回はPromiseを使う上で無視できないthenを深掘りしていく then Hydra/Promise+Then.swift at master · malcommac/Hydra · GitHub 定義を見ていく @discardableResult public func then<N>( in context: </n>…

構想 - APIクライアントライブラリ

概要 概要 HTTP Method Request Parameter 様々なAPIクライアントライブラリ Swift APIKit Alamofire Rust reqwest Python requests Ruby HTTPClient Faraday APIクライアントライブラリをこう作りたいっていう構想をまとめたい APIクライアントで必要な要素…

【WIP】apple/swift - stdlib/public/core/Codable.swift.gyb コードリーディング

概要 gyb : codable_types CodingKey Codable CodingUserInfoKey _DictionaryCodingKey _GenericIndexKey エンコード Encodable encode Encoder codingPath userInfo container unkeyedContainer singleValueContainer KeyedEncodingContainerProtocol Keyed…

(discord/swift/2018/03/13/1) Codableのtypealiasにstructを使ったtips

概要 discord ios dev #swift 2018/03/13 Codableのtypealiasにstructを使ったtips log omochimetaru - 2018/03/13 ときどき話題に出てくるCodableとJSONの話で、JSON表現用の型とモデルの型をわけて・・・ってパターン、こうやると少し楽になると気づいた g…

apple/swift - stdlib/public/SDK/ObjectiveC コードリーディング(全体)

概要 swift/stdlib/public/SDK/ObjectiveC at master · apple/swift · GitHub 概要 ObjectiveC.swift ObjCBool 定義 Selector 定義 NSZone autoreleasepool NSObject 等価性比較 & hash対応 CVarArg ObjectiveC.swift ObjCBool Objective-C BOOL型、64bitのi…

(discord/swift/2018/03/13/0) inout atributeの挙動について

概要 discord ios dev #swift 2018/03/13 inout atributeの挙動について log koher - 2018/03/13 最近、 inout 的に @escaping なクロージャ式の中からアクセスできないようにするけど、特に out したいわけじゃないというのを表せるものがあればいいんじゃ…

malcommac/Hydra コードレビュー1 (Promise)

概要 github.com 軽量なPromiseライブラリ Async&Awaitもサポートしてる 便利な独自オペレータも豊富で使い勝手が良い 導入 軽量を謳ってるだけあって依存してるライブラリもなくシンプルにHydraAsyncのみの導入だけで良い cocoapods pod 'HydraAsync' cart…

Swift単語メモ

Objective-C インスタンス変数 / ivar, instance variable Objective-Cランタイム内での変数を表す構造体のポインタの定義のことを示す グラフ理論 / graph theory 有向グラフ / directed graph https://ja.wikipedia.org/wiki/グラフ理論#有向グラフ ダイグ…

apple/swift-clang/include/clang/AST コードリーディング(全体)

概要 swift-clang/include/clang/AST at 0a8078f3c1190c7b6c2e021ad6b102971bca5413 · apple/swift-clang · GitHub 概要 Type.h Qualifiers::TQ Qualifiers::GC Qualifiers::ObjCLifetime Type Typeのクラス図 Type.h Qualifiers::TQ これらのフラグはDeclSp…

ClangImporter.cpp - ClangImporter::createで生成しているclangのコマンドを調べてみた

概要 moaible-swift-memo.hateblo.jp コマンド生成 - モードによる分岐終了まで フラグ一覧 参考: swift-clang/Options.td at ba3b1c672105db284b1e425d4ab7cdc8411f29a3 · apple/swift-clang · GitHub Swift関連で追加してるマクロ定義一覧 Swift bridging …

【WIP】弱参照(docs/weak.rst) 翻訳

出典 https://github.com/apple/swift/blob/3cbabfd196d3be8d01e97cacef71f41e9c594f1d/docs/weak.rst 弱参照 要約:本書では、他の言語での様々な設計を含む弱参照の一般的な概念について説明し、標準ライブラリで利用できるいくつかの新しいコア言語機能と…

include/swift/Driver コードリーディング(全体)

概要 https://github.com/apple/swift/tree/c309fb2620b030a722741171baee4dfec5017d58/include/swift/Driver 概要 Action.h Compilation.h DependencyGraph.h Driver.h OutputInfo::Mode Driver Driver::DriverKind FrontendUtil.h Job.h OutputFileMap.h P…

include/swift/Frontend コードリーディング(全体)

概要 swift/include/swift/Frontend at 4b727e5813246d4029e7c4269bba317db9b012d3 · apple/swift · GitHub 概要 ArgsToFrontendInputsConverter.h ArgsToFrontendOptionsConverter.h ArgsToFrontendOutputsConverter.h DiagnosticVerifier.h Frontend.h Com…

lib/Frontend コードリーディング(全体)

概要 swift/lib/Frontend at master · apple/swift · GitHub 概要 ArgsToFrontendInputsConverter.cpp ArgsToFrontendOptionsConverter.cpp ArgsToFrontendOutputsConverter.cpp CompilerInvocation.cpp DiagnosticVerifier.cpp Frontend.cpp CompilerInstan…

(discord/swift/2018/03/12/0) Swift IRGenがcoroutineをサポートした件について

概要 discord ios dev #swift 2018/03/12 Swift IRGenがcoroutineをサポートした log omochimetaru - 03/12 12:47 github.com コルーチンの下回り進んでた koher - 03/12 01:04 コルーチンって正式な Proposal になってないけど、表面的なシンタックスは別と…

apple/swift - include/swift/AST コードリーディング(全体)

概要 swift/include/swift/AST at c309fb2620b030a722741171baee4dfec5017d58 · apple/swift · GitHub 概要 AST.h ASTContext.h AllocationArena KnownFoundationEntity ASTContext ASTMangler.h ASTNode.h ASTPrinter.h ASTScope.h ASTVisitor.h ASTWalker.…