From c937d8e02869d8f8f04d9d37ebc9372907070465 Mon Sep 17 00:00:00 2001 From: Jeffrey Macko Date: Thu, 17 May 2018 19:23:32 +0200 Subject: [PATCH 001/589] Update 2018-05-17-issue-109.md (#392) --- _posts/2018-05-17-issue-109.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-05-17-issue-109.md b/_posts/2018-05-17-issue-109.md index 16cc4922..d03892f3 100644 --- a/_posts/2018-05-17-issue-109.md +++ b/_posts/2018-05-17-issue-109.md @@ -31,7 +31,7 @@ In [episode 58](https://spec.fm/podcasts/swift-unwrapped/144196), Jesse and JP d ### News and community -[Nicole Jacque])(https://github.com/najacque/) and [Mishal Shah](https://twitter.com/mishaldshah/) announced [a community hosted Swift continuous integration](https://twitter.com/SwiftLang/status/992166029613674497) to make it easier to support more platforms for Swift. +[Nicole Jacque](https://github.com/najacque/) and [Mishal Shah](https://twitter.com/mishaldshah/) announced [a community hosted Swift continuous integration](https://twitter.com/SwiftLang/status/992166029613674497) to make it easier to support more platforms for Swift. [Ted Kremenek](https://twitter.com/tkremenek) announced that Swift for TensorFlow [will be developed](https://forums.swift.org/t/swift-for-tensorflow-to-be-developed-on-tensorflow-branch-on-apple-swift-on-github/12595) on a `tensorflow` branch on apple/swift, allowing closer collaborations among the Swift and TensorFlow teams. From 8c08b02471bee1fff4546ea9e35e63c8bde59b2e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 28 May 2018 20:52:27 +0200 Subject: [PATCH 002/589] Initial 110 draft --- _drafts/2018-05-31-issue-110.md | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 _drafts/2018-05-31-issue-110.md diff --git a/_drafts/2018-05-31-issue-110.md b/_drafts/2018-05-31-issue-110.md new file mode 100644 index 00000000..7631d40a --- /dev/null +++ b/_drafts/2018-05-31-issue-110.md @@ -0,0 +1,51 @@ +--- +layout: post +title: ! 'Issue #110' +author: btb +--- + +With WWDC around the corner (it starts in four days!), it is not that big of a surprise that these last two weeks have been pretty quite when it comes to Swift. + + + +### Starter tasks + +> TODO + +{% include task_remind.html %} + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 5f657cad706c2d68246fe4430978fb50bcb91f16 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 31 May 2018 18:09:36 +0200 Subject: [PATCH 003/589] Draft for issue #110 (#395) * 110 draft * Move to posts --- _drafts/2018-05-31-issue-110.md | 51 ------------------------------- _posts/2018-05-31-issue-110.md | 53 +++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 51 deletions(-) delete mode 100644 _drafts/2018-05-31-issue-110.md create mode 100644 _posts/2018-05-31-issue-110.md diff --git a/_drafts/2018-05-31-issue-110.md b/_drafts/2018-05-31-issue-110.md deleted file mode 100644 index 7631d40a..00000000 --- a/_drafts/2018-05-31-issue-110.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -layout: post -title: ! 'Issue #110' -author: btb ---- - -With WWDC around the corner (it starts in four days!), it is not that big of a surprise that these last two weeks have been pretty quite when it comes to Swift. - - - -### Starter tasks - -> TODO - -{% include task_remind.html %} - -### Swift Unwrapped - -> TODO: Latest episode(s) of Swift Unwrapped - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2018-05-31-issue-110.md b/_posts/2018-05-31-issue-110.md new file mode 100644 index 00000000..a8f042a4 --- /dev/null +++ b/_posts/2018-05-31-issue-110.md @@ -0,0 +1,53 @@ +--- +layout: post +title: ! 'Issue #110' +author: btb +--- + +With WWDC around the corner (it starts in four days!), it is not that big of a surprise that these last two weeks have been pretty quite when it comes to Swift. + +Also, come and say hi at WWDC! + + + +### Swift Unwrapped + +In [episode 59](https://spec.fm/podcasts/swift-unwrapped/144991), Jesse and JP discuss implicit escaping of closures, explaining in how they (should) work. + +In [episode 60](https://spec.fm/podcasts/swift-unwrapped/144992), Jesse and JP discuss Character Properties, a proposal pitch that aims to increase the usefulness of `Character` and approachability of programming in Swift. + +### News and community + +[Michael Ilseman](https://twitter.com/Ilseman) has [improved](https://twitter.com/brentdax/status/1001351681370542080) string interpolation in Swift 4.2 to be at least twice as fast! 🏎💨 + +### Commits and pull requests + +[Alex Hoppen](https://github.com/ahoppen) merged [a pull request](https://github.com/apple/swift/pull/16340) that adds [incremental syntax parsing](https://gist.github.com/ahoppen/3ae1a6cd64e558710a4afcd372e8fdc4) to the Swift compiler. Cool! + +[Lily Vulcano](https://github.com/millenomi) merged [a pull request](https://github.com/apple/swift/pull/16022) to bridge `as`, `as?`, and `as!` to Linux. 🎉 + +[Michael Gottesman](https://github.com/gottesmm) opened [a pull request](https://github.com/apple/swift/pull/16882) to allow for benchmark testing on Linux. + +### Proposals in review + +[SE-0214](https://github.com/apple/swift-evolution/blob/master/proposals/0214-DictionaryLiteral.md): *Renaming the `DictionaryLiteral` type to `KeyValueList`* is [under review](https://forums.swift.org/t/se-0214-renaming-the-dictionaryliteral-type-to-keyvaluelist/12817). + +> This proposal renames the confusing and misnamed [`DictionaryLiteral`](https://github.com/apple/swift/blob/c25188bafd1c775d4ceecc4a795f614f00451bf9/stdlib/public/core/Mirror.swift#L646) type to `KeyValueList`. This type is neither a dictionary nor a literal. It is a list of key-value pairs. +> +> There is no strong motivation to deprecate. The type does not produce active harm. Instead, it adds measurable (if small) utility and will be part of the ABI. A sensible renaming mitigates the most problematic issue with the type. + +### Swift Forums + +[Ben Cohen](https://twitter.com/airspeedswift) started [a discussion](https://forums.swift.org/t/se-0202-amendment-proposal-rename-random-to-defaultrandomnumbergenerator/12942) to change part of SE-0202, renaming `Random` to `DefaultRandomNumberGenerator`. + +> SE-0202, as accepted, introduces a type, `Random`, as the default source of random numbers on each platform. +> +> [..] the name `Random` for this default source is misleading, and would probably be better named `DefaultRandomNumberGenerator`. +> +> One open question is the naming of the getter for an instance of the type. Currently it is `Random.default`. However, renaming `Random` leads to the rather clunky `DefaultRandomNumberGenerator.default`. Benjamin suggests `.shared`. However, in all current implementations, this is not strictly speaking a shared instance – it is instead a getter/setter for a fresh instance each time. This doesn't actually have a cost, since the type has no actual size (the type is just a vehicle for calling an OS function), but needs to be done this way because `using:` is taken `inout`. +> +> Any suggestions for better naming gratefully received. + +### Finally + +[Although not all may agree](https://twitter.com/jckarter/status/999040485309140992)... From 892b8b5428e16a6a9e8b7c5323b2299dd164c1c3 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 31 May 2018 18:11:33 +0200 Subject: [PATCH 004/589] Push 111 draft --- _drafts/2018-06-14-issue-111.md | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 _drafts/2018-06-14-issue-111.md diff --git a/_drafts/2018-06-14-issue-111.md b/_drafts/2018-06-14-issue-111.md new file mode 100644 index 00000000..4b2bc4ac --- /dev/null +++ b/_drafts/2018-06-14-issue-111.md @@ -0,0 +1,51 @@ +--- +layout: post +title: ! 'Issue #111' +author: roman +--- + +> TODO: intro comments + + + +### Starter tasks + +> TODO + +{% include task_remind.html %} + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From cdfe0ba0d649e227911314fb4854baff7f0d6cc1 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 31 May 2018 21:05:54 +0200 Subject: [PATCH 005/589] Update 2018-05-31-issue-110.md --- _posts/2018-05-31-issue-110.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-05-31-issue-110.md b/_posts/2018-05-31-issue-110.md index a8f042a4..a3373194 100644 --- a/_posts/2018-05-31-issue-110.md +++ b/_posts/2018-05-31-issue-110.md @@ -4,7 +4,7 @@ title: ! 'Issue #110' author: btb --- -With WWDC around the corner (it starts in four days!), it is not that big of a surprise that these last two weeks have been pretty quite when it comes to Swift. +With WWDC around the corner (it starts in four days!), it is not that big of a surprise that these last two weeks have been pretty quiet when it comes to Swift. Also, come and say hi at WWDC! From 947a37ad7caae45f7b1dc920fc9dccf121ec5a4f Mon Sep 17 00:00:00 2001 From: Roman Volkov Date: Thu, 14 Jun 2018 22:26:52 +0500 Subject: [PATCH 006/589] Issue 111 draft (#396) --- _drafts/2018-06-14-issue-111.md | 62 ++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/_drafts/2018-06-14-issue-111.md b/_drafts/2018-06-14-issue-111.md index 4b2bc4ac..93e7b9c5 100644 --- a/_drafts/2018-06-14-issue-111.md +++ b/_drafts/2018-06-14-issue-111.md @@ -4,48 +4,78 @@ title: ! 'Issue #111' author: roman --- -> TODO: intro comments +Hi there SwiftWeekly readers! The last two weeks were full of exciting news with WWDC, interesting discussions on the Swift Unwrapped podcast and there's plenty of new starter tasks for you, especially for SPM. Enjoy! ### Starter tasks -> TODO +- [SR-7823](https://bugs.swift.org/browse/SR-7823) [Package Manager] swift run intermingles SwiftPM status with tool output on stdout +- [SR-7824](https://bugs.swift.org/browse/SR-7824) [Package Manager] SwiftPM ignores missing source symlinks +- [SR-7825](https://bugs.swift.org/browse/SR-7825) [Package Manager] SwiftPM should consider a target with header files but no sources as a ClangTarget +- [SR-7826](https://bugs.swift.org/browse/SR-7826) [Package Manager] SwiftPM should warn if it skips traversing a symlink which would contain sources in it +- [SR-7829](https://bugs.swift.org/browse/SR-7829) [Package Manager] Bad error message when a tag doesn't exist +- [SR-7904](https://bugs.swift.org/browse/SR-7904) [Compiler] AST dump - can't distinguish files +- [SR-7933](https://bugs.swift.org/browse/SR-7933) [Tooling] SourceKit double-counts escaping and autoclosure attributes +- [SR-7979](https://bugs.swift.org/browse/SR-7979) [Package Manager] Circular Dependency in SwiftPM Causes Segfault {% include task_remind.html %} ### Swift Unwrapped -> TODO: Latest episode(s) of Swift Unwrapped +In [episode 61](https://spec.fm/podcasts/swift-unwrapped/154581), Jesse and JP with special guest Greg Heo discussed general announcements from WWDC 2018, not just limited to the Swift language. + +In [episode 62](https://spec.fm/podcasts/swift-unwrapped/154699), Jesse and JP talk with [Ted Kremenek](https://twitter.com/tkremenek), the Swift Project Lead and manager of the Languages and Runtimes team at Apple. ### News and community -> TODO +The biggest news from the past two weeks is, of course, WWDC. There are plenty of videos to watch, but take take a closer look into these Swift related videos: -### Commits and pull requests +- [What's New in Swift](https://developer.apple.com/videos/play/wwdc2018/401) +- [Swift Generics](https://developer.apple.com/videos/play/wwdc2018/406/) +- [Getting to Know Swift Package Manager](https://developer.apple.com/videos/play/wwdc2018/411/) +- [Behind the Scenes of the Xcode Build Process](https://developer.apple.com/videos/play/wwdc2018/415/) -> TODO +[Ole Begemann](https://github.com/ole) made an easy-to-use [playground](https://github.com/ole/whats-new-in-swift-4-2) that you can use to test the new features in Swift 4.2. If you prefer to read about it, check out Cosmin Pupăză's article [What’s New in Swift 4.2?](https://www.raywenderlich.com/194066/whats-new-in-swift-4-2). -### Accepted proposals +Greg Heo wrote a new post on Swift Unboxed, [Swift Diagnostics: #warning and #error](https://swiftunboxed.com/internals/diagnostics-warning-error/), about the new `#warning` and `#error` directive implementations. -> TODO +[Brian Gesiak](https://twitter.com/modocache) wrote the second part of a [great article](https://modocache.io/swift-compiler-diagnostics-part-2) about the interaction between the Swift frontend and LLVM in terms of emitting diagnostics. -### Returned proposals +### Commits and pull requests -> TODO +[Erik Eckstein](https://github.com/eeckstein) [merged](https://github.com/apple/swift/pull/17014) optimizations for generation of optimal code for static String constants. -### Rejected proposals +Xcode 10 Beta is now required to build `master` and `swift-4.2-branch`: [#17000](https://github.com/apple/swift/pull/17000) and [#17001](https://github.com/apple/swift/pull/17001). -> TODO +[Adrian Prantl](https://github.com/adrian-prantl) [merged](https://github.com/apple/swift/pull/16937) "Use depth and index to lookup type metadata artificial variables". The general purpose: "debug info support for generics is about to get a whole lot better". + +[Slava Pestov](https://github.com/slavapestov) [fixed](https://github.com/apple/swift/pull/17080) availability of inherited designated initializers. +> Inherited designated initializers got the same availability as the corresponding initialier in the superclass. However if the superclass was more available than the subclass, we would generate a diagnostic that a member cannot be more available than its containing type. This diagnostic had an unknown source location, since the location was for a synthesized declaration, causing confusion. ### Proposals in review -> TODO +[SE-0215](https://github.com/apple/swift-evolution/blob/master/proposals/0215-conform-never-to-hashable-and-equatable.md): *Conform `Never` to `Equatable` and `Hashable`* is [under review](https://forums.swift.org/t/se-0215-conform-never-to-equatable-and-hashable/13586). + +> `Never` is very useful for representing impossible code. Most people are familiar with it as the return type of functions like `fatalError`, but `Never` is also useful when working with generic classes. +> +> For example, a `Result` type might use `Never` for its `Value` to represent something that _always_ errors or use `Never` for its `Error` to represent something that _never_ errors. +> +> Conditional conformances to `Equatable` and `Hashable` are also very useful when working with `enum`s so you can test easily or work with collections. +> +> But those don’t play well together. Without conformance to `Equatable` and `Hashable`, `Never` disqualifies your generic type from being `Equatable` and `Hashable`. -### Swift Forums +[SE-0216](https://github.com/apple/swift-evolution/blob/master/proposals/0216-dynamic-callable.md) *Introduce user-defined dynamically "callable" types* is [under review](https://forums.swift.org/t/se-0216-user-defined-dynamically-callable-types/13615). -> TODO +> This proposal is a follow-on to [SE-0195 - Introduce User-defined "Dynamic Member +Lookup" Types](https://github.com/apple/swift-evolution/blob/master/proposals/0195-dynamic-member-lookup.md) +which shipped in Swift 4.2. It introduces a new `@dynamicCallable` attribute, which marks +a type as being "callable" with normal syntax. +> +> [...] +> +> Swift is exceptional at interworking with existing C and Objective-C APIs and we would like to extend this interoperability to dynamic languages like Python, JavaScript, Perl, and Ruby. We explored this overall goal in a long design process wherein the Swift evolution community evaluated multiple different implementation approaches. The conclusion was that the best approach was to put most of the complexity into dynamic language specific bindings written as pure-Swift libraries, but add small hooks in Swift to allow these bindings to provide a natural experience to their clients. ### Finally -> TODO: something funny/fun. tweet, link, etc. +And finally — [time to get some rest](https://twitter.com/jckarter/status/1005500623175815168)! From 0e2b74bd13660c6d707a0b5d0f88476a58d0c7eb Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Thu, 14 Jun 2018 10:27:57 -0700 Subject: [PATCH 007/589] publish issue 111, close #394 --- {_drafts => _posts}/2018-06-14-issue-111.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2018-06-14-issue-111.md (100%) diff --git a/_drafts/2018-06-14-issue-111.md b/_posts/2018-06-14-issue-111.md similarity index 100% rename from _drafts/2018-06-14-issue-111.md rename to _posts/2018-06-14-issue-111.md From 14efa849d90642c3256cf62ae357d13f0e5a3fcd Mon Sep 17 00:00:00 2001 From: Greg Heo Date: Thu, 14 Jun 2018 11:23:30 -0700 Subject: [PATCH 008/589] [111] Add Twitter link and fix typo --- _posts/2018-06-14-issue-111.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2018-06-14-issue-111.md b/_posts/2018-06-14-issue-111.md index 93e7b9c5..7e1908d9 100644 --- a/_posts/2018-06-14-issue-111.md +++ b/_posts/2018-06-14-issue-111.md @@ -23,13 +23,13 @@ Hi there SwiftWeekly readers! The last two weeks were full of exciting news with ### Swift Unwrapped -In [episode 61](https://spec.fm/podcasts/swift-unwrapped/154581), Jesse and JP with special guest Greg Heo discussed general announcements from WWDC 2018, not just limited to the Swift language. +In [episode 61](https://spec.fm/podcasts/swift-unwrapped/154581), Jesse and JP with special guest [Greg Heo](https://twitter.com/gregheo) discussed general announcements from WWDC 2018, not just limited to the Swift language. In [episode 62](https://spec.fm/podcasts/swift-unwrapped/154699), Jesse and JP talk with [Ted Kremenek](https://twitter.com/tkremenek), the Swift Project Lead and manager of the Languages and Runtimes team at Apple. ### News and community -The biggest news from the past two weeks is, of course, WWDC. There are plenty of videos to watch, but take take a closer look into these Swift related videos: +The biggest news from the past two weeks is, of course, WWDC. There are plenty of videos to watch, but take a closer look into these Swift related videos: - [What's New in Swift](https://developer.apple.com/videos/play/wwdc2018/401) - [Swift Generics](https://developer.apple.com/videos/play/wwdc2018/406/) From 56a3259ee1fc54a4d2a55b29e6cbab9d94936266 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 18 Jun 2018 20:06:45 +0200 Subject: [PATCH 009/589] Initial 112 draft --- _drafts/2018-06-21-issue-112.md | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 _drafts/2018-06-21-issue-112.md diff --git a/_drafts/2018-06-21-issue-112.md b/_drafts/2018-06-21-issue-112.md new file mode 100644 index 00000000..b49dff9c --- /dev/null +++ b/_drafts/2018-06-21-issue-112.md @@ -0,0 +1,51 @@ +--- +layout: post +title: ! 'Issue #112' +author: btb +--- + +> TODO: intro comments + + + +### Starter tasks + +> TODO + +{% include task_remind.html %} + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 1d364a8454e17fde87169d0d05cc9849218ed897 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 19 Jun 2018 07:43:55 +0200 Subject: [PATCH 010/589] Biweekly, oops --- _drafts/{2018-06-21-issue-112.md => 2018-06-28-issue-112.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename _drafts/{2018-06-21-issue-112.md => 2018-06-28-issue-112.md} (100%) diff --git a/_drafts/2018-06-21-issue-112.md b/_drafts/2018-06-28-issue-112.md similarity index 100% rename from _drafts/2018-06-21-issue-112.md rename to _drafts/2018-06-28-issue-112.md From add6dec23305af1c50bd78c672be710e5c01a01f Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 28 Jun 2018 18:34:25 +0200 Subject: [PATCH 011/589] Initial draft of issue 112. (#398) Issue 112 --- _drafts/2018-06-28-issue-112.md | 51 --------------- _posts/2018-06-28-issue-112.md | 109 ++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 51 deletions(-) delete mode 100644 _drafts/2018-06-28-issue-112.md create mode 100644 _posts/2018-06-28-issue-112.md diff --git a/_drafts/2018-06-28-issue-112.md b/_drafts/2018-06-28-issue-112.md deleted file mode 100644 index b49dff9c..00000000 --- a/_drafts/2018-06-28-issue-112.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -layout: post -title: ! 'Issue #112' -author: btb ---- - -> TODO: intro comments - - - -### Starter tasks - -> TODO - -{% include task_remind.html %} - -### Swift Unwrapped - -> TODO: Latest episode(s) of Swift Unwrapped - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2018-06-28-issue-112.md b/_posts/2018-06-28-issue-112.md new file mode 100644 index 00000000..5fa882f0 --- /dev/null +++ b/_posts/2018-06-28-issue-112.md @@ -0,0 +1,109 @@ +--- +layout: post +title: ! 'Issue #112' +author: btb +--- + +I am back! I had the most wonderful time at WWDC, learning a lot of and meeting awesome people. +I want to specifically thank all those that have shown their gratitude for the weekly brief, it's much appreciated! + +Without further ado, here's this week's news on the Swift.org open source projects. + + + +### Starter tasks + +- [SR-7984](https://bugs.swift.org/browse/SR-7984) [Compiler] Constraint to concrete type using `:` should offer a fixit +- [SR-8012](https://bugs.swift.org/browse/SR-8012) [Standard Library] Remove `Indexable` aliases +- [SR-8049](https://bugs.swift.org/browse/SR-8049) [Swift for TensorFlow] Open source S4TF unit testing with a remote TF session + +{% include task_remind.html %} + +### Swift Unwrapped + +In [episode 63](https://spec.fm/podcasts/swift-unwrapped/147483), Jesse and JP discuss Swift algorithms and data structures with [Kelvin Lau](https://twitter.com/KelvinlauKl) and [Vincent Ngo](https://twitter.com/VincentNgo2). + +In [episode 64](https://spec.fm/podcasts/swift-unwrapped/160151), Jesse and JP discuss `Never`, the [return type of functions that do not return normally](https://developer.apple.com/documentation/swift/never). + +### News and community + +[Ole Begemann](https://twitter.com/olebegemann) wrote [a blog post](https://oleb.net/blog/2018/06/dynamic-member-lookup/) with thoughts on `@dynamicMemberLookup`, which was introduced in [SE-0195](https://github.com/apple/swift-evolution/blob/master/proposals/0195-dynamic-member-lookup.md). + +[John Sundell](https://twitter.com/johnsundell) discussed the Swift Package Manager with [David Hart](https://twitter.com/dhartbit) in his [podcast](https://www.swiftbysundell.com/podcast/26). + +### Commits and pull requests + +[Slava Pestov](https://github.com/slavapestov) merged [a pull request](https://github.com/apple/swift/pull/17227) to fix a corner case for source compatibility. As it appears, using an enum case called `init` could cause some trouble. + +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r/) merged [a pull request](https://github.com/apple/swift-evolution/pull/828) that adds a new, SwiftPM specific proposal template that better reflects the expectations and nuances of this project. + +### Accepted proposals + +[SE-0211](https://github.com/apple/swift-evolution/blob/master/proposals/0211-unicode-scalar-properties.md): *Add Unicode Properties to `Unicode.Scalar`* has been [accepted with revisions](https://forums.swift.org/t/accepted-se-0211-add-unicode-properties-to-unicode-scalar/13857/1). + +> The core team has accepted this proposal, with one revision: +> +> - the `numericValue` property should be a `Double?` rather than a `Double`, with `nil` for non-numeric values rather than `NaN`. + +[SE-0214](https://github.com/apple/swift-evolution/blob/master/proposals/0214-DictionaryLiteral.md): *Renaming the `DictionaryLiteral` type to `KeyValuePairs`* has been [accepted with revisions](https://forums.swift.org/t/accepted-with-revision-se-0214-renaming-the-dictionaryliteral-type-to-keyvaluepairs/13661). + +> In the review thread discussion, many names were considered, and the core team agreed that `KeyValuePairs` (initially `KeyValueList` was proposed) is a best name suggested on the thread for this type. + +### Swift Forums + +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r/) shared some [features and enhancements](https://forums.swift.org/t/recent-swiftpm-features-and-enhancements/13807) that have been brought to SwiftPM recently. + +> - Improved scheme generation logic +> - Local dependencies +> - Automatic Xcode project generation +> - System library targets +> - Embeddable Xcode projects + +[Dave DeLong](https://twitter.com/davedelong) and [Erica Sadun](https://twitter.com/ericasadun) pitched [a proposal](https://forums.swift.org/t/introducing-namespacing-for-common-swift-error-scenarios/10773) to introduce namespacing for common Swift error scenarios. + +> This proposal introduces namespacing for fatal errors. It provides an umbrella for common exit scenarios, modernizing a holdover from C-like languages. +> +> Swift’s `fatalError` is arguably insufficient for a multitude of real world uses including discoverability, extensibility, and significance. Swift lacks a modern extensible solution that differentiates fatal error scenarios. + +Awesome stuff! + +[Steve Canon](https://forums.swift.org/u/scanon/summary) pitched [a proposal](https://forums.swift.org/t/comparable-and-floatingpoint/13931) that aims to solve some issues around floating points and their `min` and `max` operations. + +> There is a small but important tangle of issues around the interaction between `min` and `max` operations and `Comparable` and `FloatingPoint` protocols and the IEEE 754 standard that I would like to attempt to resolve. + +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r/) shared [a list of SwiftPM evolution ideas](https://forums.swift.org/t/swift-package-manager-evolution-ideas/13940) that could use some help to get proposals off the ground. + +> This is a list of some evolution ideas for the package manager. Once the details of an idea are fleshed out and there is a full proposal, it can be scheduled for the swift-evolution process. It is important to note that not every idea on this list is guaranteed to become an official feature, and it all depends on where the design discussion leads us. Also, this is not meant to be an exhaustive feature list, if you have an idea for a feature that you think will be a valuable addition to the package manager, feel free to start a discussion about it. +> +> If you're interested in participating in a particular evolution idea, please familarize yourself with the existing discussion on that topic and start participating in the discussion thread of that idea. + +[Nate Cook](https://twitter.com/nnnnnnnn) pitched [a proposal](https://forums.swift.org/t/array-initializer-with-access-to-uninitialized-buffer/13689) to add an `Array` initializer with access to its unitialized buffer. + +> I've been thinking about a way of creating an array that would let us access the buffer of uninitialized memory, so that we could implement algorithms that don't necessarily know the size in advance or need access to noncontiguous parts of an array. +> +> There is currently no way to work with a buffer of uninitialized memory that then becomes a fully memory-managed `Array`. This limitation means that operations that don't know the final size of their data in advance, or that need to access noncontiguous parts of an array, are less efficient than necessary, often requiring an extra copy. This proposal suggests a new initializer for `Array` and `ContiguousArray` that would provide access to a newly created array's entire storage buffer. + +[Brent Royal-Gordon](https://twitter.com/brentdax) pitched [a proposal](https://forums.swift.org/t/pitch-deprecate-strange-interpolations-in-swift-4-2/13694) that aims to clean up some of the lesser known rough edges in String interpolation. + +> So, everyone knows what a string interpolation looks like: + +{% highlight swift %} +print("Hello, \(firstName)!") +{% endhighlight %} + +> But let's talk about some other things you might write, perhaps because you hate compiler engineers. What do you think these do? + +{% highlight swift %} +print("Hello, \()!") // #1 +print("Hello, \(first: firstName)!") // #2 +print("Hello, \(firstName, lastName)!") // #3 +print("Hello, \(first: firstName, last: lastName)!") // #4 +{% endhighlight %} + +> Most people I've spoken to say "produce an error message", and they're right about #1—it produces the error "expected expression in list of expressions". Maybe not the clearest message, but it's not technically wrong. +> +> But the other three? They actually compile without complaint and form a tuple. + +### Finally + +[Do you wish to take a leap of faith?](https://twitter.com/slava_pestov/status/1010043445203701760) From fd42f196d895c1a9dbb35c3fa8e085c300009dcc Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 9 Jul 2018 19:46:16 +0200 Subject: [PATCH 012/589] Add 113 draft --- _drafts/2018-07-12-issue-113.md | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 _drafts/2018-07-12-issue-113.md diff --git a/_drafts/2018-07-12-issue-113.md b/_drafts/2018-07-12-issue-113.md new file mode 100644 index 00000000..fa9a3dd4 --- /dev/null +++ b/_drafts/2018-07-12-issue-113.md @@ -0,0 +1,51 @@ +--- +layout: post +title: ! 'Issue #113' +author: roman +--- + +> TODO: intro comments + + + +### Starter tasks + +> TODO + +{% include task_remind.html %} + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From ad050f4bcbd14b52bbd647055531ef0f1a044879 Mon Sep 17 00:00:00 2001 From: Roman Volkov Date: Thu, 12 Jul 2018 21:45:12 +0500 Subject: [PATCH 013/589] Issue 113 (#400) * init * draft * Update 2018-07-12-issue-113.md * Update 2018-07-12-issue-113.md * Update 2018-07-12-issue-113.md * Update 2018-07-12-issue-113.md * Final changes --- _drafts/2018-07-12-issue-113.md | 51 ------------------ _posts/2018-07-12-issue-113.md | 94 +++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 51 deletions(-) delete mode 100644 _drafts/2018-07-12-issue-113.md create mode 100644 _posts/2018-07-12-issue-113.md diff --git a/_drafts/2018-07-12-issue-113.md b/_drafts/2018-07-12-issue-113.md deleted file mode 100644 index fa9a3dd4..00000000 --- a/_drafts/2018-07-12-issue-113.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -layout: post -title: ! 'Issue #113' -author: roman ---- - -> TODO: intro comments - - - -### Starter tasks - -> TODO - -{% include task_remind.html %} - -### Swift Unwrapped - -> TODO: Latest episode(s) of Swift Unwrapped - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2018-07-12-issue-113.md b/_posts/2018-07-12-issue-113.md new file mode 100644 index 00000000..94fbab7d --- /dev/null +++ b/_posts/2018-07-12-issue-113.md @@ -0,0 +1,94 @@ +--- +layout: post +title: ! 'Issue #113' +author: roman +--- + +Welcome to the 113th issue of Swift Weekly Brief! This week was more calm, no news explosions. The repositories and Swift.org discussions had their usual activity. + + + +### Starter tasks + +- [SR-8135](https://bugs.swift.org/browse/SR-8135) [Package Manager] SwiftPM should only check for `clang` if it is needed +- [SR-8137](https://bugs.swift.org/browse/SR-8137) [Package Manager] Provide mechanism to disable color diagnostics from commands +- [SR-8138](https://bugs.swift.org/browse/SR-8138) [Package Manager] Mechanism to limit the parallelism of `swift test --parallel` +- [SR-8139](https://bugs.swift.org/browse/SR-8139) [Package Manager] Executable init template is broken when there is a dash in package name +- [SR-8173](https://bugs.swift.org/browse/SR-8172) [Tooling] `(T)` Reported as Single-Element Tuple Rather Than `T` +- [SR-8190](https://bugs.swift.org/browse/SR-8190) [Standard Library] Introduce a RingBuffer to the Standard Library +- [SR-8204](https://bugs.swift.org/browse/SR-8204) [Package Manager] Sort targets in SwiftPM generated Xcode project +- [SR-8222](https://bugs.swift.org/browse/SR-8222) [Swift for TensorFlow] `PartitionCloner::visitCondBranchInst()` should be generalized to handle `TensorHandle` in addition to `TensorHandle` + +{% include task_remind.html %} + +### Swift Unwrapped + +In [episode 65](https://spec.fm/podcasts/swift-unwrapped/160476), Jesse and JP discuss the [SE-0213: Literal initialization via coercion](https://github.com/apple/swift-evolution/blob/master/proposals/0213-literal-init-via-coercion.md) proposal and its implementation. + +### News and community + +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r) noticed the right thing: when `Codable` is awesome, it requires [so much boilerplate](https://github.com/apple/swift-package-manager/pull/1655/files#diff-31d171cad93e680d3ffc6cb3c4fc6848R13) to support enums. It would be great if the compiler could synthesize it, like with `Hashable` and `Equatable`. + +### Commits and pull requests + +[Mark Lacey](https://github.com/rudkx) opened [a pull request](https://github.com/apple/swift/pull/17691) to remove Swift 3 from type checher. "Goodbye, Swift 3" + +[Slava Pestov](https://twitter.com/slava_pestov) merged several pull requests: [#17611](https://github.com/apple/swift/pull/17611), [#17651](https://github.com/apple/swift/pull/17651) and [#17816](https://github.com/apple/swift/pull/17816) - great additions to [SE-0156: Class and Subtype existentials](https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md) to add support for protocols with superclass constraints. + +[Tony Allevato](https://github.com/allevato) merged [a pull request](https://github.com/apple/swift/pull/15593) to add Unicode properties to `Unicode.Scalar`. This implements [SE-0211](https://github.com/apple/swift-evolution/blob/master/proposals/0211-unicode-scalar-properties.md), *Add Unicode Properties to `Unicode.Scalar`*. + +### Accepted proposals + +An amendment to [SE-0202](https://github.com/jckarter/swift-evolution/blob/master/proposals/0202-random-unification.md): *Random Unification* was [accepted](https://forums.swift.org/t/amendment-to-se-0202-removing-collection-randomelement-as-a-customization-point/14101). + +> We decided to accept the proposed amendment to remove `randomElement` as a customization point. + +[SE-0216](https://github.com/apple/swift-evolution/blob/master/proposals/0216-dynamic-callable.md): *User-defined dynamically callable types* was [accepted](https://forums.swift.org/t/accepted-se-216-user-defined-dynamically-callable-types/14110). + +> Feedback on the proposal was almost entirely positive on both the idea of supporting dynamically-typed calls and the proposal's specific approach to providing that support. +> +> Therefore, the proposal was accepted without modifications. + +### Proposals in review + +[SE-0217](https://github.com/apple/swift-evolution/blob/master/proposals/0217-bangbang.md): *Introducing the `!!` "Unwrap or Die" operator to the Swift Standard Library* is [under review](https://forums.swift.org/t/se-0217-the-unwrap-or-die-operator/14107). + +> This proposal introduces an annotating forced-unwrapping operator to the Swift standard library. It augments the `?`, `??`, and `!` family, adding `!!`. This "unwrap or die" operator provides code-sourced rationales for failed unwraps, supporting self-documentation and safer development. The `!!` operator is commonly implemented in the wider Swift Community and should be considered for official adoption. +> +> The new operator benefits both experienced and new Swift users. It takes this form: + +{% highlight swift %} +let value = wrappedValue !! <# "Explanation why lhs cannot be nil." #> +{% endhighlight %} + +[SE-0218](https://github.com/apple/swift-evolution/blob/master/proposals/0218-introduce-compact-map-values.md): *Introduce `compactMapValues` to `Dictionary`* is [under review](https://forums.swift.org/t/se-0218-introduce-compactmapvalues-to-dictionary/14266). + +> This proposal adds a combined `filter`/`map` operation to `Dictionary`, as a companion to the `mapValues` and `filter` methods introduced by [SE-0165](https://github.com/apple/swift-evolution/blob/master/proposals/0165-dict.md). The new `compactMapValues` operation corresponds to `compactMap` on `Sequence`. + +[SE-0219](https://github.com/apple/swift-evolution/blob/master/proposals/0219-package-manager-dependency-mirroring.md): *Package Manager Dependency Mirroring* is [under review](https://forums.swift.org/t/se-0219-package-manager-dependency-mirroring/14371). + +> A dependency mirror refers to an alternate source location which exactly replicates the contents of the original source. +> +> Dependency mirroring is useful for several reasons: +> +> - **Availability**: Mirrors can ensure that a dependency can be always fetched, in case the original source is unavailable or even deleted. +> - **Cache**: Access to the original source location could be slow or forbidden in the current environment. +> - **Validation**: Mirrors can help with screening the upstream updates before making them available internally within a company. + +### Swift Forums + +[Tony Parker]() started [a pitch](https://forums.swift.org/t/pitch-move-urlsession-to-new-foundationnetworking-module/14002) to move `URLSession` and related types to a new library. + +> Some of the feedback we've received from the SwiftNIO team is that Foundation's dependency on `libcurl` brings in too many other libraries. +> +> I propose moving the networking types (except `URL` and `URLComponents`) into another library, with a working name of `swift-corelibs-foundation-networking`. +> +> Benefits: +> +> - SwiftNIO would be able to use core Foundation types. +> - `swift-corelibs-foundation-networking` could use SwiftPM to build itself. +> - Other projects that wish to maintain a minimum set of dependencies and do not need networking support can reduce their footprint. + +### Finally + +[I wonder if it runs Swift?](https://twitter.com/slava_pestov/status/1016534163988496384) 🤔 From 164dbb834ae833c90ca69702fe6a5acc989245ce Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 12 Jul 2018 20:14:50 +0200 Subject: [PATCH 014/589] 114 draft --- _drafts/2018-07-26-issue-114.md | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 _drafts/2018-07-26-issue-114.md diff --git a/_drafts/2018-07-26-issue-114.md b/_drafts/2018-07-26-issue-114.md new file mode 100644 index 00000000..add3500a --- /dev/null +++ b/_drafts/2018-07-26-issue-114.md @@ -0,0 +1,51 @@ +--- +layout: post +title: ! 'Issue #114' +author: btb +--- + +> TODO: intro comments + + + +### Starter tasks + +> TODO + +{% include task_remind.html %} + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From fd8d005fcd6381c29a4a1bb36c22228b2aa931a8 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 14 Jul 2018 12:10:23 +0200 Subject: [PATCH 015/589] 0218 accepted ref #402 --- _drafts/2018-07-26-issue-114.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_drafts/2018-07-26-issue-114.md b/_drafts/2018-07-26-issue-114.md index add3500a..26e5b1c7 100644 --- a/_drafts/2018-07-26-issue-114.md +++ b/_drafts/2018-07-26-issue-114.md @@ -28,7 +28,9 @@ author: btb ### Accepted proposals -> TODO +[SE-0218](https://github.com/apple/swift-evolution/blob/master/proposals/0218-introduce-compact-map-values.md): *Introduce `compactMapValues` to Dictionary* was [accepted](https://forums.swift.org/t/accepted-se-0218-introduce-compactmapvalues-to-dictionary/14448). + +> Feedback on the proposal was very positive – the main concern being with the name, but this falls naturally out of our existing method names so is consistent, if clunky. ### Returned proposals From ab647f774162f34723b2669538c2d8d155ace2b6 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 14 Jul 2018 16:08:43 +0200 Subject: [PATCH 016/589] 0217 rejected ref #402 --- _drafts/2018-07-26-issue-114.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_drafts/2018-07-26-issue-114.md b/_drafts/2018-07-26-issue-114.md index 26e5b1c7..ba5af673 100644 --- a/_drafts/2018-07-26-issue-114.md +++ b/_drafts/2018-07-26-issue-114.md @@ -38,7 +38,9 @@ author: btb ### Rejected proposals -> TODO +[SE-0217](https://github.com/apple/swift-evolution/blob/master/proposals/0217-bangbang.md): *Introducing the `!!` "Unwrap or Die" operator to the Swift Standard Library* has been [rejected](https://forums.swift.org/t/se-0217-the-unwrap-or-die-operator/14107/222). + +> The core team has decided to reject this proposal as written. However, the core team concurs that the motivating problems posed by the proposal are important to solve, as did an overwhelming majority of commenters who participated in the public review. The fact that the only fixit the compiler offers to unwrap an Optional is to use the `!` operator is an unfortunate legacy of the Swift 1.0 days, before anything in the SDKs Swift was designed to work with had been audited for nullability, so force-unwrapping was far more of a necessity. Nowadays this legacy is actively harmful, and encourages bad habits in new Swift programmers, as the proposal and review discussion highlight extensively. It is clear too that `!` giving inadequate runtime feedback is a major problem, since a large contingent of the Swift community follows style guides that flat-out ban it, and the `guard ... else { fatalError("message") }` idiom is widespread as a way of more thoughtfully crashing on nil with an actionable error message. ### Proposals in review From 09aa3581cce4ca9652e02efee189dd082ec1f24a Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 14 Jul 2018 16:11:33 +0200 Subject: [PATCH 017/589] Add another link to the rationale --- _drafts/2018-07-26-issue-114.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_drafts/2018-07-26-issue-114.md b/_drafts/2018-07-26-issue-114.md index ba5af673..d481506a 100644 --- a/_drafts/2018-07-26-issue-114.md +++ b/_drafts/2018-07-26-issue-114.md @@ -38,10 +38,12 @@ author: btb ### Rejected proposals -[SE-0217](https://github.com/apple/swift-evolution/blob/master/proposals/0217-bangbang.md): *Introducing the `!!` "Unwrap or Die" operator to the Swift Standard Library* has been [rejected](https://forums.swift.org/t/se-0217-the-unwrap-or-die-operator/14107/222). +[SE-0217](https://github.com/apple/swift-evolution/blob/master/proposals/0217-bangbang.md): *Introducing the `!!` "Unwrap or Die" operator to the Swift Standard Library* was [rejected](https://forums.swift.org/t/se-0217-the-unwrap-or-die-operator/14107/222). > The core team has decided to reject this proposal as written. However, the core team concurs that the motivating problems posed by the proposal are important to solve, as did an overwhelming majority of commenters who participated in the public review. The fact that the only fixit the compiler offers to unwrap an Optional is to use the `!` operator is an unfortunate legacy of the Swift 1.0 days, before anything in the SDKs Swift was designed to work with had been audited for nullability, so force-unwrapping was far more of a necessity. Nowadays this legacy is actively harmful, and encourages bad habits in new Swift programmers, as the proposal and review discussion highlight extensively. It is clear too that `!` giving inadequate runtime feedback is a major problem, since a large contingent of the Swift community follows style guides that flat-out ban it, and the `guard ... else { fatalError("message") }` idiom is widespread as a way of more thoughtfully crashing on nil with an actionable error message. +I'd encourage you to read [the rest of the rationale](https://forums.swift.org/t/se-0217-the-unwrap-or-die-operator/14107/222). + ### Proposals in review > TODO From f5a0bfb2618fce75d2ffccb101f14c851dcd7e28 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 14 Jul 2018 16:18:24 +0200 Subject: [PATCH 018/589] 0215 accepted ref #402 --- _drafts/2018-07-26-issue-114.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/_drafts/2018-07-26-issue-114.md b/_drafts/2018-07-26-issue-114.md index d481506a..40bfed9a 100644 --- a/_drafts/2018-07-26-issue-114.md +++ b/_drafts/2018-07-26-issue-114.md @@ -28,6 +28,22 @@ author: btb ### Accepted proposals +[SE-0215](https://github.com/apple/swift-evolution/blob/master/proposals/0215-conform-never-to-hashable-and-equatable.md): *Conform `Never` to `Equatable` and `Hashable`* was [accepted](https://forums.swift.org/t/se-0215-conform-never-to-equatable-and-hashable/13586/45). + +> The Core Team discussed the review, and reached the following conclusions: +> +> - The proposal should be accepted with the new explicit conformances to `Equatable` and `Hashable` be added to `Never`. This addresses a real point of friction users are experiencing with the use of `Never`. +> +> - For the same reasons conformances to `Hashable` and `Equatable` are being added to `Never`, the Core Team felt that conformances to `Error` and `Comparable` should also be added to `Never` as part of accepting this proposal. Both of these additional protocol conformances were brought up during the review. +> +> - `Never` should become a blessed bottom type in the language. This matches with semantics in other languages and its intended role in Swift. +> +> With respect to the latter, the Core Team discussed what Never being a bottom type actually meant. From that discussion we reached the following conclusions: +> +> - Semantically, as a bottom type, it would mean that Never should be implicitly convertible to any other type. This composes well in the type system because of the fact that instances of `Never` cannot be instantiated. +> +> However, being a bottom type does not imply that `Never` should implicitly conform to all protocols. Instead, convenient protocol conformances for Never should be added as deemed useful or necessary. + [SE-0218](https://github.com/apple/swift-evolution/blob/master/proposals/0218-introduce-compact-map-values.md): *Introduce `compactMapValues` to Dictionary* was [accepted](https://forums.swift.org/t/accepted-se-0218-introduce-compactmapvalues-to-dictionary/14448). > Feedback on the proposal was very positive – the main concern being with the name, but this falls naturally out of our existing method names so is consistent, if clunky. From 7dc369043cf9fa80c4b06e9352cb23e62f98adfa Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 16 Jul 2018 07:38:46 +0200 Subject: [PATCH 019/589] Remove task remind (#403) * Remove task remind Fixes #401 * Re-add task_remind --- new_draft.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/new_draft.sh b/new_draft.sh index 22745f6d..b681c72b 100755 --- a/new_draft.sh +++ b/new_draft.sh @@ -57,8 +57,6 @@ author: $3 > TODO -{% include task_remind.html %} - ### Swift Unwrapped > TODO: Latest episode(s) of Swift Unwrapped From b5eea975d82c30069f1306250c46fc053bfe52bb Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 24 Jul 2018 21:31:26 +0200 Subject: [PATCH 020/589] Add some more to 114 References #402 --- _drafts/2018-07-26-issue-114.md | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/_drafts/2018-07-26-issue-114.md b/_drafts/2018-07-26-issue-114.md index 40bfed9a..0cbdfdc3 100644 --- a/_drafts/2018-07-26-issue-114.md +++ b/_drafts/2018-07-26-issue-114.md @@ -4,27 +4,29 @@ title: ! 'Issue #114' author: btb --- -> TODO: intro comments +Not only did the Swift repository pass [18,000](https://twitter.com/jckarter/status/1019623101921804288) pull requests (after the internal repository had 18,000 SVN revisions after four years), it also celebrated its [8th birthday](https://twitter.com/slava_pestov/status/1021627717228220417)! Impressive numbers, and may many more follow. ### Starter tasks -> TODO - -{% include task_remind.html %} +- [SR-8252](https://bugs.swift.org/browse/SR-8252) [Compiler] Consolidate and Fix `-debug-crash-*` Flags +- [SR-8253](https://bugs.swift.org/browse/SR-8253) [Compiler] `catch` clause should allow multiple patterns +- [SR-8327](https://bugs.swift.org/browse/SR-8327) [Package Manager] Improve error message when bootstrapping SwiftPM without cmake or ninja ### Swift Unwrapped -> TODO: Latest episode(s) of Swift Unwrapped +Jesse and JP are taking [a well deserved summer break](https://twitter.com/swift_unwrapped/status/1016334803648434176). ☀️🏖 ### News and community -> TODO +[Cory Benfield](https://github.com/Lukasa) announced the release of [`NIOTransportServices`](https://forums.swift.org/t/niotransportservices-swiftnio-and-network-framework/14567) to help users use Network.framework with a SwiftNIO API. ### Commits and pull requests -> TODO +[Slava Pestov](https://twitter.com/slava_pestov/) merged [a pull request](https://github.com/apple/swift/pull/18082) that continues the work of SE-0002 (!), removing multiple parameter lists from the Abstract Syntax Tree (AST). + +[Ben Cohen](https://twitter.com/AirspeedSwift/) merged [a pull request](https://github.com/apple/swift/pull/18098) that refactors some code making use of conditional conformances. The result? +276, -2,694 lines of code. Impressive! ### Accepted proposals @@ -48,9 +50,9 @@ author: btb > Feedback on the proposal was very positive – the main concern being with the name, but this falls naturally out of our existing method names so is consistent, if clunky. -### Returned proposals +[SE-0219](https://github.com/apple/swift-evolution/blob/master/proposals/0219-package-manager-dependency-mirroring.md): *Package Manager Dependency Mirroring* was [accepted with revisions](https://forums.swift.org/t/se-0219-package-manager-dependency-mirroring/14371/8). -> TODO +> The review of SE-0219 “Package Manager Dependency Mirroring" ran from July 10...17. Feedback was positive, and the proposal is accepted with revisions (adding a `swift package config get-mirror` command). Thanks to everyone who participated! ### Rejected proposals @@ -62,12 +64,18 @@ I'd encourage you to read [the rest of the rationale](https://forums.swift.org/t ### Proposals in review -> TODO +[SE-0221](https://github.com/apple/swift-evolution/blob/master/proposals/0221-character-properties.md): *Character Properties* is [under review](https://forums.swift.org/t/se-0221-character-properties/14686). + +> [Tony Allevato](https://github.com/allevato) (a co-author here) proposed [Add Unicode Properties to `Unicode.Scalar`](https://github.com/apple/swift-evolution/blob/master/proposals/0211-unicode-scalar-properties.md), which exposes Unicode properties from the [Unicode Character Database](http://unicode.org/reports/tr44/). These are Unicode expert/enthusiast oriented properties that give a finer granularity of control and answer highly-technical and specific Unicody enquiries. +> +> However, they are not ergonomic and Swift makes no attempt to clarify their interpretation or usage: meaning and proper interpretation is directly tied to the Unicode Standard and the version of Unicode available at run time. There’s some low-hanging ergo-fruit ripe for picking by exposing properties directly on `Character`. ### Swift Forums -> TODO +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r) shared news about some [recently added features](https://forums.swift.org/t/package-manifest-caching-landed/14624) in SwiftPM, namely the caching of manifests. + +> [..] SwiftPM will now cache the loaded manifests for effectively all operations except dependency resolution. This provides great performance improvements during iterative development. Commands like `swift build`, `swift test`, `swift package edit`, `swift package generate-xcodeproj` should start significantly faster once the cache is created. For e.g., time spent to load all manifests of Vapor reduces from 3.7s to 64ms! ### Finally -> TODO: something funny/fun. tweet, link, etc. +[Index out of bounds](https://twitter.com/jckarter/status/1018224486477279233). 💥 From 65cf6ab5737f18824349bd3df1568d750bb278ed Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 26 Jul 2018 17:12:43 +0200 Subject: [PATCH 021/589] Finish up issue 114 (#405) * Finish up issue 114 * Update 2018-07-26-issue-114.md * Update 2018-07-26-issue-114.md --- {_drafts => _posts}/2018-07-26-issue-114.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) rename {_drafts => _posts}/2018-07-26-issue-114.md (76%) diff --git a/_drafts/2018-07-26-issue-114.md b/_posts/2018-07-26-issue-114.md similarity index 76% rename from _drafts/2018-07-26-issue-114.md rename to _posts/2018-07-26-issue-114.md index 0cbdfdc3..cae930c2 100644 --- a/_drafts/2018-07-26-issue-114.md +++ b/_posts/2018-07-26-issue-114.md @@ -6,6 +6,8 @@ author: btb Not only did the Swift repository pass [18,000](https://twitter.com/jckarter/status/1019623101921804288) pull requests (after the internal repository had 18,000 SVN revisions after four years), it also celebrated its [8th birthday](https://twitter.com/slava_pestov/status/1021627717228220417)! Impressive numbers, and may many more follow. +Apart from that, I hope many of you are enjoying an awesome summer! + ### Starter tasks @@ -28,6 +30,8 @@ Jesse and JP are taking [a well deserved summer break](https://twitter.com/swift [Ben Cohen](https://twitter.com/AirspeedSwift/) merged [a pull request](https://github.com/apple/swift/pull/18098) that refactors some code making use of conditional conformances. The result? +276, -2,694 lines of code. Impressive! +[Doug Gregor](https://twitter.com/dgregor79/) merged [a pull request](https://github.com/apple/swift/pull/18163) involving protocol metadata. This is also part of ABI stability and improving reflection. According to Slava, "This all lays the groundwork for powerful metaprogramming capabilities that go far beyond the standard library's `Mirror` type". 🎉 + ### Accepted proposals [SE-0215](https://github.com/apple/swift-evolution/blob/master/proposals/0215-conform-never-to-hashable-and-equatable.md): *Conform `Never` to `Equatable` and `Hashable`* was [accepted](https://forums.swift.org/t/se-0215-conform-never-to-equatable-and-hashable/13586/45). @@ -76,6 +80,21 @@ I'd encourage you to read [the rest of the rationale](https://forums.swift.org/t > [..] SwiftPM will now cache the loaded manifests for effectively all operations except dependency resolution. This provides great performance improvements during iterative development. Commands like `swift build`, `swift test`, `swift package edit`, `swift package generate-xcodeproj` should start significantly faster once the cache is created. For e.g., time spent to load all manifests of Vapor reduces from 3.7s to 64ms! +[Jordan Rose](https://twitter.com/UINT_MIN) shared [an update on module stability](https://forums.swift.org/t/plan-for-module-stability/14551), which he will be working on in "the next year or so". + +> _ABI stability_ means that an executable compiled against Swift 5 will work with the Swift 6 libraries, and that an executable compiled against Swift 6 will work with the Swift 5 libraries. A related concept is module stability, which says that the _interface_ for a Swift 5 library will work with the Swift 6 compiler. (The opposite direction is less interesting.) More generally, *the interface for a library should be forward-compatible with future versions of the compiler*. This is useful in a number of ways: +> +> - Can test a new compiler without rebuilding all of an app's dependencies. +> - May overlap with work to make the debugger work across Swift versions. +> - May help reduce incremental build time by better tracking cross-target dependencies. +> - Support for general _non-resilient_ binary frameworks. + +If you're interested in this, I would recommend reading the [full post](https://forums.swift.org/t/plan-for-module-stability/14551). + +[Nate Cook]() pitched [a proposal](https://forums.swift.org/t/array-initializer-with-access-to-uninitialized-buffer/13689) to expose the internal array initializer that has access to an uninitialized buffer. + +> There is currently no way to work with a buffer of uninitialized memory that then becomes a fully memory-managed `Array`. This limitation means that operations that don't know the final size of their data in advance, or that need to access noncontiguous parts of an array, are less efficient than necessary, often requiring an extra copy. This proposal suggests a new initializer for `Array` and `ContiguousArray` that would provide access to a newly created array's entire storage buffer. + ### Finally [Index out of bounds](https://twitter.com/jckarter/status/1018224486477279233). 💥 From a89422e99d3f7ad97e2ce97e1d43dde12c9430ee Mon Sep 17 00:00:00 2001 From: Ole Begemann Date: Mon, 30 Jul 2018 05:18:47 +0200 Subject: [PATCH 022/589] Fix typo in issue 113 (#406) --- _posts/2018-07-12-issue-113.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-07-12-issue-113.md b/_posts/2018-07-12-issue-113.md index 94fbab7d..dacd90a5 100644 --- a/_posts/2018-07-12-issue-113.md +++ b/_posts/2018-07-12-issue-113.md @@ -31,7 +31,7 @@ In [episode 65](https://spec.fm/podcasts/swift-unwrapped/160476), Jesse and JP d ### Commits and pull requests -[Mark Lacey](https://github.com/rudkx) opened [a pull request](https://github.com/apple/swift/pull/17691) to remove Swift 3 from type checher. "Goodbye, Swift 3" +[Mark Lacey](https://github.com/rudkx) opened [a pull request](https://github.com/apple/swift/pull/17691) to remove Swift 3 from the type checker. "Goodbye, Swift 3" [Slava Pestov](https://twitter.com/slava_pestov) merged several pull requests: [#17611](https://github.com/apple/swift/pull/17611), [#17651](https://github.com/apple/swift/pull/17651) and [#17816](https://github.com/apple/swift/pull/17816) - great additions to [SE-0156: Class and Subtype existentials](https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md) to add support for protocols with superclass constraints. From ce5c047b01c0ecb36cca499f9d8b28955350f2f6 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 30 Jul 2018 22:24:58 +0200 Subject: [PATCH 023/589] bundle update --- Gemfile.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 578fa422..785ae3bb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,12 +20,12 @@ GEM colorator (1.1.0) colored2 (3.1.2) colorize (0.8.1) - commonmarker (0.17.7.1) + commonmarker (0.17.9) ruby-enum (~> 0.5) concurrent-ruby (1.0.5) cork (0.3.0) colored2 (~> 3.1) - danger (5.5.6) + danger (5.6.4) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -37,19 +37,19 @@ GEM no_proxy_fix octokit (~> 4.7) terminal-table (~> 1) - danger-prose (2.0.5) + danger-prose (2.0.7) danger ethon (0.11.0) ffi (>= 1.3.0) execjs (2.7.0) - faraday (0.13.1) + faraday (0.15.2) multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) - ffi (1.9.18) + ffi (1.9.25) forwardable-extended (2.6.0) gemoji (3.0.0) - git (1.3.0) + git (1.4.0) github-pages (172) activesupport (= 4.2.9) github-pages-health-check (= 1.3.5) @@ -100,10 +100,10 @@ GEM octokit (~> 4.0) public_suffix (~> 2.0) typhoeus (~> 0.7) - html-pipeline (2.7.1) + html-pipeline (2.8.4) activesupport (>= 2) nokogiri (>= 1.4) - i18n (0.9.1) + i18n (0.9.5) concurrent-ruby (~> 1.0) jekyll (3.6.2) addressable (~> 2.4) @@ -121,7 +121,7 @@ GEM jekyll-coffeescript (1.0.2) coffee-script (~> 2.2) coffee-script-source (~> 1.11.1) - jekyll-commonmark (1.1.0) + jekyll-commonmark (1.2.0) commonmarker (~> 0.14) jekyll (>= 3.0, < 4.0) jekyll-commonmark-ghpages (0.1.3) @@ -219,28 +219,28 @@ GEM mini_portile2 (2.3.0) minima (2.1.1) jekyll (~> 3.3) - minitest (5.11.1) + minitest (5.11.3) multipart-post (2.0.0) nap (1.1.0) net-dns (0.8.0) no_proxy_fix (0.1.2) - nokogiri (1.8.1) + nokogiri (1.8.4) mini_portile2 (~> 2.3.0) - octokit (4.8.0) + octokit (4.9.0) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) pathutil (0.16.1) forwardable-extended (~> 2.6) public_suffix (2.0.5) - rb-fsevent (0.10.2) + rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) rouge (2.2.1) - ruby-enum (0.7.1) + ruby-enum (0.7.2) i18n rubyzip (1.2.1) safe_yaml (1.0.4) - sass (3.5.5) + sass (3.5.7) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) @@ -253,9 +253,9 @@ GEM thread_safe (0.3.6) typhoeus (0.8.0) ethon (>= 0.8.0) - tzinfo (1.2.4) + tzinfo (1.2.5) thread_safe (~> 0.1) - unicode-display_width (1.3.0) + unicode-display_width (1.4.0) PLATFORMS ruby From 3f0be1e7e4255ad8730e0938ba44075ed0144f85 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 9 Aug 2018 18:57:13 +0200 Subject: [PATCH 024/589] Publish issue 115 Closes #404 --- _posts/2018-08-09-issue-115.md | 82 ++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 _posts/2018-08-09-issue-115.md diff --git a/_posts/2018-08-09-issue-115.md b/_posts/2018-08-09-issue-115.md new file mode 100644 index 00000000..a6a9c852 --- /dev/null +++ b/_posts/2018-08-09-issue-115.md @@ -0,0 +1,82 @@ +--- +layout: post +title: ! 'Issue #115' +author: btb +--- + +A calm week during these warm two summer weeks. Nevertheless, here is a quick update on what has happened these weeks. + + + +### Starter tasks + +- [SR-8467](https://bugs.swift.org/browse/SR-8467) [Compiler] Invalid read when calling `swift::AnyFunctionType::getExtInfo` +- [SR-8464](https://bugs.swift.org/browse/SR-8464) [Compiler] Attempting to print a function should require the use of `String(describing:)` +- [SR-8453](https://bugs.swift.org/browse/SR-8453) [Compiler] Warn when redundant access modifier is added in an extension + +### Swift Unwrapped + +While Jesse and JP are on a holiday break from the podcast, you can find all previous episodes [here](https://spec.fm/podcasts/swift-unwrapped). + +### News and community + +[Nicole Jacque](https://forums.swift.org/u/nicole_jacque/summary) shared that [Swift 4.1.3](https://forums.swift.org/t/swift-4-1-3-is-released-linux-only/14847), with a [Linux-only fix](https://bugs.swift.org/browse/SR-7650), has been released. + +### Commits and pull requests + +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/18145) getting rid of redundancy in protocol derivation. + +[Philippe Hausler](https://github.com/phausler) merged [a pull request](https://github.com/apple/swift/pull/18469) to fix ambiguous mapping to `Data` from a byte sequence in Swift 4.2. + +[David Hart](https://twitter.com/dhartbit) merged [a pull request](https://github.com/apple/swift-package-manager/pull/1537) that allows SwiftPM to use `llbuild` as a library, which will "enable great new features and enhancements in the future". + +[Pavel Yaskevich](https://github.com/xedin) merged [a pull request](https://github.com/apple/swift/pull/18484) to emit diagnostics directly from the constraint solver, moving away from re-type checking sub-expressions after a failure, which has been a source of misleading diagnostics and crashes. + +### Accepted proposals + +[SE-0221](https://github.com/apple/swift-evolution/blob/master/proposals/0221-character-properties.md): *Character Properties* was [accepted with pending discussion](https://forums.swift.org/t/accepted-with-pending-discussion-se-0221-character-properties/14944). + +> SE-0221 has been accepted, with the exception of the `.isEmoji` property. +> +> The core team accepts the principle for the `isEmoji` property, but wants to continue the discussion of exactly how it should work. Therefore the thread will remain open for this specific topic through **August 10th**. The other functionality can be merged into master in the meantime. + +### Proposals in review + +[SE-0220](https://github.com/apple/swift-evolution/blob/master/proposals/0220-count-where.md): *`count(where:)`* is [under review](https://forums.swift.org/t/se-0220-count-where/15048). + +> While Swift's `Sequence` models brings a lot of niceties that we didn't have access to in Objective-C, like `map` and `filter`, there are other useful operations on sequences that the standard library doesn't support yet. One current missing operation is `count(where:)`, which counts the number of elements in a `Sequence` that pass some test. + +[SE-0222](https://github.com/apple/swift-evolution/blob/master/proposals/0222-lazy-compactmap-sequence.md): *Lazy CompactMap Sequence* is [under review](https://forums.swift.org/t/se-0222-lazy-compactmap-sequence/14850). + +> Chaining multiple `.map()`s and `.filter()`s on a lazy collection leads to suboptimal codegen, as well as large, painful type names. +> +> To improve this, we propose adding a `LazyCompactMap{Sequence, Collection}` type along with some overloads on the other lazy collection types' `.map(_:)` and `.filter(_:)` functions which return this type to get better codegen and shorter type names. + +### Swift Forums + +[Brent Royal-Gordon](http://twitter.com/brentdax) pitched [a proposal](https://forums.swift.org/t/draft-fix-string-interpolation-swift-5-edition/14786) to fix String interpolation in Swift 5. + +> String interpolation is a simple and powerful feature for expressing complex, runtime-created strings, but the current version of the `ExpressibleByStringInterpolation` protocol has been deprecated since Swift 3. We propose a new design which improves its performance, clarity, and efficiency. + +[Erica Sadun](http://twitter.com/ericasadun/status/970754573609484288) pitched [a proposal](https://forums.swift.org/t/support-repeating-initializers-with-closures-not-just-values/14666) to support repeating initializers with closures. + +> I'd like to pitch a protocol that supports repeated initializers, both for a repeated element and for `() -> Element`. The goal is to ensure that any type that conforms to the protocol guarantees that if you can initialize with _n_ copies of a value type, then you can initialize with _n_ instances of a reference type or _n_ applications of a closure: + +{% highlight swift %} +protocol RepeatingInitializable: Collection { + + /// See also: `Repeat.swift`: A collection whose elements are all identical. + /// https://github.com/apple/swift/blob/master/stdlib/public/core/Repeat.swift + public init(repeating repeatedValue: Element, count: Int) + + /// Allow reference types to generate new instances and value types + /// to use a closure to create potentially distinct values + /// + /// A collection whose elements are all created by an identical generator + public init(repeating repeatedGenerator: @autoclosure () -> Element, count: Int) +} +{% endhighlight %} + +### Finally + +[When you try to run Swift locally](https://twitter.com/aciidb0mb3r/status/1026241132848537600)... From d6914f834696a53a67ceaa08a2d954aae5358741 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 22 Aug 2018 22:33:53 +0200 Subject: [PATCH 025/589] 116 draft Ref #407 --- _drafts/2018-08-23-issue-116.md | 65 +++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 _drafts/2018-08-23-issue-116.md diff --git a/_drafts/2018-08-23-issue-116.md b/_drafts/2018-08-23-issue-116.md new file mode 100644 index 00000000..d65eb481 --- /dev/null +++ b/_drafts/2018-08-23-issue-116.md @@ -0,0 +1,65 @@ +--- +layout: post +title: ! 'Issue #116' +author: btb +--- + +September is approaching swiftly, which means that we'll be seeing new iPhones and all the new software before we know it. + + + +### Starter tasks + +- [SR-8507](https://bugs.swift.org/browse/SR-8507) [Compiler] 'foo bar' could have fixit suggesting missing `.` rather than just `;` or `,` +- [SR-8536](https://bugs.swift.org/browse/SR-8536) [Compiler] Warn on member assignments capturing `self` +- [SR-8598](https://bugs.swift.org/browse/SR-8598) [Compiler] Deprecating then obsoleting can be error prone + +### Swift Unwrapped + +https://twitter.com/swift_unwrapped/status/1031542426282942464 + https://twitter.com/simjp/status/1031547194594144257 + +### News and community + +https://forums.swift.org/t/swift-4-2-in-final-convergence-swift-4-2-branch-open-for-post-4-2-0-changes/15128/1 + +### Commits and pull requests + +https://github.com/apple/swift/pull/18579 + +https://github.com/apple/swift/pull/18539 + +https://github.com/apple/swift/pull/18699 + +### Accepted proposals + +224 https://forums.swift.org/t/se-0224-support-less-than-operator-in-compilation-conditions/15213/5 + +### Returned proposals + +200 + +### Rejected proposals + +> TODO + +### Proposals in review + +223 https://github.com/apple/swift-evolution/blob/master/proposals/0223-array-uninitialized-initializer.md + +224 + +225 + +226 https://forums.swift.org/t/se-0226-package-manager-target-based-dependency-resolution/15404 + +### Swift Forums + +https://forums.swift.org/t/rfc-swift-package-publish-precheck/15398 + +https://forums.swift.org/t/resolved-insert-is-a-bad-fixit/10764/102 + +https://forums.swift.org/t/crowdfunding-world-domination/13655/113 + +### Finally + +[Old but gold](https://twitter.com/ryzokuken/status/1030367978691260416) (I mean green). From e295bf55f646062923fc5e15a11c5ff224d4e2c7 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 23 Aug 2018 19:48:37 +0200 Subject: [PATCH 026/589] Post issue 116 Closes #407 --- _drafts/2018-08-23-issue-116.md | 65 ---------------------- _posts/2018-08-23-issue-116.md | 97 +++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 65 deletions(-) delete mode 100644 _drafts/2018-08-23-issue-116.md create mode 100644 _posts/2018-08-23-issue-116.md diff --git a/_drafts/2018-08-23-issue-116.md b/_drafts/2018-08-23-issue-116.md deleted file mode 100644 index d65eb481..00000000 --- a/_drafts/2018-08-23-issue-116.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -layout: post -title: ! 'Issue #116' -author: btb ---- - -September is approaching swiftly, which means that we'll be seeing new iPhones and all the new software before we know it. - - - -### Starter tasks - -- [SR-8507](https://bugs.swift.org/browse/SR-8507) [Compiler] 'foo bar' could have fixit suggesting missing `.` rather than just `;` or `,` -- [SR-8536](https://bugs.swift.org/browse/SR-8536) [Compiler] Warn on member assignments capturing `self` -- [SR-8598](https://bugs.swift.org/browse/SR-8598) [Compiler] Deprecating then obsoleting can be error prone - -### Swift Unwrapped - -https://twitter.com/swift_unwrapped/status/1031542426282942464 + https://twitter.com/simjp/status/1031547194594144257 - -### News and community - -https://forums.swift.org/t/swift-4-2-in-final-convergence-swift-4-2-branch-open-for-post-4-2-0-changes/15128/1 - -### Commits and pull requests - -https://github.com/apple/swift/pull/18579 - -https://github.com/apple/swift/pull/18539 - -https://github.com/apple/swift/pull/18699 - -### Accepted proposals - -224 https://forums.swift.org/t/se-0224-support-less-than-operator-in-compilation-conditions/15213/5 - -### Returned proposals - -200 - -### Rejected proposals - -> TODO - -### Proposals in review - -223 https://github.com/apple/swift-evolution/blob/master/proposals/0223-array-uninitialized-initializer.md - -224 - -225 - -226 https://forums.swift.org/t/se-0226-package-manager-target-based-dependency-resolution/15404 - -### Swift Forums - -https://forums.swift.org/t/rfc-swift-package-publish-precheck/15398 - -https://forums.swift.org/t/resolved-insert-is-a-bad-fixit/10764/102 - -https://forums.swift.org/t/crowdfunding-world-domination/13655/113 - -### Finally - -[Old but gold](https://twitter.com/ryzokuken/status/1030367978691260416) (I mean green). diff --git a/_posts/2018-08-23-issue-116.md b/_posts/2018-08-23-issue-116.md new file mode 100644 index 00000000..a1e1b120 --- /dev/null +++ b/_posts/2018-08-23-issue-116.md @@ -0,0 +1,97 @@ +--- +layout: post +title: ! 'Issue #116' +author: btb +--- + +September is approaching swiftly, which means that we'll be seeing new iPhones and all the new software before we know it. + +And although that won't yet bring Swift 5, we will get Swift 4.2 that comes with some awesome improvements as well, plus we'll still have Swift 5 to look forward to! + + + +### Starter tasks + +- [SR-8507](https://bugs.swift.org/browse/SR-8507) [Compiler] 'foo bar' could have fixit suggesting missing `.` rather than just `;` or `,` +- [SR-8536](https://bugs.swift.org/browse/SR-8536) [Compiler] Warn on member assignments capturing `self` +- [SR-8598](https://bugs.swift.org/browse/SR-8598) [Compiler] Deprecating then obsoleting can be error prone + +### Swift Unwrapped + +Swift Unwrapped is back from the summer break, and will take on [a new format](https://twitter.com/simjp/status/1031547194594144257) with longer episodes once a month. + +In [episode 66](https://spec.fm/podcasts/swift-unwrapped/184831), Jesse and JP discuss the plan for module stability, outlined by [Jordan Rose](https://twitter.com/uint_min) on the [forums](https://forums.swift.org/t/plan-for-module-stability/14551). + +### News and community + +[Ted Kremenek](https://twitter.com/tkremenek) shared that Swift 4.2 is [in final convergence](https://forums.swift.org/t/swift-4-2-in-final-convergence-swift-4-2-branch-open-for-post-4-2-0-changes/15128/1). Not much longer now! + +### Commits and pull requests + +[Jordan Rose](https://twitter.com/uint_min) merged [a pull request](https://github.com/apple/swift/pull/18579) that adds default argument values in the generated interface view within Xcode. This also closes [SR-2608](https://bugs.swift.org/browse/SR-2608). + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/18539) improving name lookup from declaration checking. "With the request evaluator, new function type representation, `SubstitutionMap` redesign and removal of curried parameter lists we’re finally paying off a lot of tech debt - the implementation is catching up to the language" 🎉 + +[Greg Titus](https://twitter.com/gregtitus) merged [a pull request](https://github.com/apple/swift/pull/18699) that ports Optional unwrapping fixits to the new diagnostics framework. + +### Accepted proposals + +[SE-0224](https://github.com/apple/swift-evolution/blob/master/proposals/0224-ifswift-lessthan-operator.md): *Support 'less than' operator in compilation conditions* was [accepted](https://forums.swift.org/t/se-0224-support-less-than-operator-in-compilation-conditions/15213/5). + +> The proposal text will be amended to include the mention of the change of behavior to `#if compiler`, which is also reflected in the implementation and logically fits in with this change: +> +>> The proposal only mentions `#if swift(<4.2)` but the implementation also appears to support `#if compiler(<4.2)` from [SE-0212](https://github.com/apple/swift-evolution/blob/master/proposals/0212-compiler-version-directive.md). + +### Returned proposals + +[SE-0200](https://github.com/apple/swift-evolution/blob/master/proposals/0200-raw-string-escaping.md): *Enhancing String Literals Delimiters to Support Raw Text* was [returned for revision](https://forums.swift.org/t/se-0200-enhancing-string-literals-delimiters-to-support-raw-text/15420). + +> Like many computer languages, Swift uses an escape character (`\`) to create a special interpretation of subsequent characters within a string literal. Escape character sequences represent a set of predefined, non-printing characters as well as string delimiters (the double quote), the escape character (the backslash itself), and (uniquely in Swift) to allow in-string expression interpolation. +> +> Escape characters provide useful and necessary capabilities but strings containing many escape sequences are difficult to read. Other languages have solved this problem by providing an alternate "raw" string literal syntax which does not process escape sequences. As the name suggests, raw string literals allow you to use "raw" text, incorporating backslashes and double quotes without escaping. +> +> We propose to alter Swift's string literal design to do the same, using a new design which we believe fits Swift's simple and clean syntax. This design supports both single-line and multi-line string literals, and can contain any content whatsoever. + +### Proposals in review + +[SE-0223](https://github.com/apple/swift-evolution/blob/master/proposals/0223-array-uninitialized-initializer.md): *Accessing an Array's Uninitialized Buffer* is [under review](https://forums.swift.org/t/se-0223-accessing-an-arrays-uninitialized-buffer/15194). + +> This proposal suggests a new initializer and method for `Array` and `ContiguousArray` that provide access to an array's uninitialized storage buffer. +> +> Some collection operations require working on a fixed-size buffer of uninitialized memory. For example, one O(*n*) algorithm for performing a stable partition of an array is as follows: +> +> 1. Create a new array the same size as the original array. +> 2. Iterate over the original array, copying matching elements to the beginning of the new array and non-matching elements to the end. +> 3. When finished iterating, reverse the slice of non-matching elements. +> +> Unfortunately, the standard library provides no way to create an array of a particular size without allocating every element, or to copy elements to the end of an array's buffer without initializing every preceding element. + +[SE-0225](https://github.com/apple/swift-evolution/blob/master/proposals/0225-binaryinteger-iseven-isodd-ismultiple.md): *Adding `isEven`, `isOdd`, `isMultiple` to `BinaryInteger`* is [under review](https://forums.swift.org/t/se-0225-adding-iseven-isodd-ismultiple-to-binaryinteger/15382). + +> This proposal adds `var isEven: Bool`, `var isOdd: Bool`, and `func isMultiple(of other: Self) -> Bool` to the `BinaryInteger` protocol. `isEven` and `isOdd` are convenience properties for querying the [parity](https://en.wikipedia.org/wiki/Parity_(mathematics)) of the integer and `isMultiple` is a more general function to determine whether an integer is a multiple of another integer. + +[SE-0226](https://github.com/apple/swift-evolution/blob/master/proposals/0226-package-manager-target-based-dep-resolution.md): *Package Manager Target Based Dependency Resolution* is [under review](https://forums.swift.org/t/se-0226-package-manager-target-based-dependency-resolution/15404). + +> This is a proposal for enhancing the package resolution process to resolve the minimal set of dependencies that are used in a package graph. +> +> The current package resolution process resolves all declared dependencies in the package graph. Some of the declared dependencies may not be required by the products that are being used in the package graph. For e.g., a package may be using some additional dependencies for its test targets. The packages that depend on this package doesn't need to resolve such additional dependencies. These dependencies increase the overall constraint in the dependency resolution process that can otherwise be avoided. It can cause more cases of dependency hell if two packages want to use incompatible versions of a dependency that they only use for their unexported products. Cloning unnecessary dependencies also impacts the performance of the resolution process. + +### Swift Forums + +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r) shared [a small proposal](https://forums.swift.org/t/rfc-swift-package-publish-precheck/15398) regarding tagging and publishing of Swift packages. + +> Swift packages can be in a bunch of states which makes them inappropriate for tagging or publishing. I think having a command to detect such states would be valuable for Swift package authors. In the future, this can even evolve into a larger tag-and-publish workflow feature. + +[Greg Titus](https://twitter.com/gregtitus) shared [an update](https://forums.swift.org/t/resolved-insert-is-a-bad-fixit/10764/102) on the much improved fixits for Optional chaining and force unwrapping. + +> [..] The force unwrap fixit still exists, but it is now never the only or preferred fixit offered, and hopefully the explanations of the errors are a lot more beginner-friendly now. + +These error messages have been much-improved. I recommend [taking a look](https://forums.swift.org/t/resolved-insert-is-a-bad-fixit/10764/102) at the changes yourself. + +[Ted Kremenek](https://twitter.com/tkremenek) shared [they are evaluating implementing the Language Server Protocol in Swift](https://forums.swift.org/t/crowdfunding-world-domination/13655/113). + +> [We] have also been recently discussing offline LSP and evaluating potential strategies. We'll start a thread soon once we've put those thoughts in order; should be soon. + +### Finally + +[Old but ~~gold~~ green](https://twitter.com/ryzokuken/status/1030367978691260416). From e17c3410c66adbe68a270c9f952a7394e06fffdf Mon Sep 17 00:00:00 2001 From: Greg Heo Date: Wed, 5 Sep 2018 19:19:30 -0700 Subject: [PATCH 027/589] [117] Add initial draft and notes --- _drafts/2018-09-06-issue-117.md | 64 +++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 _drafts/2018-09-06-issue-117.md diff --git a/_drafts/2018-09-06-issue-117.md b/_drafts/2018-09-06-issue-117.md new file mode 100644 index 00000000..70f4dae3 --- /dev/null +++ b/_drafts/2018-09-06-issue-117.md @@ -0,0 +1,64 @@ +--- +layout: post +title: ! 'Issue #117' +author: gregheo +--- + +> TODO: intro comments and lines of verse + + + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +The LLVM Foundation [announced the program for the 2018 LLVM Developers' Meeting](http://blog.llvm.org/2018/08/announcing-program-for-2018-llvm.html) scheduled for October 17–18 in San Jose. Swift nerds will [recognize](https://llvm.org/devmtg/2018-10/talk-abstracts.html#talk15) several [names](https://llvm.org/devmtg/2018-10/talk-abstracts.html#talk13) on the [program](https://llvm.org/devmtg/2018-10/talk-abstracts.html#talk12). + +The [Swift Server Work Group](https://swift.org/server/) has a new stated goal: + +> The main goal of the Swift Server work group is to eventually recommend libraries and tools for server application development with Swift. + +[SwiftNIO](https://github.com/apple/swift-nio) is currently the sole recommended library, but you can stay on top of updates from the group in the [Server category of the Swift forums](https://forums.swift.org/c/development/server). + + +### Commits and pull requests + +[Doug Gregor](https://github.com/DougGregor) merged in some new ["Request-Evaluator" infrastructure](https://twitter.com/dgregor79/status/1032774695039324160) around the type checker to help eliminate mutable state and track dependencies. See the [design document](https://github.com/apple/swift/blob/master/docs/RequestEvaluator.md) and [pull request](https://github.com/apple/swift/pull/18923) for all the details. + +[Erik Eckstein](https://github.com/eeckstein) removed the now unneeded [pinning built-ins and SIL instructions](https://github.com/apple/swift/pull/18922). As [summarized in a tweet](https://twitter.com/slava_pestov/status/1032871154032111616): "Nice simplification of the Swift reference counting model - the entire concept of “pinning” is gone now, thanks to exclusivity enforcement". + + +### Accepted proposals + +[SE-0200](https://github.com/apple/swift-evolution/blob/master/proposals/0200-raw-string-escaping.md): _Enhancing String Literals Delimiters to Support Raw Text_ was [accepted](https://forums.swift.org/t/accepted-se-0200-enhancing-string-literals-delimiters-to-support-raw-text/15822/1). + +[SE-0226](https://github.com/apple/swift-evolution/blob/master/proposals/0226-package-manager-target-based-dep-resolution.md): _Package Manager Target Based Dependency Resolution_ +was [accepted](https://forums.swift.org/t/se-0226-package-manager-target-based-dependency-resolution/15404/16) with generally positive comments all around. + + +### Returned proposals + +> TODO + +### Rejected proposals + +[SE-0132](https://github.com/apple/swift-evolution/blob/master/proposals/0132-sequence-end-ops.md): _Rationalizing Sequence end-operation names_ [was rejected](https://github.com/apple/swift-evolution/pull/898). Although it would make sequence and collection operation naming more consistent (e.g. "first" vs "start" vs "prefix"), the core team decided the source compatibility hit would be too great. + +[SE-0222](https://github.com/apple/swift-evolution/blob/master/proposals/0222-lazy-compactmap-sequence.md): _Lazy CompactMap Sequence_ [was rejected](https://forums.swift.org/t/se-0222-lazy-compactmap-sequence/14850/16). The proposal would have added a new `LazyCompactMapCollection` to represent a `compactMap` to more efficiently handle a chain of `map` and `filter` operations. + +The core team decided the performance benefits were negligible and not worth the increased complexity pointed out during the review discussion. + + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From ca9e6edaafdcced7928aa0184e363eff0818dc5c Mon Sep 17 00:00:00 2001 From: Greg Heo Date: Wed, 5 Sep 2018 21:57:27 -0700 Subject: [PATCH 028/589] [117] More words --- _drafts/2018-09-06-issue-117.md | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/_drafts/2018-09-06-issue-117.md b/_drafts/2018-09-06-issue-117.md index 70f4dae3..4d2c5635 100644 --- a/_drafts/2018-09-06-issue-117.md +++ b/_drafts/2018-09-06-issue-117.md @@ -8,9 +8,6 @@ author: gregheo -### Swift Unwrapped - -> TODO: Latest episode(s) of Swift Unwrapped ### News and community @@ -32,7 +29,11 @@ The [Swift Server Work Group](https://swift.org/server/) has a new stated goal: ### Accepted proposals -[SE-0200](https://github.com/apple/swift-evolution/blob/master/proposals/0200-raw-string-escaping.md): _Enhancing String Literals Delimiters to Support Raw Text_ was [accepted](https://forums.swift.org/t/accepted-se-0200-enhancing-string-literals-delimiters-to-support-raw-text/15822/1). +[SE-0200](https://github.com/apple/swift-evolution/blob/master/proposals/0200-raw-string-escaping.md): _Enhancing String Literals Delimiters to Support Raw Text_ [was accepted](https://forums.swift.org/t/accepted-se-0200-enhancing-string-literals-delimiters-to-support-raw-text/15822/1). With extra delimiting characters `#"like this"#`, you’ll be able to control how escaping works and have an easier time writing "raw" text. + +This is one of the best written Swift Evolution proposals in my opinion, and has an epic **461** [forum posts](https://forums.swift.org/t/pure-bikeshedding-raw-strings-why-yes-again/13866) split [across](https://forums.swift.org/t/se-0200-raw-mode-string-literals/11048) three [threads](https://forums.swift.org/t/se-0200-enhancing-string-literals-delimiters-to-support-raw-text/15420). + +[SE-0225](https://github.com/apple/swift-evolution/blob/master/proposals/0225-binaryinteger-iseven-isodd-ismultiple.md): _Adding `isMultiple` to `BinaryInteger`_ [was accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0225-adding-ismultiple-to-binaryinteger/15689). The `isMultiple(of:)` method made it, but proposed computed properties `isEven` and `isOdd` were dropped. [SE-0226](https://github.com/apple/swift-evolution/blob/master/proposals/0226-package-manager-target-based-dep-resolution.md): _Package Manager Target Based Dependency Resolution_ was [accepted](https://forums.swift.org/t/se-0226-package-manager-target-based-dependency-resolution/15404/16) with generally positive comments all around. @@ -40,7 +41,8 @@ was [accepted](https://forums.swift.org/t/se-0226-package-manager-target-based-d ### Returned proposals -> TODO +[SE-0223](https://github.com/apple/swift-evolution/blob/master/proposals/0223-array-uninitialized-initializer.md): _Accessing an Array's Uninitialized Buffer_ [was returned for revision](https://forums.swift.org/t/se-0223-accessing-an-arrays-uninitialized-buffer/15194/40). This proposal would allow you to initialize and access arrays via raw buffer. The core team is looking for more usage experience and discussion mostly around handling errors. + ### Rejected proposals @@ -53,12 +55,26 @@ The core team decided the performance benefits were negligible and not worth the ### Proposals in review -> TODO +[SE-0227](https://github.com/apple/swift-evolution/blob/master/proposals/0227-identity-keypath.md): _Identity key path_ [is in review](https://forums.swift.org/t/se-0227-identity-key-path/15830) through Friday September 14. + +Swift values already have a `.self` pseudo-property to refer to the value itself, and this proposal would add a corresponding key path `\.self`. + ### Swift Forums -> TODO +Containerization has officially reached the world of Swift: Haris Amin posted about plans to offer [an official Docker image](https://forums.swift.org/t/kickstarting-new-official-docker-support-for-swift/15487) for the community. + +[Doug Gregor](https://forums.swift.org/u/Douglas_Gregor) wrote a pitch for [Opaque result types](https://forums.swift.org/t/opaque-result-types/15645) — the ability to hide a function’s exact return type and specify its capabilities instead. + +[Erik Eckstein](https://forums.swift.org/u/Erik_Eckstein) wrote an update on [improvements to running benchmarks on pull requests](https://forums.swift.org/t/improved-benchmarking-for-pull-requests/15461). They are faster, less noisy, and have nicer reports — a great boost to developer productivity. + +[Alex Hoppen](https://forums.swift.org/u/ahoppen) announced [SwiftSyntax is now in its own repository](https://forums.swift.org/t/swiftsyntax-is-now-a-swiftpm-project/15691) and available to include via Swift Package Manager. [SwiftSyntax](https://github.com/apple/swift-syntax) is a wrapper for [libSyntax](https://github.com/apple/swift/tree/master/lib/Syntax) and lets you write tools to work with Swift code in Swift. + +[Daniel Duan highlighted](https://twitter.com/daniel_duan/status/1035331454467796993) the [approval post for SE-0225](https://forums.swift.org/t/accepted-with-modifications-se-0225-adding-ismultiple-to-binaryinteger/15689) mentioned above, where review manager [John McCall](https://forums.swift.org/u/John_McCall) listed guidelines for what gets included in the standard library: + +> To be considered for addition to the library, a proposed feature must satisfy two conditions: it must provide functionality that is useful to a substantial population of Swift programmers, and it must provide substantial advantages over the alternative ways of accomplishing that functionality. + ### Finally -> TODO: something funny/fun. tweet, link, etc. +Add this to the category of things I read all the time, but never had to say out loud and [don't know how to pronounce](https://twitter.com/jckarter/status/1035568097535508480). From 7341b61e6ff1d84b38fd0640198319733350d8e3 Mon Sep 17 00:00:00 2001 From: Greg Heo Date: Wed, 5 Sep 2018 22:09:16 -0700 Subject: [PATCH 029/589] Boosted default graf font size Blockquote font was bigger than paragraph font, which seems weird, so make them the same. Also, we're not getting any younger so let's be kind to our eyes :). --- css/style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/css/style.css b/css/style.css index e2003831..4e100447 100644 --- a/css/style.css +++ b/css/style.css @@ -7,8 +7,9 @@ body { } body p { - line-height: 2.5rem; + line-height: 2.7rem; padding: 0.5rem 0rem 0.5rem 0rem; + font-size: 16px; } hr { From aea0cae70e2bb4acf2504e2084769a84f6848e9a Mon Sep 17 00:00:00 2001 From: Greg Heo Date: Thu, 6 Sep 2018 08:07:26 -0700 Subject: [PATCH 030/589] [117] Final tweaks and edits --- _drafts/2018-09-06-issue-117.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/_drafts/2018-09-06-issue-117.md b/_drafts/2018-09-06-issue-117.md index 4d2c5635..f5d5272d 100644 --- a/_drafts/2018-09-06-issue-117.md +++ b/_drafts/2018-09-06-issue-117.md @@ -26,29 +26,31 @@ The [Swift Server Work Group](https://swift.org/server/) has a new stated goal: [Erik Eckstein](https://github.com/eeckstein) removed the now unneeded [pinning built-ins and SIL instructions](https://github.com/apple/swift/pull/18922). As [summarized in a tweet](https://twitter.com/slava_pestov/status/1032871154032111616): "Nice simplification of the Swift reference counting model - the entire concept of “pinning” is gone now, thanks to exclusivity enforcement". +Great work by [Pavol Vaskovic](https://bugs.swift.org/secure/ViewProfile.jspa?name=palimondo) on spotting a recent regression [causing incorrect sorting](https://bugs.swift.org/browse/SR-8682) (!) from the standard library, and [Kirill Chibisov](https://github.com/overlazy) for [the bug fix](https://github.com/apple/swift/pull/19107). Test your code and watch your variable names! + ### Accepted proposals [SE-0200](https://github.com/apple/swift-evolution/blob/master/proposals/0200-raw-string-escaping.md): _Enhancing String Literals Delimiters to Support Raw Text_ [was accepted](https://forums.swift.org/t/accepted-se-0200-enhancing-string-literals-delimiters-to-support-raw-text/15822/1). With extra delimiting characters `#"like this"#`, you’ll be able to control how escaping works and have an easier time writing "raw" text. -This is one of the best written Swift Evolution proposals in my opinion, and has an epic **461** [forum posts](https://forums.swift.org/t/pure-bikeshedding-raw-strings-why-yes-again/13866) split [across](https://forums.swift.org/t/se-0200-raw-mode-string-literals/11048) three [threads](https://forums.swift.org/t/se-0200-enhancing-string-literals-delimiters-to-support-raw-text/15420). +This is one of the most well written Swift Evolution proposals in my opinion, and has an epic **461** [forum posts](https://forums.swift.org/t/pure-bikeshedding-raw-strings-why-yes-again/13866) split [across](https://forums.swift.org/t/se-0200-raw-mode-string-literals/11048) three [threads](https://forums.swift.org/t/se-0200-enhancing-string-literals-delimiters-to-support-raw-text/15420) for your reading pleasure. -[SE-0225](https://github.com/apple/swift-evolution/blob/master/proposals/0225-binaryinteger-iseven-isodd-ismultiple.md): _Adding `isMultiple` to `BinaryInteger`_ [was accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0225-adding-ismultiple-to-binaryinteger/15689). The `isMultiple(of:)` method made it, but proposed computed properties `isEven` and `isOdd` were dropped. +[SE-0225](https://github.com/apple/swift-evolution/blob/master/proposals/0225-binaryinteger-iseven-isodd-ismultiple.md): _Adding `isMultiple` to `BinaryInteger`_ [was accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0225-adding-ismultiple-to-binaryinteger/15689). The `isMultiple(of:)` method made it in, but proposed computed properties `isEven` and `isOdd` were dropped. [SE-0226](https://github.com/apple/swift-evolution/blob/master/proposals/0226-package-manager-target-based-dep-resolution.md): _Package Manager Target Based Dependency Resolution_ -was [accepted](https://forums.swift.org/t/se-0226-package-manager-target-based-dependency-resolution/15404/16) with generally positive comments all around. +was [accepted](https://forums.swift.org/t/se-0226-package-manager-target-based-dependency-resolution/15404/16) with generally positive comments all around. This change will speed up package resolution by only resolving dependencies that are actually used rather than all declared dependencies. ### Returned proposals -[SE-0223](https://github.com/apple/swift-evolution/blob/master/proposals/0223-array-uninitialized-initializer.md): _Accessing an Array's Uninitialized Buffer_ [was returned for revision](https://forums.swift.org/t/se-0223-accessing-an-arrays-uninitialized-buffer/15194/40). This proposal would allow you to initialize and access arrays via raw buffer. The core team is looking for more usage experience and discussion mostly around handling errors. +[SE-0223](https://github.com/apple/swift-evolution/blob/master/proposals/0223-array-uninitialized-initializer.md): _Accessing an Array's Uninitialized Buffer_ [was returned for revision](https://forums.swift.org/t/se-0223-accessing-an-arrays-uninitialized-buffer/15194/40). This proposal would allow you to initialize and access arrays via raw buffer. The core team was looking for more usage experience and discussion around handling errors. ### Rejected proposals [SE-0132](https://github.com/apple/swift-evolution/blob/master/proposals/0132-sequence-end-ops.md): _Rationalizing Sequence end-operation names_ [was rejected](https://github.com/apple/swift-evolution/pull/898). Although it would make sequence and collection operation naming more consistent (e.g. "first" vs "start" vs "prefix"), the core team decided the source compatibility hit would be too great. -[SE-0222](https://github.com/apple/swift-evolution/blob/master/proposals/0222-lazy-compactmap-sequence.md): _Lazy CompactMap Sequence_ [was rejected](https://forums.swift.org/t/se-0222-lazy-compactmap-sequence/14850/16). The proposal would have added a new `LazyCompactMapCollection` to represent a `compactMap` to more efficiently handle a chain of `map` and `filter` operations. +[SE-0222](https://github.com/apple/swift-evolution/blob/master/proposals/0222-lazy-compactmap-sequence.md): _Lazy CompactMap Sequence_ [was rejected](https://forums.swift.org/t/se-0222-lazy-compactmap-sequence/14850/16). The proposal would have added a new `LazyCompactMapCollection` to represent a `compactMap` to more efficiently handle chains of `map` and `filter` operations. The core team decided the performance benefits were negligible and not worth the increased complexity pointed out during the review discussion. From bf54f62d08aa673fa0bd275cd939f8ec9d579bfe Mon Sep 17 00:00:00 2001 From: Greg Heo Date: Thu, 6 Sep 2018 08:08:15 -0700 Subject: [PATCH 031/589] [117] Add preamble --- _drafts/2018-09-06-issue-117.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/_drafts/2018-09-06-issue-117.md b/_drafts/2018-09-06-issue-117.md index f5d5272d..b73f3d07 100644 --- a/_drafts/2018-09-06-issue-117.md +++ b/_drafts/2018-09-06-issue-117.md @@ -4,7 +4,19 @@ title: ! 'Issue #117' author: gregheo --- -> TODO: intro comments and lines of verse +> Bikeshedding, literals, thinking raw strings;
+> Swift on the server is earning its wings.
+> +> Numbers are multiples, even or odd;
+> Pull requests benchmarking faster, no fraud.
+> +> September announcements are here once again;
+> New phones and devices, and soon Xcode 10. + +September is here, and we're closing out the Summer of Swift. We’ve almost made it through the beta period and now iOS 12, macOS Mojave, Xcode 10, and Swift 4.2 are upon us. + +There’s been a flurry of activity on Swift Evolution and around the community; let’s get started with all the latest! + From e0f8591f9a37bff029a8c502a5c83408c26164d2 Mon Sep 17 00:00:00 2001 From: Greg Heo Date: Thu, 6 Sep 2018 08:15:54 -0700 Subject: [PATCH 032/589] [117] Publish issue 117; closes #408. --- {_drafts => _posts}/2018-09-06-issue-117.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2018-09-06-issue-117.md (100%) diff --git a/_drafts/2018-09-06-issue-117.md b/_posts/2018-09-06-issue-117.md similarity index 100% rename from _drafts/2018-09-06-issue-117.md rename to _posts/2018-09-06-issue-117.md From cfc596390f56006a0e6ac54cdd9457774e417ac4 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 19 Sep 2018 06:57:49 +0200 Subject: [PATCH 033/589] 118 initial draft References #409 --- _drafts/2018-09-20-issue-118.md | 75 +++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 _drafts/2018-09-20-issue-118.md diff --git a/_drafts/2018-09-20-issue-118.md b/_drafts/2018-09-20-issue-118.md new file mode 100644 index 00000000..feef7a4d --- /dev/null +++ b/_drafts/2018-09-20-issue-118.md @@ -0,0 +1,75 @@ +--- +layout: post +title: ! 'Issue #118' +author: btb +--- + +So the lovely Greg took over last issue as I was at a conference, [try! Swift NYC](https://www.tryswift.co/events/2018/nyc/). I've had an amazing time at the conference (and New York) where I gave [a talk](https://speakerdeck.com/basthomas/taken-for-granted) about the history of Swift. A video of that talk will be posted in the future. + +A big thank you goes out to the organizers, the volunteers and all of those who I got to meet at the conference! + +That being said, and without further ado, here is an update on everything Swift from the past two weeks. A lot has happened! + + + +### Starter tasks + +- [SR-8625](https://bugs.swift.org/browse/SR-8625) [Compiler] Swift should warn if a closures is passed to an argument that is an `autoclosure` +- [SR-8645](https://bugs.swift.org/browse/SR-8645) [Package Manager] BuildPlan error descriptions aren't printed +- [SR-8646](https://bugs.swift.org/browse/SR-8646) [Package Manager] `BuildPlan.Error.missingLinuxMain` description rephrasing +- [SR-8671](https://bugs.swift.org/browse/SR-8671) [Package Manager] `ARG_MAX` limit exceeded when compiles huge project + +### News and community + +https://swift.org/blog/swift-4-2-released/ + +Xcode 10 + +https://oleb.net/blog/2018/06/whats-new-in-swift-4-2-playground/ + +https://www.hackingwithswift.com/articles/126/whats-new-in-swift-5-0 + +https://numerics.diploid.ca (xwu) + +### Commits and pull requests + +The constraint solver is now iterative rather than recursive — this should fix some stack overflow issues: https://github.com/apple/swift/pull/19203 + +In Swift, foo.self always evaluates to foo. So naturally, .self should be a valid keypath as well: https://github.com/apple/swift/pull/19382 +Now we’re just waiting for tuple keypaths so we can have full parity between member access syntax and keypath syntax + +### Accepted proposals + +https://github.com/apple/swift-evolution/blob/master/proposals/0227-identity-keypath.md + https://forums.swift.org/t/accepted-se-0227-identity-key-path/16278 + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +https://forums.swift.org/t/se-0228-fix-expressible-by-string-interpolation/16031 + +### Swift Forums + +https://forums.swift.org/t/server-work-group-new-focus-areas/15969 + +https://forums.swift.org/t/notes-on-numerics-in-swift/15746 + +> A great number of questions are raised in these forums as to the functioning and design of numeric types and protocols in Swift. Sometimes, the answer can be found only by digging through the source code, and even then it's hard to place what you learn there within a larger context. Therefore, I've compiled a series of articles that delve into these topics in more detail. + +https://forums.swift.org/t/allow-self-x-in-class-convenience-initializers/15924 + +> If we’re lucky we might soon be able to assign to ‘self’ in class convenience initializers, addressing a long-standing language restriction + +https://forums.swift.org/t/stable-branch-update-tomorrow-clang-llvm-required/16142 + +> Swift's stable branch (v5.0) is upgrading to LLVM 7.0 + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 3a2c5c4d1749047c3f6e950136b5a2195c5e50a1 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 20 Sep 2018 18:28:14 +0200 Subject: [PATCH 034/589] Finish 118 (#411) --- _drafts/2018-09-20-issue-118.md | 75 ------------------- _posts/2018-09-20-issue-118.md | 124 ++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 75 deletions(-) delete mode 100644 _drafts/2018-09-20-issue-118.md create mode 100644 _posts/2018-09-20-issue-118.md diff --git a/_drafts/2018-09-20-issue-118.md b/_drafts/2018-09-20-issue-118.md deleted file mode 100644 index feef7a4d..00000000 --- a/_drafts/2018-09-20-issue-118.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -layout: post -title: ! 'Issue #118' -author: btb ---- - -So the lovely Greg took over last issue as I was at a conference, [try! Swift NYC](https://www.tryswift.co/events/2018/nyc/). I've had an amazing time at the conference (and New York) where I gave [a talk](https://speakerdeck.com/basthomas/taken-for-granted) about the history of Swift. A video of that talk will be posted in the future. - -A big thank you goes out to the organizers, the volunteers and all of those who I got to meet at the conference! - -That being said, and without further ado, here is an update on everything Swift from the past two weeks. A lot has happened! - - - -### Starter tasks - -- [SR-8625](https://bugs.swift.org/browse/SR-8625) [Compiler] Swift should warn if a closures is passed to an argument that is an `autoclosure` -- [SR-8645](https://bugs.swift.org/browse/SR-8645) [Package Manager] BuildPlan error descriptions aren't printed -- [SR-8646](https://bugs.swift.org/browse/SR-8646) [Package Manager] `BuildPlan.Error.missingLinuxMain` description rephrasing -- [SR-8671](https://bugs.swift.org/browse/SR-8671) [Package Manager] `ARG_MAX` limit exceeded when compiles huge project - -### News and community - -https://swift.org/blog/swift-4-2-released/ - -Xcode 10 - -https://oleb.net/blog/2018/06/whats-new-in-swift-4-2-playground/ - -https://www.hackingwithswift.com/articles/126/whats-new-in-swift-5-0 - -https://numerics.diploid.ca (xwu) - -### Commits and pull requests - -The constraint solver is now iterative rather than recursive — this should fix some stack overflow issues: https://github.com/apple/swift/pull/19203 - -In Swift, foo.self always evaluates to foo. So naturally, .self should be a valid keypath as well: https://github.com/apple/swift/pull/19382 -Now we’re just waiting for tuple keypaths so we can have full parity between member access syntax and keypath syntax - -### Accepted proposals - -https://github.com/apple/swift-evolution/blob/master/proposals/0227-identity-keypath.md + https://forums.swift.org/t/accepted-se-0227-identity-key-path/16278 - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -https://forums.swift.org/t/se-0228-fix-expressible-by-string-interpolation/16031 - -### Swift Forums - -https://forums.swift.org/t/server-work-group-new-focus-areas/15969 - -https://forums.swift.org/t/notes-on-numerics-in-swift/15746 - -> A great number of questions are raised in these forums as to the functioning and design of numeric types and protocols in Swift. Sometimes, the answer can be found only by digging through the source code, and even then it's hard to place what you learn there within a larger context. Therefore, I've compiled a series of articles that delve into these topics in more detail. - -https://forums.swift.org/t/allow-self-x-in-class-convenience-initializers/15924 - -> If we’re lucky we might soon be able to assign to ‘self’ in class convenience initializers, addressing a long-standing language restriction - -https://forums.swift.org/t/stable-branch-update-tomorrow-clang-llvm-required/16142 - -> Swift's stable branch (v5.0) is upgrading to LLVM 7.0 - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2018-09-20-issue-118.md b/_posts/2018-09-20-issue-118.md new file mode 100644 index 00000000..fb4d8b1e --- /dev/null +++ b/_posts/2018-09-20-issue-118.md @@ -0,0 +1,124 @@ +--- +layout: post +title: ! 'Issue #118' +author: btb +--- + +So the lovely Greg took over last issue as I was at a conference, [try! Swift NYC](https://www.tryswift.co/events/2018/nyc/). I've had an amazing time at the conference (and New York) where I gave [a talk](https://speakerdeck.com/basthomas/taken-for-granted) about the history of Swift. A video of that talk will be posted in the future. + +A big thank you goes out to the organizers, the volunteers and all of those who I got to meet at the conference! + +--- + +We are also working on bringing back [subscriptions via email](https://github.com/SwiftWeekly/swiftweekly.github.io/issues/410). To cover the associated costs, we are looking for sponsors again. + +We're sharing more details soon. If you or your company are interested in sponsoring the newsletter, please send me a direct message [on Twitter](https://twitter.com/basthomas). + +--- + +That being said, and without further ado, here is an update on everything Swift from the past two weeks. + + + +### Starter tasks + +- [SR-8625](https://bugs.swift.org/browse/SR-8625) [Compiler] Swift should warn if a closures is passed to an argument that is an `autoclosure` +- [SR-8645](https://bugs.swift.org/browse/SR-8645) [Package Manager] BuildPlan error descriptions aren't printed +- [SR-8646](https://bugs.swift.org/browse/SR-8646) [Package Manager] `BuildPlan.Error.missingLinuxMain` description rephrasing +- [SR-8671](https://bugs.swift.org/browse/SR-8671) [Package Manager] `ARG_MAX` limit exceeded when compiles huge project + +### News and community + +Xcode 10 has been released, and alongside came Swift 4.2. [Ted Kremenek](https://twitter.com/tkremenek) wrote [a blog post](https://swift.org/blog/swift-4-2-released/) describing the changes in detail. + +[Ole Begemann](https://twitter.com/olebegemann) did us all another huge favor by means of a What's new in Swift 4.2 [Playground](https://oleb.net/blog/2018/06/whats-new-in-swift-4-2-playground/). You should definitely give this a try if you want a quick and interactive overview of the new features in Swift 4.2. + +On a related note, [Paul Hudson](https://twitter.com/twostraws) wrote about what's new [in Swift 5](https://www.hackingwithswift.com/articles/126/whats-new-in-swift-5-0). Besides ABI stability, there are some other interesting new improvements and features expected in that release. Swift 5 is expected to be released early 2019. + +### Commits and pull requests + +[Pavel Yaskevich](https://twitter.com/pyaskevich) merged [a pull request](https://github.com/apple/swift/pull/19203) making the constraint solver iterative rather than recursive, which should fix some stack overflow issues. + +[Joe Groff](https://twitter.com/jckarter) merged [a pull request](https://github.com/apple/swift/pull/19382) that finishes up the implementation of SE-0227 (see below). "Now we’re just waiting for tuple keypaths so we can have full parity between member access syntax and keypath syntax." 🎉 + +### Accepted proposals + +[SE-0227](https://github.com/apple/swift-evolution/blob/master/proposals/0227-identity-keypath.md): *Identity key path* was [accepted](https://forums.swift.org/t/accepted-se-0227-identity-key-path/16278). + +> Feedback on the proposal was light but all positive, and the proposal was accepted without modifications. + +### Proposals in review + +[SE-0228](https://github.com/apple/swift-evolution/blob/master/proposals/0228-fix-expressiblebystringinterpolation.md): *Fix `ExpressibleByStringInterpolation`* is [under review](https://forums.swift.org/t/se-0228-fix-expressible-by-string-interpolation/16031). + +> String interpolation is a simple and powerful feature for expressing complex, runtime-created strings, but the current version of the `ExpressibleByStringInterpolation` protocol has been deprecated since Swift 3. We propose a new design which improves its performance, clarity, and efficiency. +> +> We see three general classes of types which might want to conform to `ExpressibleByStringInterpolation`: +> +> 1. Simple textual data +> 2. Structured textual data +> 3. Machine-readable code fragments +> +> The current design handles simple textual data, but struggles to support structured textual data and machine-readable code fragments. + +### Swift Forums + +[Ted Kremenek](https://twitter.com/tkremenek) shared [the next steps for the Swift Server work group](https://forums.swift.org/t/next-steps-for-the-swift-server-work-group/15816). + +> As announced at try! Swift New York City, the Swift Server work group is now entering a new chapter in its evolution. With the release of SwiftNIO and it’s subsequent adoption by popular Swift web frameworks, Kitura and Vapor, the group is now ready to take on new tasks. It’s time to focus on defining and creating a set of libraries and tools that are focused on developing and deploying server applications written in Swift. +> +> Read more about the new focus on the updated [Swift Server work group page](https://swift.org/server/). + +[Tomer Doron](https://github.com/tomerd) shared [new focus areas](https://forums.swift.org/t/server-work-group-new-focus-areas/15969) for the Swift Server work group. + +> [..] the work group came up with the following focus areas which we feel can make a real and immediate impact on the ecosystem. The list reflects what we previously heard from the community as well as our own personal experience writing server applications with Swift, and is designed to solve tangible needs that do not require new features from the language or core libraries. +> +> - Database Drivers and Storage Clients +> - Tooling and Production Readiness +> - Distributed Systems, Microservices and Event Driven Architecture + +[Xiaodi Wu](https://twitter.com/xwu) shared news [about a number of blog posts](https://forums.swift.org/t/notes-on-numerics-in-swift/15746) that go into detail of how numeric types work in Swift. + +> A great number of questions are raised in these forums as to the functioning and design of numeric types and protocols in Swift. Sometimes, the answer can be found only by digging through the source code, and even then it's hard to place what you learn there within a larger context. Therefore, I've compiled a series of articles that delve into these topics in more detail. + +You can find the blog posts [here](https://numerics.diploid.ca). + +[Joe Groff](https://twitter.com/jckarter) pitched [a proposal](https://forums.swift.org/t/allow-self-x-in-class-convenience-initializers/15924) to allow `self = x` in class convenience initializers. + +> In [this pull request](https://github.com/apple/swift/pull/19151), I'm changing code generation for class convenience initializers so that they only have "allocating" entry points, which are responsible for allocating and initializing the entire object. (See [Changing class convenience initializers to perform whole object allocation and `@objc` interop](https://forums.swift.org/t/changing-class-convenience-initializers-to-perform-whole-object-allocation-and-objc-interop/15676) for more background.) With this change, convenience initializers are nearly identical to value or protocol extension initializers at the implementation level, since the `self.init` delegation within a convenience initializer is effectively initializing the self _reference_ with a reference to the instance created by the `self.init` call rather than initializing the instance itself. At this point, it's not that big of a leap to allow the `self` reference to also be initialized by assignment, as it can be in value and protocol extension initializers, like this: + +{% highlight swift %} +class Y { + required init() {} + static func singletonInstance() -> Self { return self.init() } + convenience init(pref: Y) { + self = type(of: self).singletonInstance() + } +} +{% endhighlight %} + +> This opens the door to convenience initializers being able to use static factory methods or other `Self`-returning operations to produce their returned result, not only the result of other initializers. Swift's own standard library and Foundation overlay hack around this missing functionality by making classes conform to dummy protocols and using protocol extension initializers where necessary to implement this functionality: + +{% highlight swift %} +protocol P { + static func instance() -> Self +} + +extension P { + init() { + self = Self.instance() + } +} + +class C: P { + static func instance() -> Self { ... } + + convenience init(x: ()) { + self.init() + } +} +{% endhighlight %} + +### Finally + +Swift can now even be found [in Apple Watch bands](https://twitter.com/jckarter/status/1040297140822523904). Who would've thought?! From 675cc4cb69515f7ed2a35e4178b0e2587fea020b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 21 Sep 2018 17:38:32 +0200 Subject: [PATCH 035/589] Initial 119 draft --- _drafts/2018-10-04-issue-119.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2018-10-04-issue-119.md diff --git a/_drafts/2018-10-04-issue-119.md b/_drafts/2018-10-04-issue-119.md new file mode 100644 index 00000000..d5969c1f --- /dev/null +++ b/_drafts/2018-10-04-issue-119.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #119' +author: btb +sponsor: + link: https://do-ios.com/ + heading: Do iOS conference in Amsterdam + body: On November 2 come join us for Do iOS. This is its third edition. Now fully owned and ran by the Dutch CocoaHeads Foundation. Come and join 130 fellow iOS developers for a day filled with content. Come and meet your fellow iOS developers.

There is also a University Day available on November 1.

More info and tickets on + displaylink: do-ios.com +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 344b008278b3f65b36414e0dc446b6b3e9dbe0da Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Mon, 24 Sep 2018 11:47:31 -0700 Subject: [PATCH 036/589] Update header copy (#414) I think this is more accurate now :) --- _includes/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/header.html b/_includes/header.html index 57d05ed6..9954d460 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -5,7 +5,7 @@

{{ site.title }}

A community-driven weekly newsletter about what's happening in the Swift open source projects at Swift.org. - Curated by Jesse Squires and Bas Broek. Published for free every other Thursday.

+ Curated by Bas Broek. Started by Jesse Squires. Published for free every other Thursday.
From 3740311169d841a3bcb427ff5b4b40df5f1bdc4e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 24 Sep 2018 21:26:41 +0200 Subject: [PATCH 037/589] Update gems --- Gemfile.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 785ae3bb..1f1cdc85 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -20,19 +20,19 @@ GEM colorator (1.1.0) colored2 (3.1.2) colorize (0.8.1) - commonmarker (0.17.9) + commonmarker (0.17.13) ruby-enum (~> 0.5) concurrent-ruby (1.0.5) cork (0.3.0) colored2 (~> 3.1) - danger (5.6.4) + danger (5.6.7) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) cork (~> 0.1) faraday (~> 0.9) faraday-http-cache (~> 1.0) - git (~> 1) + git (~> 1.5) kramdown (~> 1.5) no_proxy_fix octokit (~> 4.7) @@ -42,14 +42,14 @@ GEM ethon (0.11.0) ffi (>= 1.3.0) execjs (2.7.0) - faraday (0.15.2) + faraday (0.15.3) multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) ffi (1.9.25) forwardable-extended (2.6.0) gemoji (3.0.0) - git (1.4.0) + git (1.5.0) github-pages (172) activesupport (= 4.2.9) github-pages-health-check (= 1.3.5) @@ -226,7 +226,7 @@ GEM no_proxy_fix (0.1.2) nokogiri (1.8.4) mini_portile2 (~> 2.3.0) - octokit (4.9.0) + octokit (4.12.0) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) pathutil (0.16.1) @@ -238,9 +238,9 @@ GEM rouge (2.2.1) ruby-enum (0.7.2) i18n - rubyzip (1.2.1) + rubyzip (1.2.2) safe_yaml (1.0.4) - sass (3.5.7) + sass (3.6.0) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) From 533aa3110c1d86fe04652f36ab548ccf58148349 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 24 Sep 2018 21:26:57 +0200 Subject: [PATCH 038/589] Setup sponsorships (#412) * Initial draft to setup sponsorship again * Readd subscribe and sponsorship links in header * Update sponsorship.md * Update subscribe.html * Add contact method * Add availability for 2018 --- _includes/subscribe.html | 3 ++- new_draft.sh | 8 ++++++++ sponsorship.md | 31 ++++++++++++++++++++++++------- subscribe.html | 10 +--------- 4 files changed, 35 insertions(+), 17 deletions(-) diff --git a/_includes/subscribe.html b/_includes/subscribe.html index 4e2131fb..1a3d5e64 100644 --- a/_includes/subscribe.html +++ b/_includes/subscribe.html @@ -3,7 +3,8 @@
diff --git a/subscribe.html b/subscribe.html index c4b5c16e..d5c00a37 100644 --- a/subscribe.html +++ b/subscribe.html @@ -10,17 +10,9 @@

{{ page.title }}

Published every other Thursday for free.

- -
-
Date: Thu, 4 Oct 2018 20:06:21 +0200 Subject: [PATCH 039/589] Issue 119 (#415) * Further progress * Add finally * Finish issue 119 --- _drafts/2018-10-04-issue-119.md | 56 -------------- _posts/2018-10-04-issue-119.md | 130 ++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+), 56 deletions(-) delete mode 100644 _drafts/2018-10-04-issue-119.md create mode 100644 _posts/2018-10-04-issue-119.md diff --git a/_drafts/2018-10-04-issue-119.md b/_drafts/2018-10-04-issue-119.md deleted file mode 100644 index d5969c1f..00000000 --- a/_drafts/2018-10-04-issue-119.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: post -title: ! 'Issue #119' -author: btb -sponsor: - link: https://do-ios.com/ - heading: Do iOS conference in Amsterdam - body: On November 2 come join us for Do iOS. This is its third edition. Now fully owned and ran by the Dutch CocoaHeads Foundation. Come and join 130 fellow iOS developers for a day filled with content. Come and meet your fellow iOS developers.

There is also a University Day available on November 1.

More info and tickets on - displaylink: do-ios.com ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Swift Unwrapped - -> TODO: Latest episode(s) of Swift Unwrapped - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2018-10-04-issue-119.md b/_posts/2018-10-04-issue-119.md new file mode 100644 index 00000000..026af579 --- /dev/null +++ b/_posts/2018-10-04-issue-119.md @@ -0,0 +1,130 @@ +--- +layout: post +title: ! 'Issue #119' +author: btb +sponsor: + link: https://do-ios.com/ + heading: Do iOS conference in Amsterdam + body: On November 2 come join us for Do iOS. This is its third edition. Now fully owned and ran by the Dutch CocoaHeads Foundation. Come and join 130 fellow iOS developers for a day filled with content. Come and meet your fellow iOS developers.

There is also a University Day available on November 1.

More info and tickets on + displaylink: do-ios.com +--- + +We're very happy to re-introduce the newsletter's mail subscriptions, so that you can once again receive Swift Weekly Brief in your inbox. If you haven't yet and are interested, you can subscribe [here](subscribe/). + +Enjoy the newsletter and have a great weekend and week! + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-8703](https://bugs.swift.org/browse/SR-8703) [Tensorflow] Deabstraction should properly diagnose recursion +- [SR-8706](https://bugs.swift.org/browse/SR-8706) Fix up parseDependencyFile to not crash on invalid YAML Compiler +- [SR-8707](https://bugs.swift.org/browse/SR-8707) Write out swiftdeps files atomically Compiler +- [SR-8720](https://bugs.swift.org/browse/SR-8720) Add --hide-build option to `swift run` Package Manager + +### News and community + +[Ted Kremenek](https://twitter.com/tkremenek) has written [an overview](https://swift.org/blog/5-0-release-process/) of the release process of Swift 5.0, including the goals and an estimated schedule. + +[Mike Ash](https://twitter.com/mikeash) wrote [a blog post](https://swift.org/blog/how-mirror-works/) on the Swift.org blog, explaining how `Mirror` works. + +[Timac](https://twitter.com/timacfr) wrote [a blog post](https://blog.timac.org/2018/0924-state-of-swift-ios12/) that measures Apple's use of Swift in iOS 12. 66 binaries are now using Swift! 🎉 + +[Bruno Rocha](https://twitter.com/rockthebruno) wrote [a blog post](https://swiftrocks.com/how-caseiterable-works-internally-in-swift.html) on how Swift 4.2's `CaseIterable` works internally. + +### Commits and pull requests + +[Lily Vulcano](https://twitter.com/millenomi) opened [a pull request](https://github.com/apple/swift-corelibs-foundation/pull/1708) that merges improvements from the Core Foundation version found in Mojave and iOS 12 into Swift Foundation. + +[Albert Aleksieiev](https://twitter.com/albert_keyj) merged [a pull request](https://github.com/apple/swift-nio/pull/609) that adds Android support to SwiftNIO! 💪 + +[Michael Gottesman](https://twitter.com/gottesmang) merged [a pull request](https://github.com/apple/swift/pull/19690) bringing performance improvements to the standard library. 🏎 + +### Accepted proposals + +[SE-0221](https://github.com/apple/swift-evolution/blob/master/proposals/0221-character-properties.md): *Character Properties* was [acceptance status was updated](https://forums.swift.org/t/accepted-with-modification-se-0221-character-properties/14944/3). + +> The core team has resolved to change the status of this proposal to **accepted** with modification, deferring the `.isEmoji` property to a later proposal. +> +> The core team still believe it is a useful feature for the standard library, but needs more investigation that should not hold up the rest of this proposal. +> +> In addition, the proposal will drop the source-breaking change to the existing `FixedWidthInteger.init?`. While this would be the preferred naming for a newly proposed initializer, it doesn't clear the bar for a source-breaking change for Swift 5. + +[SE-0228](https://github.com/apple/swift-evolution/blob/master/proposals/0228-fix-expressiblebystringinterpolation.md): *Fix `ExpressibleByStringInterpolation`* was [accepted with a small amendment](https://forums.swift.org/t/accepted-se-0228-fix-expressible-by-string-interpolation/16548). + +> Feedback was overwhelmingly positive, and the proposal is accepted with [one small amendment](https://github.com/apple/swift-evolution/pull/909) to provide a default implementation of `init(stringLiteral:)` for types that conform to `ExpressibleByStringInterpolation`. + +### Proposals in review + +[SE-0229](https://github.com/apple/swift-evolution/blob/master/proposals/0229-simd.md): *`simd` vectors* is [under review](https://forums.swift.org/t/se-0229-simd-vectors/16518). + +> This proposal would expose a common subset of operations on the SIMD types supported by most processors in the standard library. It is based on Apple's `` module, which is used throughout Apple's platforms as the common currency type for fixed-size vectors and matrices. It is not a complete re-implementation; rather it provides the low-level support needed to import any such library, and tries to make a number of things much nicer in Swift than they are in C or C++. + +[SE-0230](https://github.com/apple/swift-evolution/blob/master/proposals/0230-flatten-optional-try.md): *Flatten nested optionals resulting from `try?`* is [under review](https://forums.swift.org/t/se-0230-flatten-nested-optionals-resulting-from-try/16570). + +> Swift's `try?` statement currently makes it easy to introduce a +nested optional. Nested optionals are difficult for users to reason +about, and Swift tries to avoid producing them in other common cases. +> +> This document proposes giving `try?` the same optional-flattening +behavior found in other common Swift features, to avoid the common +occurrence of a nested optional. +> +> It's currently quite easy to end up with a nested `Optional` type when +using `try?`. Although it is valid to construct a nested optional, it +is usually not what the developer intended. + +### Swift Forums + +Alejandro Alonso pitched [a proposal](https://forums.swift.org/t/default-implementation-in-protocols/15794) to make it easier to have default implementations in protocols, without the need of an extension. + +> I've been working on implementing Default Implementation in Protocols and I have a working early implementation of the feature. +> +> What this feature allows is that you can now declare a default implementation of a requirement from the protocol: + +{% highlight swift %} +protocol Animal { + func makeNoise() { + print("Bark!") + } +} + +struct Dog: Animal {} + +let sparky = Dog() +sparky.makeNoise() // Bark! +{% endhighlight %} + +Peter Camb shared [an issue](https://forums.swift.org/t/anyobject-parameter-cannot-assign-to-immutable-expression/16642), which is a bug in Swift that can currently not be solved through Swift iself. + +> I'm hitting this issue in my NSOpenSavePanelDelegate in a Sandboxed Mac app. +> +> I need to get a reference to the sender as a Panel and set the directory. + +{% highlight swift %} +/* NSSavePanel/NSOpenPanel: Gets and sets the directoryURL shown. */ +@available(OSX 10.6, *) +open var directoryURL: URL? +{% endhighlight %} + +> All of my `as?` casts fail because the Sandbox uses a private subclass for these items. + +[Jordan Rose](https://twitter.com/UINT_MIN): + +> This is a longstanding bug, but it looks like we don't have a JIRA bug for it. [..] it's very similar to SR-5475 (which is about optional properties of protocols). I don't think we have a good workaround other than defining a little static inline function in Objective-C that will do the call for you without trying to check anything. + +{% highlight objc %} +NS_SWIFT_NAME(setDirectoryURL(_:for:)) +static inline void setDirectoryURLForPanel(id panel, NSURL * _Nonnull url) { + NSSavePanel *realPanel = (NSSavePanel *)panel; + realPanel.directoryURL = url; +} +{% endhighlight %} + +> An alternate approach in this specific case would be to file a bug against Apple that the sender here is not an instance of `NSOpenPanel` or at least `NSSavePanel`. + +### Finally + +Making all sorts of progress [on variadic generics](https://twitter.com/clattner_llvm/status/1044802613345218563). 🦄 From ab57e730e828cda2bc2124eb5c5970e999992985 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Thu, 4 Oct 2018 13:58:00 -0700 Subject: [PATCH 040/589] =?UTF-8?q?Fix=20broken=20subscribe=20link=20?= =?UTF-8?q?=F0=9F=98=8A=20(#416)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _posts/2018-10-04-issue-119.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-10-04-issue-119.md b/_posts/2018-10-04-issue-119.md index 026af579..27dce236 100644 --- a/_posts/2018-10-04-issue-119.md +++ b/_posts/2018-10-04-issue-119.md @@ -9,7 +9,7 @@ sponsor: displaylink: do-ios.com --- -We're very happy to re-introduce the newsletter's mail subscriptions, so that you can once again receive Swift Weekly Brief in your inbox. If you haven't yet and are interested, you can subscribe [here](subscribe/). +We're very happy to re-introduce the newsletter's mail subscriptions, so that you can once again receive Swift Weekly Brief in your inbox. If you haven't yet and are interested, you can subscribe [here](https://swiftweekly.github.io/subscribe/). Enjoy the newsletter and have a great weekend and week! From 566416f99c2577862de725ab57448a6b5070a004 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 5 Oct 2018 19:55:54 +0200 Subject: [PATCH 041/589] fixes --- _posts/2018-10-04-issue-119.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_posts/2018-10-04-issue-119.md b/_posts/2018-10-04-issue-119.md index 27dce236..364ef826 100644 --- a/_posts/2018-10-04-issue-119.md +++ b/_posts/2018-10-04-issue-119.md @@ -20,9 +20,9 @@ Enjoy the newsletter and have a great weekend and week! ### Starter tasks - [SR-8703](https://bugs.swift.org/browse/SR-8703) [Tensorflow] Deabstraction should properly diagnose recursion -- [SR-8706](https://bugs.swift.org/browse/SR-8706) Fix up parseDependencyFile to not crash on invalid YAML Compiler -- [SR-8707](https://bugs.swift.org/browse/SR-8707) Write out swiftdeps files atomically Compiler -- [SR-8720](https://bugs.swift.org/browse/SR-8720) Add --hide-build option to `swift run` Package Manager +- [SR-8706](https://bugs.swift.org/browse/SR-8706) [Compiler] Fix up `parseDependencyFile` to not crash on invalid YAML +- [SR-8707](https://bugs.swift.org/browse/SR-8707) [Compiler] Write out swiftdeps files atomically +- [SR-8720](https://bugs.swift.org/browse/SR-8720) [Package Manager] Add --hide-build option to `swift run` ### News and community From 9e475b93b0bbe7876e26be0fcce522307bcdde2c Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 5 Oct 2018 21:44:05 +0200 Subject: [PATCH 042/589] Update Nokogiri --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1f1cdc85..ba256dc1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -224,7 +224,7 @@ GEM nap (1.1.0) net-dns (0.8.0) no_proxy_fix (0.1.2) - nokogiri (1.8.4) + nokogiri (1.8.5) mini_portile2 (~> 2.3.0) octokit (4.12.0) sawyer (~> 0.8.0, >= 0.5.3) From 7d30b2e71d74849e3dd8f026f0164c1fc630d9de Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 5 Oct 2018 21:46:32 +0200 Subject: [PATCH 043/589] Update github-pages --- Gemfile | 2 +- Gemfile.lock | 182 +++++++++++++++++++++++++++------------------------ 2 files changed, 97 insertions(+), 87 deletions(-) diff --git a/Gemfile b/Gemfile index b8263355..cdf88092 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' -gem 'github-pages', '~> 172', group: :jekyll_plugins +gem 'github-pages', group: :jekyll_plugins gem 'jekyll-sitemap' gem 'danger' gem 'danger-prose' diff --git a/Gemfile.lock b/Gemfile.lock index ba256dc1..7c50f82f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (4.2.9) + activesupport (4.2.10) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) @@ -39,8 +39,14 @@ GEM terminal-table (~> 1) danger-prose (2.0.7) danger + dnsruby (1.61.2) + addressable (~> 2.5) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) ethon (0.11.0) ffi (>= 1.3.0) + eventmachine (1.2.7) execjs (2.7.0) faraday (0.15.3) multipart-post (>= 1.2, < 3) @@ -50,95 +56,98 @@ GEM forwardable-extended (2.6.0) gemoji (3.0.0) git (1.5.0) - github-pages (172) - activesupport (= 4.2.9) - github-pages-health-check (= 1.3.5) - jekyll (= 3.6.2) - jekyll-avatar (= 0.5.0) - jekyll-coffeescript (= 1.0.2) - jekyll-commonmark-ghpages (= 0.1.3) + github-pages (192) + activesupport (= 4.2.10) + github-pages-health-check (= 1.8.1) + jekyll (= 3.7.4) + jekyll-avatar (= 0.6.0) + jekyll-coffeescript (= 1.1.1) + jekyll-commonmark-ghpages (= 0.1.5) jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.9.2) - jekyll-gist (= 1.4.1) - jekyll-github-metadata (= 2.9.3) - jekyll-mentions (= 1.2.0) + jekyll-feed (= 0.10.0) + jekyll-gist (= 1.5.0) + jekyll-github-metadata (= 2.9.4) + jekyll-mentions (= 1.4.1) jekyll-optional-front-matter (= 0.3.0) jekyll-paginate (= 1.1.0) jekyll-readme-index (= 0.2.0) - jekyll-redirect-from (= 0.12.1) - jekyll-relative-links (= 0.5.2) - jekyll-remote-theme (= 0.2.3) - jekyll-sass-converter (= 1.5.0) - jekyll-seo-tag (= 2.3.0) - jekyll-sitemap (= 1.1.1) + jekyll-redirect-from (= 0.14.0) + jekyll-relative-links (= 0.5.3) + jekyll-remote-theme (= 0.3.1) + jekyll-sass-converter (= 1.5.2) + jekyll-seo-tag (= 2.5.0) + jekyll-sitemap (= 1.2.0) jekyll-swiss (= 0.4.0) - jekyll-theme-architect (= 0.1.0) - jekyll-theme-cayman (= 0.1.0) - jekyll-theme-dinky (= 0.1.0) - jekyll-theme-hacker (= 0.1.0) - jekyll-theme-leap-day (= 0.1.0) - jekyll-theme-merlot (= 0.1.0) - jekyll-theme-midnight (= 0.1.0) - jekyll-theme-minimal (= 0.1.0) - jekyll-theme-modernist (= 0.1.0) - jekyll-theme-primer (= 0.5.2) - jekyll-theme-slate (= 0.1.0) - jekyll-theme-tactile (= 0.1.0) - jekyll-theme-time-machine (= 0.1.0) - jekyll-titles-from-headings (= 0.5.0) - jemoji (= 0.8.1) - kramdown (= 1.14.0) + jekyll-theme-architect (= 0.1.1) + jekyll-theme-cayman (= 0.1.1) + jekyll-theme-dinky (= 0.1.1) + jekyll-theme-hacker (= 0.1.1) + jekyll-theme-leap-day (= 0.1.1) + jekyll-theme-merlot (= 0.1.1) + jekyll-theme-midnight (= 0.1.1) + jekyll-theme-minimal (= 0.1.1) + jekyll-theme-modernist (= 0.1.1) + jekyll-theme-primer (= 0.5.3) + jekyll-theme-slate (= 0.1.1) + jekyll-theme-tactile (= 0.1.1) + jekyll-theme-time-machine (= 0.1.1) + jekyll-titles-from-headings (= 0.5.1) + jemoji (= 0.10.1) + kramdown (= 1.17.0) liquid (= 4.0.0) - listen (= 3.0.6) + listen (= 3.1.5) mercenary (~> 0.3) - minima (= 2.1.1) + minima (= 2.5.0) + nokogiri (>= 1.8.2, < 2.0) rouge (= 2.2.1) terminal-table (~> 1.4) - github-pages-health-check (1.3.5) + github-pages-health-check (1.8.1) addressable (~> 2.3) - net-dns (~> 0.8) + dnsruby (~> 1.60) octokit (~> 4.0) public_suffix (~> 2.0) - typhoeus (~> 0.7) + typhoeus (~> 1.3) html-pipeline (2.8.4) activesupport (>= 2) nokogiri (>= 1.4) + http_parser.rb (0.6.0) i18n (0.9.5) concurrent-ruby (~> 1.0) - jekyll (3.6.2) + jekyll (3.7.4) addressable (~> 2.4) colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 0.7) jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 1.1) + jekyll-watch (~> 2.0) kramdown (~> 1.14) liquid (~> 4.0) mercenary (~> 0.3.3) pathutil (~> 0.9) - rouge (>= 1.7, < 3) + rouge (>= 1.7, < 4) safe_yaml (~> 1.0) - jekyll-avatar (0.5.0) + jekyll-avatar (0.6.0) jekyll (~> 3.0) - jekyll-coffeescript (1.0.2) + jekyll-coffeescript (1.1.1) coffee-script (~> 2.2) coffee-script-source (~> 1.11.1) jekyll-commonmark (1.2.0) commonmarker (~> 0.14) jekyll (>= 3.0, < 4.0) - jekyll-commonmark-ghpages (0.1.3) + jekyll-commonmark-ghpages (0.1.5) commonmarker (~> 0.17.6) jekyll-commonmark (~> 1) rouge (~> 2) jekyll-default-layout (0.1.4) jekyll (~> 3.0) - jekyll-feed (0.9.2) + jekyll-feed (0.10.0) jekyll (~> 3.3) - jekyll-gist (1.4.1) + jekyll-gist (1.5.0) octokit (~> 4.2) - jekyll-github-metadata (2.9.3) + jekyll-github-metadata (2.9.4) jekyll (~> 3.1) octokit (~> 4.0, != 4.4.0) - jekyll-mentions (1.2.0) - activesupport (~> 4.0) + jekyll-mentions (1.4.1) html-pipeline (~> 2.3) jekyll (~> 3.0) jekyll-optional-front-matter (0.3.0) @@ -146,83 +155,83 @@ GEM jekyll-paginate (1.1.0) jekyll-readme-index (0.2.0) jekyll (~> 3.0) - jekyll-redirect-from (0.12.1) + jekyll-redirect-from (0.14.0) jekyll (~> 3.3) - jekyll-relative-links (0.5.2) + jekyll-relative-links (0.5.3) jekyll (~> 3.3) - jekyll-remote-theme (0.2.3) + jekyll-remote-theme (0.3.1) jekyll (~> 3.5) rubyzip (>= 1.2.1, < 3.0) - typhoeus (>= 0.7, < 2.0) - jekyll-sass-converter (1.5.0) + jekyll-sass-converter (1.5.2) sass (~> 3.4) - jekyll-seo-tag (2.3.0) + jekyll-seo-tag (2.5.0) jekyll (~> 3.3) - jekyll-sitemap (1.1.1) + jekyll-sitemap (1.2.0) jekyll (~> 3.3) jekyll-swiss (0.4.0) - jekyll-theme-architect (0.1.0) + jekyll-theme-architect (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-cayman (0.1.0) + jekyll-theme-cayman (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-dinky (0.1.0) + jekyll-theme-dinky (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.1.0) + jekyll-theme-hacker (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-leap-day (0.1.0) + jekyll-theme-leap-day (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-merlot (0.1.0) + jekyll-theme-merlot (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-midnight (0.1.0) + jekyll-theme-midnight (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-minimal (0.1.0) + jekyll-theme-minimal (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-modernist (0.1.0) + jekyll-theme-modernist (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.5.2) + jekyll-theme-primer (0.5.3) jekyll (~> 3.5) jekyll-github-metadata (~> 2.9) - jekyll-seo-tag (~> 2.2) - jekyll-theme-slate (0.1.0) + jekyll-seo-tag (~> 2.0) + jekyll-theme-slate (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-tactile (0.1.0) + jekyll-theme-tactile (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-time-machine (0.1.0) + jekyll-theme-time-machine (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.0) + jekyll-titles-from-headings (0.5.1) jekyll (~> 3.3) - jekyll-watch (1.5.1) + jekyll-watch (2.0.0) listen (~> 3.0) - jemoji (0.8.1) - activesupport (~> 4.0, >= 4.2.9) + jemoji (0.10.1) gemoji (~> 3.0) html-pipeline (~> 2.2) - jekyll (>= 3.0) - kramdown (1.14.0) + jekyll (~> 3.0) + kramdown (1.17.0) liquid (4.0.0) - listen (3.0.6) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9.7) + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) mercenary (0.3.6) mini_portile2 (2.3.0) - minima (2.1.1) - jekyll (~> 3.3) + minima (2.5.0) + jekyll (~> 3.5) + jekyll-feed (~> 0.9) + jekyll-seo-tag (~> 2.1) minitest (5.11.3) multipart-post (2.0.0) nap (1.1.0) - net-dns (0.8.0) no_proxy_fix (0.1.2) nokogiri (1.8.5) mini_portile2 (~> 2.3.0) @@ -238,6 +247,7 @@ GEM rouge (2.2.1) ruby-enum (0.7.2) i18n + ruby_dep (1.5.0) rubyzip (1.2.2) safe_yaml (1.0.4) sass (3.6.0) @@ -251,8 +261,8 @@ GEM terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) - typhoeus (0.8.0) - ethon (>= 0.8.0) + typhoeus (1.3.0) + ethon (>= 0.9.0) tzinfo (1.2.5) thread_safe (~> 0.1) unicode-display_width (1.4.0) @@ -265,7 +275,7 @@ DEPENDENCIES colorize danger danger-prose - github-pages (~> 172) + github-pages jekyll-sitemap octokit From 3fa298507596fe359f23b63be870d673315ff59a Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 5 Oct 2018 21:49:38 +0200 Subject: [PATCH 044/589] Update Ruby --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 525978c2..ff746472 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: ruby sudo: false cache: bundler -rvm: 2.2.5 +rvm: 2.5.1 script: - bundle exec jekyll build --future --drafts From c70df78a66d927df32dc46da1baba5413e35e58e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 18 Oct 2018 18:33:00 +0200 Subject: [PATCH 045/589] Post issue 120 Closes #417 --- _posts/2018-10-18-issue-120.md | 80 ++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 _posts/2018-10-18-issue-120.md diff --git a/_posts/2018-10-18-issue-120.md b/_posts/2018-10-18-issue-120.md new file mode 100644 index 00000000..fe8e6171 --- /dev/null +++ b/_posts/2018-10-18-issue-120.md @@ -0,0 +1,80 @@ +--- +layout: post +title: ! 'Issue #120' +author: btb +--- + +A packed week with some exciting announcements. And an Apple event coming up on October 30th. *And* Swift Unwrapped is back! Cool stuff. + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-8788](https://bugs.swift.org/browse/SR-8788) [Compiler] Rethrowing/convenience initializer does not compile +- [SR-8811](https://bugs.swift.org/browse/SR-8811) [Compiler] Diagnosing Implicit Accessors for Uninhabited Types Should Be Smarter +- [SR-8905](https://bugs.swift.org/browse/SR-8905) [Standard Library] Gaps in String benchmarking +- [SR-8908](https://bugs.swift.org/browse/SR-8908) [Standard Library] Add `insert(_:Character)` benchmarks in `RangeReplaceableCollection` + +### Swift Unwrapped + +Swift Unwrapped is back! In episode 67, Jesse and JP [discuss](https://spec.fm/podcasts/swift-unwrapped/212093) Raw Strings. + +### News and community + +FoundationDB has [announced](https://www.foundationdb.org/blog/official-swift-bindings-for-foundationdb/) official Swift bindings! + +Jetbrains added [support](https://blog.jetbrains.com/objc/2018/10/spm-support-clion/) for the Swift Package Manager in their C IDE, CLion. + +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r/) wrote [a blog post](https://swift.org/blog/swiftpm-repl-support/) now that Swift Packages have Read Evaluate Print Loop (REPL) support! + +[Richard Wei](https://github.com/rxwei) wrote [a manifesto](https://gist.github.com/rxwei/30ba75ce092ab3b0dce4bde1fc2c9f1d) on first-class automatic differentiation in Swift, written for both the machine learning community and the Swift programming language design community, with a strong focus on language design. + +### Commits and pull requests + +[Slava Pestov](https://twitter.com/slava_pestov/) merged [a pull request](https://github.com/apple/swift/pull/19844) that fixes crashes and allows both spellings for protocols with `where` clauses. If you would like to know more, see [this](https://twitter.com/slava_pestov/status/1050571783026266118) thread. + +[Doug Gregor](https://twitter.com/dgregor79/) merged [a pull request](https://github.com/apple/swift/pull/19828) replacing associated type metadata accessors with mangled strings, bringing both code size and runtime performance improvements! + +### Returned proposals + +[SE-0229](https://github.com/apple/swift-evolution/blob/master/proposals/0229-simd.md): *SIMD Vectors* is [intended to be accepted](https://forums.swift.org/t/se-0229-simd-vectors/16518/97). + +> The core team feels this is an important addition to the language that will open up SIMD programming to a wide audience in an approachable way. +> +> The majority of the feedback received during the thread was regarding the alternate "generic" spelling: `Vector3` rather than `Int8.Vector3`. +> +> It is still unclear which is the better form. However, in order to better make the decision, the core team has asked the proposal author to implement a prototype showing the alternate form. Reviewers will then be able to try out either form in order to help make the decision. +> +> In addition, the proposal should be revised to spell out more explicitly some of the details, for example, of what masks are and the role they play. + +### Proposals in review + +[SE-0231](https://github.com/apple/swift-evolution/blob/master/proposals/0231-optional-iteration.md): *Optional Iteration* is [under review](https://forums.swift.org/t/se-0231-optional-iteration/16737). + +> Optionals are a key feature of Swift and a powerful tool that seamlessly interacts with code. In particular, they serve a great means in expressing "act accordingly if there's a value, skip otherwise". Some vivid examples of such behavior are optional chaining, optional invocation `foo?()`, `if let`, [optional patterns](https://docs.swift.org/swift-book/ReferenceManual/Patterns.html#grammar_optional-pattern), optional assignments and `guard let`. This proposal considers further supporting this convenience in `for-in` loops. + +### Swift Forums + +[Argyrios Kyrtzidis](https://twitter.com/akyrtzi) announced [Language Service Protocol support](https://forums.swift.org/t/new-lsp-language-service-supporting-swift-and-c-family-languages-for-any-editor-and-platform/17024) for Swift and C-family languages! + +> At Apple we are making it a priority to support high-quality tooling for all Swift developers, including those working on non-Apple platforms. We want to collaborate with the open-source community and focus our efforts on building common infrastructure that can be shared by Xcode and other editors and platforms. +> +> To that end, I'm excited to announce that we are going to start a new open-source project for a Swift and C-family language service based on the [Language Server Protocol](https://microsoft.github.io/language-server-protocol). We've chosen to adopt LSP so we can benefit from its active community and wide adoption across other editors and platforms. This means that Visual Studio Code, Atom, Sublime Text, or whatever your favorite editor happens to be, can use the same service as Xcode, and any improvements we make to the service will benefit them all. + +> To add to what Ben mentioned, the new service will be written in Swift so it could use SwiftSyntax and any other functionality written on top of SwiftSyntax, like formatting. + +[Xi Ge](https://twitter.com/xge_apple) announced [an ABI stability checker](https://forums.swift.org/t/abi-stability-checker-is-now-online-for-the-swift-standard-library) for the Swift standard library. + +> We’ve started testing the ABI stability of the Swift standard library as part of Swift regression testing. +> +> [It] will check whether the change has broken the ABI stability of a previously checked-in [baseline](https://github.com/apple/swift/blob/master/test/api-digester/Inputs/stdlib-stable-abi.json). If it does, a test failure will occur in [`stability-stdlib-abi.swift`](https://github.com/apple/swift/blob/master/test/api-digester/stability-stdlib-abi.swift). To resolve this test failure, we can either update the expected ABI breakage list in [`stability-stdlib-abi.swift.expected`](https://github.com/apple/swift/blob/master/test/api-digester/Outputs/stability-stdlib-abi.swift.expected) or update the PR to remedy those breakages. + +[Steve Canon](https://twitter.com/stephentyrone) pitched [a proposal(https://forums.swift.org/t/comparable-and-floatingpoint-types/16886) regarding comparability of Floating point types. + +> The `Comparable` and `Equatable` protocols want to imply a total order. This is mostly satisfied by `FloatingPoint` types, except for the behavior with `NaN`s. A total order requires that for any `a` and `b`, either `a ≤ b` or `a ≥ b` is true. But IEEE 754 requires that if either `a` or `b` is `NaN`, both of those comparisons are false. + +### Finally + +How to write [a proposal](https://twitter.com/AirspeedSwift/status/1051860332740661248). From 99b124cb4e9322b1f35265a78166da0c69c490cb Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 27 Oct 2018 10:33:05 +0200 Subject: [PATCH 046/589] Initial 121 draft References #418 --- _drafts/2018-11-01-issue-121.md | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 _drafts/2018-11-01-issue-121.md diff --git a/_drafts/2018-11-01-issue-121.md b/_drafts/2018-11-01-issue-121.md new file mode 100644 index 00000000..cf4fc81d --- /dev/null +++ b/_drafts/2018-11-01-issue-121.md @@ -0,0 +1,53 @@ +--- +layout: post +title: ! 'Issue #121' +author: btb + +It's November! The days get shorter, and the end of year is creeping up. Swift 5 is drawing nearer. + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-8937](https://bugs.swift.org/browse/SR-8937) [Compiler] Switch over `T?` fixit does not use syntactic sugar +- [SR-8960](https://bugs.swift.org/browse/SR-8960) [Compiler] Emit a symbol reference to ensure swiftrt.o is linked on Linux/Windows + +### News and community + +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r/) shared [that SwiftPM can now generate code coverage data](https://twitter.com/aciidb0mb3r/status/1055190174231973889)! + +### Commits and pull requests + +[Pavel Yaskevich](https://github.com/xedin) merged [a pull request](https://github.com/apple/swift/pull/19947) that replaces one of the last remaining places where curry levels were still used by diagnostics. + +### Accepted proposals + +[SE-0230](https://github.com/apple/swift-evolution/blob/master/proposals/0230-flatten-optional-try.md): *Flatten nested optionals resulting from `try?`* was [accepted](https://forums.swift.org/t/accepted-se-230-flatten-nested-optionals-resulting-from-try/17376). + +> The Core Team does not want to make source-incompatible changes lightly, but we also want to leave room to improve the language for future users of Swift. We don't have a bright-line rule for when a change crosses the line to become unacceptable, but the key consideration in our analysis is the change's apparent impact in practice on existing code more than its hypothetical risks. In this case, we are convinced that the change leads to fairly inarguably better results. + +### Proposals in review + +[SE-0232](https://github.com/apple/swift-evolution/blob/master/proposals/0232-remove-customization-points.md): *Remove Some Customization Points from the Standard Library's `Collection` Hierarchy* is [under review](https://forums.swift.org/t/se-0232-remove-some-customization-points-from-the-standard-librarys-collection-hierarchy/17265). + +> This proposal removes four customization points from protocols in the +standard library: +> +> - `map`, `filter`, and `forEach` from `Sequence` +> - `first`, `prefix(upTo:)`, `prefix(through:)`, and `suffix(from:)` from `Collection` +> - `last` on `BidirectionalCollection` +> +> The default implementations of these symbols will remain, so sequences and +> collections will continue to have the same operations available that they +> do today. + + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 5bcd7b1f630db034d7c760e3e1064a0c3fb1857d Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 1 Nov 2018 17:12:54 +0100 Subject: [PATCH 047/589] Publish issue 121 Closes #418 --- {_drafts => _posts}/2018-11-01-issue-121.md | 31 +++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) rename {_drafts => _posts}/2018-11-01-issue-121.md (50%) diff --git a/_drafts/2018-11-01-issue-121.md b/_posts/2018-11-01-issue-121.md similarity index 50% rename from _drafts/2018-11-01-issue-121.md rename to _posts/2018-11-01-issue-121.md index cf4fc81d..bdbb2333 100644 --- a/_drafts/2018-11-01-issue-121.md +++ b/_posts/2018-11-01-issue-121.md @@ -2,8 +2,10 @@ layout: post title: ! 'Issue #121' author: btb +--- It's November! The days get shorter, and the end of year is creeping up. Swift 5 is drawing nearer. +This issue is also guaranteed not to be spooky. @@ -16,21 +18,25 @@ It's November! The days get shorter, and the end of year is creeping up. Swift 5 ### News and community +Apple released Xcode 10.1, along with [Swift 4.2.1](https://developer.apple.com/documentation/xcode_release_notes/xcode_10_1_release_notes#3036305). It includes an overview of what's new in this Swift version. + [Ankit Aggarwal](https://twitter.com/aciidb0mb3r/) shared [that SwiftPM can now generate code coverage data](https://twitter.com/aciidb0mb3r/status/1055190174231973889)! +[Doug Gregor](https://twitter.com/dgregor79/) and [Ben Cohen](https://twitter.com/AirspeedSwift)'s talk [on generics](https://developer.apple.com/videos/play/wwdc2018/406/) at WWDC has been expanded to include an all-new section on recursive constraints, associated type and protocol where clauses, and divide-and-conquer algorithms. It starts at around 33 minutes. Highly recommended; very insightful! + ### Commits and pull requests [Pavel Yaskevich](https://github.com/xedin) merged [a pull request](https://github.com/apple/swift/pull/19947) that replaces one of the last remaining places where curry levels were still used by diagnostics. +[Rintaro Ishizaki](https://twitter.com/rintaro) merged [a pull request](https://github.com/apple/swift/pull/20066) that improves completion for the index part of a subscript expression, allowing the compiler to help you use more complex subscripts. + ### Accepted proposals [SE-0230](https://github.com/apple/swift-evolution/blob/master/proposals/0230-flatten-optional-try.md): *Flatten nested optionals resulting from `try?`* was [accepted](https://forums.swift.org/t/accepted-se-230-flatten-nested-optionals-resulting-from-try/17376). > The Core Team does not want to make source-incompatible changes lightly, but we also want to leave room to improve the language for future users of Swift. We don't have a bright-line rule for when a change crosses the line to become unacceptable, but the key consideration in our analysis is the change's apparent impact in practice on existing code more than its hypothetical risks. In this case, we are convinced that the change leads to fairly inarguably better results. -### Proposals in review - -[SE-0232](https://github.com/apple/swift-evolution/blob/master/proposals/0232-remove-customization-points.md): *Remove Some Customization Points from the Standard Library's `Collection` Hierarchy* is [under review](https://forums.swift.org/t/se-0232-remove-some-customization-points-from-the-standard-librarys-collection-hierarchy/17265). +[SE-0232](https://github.com/apple/swift-evolution/blob/master/proposals/0232-remove-customization-points.md): *Remove Some Customization Points from the Standard Library's `Collection` Hierarchy* was [under review](https://forums.swift.org/t/se-0232-remove-some-customization-points-from-the-standard-librarys-collection-hierarchy/17265). > This proposal removes four customization points from protocols in the standard library: @@ -43,11 +49,26 @@ standard library: > collections will continue to have the same operations available that they > do today. +... and has been [accepted](https://forums.swift.org/t/se-0232-remove-some-customization-points-from-the-standard-librarys-collection-hierarchy/17265/16). + +> The Core Team has decided to accept the proposal as written (with the refinements incorporated during the review). ### Swift Forums -> TODO +[Jon Shier](https://twitter.com/jshier) wrote [a second pitch](https://forums.swift.org/t/adding-result-ii-unconstrained-boogaloo/17128) to add a `Result` type to the standard library. + +> `Result` is considered generally useful enough to be included in the standard library. However, in the past, strenuous disagreement between the typed and untyped-throws camps has prevented consensus on the exact form it should take. +> +> To kick off another round of discussion, and before I update my proposal officially, I'd like to discuss the form that was brought up late in the last discussion: + +{% highlight swift %} +enum Result { + case success(Value), failure(Error) +} +{% endhighlight %} + +The proposal can be found [here](https://github.com/apple/swift-evolution/pull/937). ### Finally -> TODO: something funny/fun. tweet, link, etc. +How to learn all about generics [with this one easy trick](https://twitter.com/AirspeedSwift/status/1057357660792573952)! From a4a413c584c2decf4000c439e2f326c3000a0f50 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 1 Nov 2018 17:13:15 +0100 Subject: [PATCH 048/589] Update dependencies --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7c50f82f..44cd2300 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GEM concurrent-ruby (1.0.5) cork (0.3.0) colored2 (~> 3.1) - danger (5.6.7) + danger (5.7.1) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -211,7 +211,7 @@ GEM jekyll-seo-tag (~> 2.0) jekyll-titles-from-headings (0.5.1) jekyll (~> 3.3) - jekyll-watch (2.0.0) + jekyll-watch (2.1.2) listen (~> 3.0) jemoji (0.10.1) gemoji (~> 3.0) @@ -235,10 +235,10 @@ GEM no_proxy_fix (0.1.2) nokogiri (1.8.5) mini_portile2 (~> 2.3.0) - octokit (4.12.0) + octokit (4.13.0) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) - pathutil (0.16.1) + pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (2.0.5) rb-fsevent (0.10.3) @@ -280,4 +280,4 @@ DEPENDENCIES octokit BUNDLED WITH - 1.16.1 + 1.16.2 From 8252c8bdca7b84c7fe4b6100daebe4ecfe8c586e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 1 Nov 2018 21:31:26 +0100 Subject: [PATCH 049/589] Update sponsorship.md --- sponsorship.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 10c5e30a..582d682e 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,9 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
|   Issue |   Status | |:-|:-| -| 04 October | **Booked** | -| 18 October | Open | -| 01 November | Open | | 15 November | Open | | 29 November | Open | | 13 December | Open | From 9ef0cc0d1acf5a561f8eb481b7179c7b09eedf5f Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 15 Nov 2018 19:09:51 +0100 Subject: [PATCH 050/589] Post issue 122 Closes #419 --- _posts/2018-11-15-issue-122.md | 110 +++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 _posts/2018-11-15-issue-122.md diff --git a/_posts/2018-11-15-issue-122.md b/_posts/2018-11-15-issue-122.md new file mode 100644 index 00000000..e9fb9c79 --- /dev/null +++ b/_posts/2018-11-15-issue-122.md @@ -0,0 +1,110 @@ +--- +layout: post +title: ! 'Issue #122' +author: btb +sponsor: + link: https://try.instabug.com/swift-weekly + heading: The Most Comprehensive Bug Reporting SDK for Swift Apps + body: The top mobile companies like Lyft, Reddit, and PayPal rely on Instabug to iterate faster and enhance their app quality. Instabug's lightweight SDK lets you receive detailed bug reports directly from testers and users. A screenshot is attached automatically along with screen recordings, device details and repro-steps with each report. Instabug takes just one line of code to integrate the SDK.
Get 20% off for 3 months when you signup and subscribe to any plan. Enter offer code InstabugLovesSwiftWeekly + displaylink: https://try.instabug.com/swift-weekly +--- + +We're very happy to announce that thanks to [Zigii Wong](https://twitter.com/wongzigii), Swift Weekly Brief will be available in Chinese as well! You can go to the website [here](https://swiftweekly.github.io/cn/), and you can contribute in [this repository](https://github.com/SwiftWeekly/cn). 🎉 + +In other news, there's a potentially highly anticipated proposal in review, namely one that introduces a `Result` type to the Standard Library. 😱 + +... so go ahead and read all about this and more exciting progress on Swift. + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-9201](https://bugs.swift.org/browse/SR-9201) [Compiler] Incorrect error message when using optional chaining +- [SR-9216](https://bugs.swift.org/browse/SR-9216) [Compiler] Don't honor SDKROOT in interpreter mode + +### Swift Unwrapped + +Jesse and JP [discussed](https://spec.fm/podcasts/swift-unwrapped/222525) Opaque Result Types, as pitched by Doug Gregor on the forums. + +### News and community + +[Mattt](https://twitter.com/mattt) wrote [a blog post](https://nshipster.com/language-server-protocol/) about the Language Server Protocol, "arguably the most important decision Apple has made for Swift since releasing the language as open source in 2014". + +SwiftNIO is now available [as a CocoaPod](https://cocoapods.org/pods/SwiftNIO)! + +Vapor is working on splitting two new libraries out of their core library; `NIOKit`, + +### Commits and pull requests + +[David Smith](https://twitter.com/Catfish_Man/) merged [a pull request](https://github.com/apple/swift/pull/20383) that improves String bridging performance! + +### Accepted proposals + +[SE-0233](https://github.com/apple/swift-evolution/blob/master/proposals/0233-additive-arithmetic-protocol.md): *Make `Numeric` Refine a new `AdditiveArithmetic` Protocol* was [under review](https://forums.swift.org/t/se-0233-make-numeric-refine-a-new-additivearithmetic-protocol/17583) and then [accepted](https://forums.swift.org/t/accepted-se-0233-make-numeric-refine-a-new-additivearithmetic-protocol/17751/2). + +> This proposal introduces a weakening of the existing `Numeric` protocol named `AdditiveArithmetic` , which defines additive arithmetic operators and a zero, making conforming types roughly correspond to the mathematic notion of an [additive group](https://en.wikipedia.org/wiki/Additive_group). This makes it possible for vector types to share additive arithmetic operators with scalar types, which enables generic algorithms over `AdditiveArithmetic` to apply to both scalars and vectors. + +> Feedback on the proposal was light but all positive, and the proposal was accepted without modifications. The core team discussed moving the unary + member, but ended up agreeing with the proposal as written. + +### Returned proposals + +[SE-0229](https://github.com/apple/swift-evolution/blob/master/proposals/0229-simd.md): *SIMD Vectors, Take 2* was [returned for revision](https://forums.swift.org/t/se-0229-simd-vectors/16518/99). + +> The proposal and implementation have been updated. +> +> To summarize how the proposal has changed: +> +> - The primary working types are now spelled like `Vector3` instead of the earlier `T.Vector3`. +> - Initializers from any `Sequence` with the right element type are now provided. +> - All mask operations are `.`-prefixed +> - `count` has been renamed `elementCount` +> - The general swizzle / shuffle / permute operation `init(gathering: at:)` has been removed. We intend to restore it in a later proposal with a better name. +> - Users can make `VectorN` available for arbitrary types `T` by conforming `T` to a new `SIMDVectorizable` protocol, which has very basic requirements. +> - The any and all and `min`, `max`, and `clamp` free functions have been removed. We intend to re-introduce this functionality (possibly with different bindings) in a follow-on proposal. +> - The `IntegerVector` and `FloatingPointVector` protocols have been removed and replaced with conditional conformances. + +### Rejected proposals + +[SE-0231](https://github.com/apple/swift-evolution/blob/master/proposals/0231-optional-iteration.md): *Optional Iteration* was [rejected](https://forums.swift.org/t/rejected-se-0231-optional-iteration/17805). + +> Although the core team agrees that iterating through collections wrapped in `Optional` is a common enough occurrence to be worth providing affordances in the language for, it has decided to reject the proposal as written. + +I'd encourage to read the [full rationale](https://forums.swift.org/t/rejected-se-0231-optional-iteration/17805). + +### Proposals in review + +[SE-0235](https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md): *Add Result to the Standard Library* is [under review](https://forums.swift.org/t/se-0235-add-result-to-the-standard-library/17752). + +> Swift's current error-handling, using `throws`, `try`, and `catch`, offers automatic and synchronous handling of errors through explicit syntax and runtime behavior. However, it lacks the flexibility needed to cover all error propagation and handling in the language. `Result` is a type commonly used for manual propagation and handling of errors in other languages and within the Swift community. Therefore this proposal seeks to add such a type to the Swift standard library. + +[SE-0236](https://github.com/apple/swift-evolution/blob/master/proposals/0236-package-manager-platform-deployment-settings.md): *Package Manager Platform Deployment Settings* is [under review](https://forums.swift.org/t/se-0236-package-manager-platform-deployment-settings/17992). + +> This is a proposal for adding support for specifying a per-platform minimum required deployment target in the `Package.swift` manifest file. +> +> Packages should be able to declare the minimum required platform deployment target version. SwiftPM currently uses a hardcoded value for the macOS deployment target. This creates friction for packages which want to use APIs that were introduced after the hardcoded deployment target version. + +### Swift Forums + +[Michael Ilseman](https://twitter.com/Ilseman) shared [String's proposed Application Binary Interface (ABI)](https://forums.swift.org/t/string-s-abi-and-utf-8/17676) and that native Swift strings will be stored as UTF-8! + +> We just landed String’s proposed final ABI on master. This ABI includes some significant changes, the primary one being that native Swift strings are stored as UTF-8 where they were previously stored either as ASCII or UTF-16 depending on their contents. `NSString`s are still lazily bridged in to String without copying. +> +> This does not immediately surface in the API, but allows for some important performance wins and gives a more consistent basis for future APIs providing efficient and direct access to the underlying code units. UTF-8 is a one-byte Unicode encoding and is the preferred encoding for interoperating with C, systems programming, server-side programming, scripting, client-side programming, and tools that process source code and textual formats. + +With this change, the Standard Library's binary is around 13% smaller as well! + +Vapor is [splitting out](https://forums.swift.org/t/niokit-codablekit/17706) two new libraries from its core library. + +> We're starting work on two new packages that will debut with Vapor 4. [NIOKit](https://github.com/vapor-community/nio-kit) and [CodableKit](https://github.com/vapor-community/codable-kit). The goal of these packages is to break out a lot of utilities Vapor has developed over the past two years in our Core 1 repo. This repo has grown quite large and contains a lot of things we think would be useful to the Server community as a whole, not tied to Vapor. + +[Johannes Weiss](https://twitter.com/johannesweiss/) shared [the plan](https://forums.swift.org/t/plan-for-nio-2-and-swift-5/17791) for SwiftNIO 2 and how that ties into Swift 5. + +> As I'm sure you are aware, the first Swift 5 branches will be cut soon and needless to say SwiftNIO wants to be able to make full use of the new features/improvements upcoming in Swift 5 (for example native UTF8 `String`s). On top that, SwiftNIO already accumulated [a number of issues/[pull requests]](https://github.com/apple/swift-nio/issues?q=is%3Aopen+is%3Aissue+milestone%3A2.0.0) that can only be addressed with a new major SwiftNIO 2.0.0 release. +> +> Our plan is to therefore release SwiftNIO 2.0 together with Swift 5.0. NIO 2 will require Swift 5 and will be a breaking release. Don't expect everything to break when you need to migrate from NIO 1 to NIO 2 but there will be likely a number of things that can hopefully be fixed mostly through search & replace. We will maintain a list of changes with strategies to resolve this. + +### Finally + +[I](https://twitter.com/AirspeedSwift/status/1060266652326027264) love [this](https://twitter.com/HarshilShah1910/status/1061528775337291776) `Result` type! From 722c6381717b034ebd583a5621d4aaa047a09e89 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 15 Nov 2018 19:12:32 +0100 Subject: [PATCH 051/589] Push new draft --- _drafts/2018-11-29-issue-123.md | 57 +++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 _drafts/2018-11-29-issue-123.md diff --git a/_drafts/2018-11-29-issue-123.md b/_drafts/2018-11-29-issue-123.md new file mode 100644 index 00000000..139dcfc5 --- /dev/null +++ b/_drafts/2018-11-29-issue-123.md @@ -0,0 +1,57 @@ +--- +layout: post +title: ! 'Issue #123' +author: btb +sponsor: + + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From a0ebff19b836a0151dd6cb170060454c98ac5521 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Thu, 15 Nov 2018 14:18:00 -0800 Subject: [PATCH 052/589] Add github_issue_generator.rb to excluded files (#422) --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index a6b49a4c..5f0103e1 100644 --- a/_config.yml +++ b/_config.yml @@ -6,7 +6,7 @@ plugins: - jekyll-sitemap # File rules -exclude: [vendor, Dangerfile, Gemfile, Gemfile.lock, LICENSE, README.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, new_draft.sh] +exclude: [vendor, Dangerfile, Gemfile, Gemfile.lock, LICENSE, README.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, new_draft.sh, github_issue_generator.rb] # Permalinks permalink: /:title/ From d24a2ba4edf0de99e9b69eefa9a99621ca0efea3 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Thu, 15 Nov 2018 14:29:01 -0800 Subject: [PATCH 053/589] Make 'edit' use config value (#425) --- _config.yml | 2 ++ _drafts/2018-11-29-issue-123.md | 1 - _includes/social_share.html | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index 5f0103e1..d2793e08 100644 --- a/_config.yml +++ b/_config.yml @@ -18,6 +18,8 @@ url: https://swiftweekly.github.io logo: /img/logo.png timezone: America/Los_Angeles +repo_name: swiftweekly.github.io + twitter: username: swiftlybrief diff --git a/_drafts/2018-11-29-issue-123.md b/_drafts/2018-11-29-issue-123.md index 139dcfc5..3f5298e0 100644 --- a/_drafts/2018-11-29-issue-123.md +++ b/_drafts/2018-11-29-issue-123.md @@ -3,7 +3,6 @@ layout: post title: ! 'Issue #123' author: btb sponsor: - link: TODO heading: TODO body: TODO diff --git a/_includes/social_share.html b/_includes/social_share.html index 7ce151e2..f153ccec 100644 --- a/_includes/social_share.html +++ b/_includes/social_share.html @@ -1,5 +1,5 @@ -{% assign base_edit_url = 'https://github.com/SwiftWeekly/swiftweekly.github.io/edit/master/_posts/' %} +{% assign base_edit_url = 'https://github.com/SwiftWeekly/' | append: site.repo_name | append: '/edit/master/_posts/' %} {% assign issue_date = page.date | date: "%Y-%m-%d" %} {% assign issue_number = page.title | remove: 'Issue #' %} From d95b54a87a42cb0afff391403b251be26b218443 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Thu, 15 Nov 2018 14:29:35 -0800 Subject: [PATCH 054/589] Update new_draft.sh --- new_draft.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/new_draft.sh b/new_draft.sh index 134836a9..8b30e877 100755 --- a/new_draft.sh +++ b/new_draft.sh @@ -48,7 +48,6 @@ layout: post title: ! 'Issue #$2' author: $3 sponsor: - link: TODO heading: TODO body: TODO From e7b4079a4d4fa8ca7b1f1366f2dcb52c52a54c55 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 18 Nov 2018 21:50:26 +0100 Subject: [PATCH 055/589] Update sponsorship.md --- sponsorship.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 582d682e..c92483ab 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,10 +60,15 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
|   Issue |   Status | |:-|:-| -| 15 November | Open | | 29 November | Open | | 13 December | Open | | 27 December | Open | +| 10 January | Open | +| 24 January | Open | +| 07 February | Open | +| 21 February | Open | +| 07 March | Open | +| 21 March | Open | {: class="table table-striped table-bordered"}
From db2d21515dc73c6c9683031faa39e741983d849a Mon Sep 17 00:00:00 2001 From: Zigii Wong Date: Mon, 19 Nov 2018 18:51:45 +0800 Subject: [PATCH 056/589] Fix incomplete typo (#427) --- _posts/2018-11-15-issue-122.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-11-15-issue-122.md b/_posts/2018-11-15-issue-122.md index e9fb9c79..814379b6 100644 --- a/_posts/2018-11-15-issue-122.md +++ b/_posts/2018-11-15-issue-122.md @@ -34,7 +34,7 @@ Jesse and JP [discussed](https://spec.fm/podcasts/swift-unwrapped/222525) Opaque SwiftNIO is now available [as a CocoaPod](https://cocoapods.org/pods/SwiftNIO)! -Vapor is working on splitting two new libraries out of their core library; `NIOKit`, +Vapor is working on splitting two new libraries out of their core library: [NIOKit](https://github.com/vapor-community/nio-kit) and [CodableKit](https://github.com/vapor-community/codable-kit). ### Commits and pull requests From 71fad9899718d14f471dc731adb283009c4140aa Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 21 Nov 2018 07:41:34 +0100 Subject: [PATCH 057/589] Run bundle update --- Gemfile.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 44cd2300..31c334cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,10 +22,10 @@ GEM colorize (0.8.1) commonmarker (0.17.13) ruby-enum (~> 0.5) - concurrent-ruby (1.0.5) + concurrent-ruby (1.1.3) cork (0.3.0) colored2 (~> 3.1) - danger (5.7.1) + danger (5.8.2) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -56,7 +56,7 @@ GEM forwardable-extended (2.6.0) gemoji (3.0.0) git (1.5.0) - github-pages (192) + github-pages (193) activesupport (= 4.2.10) github-pages-health-check (= 1.8.1) jekyll (= 3.7.4) @@ -64,7 +64,7 @@ GEM jekyll-coffeescript (= 1.1.1) jekyll-commonmark-ghpages (= 0.1.5) jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.10.0) + jekyll-feed (= 0.11.0) jekyll-gist (= 1.5.0) jekyll-github-metadata (= 2.9.4) jekyll-mentions (= 1.4.1) @@ -107,7 +107,7 @@ GEM octokit (~> 4.0) public_suffix (~> 2.0) typhoeus (~> 1.3) - html-pipeline (2.8.4) + html-pipeline (2.9.1) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) @@ -140,7 +140,7 @@ GEM rouge (~> 2) jekyll-default-layout (0.1.4) jekyll (~> 3.0) - jekyll-feed (0.10.0) + jekyll-feed (0.11.0) jekyll (~> 3.3) jekyll-gist (1.5.0) octokit (~> 4.2) @@ -250,7 +250,7 @@ GEM ruby_dep (1.5.0) rubyzip (1.2.2) safe_yaml (1.0.4) - sass (3.6.0) + sass (3.7.2) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) @@ -261,7 +261,7 @@ GEM terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) - typhoeus (1.3.0) + typhoeus (1.3.1) ethon (>= 0.9.0) tzinfo (1.2.5) thread_safe (~> 0.1) @@ -280,4 +280,4 @@ DEPENDENCIES octokit BUNDLED WITH - 1.16.2 + 1.17.1 From e363841cf292efbdf3718946f8c07c3aab714abe Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 25 Nov 2018 15:02:14 +0100 Subject: [PATCH 058/589] Add proposal script --- CONTRIBUTING.md | 20 +++++++++++++++++++- proposal.rb | 31 +++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 proposal.rb diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 23efa294..ef0c77fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -68,6 +68,24 @@ $ ruby ./github_issue_generator.rb --number=1 --date='December 6, 2015' $ ruby ./github_issue_generator.rb --help ``` +### Boilerplate for proposal updates + +You can generate the boilerplate (eg. `SE-NNNN is under review`) with the +`proposal.rb` script. + +Example: + +```bash +# usage: ruby ./proposal.rb url-to-proposal url-to-forums status +# in which status is one of 'accepted', 'returned', 'rejected' or 'review'. + +$ ruby ./proposal.rb https://github.com/apple/swift-evolution/blob/master/proposals/0231-optional-iteration.md https://forums.swift.org/t/rejected-se-0231-optional-iteration/17805 rejected + +# generates the following: + +# [SE-0231](https://github.com/apple/swift-evolution/blob/master/proposals/0231-optional-iteration.md) was [rejected](https://forums.swift.org/t/rejected-se-0231-optional-iteration/17805). +``` + ### Preview the site locally, with drafts ```bash @@ -106,7 +124,7 @@ We encourage all writes to use their own voice and express their own personality * **Example:** [SE-0185](https://github.com/apple/swift-evolution/blob/master/proposals/0185-synthesize-equatable-hashable.md): *Synthesizing Equatable and Hashable conformance* by Tony Allevato is [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2017-August/000397.html). * For "Accepted proposals", "Rejected Proposals", etc. use the format: `SE-NNNN: TITLE was STATUS`. - * **Example:** [SE-0150](https://github.com/apple/swift-evolution/blob/master/proposals/0150-package-manager-branch-support.md): Package Manager Support for branches [was accepted](https://lists.swift.org/pipermail/swift-evolution-announce/2017-February/000315.html). + * **Example:** [SE-0150](https://github.com/apple/swift-evolution/blob/master/proposals/0150-package-manager-branch-support.md): Package Manager Support for branches was [accepted](https://lists.swift.org/pipermail/swift-evolution-announce/2017-February/000315.html). ## 🕵️‍♀️ Evaluating [Swift Forum](https://swift.org/community/#forums) content diff --git a/proposal.rb b/proposal.rb new file mode 100644 index 00000000..970b4ebc --- /dev/null +++ b/proposal.rb @@ -0,0 +1,31 @@ +#!/usr/bin/env ruby + +unless ARGV.length == 3 + abort('Usage: url-to-proposal url-to-forums status') +end + +statusHash = { + 'accepted' => 'was [accepted]', + 'returned' => 'was [returned for revision]', + 'rejected' => 'was [rejected]', + 'review' => 'is [under review]' +} + +unless status = statusHash[ARGV[2]] + abort("Status must be one of #{statusHash.keys}") +end + +proposal_url = ARGV[0] +forum_url = ARGV[1] + +proposal_last_split = proposal_url.split('/').last + +unless proposal_number_integer = proposal_last_split.to_i + abort("Could not find a valid proposal number in #{proposal_last_split}") +end + +proposal_number = format('%04d', proposal_number_integer) + +message = proposal_number + +puts "[SE-#{proposal_number}](#{proposal_url}) #{status}(#{forum_url})." From 6361d06e4556451b1c64cd4516759d9ab408525d Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 29 Nov 2018 17:02:44 +0100 Subject: [PATCH 059/589] Fix indentation --- proposal.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proposal.rb b/proposal.rb index 970b4ebc..433ac6a2 100644 --- a/proposal.rb +++ b/proposal.rb @@ -5,10 +5,10 @@ end statusHash = { - 'accepted' => 'was [accepted]', - 'returned' => 'was [returned for revision]', - 'rejected' => 'was [rejected]', - 'review' => 'is [under review]' + 'accepted' => 'was [accepted]', + 'returned' => 'was [returned for revision]', + 'rejected' => 'was [rejected]', + 'review' => 'is [under review]' } unless status = statusHash[ARGV[2]] From c9a21aa2ccd930c418a56709c222cccb93a435c7 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 29 Nov 2018 19:48:36 +0100 Subject: [PATCH 060/589] Post issue 123 closes #424 --- _drafts/2018-11-29-issue-123.md | 56 -------------------- _posts/2018-11-29-issue-123.md | 91 +++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 56 deletions(-) delete mode 100644 _drafts/2018-11-29-issue-123.md create mode 100644 _posts/2018-11-29-issue-123.md diff --git a/_drafts/2018-11-29-issue-123.md b/_drafts/2018-11-29-issue-123.md deleted file mode 100644 index 3f5298e0..00000000 --- a/_drafts/2018-11-29-issue-123.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: post -title: ! 'Issue #123' -author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Swift Unwrapped - -> TODO: Latest episode(s) of Swift Unwrapped - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2018-11-29-issue-123.md b/_posts/2018-11-29-issue-123.md new file mode 100644 index 00000000..72a70b1e --- /dev/null +++ b/_posts/2018-11-29-issue-123.md @@ -0,0 +1,91 @@ +--- +layout: post +title: ! 'Issue #123' +author: btb +--- + +Welcome to issue 123 of the Weekly Brief! Although winter is approaching fast, +that doesn't stop the Swift team and community (yet). A lot of discussion has +taken place over the last two weeks, and below you'll find an overview of that. + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-9341](https://bugs.swift.org/browse/SR-9341) [Tooling] Add tests for update-checkout (Python) +- [SR-9373](https://bugs.swift.org/browse/SR-9373) [Compiler] Clang importer should refuse to import arrays with excessive numbers of elements + +### News and community + +[Patrick Balesta](https://twitter.com/BalestraPatrick) wrote [a blog post](https://patrickbalestra.com/blog/2018/11/12/contributing-to-the-swift-benchmark-suite.html) on contributing to the Swift Benchmark Suite! + +[Daniel Martín](https://twitter.com/dmartincy) wrote [a blog post](https://pspdfkit.com/blog/2018/tips-for-contributing-to-the-swift-language/) with tips and tricks for contributing to the Swift language! + +My talk from try! Swift NYC on Swift's history, "Taken for Granted", [was posted](https://www.youtube.com/watch?v=ePuOrCbIW-o). Slides can be found [here](https://speakerdeck.com/basthomas/taken-for-granted). + +[Mattt](https://twitter.com/mattt) wrote [a blog post](https://nshipster.com/vscode/) on how to set up Visual Studio Code for Swift development. This is possible thanks to the [Language Server Protocol](https://github.com/apple/sourcekit-lsp) that Apple has started working on. + +[JP Simard](https://twitter.com/simjp) wrote [a blog post](https://jpsim.com/evaluating-swiftsyntax-for-use-in-swiftlint) about implementing SwiftLint using SwiftSyntax... making it 20% slower. + +### Commits and pull requests + +[Michael Ilseman](https://twitter.com/Ilseman) merged [a pull request](https://github.com/apple/swift/pull/20848) to speed up utf16 Strings! + +### Accepted proposals + +[SE-0234](https://github.com/apple/swift-evolution/blob/master/proposals/0234-remove-sequence-subsequence.md): *Remove `Sequence.SubSequence`* was [accepted](https://forums.swift.org/t/accepted-se-0234-remove-sequence-subsequence/18002). + +> Review feedback was pretty strongly positive. Several community members voiced their experience that attempting to implement the sub-sequence requirements had been an annoyance to them in the past. No-one seemed to feel that the requirements were actually valuable. + +### Proposals in review + +[SE-0237](https://github.com/apple/swift-evolution/blob/master/proposals/0237-contiguous-collection.md): *Introduce Contiguous Collection Protocols* is [under review](https://forums.swift.org/t/review-of-se-0237-introduce-contiguous-collection-protocols/18069). + +> This proposal introduces two new protocols, `ContiguousCollection`, and a +> mutable version `MutableContiguousCollection`. These protocols will allow +> generic code to make use of the `withUnsafe{Mutable}BufferPointer` idiom, +> as well as provide fast paths in the standard library for adopting types. + +[SE-0238](https://github.com/apple/swift-evolution/blob/master/proposals/0238-package-manager-build-settings.md): *Package Manager Target Specific Build Settings* is [under review](https://forums.swift.org/t/se-0238-package-manager-target-specific-build-settings/18341). + +> This is a proposal for adding support for declaring some commonly used target-specific build settings in the `Package.swift` manifest file. As the name suggests, target-specific build settings are only applied to a particular target. +> +> SwiftPM currently has little facility for customizing how the build tools (compilers, linker, etc.) are invoked during a build. This causes a lot of friction for package authors who want to do some basic customizations in order to build their targets. They often have to resort to awkward workarounds like creating custom modulemaps for linking system libraries, symlinking private headers inside the include directory, changing the include statements, and so on. +> +> We think most of these workarounds can be removed by providing support for some common build settings at the target level. This proposal will also set the stage for a richer build settings API in the future that has support for various conditional expressions, deployment options, inheritance of build settings, etc. + +### Swift Forums + +[Mark Lacey](https://github.com/rudkx) wrote [a proposal pitch](https://forums.swift.org/t/pitch-making-expression-type-checking-of-operator-expressions-fast/18037) to extend operator declarations with designated types, which could address the infamous "expression too complex" problems with operators in Swift. + +> Swift's expression type checker is known to have cases where it is extremely slow in type checking expressions. +> +> Some of these slow typechecking cases involve expressions that make use of operators (whereas others involve collections or chained single-expression closures). +> +> This proposal addresses speeding up type checking for cases that are slow primarily due to the number of combinations of overloads of operators that are examined in the course of typechecking. + +[Joe Groff](https://twitter.com/jckarter) wrote [a proposal pitch](https://forums.swift.org/t/lifting-the-self-or-associated-type-constraint-on-existentials/18025) to lift the "Self or associated type" constraint on existentials. + +> When the first seed of Swift came out many years ago, there were technical reasons for the "self or associated type" constraint on protocol existentials: at that time, protocol witness tables did not carry associated type information, so it was impossible to re-open the dynamic type in order to dispatch methods on an existential when a protocol had associated types. This was fixed a while ago in order to allow for recursive protocol constraints, but we held on to the restriction on existentials thinking it would help avoid confusion or design dead ends with people using protocols as existentials in ways that we couldn't really fully support yet. +> +> However, nowadays we also have protocol extensions, so even if a protocol doesn't have any core requirements with contravariant Self or associated type arguments, contravariant protocol methods can be added by extensions, so the type system issues unavoidably exist already. + +[Robert Widmann](https://twitter.com/CodaFi_) wrote [a post](https://forums.swift.org/t/what-should-i-learn-if-i-want-to-contribute-to-the-swift-compiler/18144/4) outlining how you can contribute to the Swift compiler. + +> C++ is a notoriously dense language that can be a real pain to get a hold on. That said, LLVM-style projects have carved out their own subset of the language, and are very consistent about sticking to that subset. If you want to get a feel for the minutiae, the LLVM Coding Standards document is a great way to get a feel for the aesthetics. If you're looking for a technical start, including programming patterns, data structures, algorithms, and more, look to the LLVM Programmer's Manual. +> +> I learn best by doing, so I'm sparse on book recommendations and such, but I think if you spend enough time with it that you can get up and working with LLVM-style structures pretty quickly. + +[John McCall](https://twitter.com/pathofshrines) shared [an update](https://forums.swift.org/t/revised-se-0235-add-result-to-the-standard-library/18371) on the `Result` proposal. + +> Based on the first round of feedback, the core team agrees that this feature is worth adding to Swift, and we are now looking for feedback on our proposed revisions to the proposal, which are at times substantial. +> +> Thank you for everyone who participated in the first phase of review. Feedback there was generally positive on the idea of standardizing the widely used and reimplemented type. + +The [complete post](https://forums.swift.org/t/revised-se-0235-add-result-to-the-standard-library/18371) goes into more detail and is worth a read. + +### Finally + +Sometimes, Swift [is really hard](https://twitter.com/alexisgallagher/status/1066559309385883648). From 780feffe13daffbc02979f0debbc8bec1f40ecb4 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 30 Nov 2018 08:16:02 +0100 Subject: [PATCH 061/589] Update 2018-11-29-issue-123.md --- _posts/2018-11-29-issue-123.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-11-29-issue-123.md b/_posts/2018-11-29-issue-123.md index 72a70b1e..181f4c9e 100644 --- a/_posts/2018-11-29-issue-123.md +++ b/_posts/2018-11-29-issue-123.md @@ -27,7 +27,7 @@ My talk from try! Swift NYC on Swift's history, "Taken for Granted", [was posted [Mattt](https://twitter.com/mattt) wrote [a blog post](https://nshipster.com/vscode/) on how to set up Visual Studio Code for Swift development. This is possible thanks to the [Language Server Protocol](https://github.com/apple/sourcekit-lsp) that Apple has started working on. -[JP Simard](https://twitter.com/simjp) wrote [a blog post](https://jpsim.com/evaluating-swiftsyntax-for-use-in-swiftlint) about implementing SwiftLint using SwiftSyntax... making it 20% slower. +[JP Simard](https://twitter.com/simjp) wrote [a blog post](https://jpsim.com/evaluating-swiftsyntax-for-use-in-swiftlint) about implementing SwiftLint using SwiftSyntax... making it 20x (!) slower. ### Commits and pull requests From 61197f7c09d837103e2964239b10483d22db7386 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 30 Nov 2018 09:13:47 +0100 Subject: [PATCH 062/589] Add Kristaps to writers --- _data/authors.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_data/authors.yml b/_data/authors.yml index d1cc37b1..af6ccb83 100644 --- a/_data/authors.yml +++ b/_data/authors.yml @@ -34,3 +34,7 @@ tapthaker: name: 'Tapan Thaker' twitter: tapthaker github: tapthaker +fassko: + name: 'Kristaps Grinbergs' + twitter: fassko + github: fassko From 81c10dc4ae5e20f45bac8b3f88493b71b87bd5ea Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 30 Nov 2018 09:15:04 +0100 Subject: [PATCH 063/589] Add 124 draft --- _drafts/2018-12-13-issue-124.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2018-12-13-issue-124.md diff --git a/_drafts/2018-12-13-issue-124.md b/_drafts/2018-12-13-issue-124.md new file mode 100644 index 00000000..08d30730 --- /dev/null +++ b/_drafts/2018-12-13-issue-124.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #124' +author: fassko +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 5f46d31f6ca9fa0a960f8a449fe43aa374381a47 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 1 Dec 2018 16:23:23 +0100 Subject: [PATCH 064/589] SE-0236 was accepted --- _drafts/2018-12-13-issue-124.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_drafts/2018-12-13-issue-124.md b/_drafts/2018-12-13-issue-124.md index 08d30730..8fff8fb4 100644 --- a/_drafts/2018-12-13-issue-124.md +++ b/_drafts/2018-12-13-issue-124.md @@ -33,7 +33,11 @@ sponsor: ### Accepted proposals -> TODO +[SE-0236](https://github.com/apple/swift-evolution/blob/master/proposals/0236-package-manager-platform-deployment-settings.md): *Package Manager Platform Deployment Settings* was [accepted](https://forums.swift.org/t/accepted-with-modifications-se-0236-package-manager-platform-deployment-settings/18420). + +> There was a lot of negative feedback about the platform restrictions part of the proposal, so the SwiftPM code owners decided to accept a revised version of the proposal which only handles customization of deployment targets. The topic of platform restrictions for packages can be revisited separately at a later time. +> +> For specifying custom deployment versions, the original proposal mentions that an initializer will be provided. However, since that would be too verbose, a string overload will be provided instead. This makes the API `.macOS("10.13")` instead of `.macOS(MacOSVersion("10.13"))`. ### Returned proposals From 62ef8d472638ad304258095b30796f9be266f3b0 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 11 Dec 2018 15:56:30 +0100 Subject: [PATCH 065/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 31c334cc..1422a7c0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GEM concurrent-ruby (1.1.3) cork (0.3.0) colored2 (~> 3.1) - danger (5.8.2) + danger (5.10.1) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -48,7 +48,7 @@ GEM ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) - faraday (0.15.3) + faraday (0.15.4) multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) From b2476bf37ddb91dea3f05a57f3d24a567f482b24 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 13 Dec 2018 20:19:28 +0100 Subject: [PATCH 066/589] Issue 124 (#431) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update 2018-12-13-issue-124.md * Updated draft and added some new stuff. * * Swift 5.0 nightly builds * result and package manager accepted proposals * fun one about Swift haiku * Added Bruno Rocha’s blog post * Grammar fixes * * fixes from Bas * started tasks * some commits and PR from Swift github * Grammar and typos * SE-0237 was accepted with modifications * Added very interesting discussion about future after ABI * * added SwiftRewriter * videos from FunSwift * new proposal PR * merged PR * Removing vidoes from Functional Swift conference. Might include approriate ones to the next one. * Update 2018-12-13-issue-124.md * PAT to Protocol with Associated Types * Update 2018-12-13-issue-124.md * Move to posts --- _drafts/2018-12-13-issue-124.md | 60 --------------- _posts/2018-12-13-issue-124.md | 129 ++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 60 deletions(-) delete mode 100644 _drafts/2018-12-13-issue-124.md create mode 100644 _posts/2018-12-13-issue-124.md diff --git a/_drafts/2018-12-13-issue-124.md b/_drafts/2018-12-13-issue-124.md deleted file mode 100644 index 8fff8fb4..00000000 --- a/_drafts/2018-12-13-issue-124.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -layout: post -title: ! 'Issue #124' -author: fassko -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Swift Unwrapped - -> TODO: Latest episode(s) of Swift Unwrapped - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -[SE-0236](https://github.com/apple/swift-evolution/blob/master/proposals/0236-package-manager-platform-deployment-settings.md): *Package Manager Platform Deployment Settings* was [accepted](https://forums.swift.org/t/accepted-with-modifications-se-0236-package-manager-platform-deployment-settings/18420). - -> There was a lot of negative feedback about the platform restrictions part of the proposal, so the SwiftPM code owners decided to accept a revised version of the proposal which only handles customization of deployment targets. The topic of platform restrictions for packages can be revisited separately at a later time. -> -> For specifying custom deployment versions, the original proposal mentions that an initializer will be provided. However, since that would be too verbose, a string overload will be provided instead. This makes the API `.macOS("10.13")` instead of `.macOS(MacOSVersion("10.13"))`. - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2018-12-13-issue-124.md b/_posts/2018-12-13-issue-124.md new file mode 100644 index 00000000..10717117 --- /dev/null +++ b/_posts/2018-12-13-issue-124.md @@ -0,0 +1,129 @@ +--- +layout: post +title: ! 'Issue #124' +author: fassko +--- + +Welcome to issue 123 of the Weekly Brief! This is my first issue as an author. I have always been amazed by the Swift community and open source. + +[Three years ago today](https://twitter.com/SwiftLang/status/672556073362960384), Swift was open sourced. What a journey it has been! + +A lot has happened in the Swift community and it seems that team wants to finish all the tasks before the New Year - accepting the [Result proposal](https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md) and [publishing](https://twitter.com/mishaldshah/status/1070048389893505024) [Swift 5.0 nightly builds](https://swift.org/download/#snapshots). + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-8728](https://bugs.swift.org/browse/SR-8728) [Compiler] Add note about conditional conformance to `RandomAccessCollection` docs +- [SR-8513](https://bugs.swift.org/browse/SR-8513) [Compiler] Confusing error messages for interactions between same-name types from different modules + +### Swift Unwrapped + +Jesse and JP [explored](https://spec.fm/podcasts/swift-unwrapped/234517) the famous [Result proposal](https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md), discussing its pros and cons. + +### News and community + +The Swift Server Work Group had a meeting. Not only did they add new members, but they also [discussed some important topics](https://forums.swift.org/t/november-29th-2018/18400) such as Docker updates, Crypto, HTTP Client improvements and more. + +[Yasuhiro Inami](https://twitter.com/inamiy) announced [SwiftRewriter](https://github.com/inamiy/SwiftRewriter), a composable Swift code formatter on top of [SwiftSyntax](https://github.com/apple/swift-syntax). + +[Bruno Rocha](https://twitter.com/rockthebruno) explored [how `@dynamicMemberLookup` Works Internally in Swift (+ Creating Custom Swift Attributes)](https://swiftrocks.com/how-dynamicmemberlookup-works-internally-in-swift.html) + +[Ole Begemann](https://twitter.com/olebegemann) investigated how to [split a Swift Sequence into head and tail](https://oleb.net/2018/sequence-head-tail/) in Swift 4.2 and why it will break in Swift 5 because of [SE-0234](https://github.com/apple/swift-evolution/blob/master/proposals/0234-remove-sequence-subsequence.md). + +Amazon has open sourced [`smoke-framework`](https://github.com/amzn/smoke-framework), a lightweight server-side service framework written in Swift and using [SwiftNIO](https://github.com/apple/swift-nio) for its networking layer. + +### Commits and pull requests + +[Michael Ilseman](https://github.com/milseman) merged [a pull request](https://github.com/apple/swift/pull/21178) which allows to access the raw UTF-8 code units backing a String thanks to `String.UTF8View.withContiguousStorageIfAvailable` hook. + +[Slava Pestov](https://github.com/slavapestov) merged [a pull request](https://github.com/apple/swift/pull/21155) that fixes converting a metatype to a readable string when the metatype is for a function type with a single tuple type argument. Related to [SR-8235](https://bugs.swift.org/browse/SR-8235). + +[Joe Groff](https://github.com/jckarter) merged [a pull request](https://github.com/apple/swift/pull/21102) that provides ABI space for source location info in unconditional casts. + +[Harlan Haskins](https://github.com/harlanhaskins) merged [a pull request](https://github.com/apple/swift/pull/21033) that consolidates the functions used to check accessors versus other declarations, and makes sure we check setter access as well as regular declaration access. This also resolves [SR-8969](https://bugs.swift.org/browse/SR-8969). + +### Accepted proposals + +[SE-0235](https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md): *Add Result to the Standard Library* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0235-add-result-to-the-standard-library/18603). + +> The Core Team acknowledges the call from several reviewers to make a special effort to communicate how we think `Result` ought to be used in Swift. We absolutely agree that is an important part of adding `Result` to the language, and we intend to provide this guidance as part of the release. +> +> Although we are revising the proposal again, the Core Team feels that these issues have already received adequate review, and there is no need for a third round of review. Accordingly, SE-0235 has been Accepted with Modifications. + +[SE-0236](https://github.com/apple/swift-evolution/blob/master/proposals/0236-package-manager-platform-deployment-settings.md): *Package Manager Platform Deployment Settings* was [accepted](https://forums.swift.org/t/accepted-with-modifications-se-0236-package-manager-platform-deployment-settings/18420). + +> There was a lot of negative feedback about the platform restrictions part of the proposal, so the SwiftPM code owners decided to accept a revised version of the proposal which only handles customization of deployment targets. The topic of platform restrictions for packages can be revisited separately at a later time. +> +> For specifying custom deployment versions, the original proposal mentions that an initializer will be provided. However, since that would be too verbose, a string overload will be provided instead. This makes the API `.macOS("10.13")` instead of `.macOS(MacOSVersion("10.13"))`. + +[SE-0238](https://github.com/apple/swift-evolution/blob/master/proposals/0238-package-manager-build-settings.md): *Package Manager Target Specific Build Settings* was [accepted](https://forums.swift.org/t/accepted-with-modifications-se-0238-package-manager-target-specific-build-settings/18590). + +> This is a proposal for adding support for declaring some commonly used target-specific build settings in the `Package.swift` manifest file. As the name suggests, target-specific build settings are only applied to a particular target. SwiftPM also aims to support cross-target build settings that go across the target boundary and impart certain settings on a target's dependees, but this proposal is only concerned with the former type of build settings and the latter will be explored with a future proposal. + +[SE-0237](https://github.com/apple/swift-evolution/blob/master/proposals/0237-contiguous-collection.md) *Introduce `withContiguous{Mutable}StorageIfAvailable` methods* was [returned for revision](https://forums.swift.org/t/review-2-of-se-0237-introduce-withunsafe-mutable-bufferpointerifsupported-methods/18418) and later [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0237-introduce-with-contiguous-mutable-storage-if-available-methods/18713). + +> The Core Team felt that the use of inout for the closure parameter of `withUnsafeMutableBufferPointer(IfSupported)` was the best available option, and noted that the library could verify that the `UnsafeMutableBufferPointer` itself wasn't directly modified by checking for the expected base address / count after the call. This limits the chance of confusion without resorting to shadowing or excessive overloading of mutating operations. +> +> The two proposed protocols (`ContiguousCollection` and `MutableContiguousCollection`) aren't used in any algorithms within the library. It is not clear that they are important enough to introduce as protocols into the Standard Library at this time. The Core Team would like to consider a revised proposal that does not introduce these protocols. +> +> There are use cases for a `Sequence` equivalent to the proposed `withUnsafeMutableBufferPointerIfSupported`, such as initializing a String from a `Sequence` of UTF-8 code points that are (e.g.) stored in a `Data`. The Core Team would like to see this addition to the `Sequence` protocol, which would allow `Sequence` clients to optimize for the contiguously-stored case without requiring a new protocol, much as the proposal already allows `MutableCollection` clients to optimize for the contiguously-stored mutable case. + +--- + +> The revised proposal shows the changes, which are: +> +> - `Sequence` will have a new (defaulted) requirement `withContiguousStorageIfAvailable`, and +> - `MutableCollection` will have a new (defaulted) requirement `withContiguousMutableStorageIfAvailable`. + +### Proposals in review + +> TODO + +### Swift Forums + +Amazon recently introduced the Lambda Runtime API to use with any programming language. [Ted Kremenek](https://twitter.com/tkremenek) agrees [that this is a big step](https://forums.swift.org/t/aws-lambda-runtime-api/18498/4) for the Swift on the Server ecosystem. + +`Async`/`Await` is not yet implemented, but there's already a few of [ideas how to improve it](https://forums.swift.org/t/proposal-to-add-cancellation-abilities-for-async-await/18419) by adding cancellation abilities. + +> The motivation is to provide a consistent and simple API to cancel asynchronous tasks. My theory (seemingly shared by some) is that supporting cancellation is too much trouble for many programmers, because it is a bit involved and the app may still basically work without it. But performance will likely suffer. With this proposal cancellation becomes a simple task so is much more likely to be implemented by app developers. + +The SwiftNIO team wants to change the [TLS implementation used by `swift-nio-ssl`](https://forums.swift.org/t/rfc-moving-swiftnio-ssl-to-boringssl/18280). + +> We propose to change `swift-nio-ssl` to stop linking against the system copy of `libssl`, and instead to provide a vendored copy of `BoringSSL`. This change would come with a number of subtle runtime behavioural changes, as well as a number of substantially more disruptive changes around application distribution and OS behavior. +> +> The proposed change would drop support for `OpenSSL` and `LibreSSL`. The reasoning for this choice is discussed later in the proposal, and is not necessarily mandatory. +> +> Note that for Apple platforms the recommended TLS solution will still be to use `swift-nio-transport-services`. + +Last week, [JP Simard](https://twitter.com/simjp) wrote how slow SwiftSyntax is. The Swift team has [heard it](https://forums.swift.org/t/speeding-up-swiftsyntax-by-using-the-parser-directly/18493). + +> Providing direct access to the parser speeds up SwiftSyntax 8x, and it becomes 2x faster than the legacy sourcekitd syntactic request + +We all know [Mattt](https://twitter.com/mattt)'s [obsession of Strings](https://www.youtube.com/watch?v=8pnHolNHD2Y), this time pitching [Unicode Named Character Escape Sequence](https://forums.swift.org/t/pitch-unicode-named-character-escape-sequence/18396). + +> This proposal adds a new `\N{name}` escape sequence to Swift string literals, where name is the name of a Unicode character. +> +> Each Unicode character is assigned a unique code point, a number between `U+0000` — `U+10FFFF`, and a name, consisting of uppercase letters (A–Z), digits (0–9), hyphens, and spaces. For example, the Unicode character for the letter “A” used in English has the code point `U+0041` and the name `LATIN CAPITAL LETTER A`. The term scalar value defines the subset of Unicode code points that aren’t surrogate pairs. +> +> In Swift, a string literal may include a character directly ("A") or using the `\u{n}` escape sequence, where n is a 1–8 digit hexadecimal number corresponding to the scalar value (`"\u{0041}"`). A string literal may also include character by interpolation (`let letterA = "\u{0041}"; "\(letterA)"`). + +A discussion has arisen about [KeyPaths for Tuples in Swift 5](https://forums.swift.org/t/keypaths-tuples-and-swift-5/18465). + +> .. finding out that `\SomeType.aTuple.0` does not work .. +> +> I think this would be a great starter project. The runtime ABI for keypaths should not need any modification to handle tuple components, so there's no rush to implement this. There's an [ABI document](https://github.com/apple/swift/blob/master/docs/ABI/KeyPaths.md) that describes the layout of key path objects; the details are somewhat out of date, but the high level structure is the same + +Very interesting discussion about [Diagnostics and Type Inference after ABI stability](https://forums.swift.org/t/after-abi-stability-will-diagnostics-and-type-inference-get-some-love/18685). + +> Two things I really wish would improve are diagnostics and type inference, in particular when it comes to closures and generics. (I'm beginning to accept the limitations on protocols with associated types). +> +> 1. What would be the process to fix such basic annoyances? +> 2. Was the focus on ABI stability the main reason for why these issues still exist? +> 3. What will be the Swift evolution focus after ABI stability? + +### Finally + +Can we write poetry and haikus about Swift? [Yes we can](https://twitter.com/twostraws/status/1070408833321836545)! From e60fc61416c5dd10afb8f3838557ffb5dd57c440 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 13 Dec 2018 20:24:57 +0100 Subject: [PATCH 067/589] Update 2018-12-13-issue-124.md --- _posts/2018-12-13-issue-124.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-12-13-issue-124.md b/_posts/2018-12-13-issue-124.md index 10717117..4e75f199 100644 --- a/_posts/2018-12-13-issue-124.md +++ b/_posts/2018-12-13-issue-124.md @@ -4,7 +4,7 @@ title: ! 'Issue #124' author: fassko --- -Welcome to issue 123 of the Weekly Brief! This is my first issue as an author. I have always been amazed by the Swift community and open source. +Welcome to issue 124 of the Weekly Brief! This is my first issue as an author. I have always been amazed by the Swift community and open source. [Three years ago today](https://twitter.com/SwiftLang/status/672556073362960384), Swift was open sourced. What a journey it has been! From 073b1e50fd595aa07c3da97818d228f40e2f047b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 13 Dec 2018 20:26:25 +0100 Subject: [PATCH 068/589] Add issue 125 draft --- _drafts/2019-01-10-issue-125.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-01-10-issue-125.md diff --git a/_drafts/2019-01-10-issue-125.md b/_drafts/2019-01-10-issue-125.md new file mode 100644 index 00000000..ceb4da29 --- /dev/null +++ b/_drafts/2019-01-10-issue-125.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #125' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From f243076e7701fee2023cf3dd7576a134c3968cdd Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Thu, 13 Dec 2018 12:53:36 -0800 Subject: [PATCH 069/589] Update 2018-12-13-issue-124.md (#433) --- _posts/2018-12-13-issue-124.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/_posts/2018-12-13-issue-124.md b/_posts/2018-12-13-issue-124.md index 4e75f199..8ee0f0bf 100644 --- a/_posts/2018-12-13-issue-124.md +++ b/_posts/2018-12-13-issue-124.md @@ -78,10 +78,6 @@ Amazon has open sourced [`smoke-framework`](https://github.com/amzn/smoke-framew > - `Sequence` will have a new (defaulted) requirement `withContiguousStorageIfAvailable`, and > - `MutableCollection` will have a new (defaulted) requirement `withContiguousMutableStorageIfAvailable`. -### Proposals in review - -> TODO - ### Swift Forums Amazon recently introduced the Lambda Runtime API to use with any programming language. [Ted Kremenek](https://twitter.com/tkremenek) agrees [that this is a big step](https://forums.swift.org/t/aws-lambda-runtime-api/18498/4) for the Swift on the Server ecosystem. From f7ce7db8cfeb48aaf223b8b7849ebf0a6abe4699 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 5 Jan 2019 19:48:12 +0100 Subject: [PATCH 070/589] Run bundle update --- Gemfile.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1422a7c0..ef38c739 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,10 +22,10 @@ GEM colorize (0.8.1) commonmarker (0.17.13) ruby-enum (~> 0.5) - concurrent-ruby (1.1.3) + concurrent-ruby (1.1.4) cork (0.3.0) colored2 (~> 3.1) - danger (5.10.1) + danger (5.11.0) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -107,7 +107,7 @@ GEM octokit (~> 4.0) public_suffix (~> 2.0) typhoeus (~> 1.3) - html-pipeline (2.9.1) + html-pipeline (2.9.2) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) @@ -224,7 +224,7 @@ GEM rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) mercenary (0.3.6) - mini_portile2 (2.3.0) + mini_portile2 (2.4.0) minima (2.5.0) jekyll (~> 3.5) jekyll-feed (~> 0.9) @@ -233,8 +233,8 @@ GEM multipart-post (2.0.0) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.8.5) - mini_portile2 (~> 2.3.0) + nokogiri (1.10.0) + mini_portile2 (~> 2.4.0) octokit (4.13.0) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) @@ -242,15 +242,15 @@ GEM forwardable-extended (~> 2.6) public_suffix (2.0.5) rb-fsevent (0.10.3) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) + rb-inotify (0.10.0) + ffi (~> 1.0) rouge (2.2.1) ruby-enum (0.7.2) i18n ruby_dep (1.5.0) rubyzip (1.2.2) safe_yaml (1.0.4) - sass (3.7.2) + sass (3.7.3) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) @@ -265,7 +265,7 @@ GEM ethon (>= 0.9.0) tzinfo (1.2.5) thread_safe (~> 0.1) - unicode-display_width (1.4.0) + unicode-display_width (1.4.1) PLATFORMS ruby From f99ebe106c0957f4999eba6a2439b8c90a194a73 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 5 Jan 2019 20:03:26 +0100 Subject: [PATCH 071/589] Update sponsorship.md --- sponsorship.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index c92483ab..ee8c8204 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,9 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
|   Issue |   Status | |:-|:-| -| 29 November | Open | -| 13 December | Open | -| 27 December | Open | | 10 January | Open | | 24 January | Open | | 07 February | Open | From fc01948e4d2dc2c42fee5d8991570a4fdd6d092f Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 5 Jan 2019 20:07:42 +0100 Subject: [PATCH 072/589] Fill the draft a bit --- _drafts/2019-01-10-issue-125.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/_drafts/2019-01-10-issue-125.md b/_drafts/2019-01-10-issue-125.md index ceb4da29..4c111794 100644 --- a/_drafts/2019-01-10-issue-125.md +++ b/_drafts/2019-01-10-issue-125.md @@ -17,7 +17,10 @@ sponsor: ### Starter tasks -> TODO +- [SR-9466](https://bugs.swift.org/browse/SR-9466) [Compiler] Redo AssignInst lowering in DI +- [SR-9482](https://bugs.swift.org/browse/SR-9482) [ClangImporter] Swift's filtering of "header guard" macros is too strict +- [SR-9557](https://bugs.swift.org/browse/SR-9557) [IRGen] Objective-C property description includes ivar name even when getters and setters are non-trivial +- [SR-9558](https://bugs.swift.org/browse/SR-9558) [SwiftPM] Improve error message when test directory is missing ### Swift Unwrapped @@ -29,7 +32,7 @@ sponsor: ### Commits and pull requests -> TODO +[David Smith](https://twitter.com/Catfish_Man) merged [a pull request](https://github.com/apple/swift/pull/21235) improving `NSDictionary` to `Swift.Dictionary` bridging! 🎉 ### Accepted proposals @@ -45,12 +48,22 @@ sponsor: ### Proposals in review -> TODO +[SE-0239](https://github.com/apple/swift-evolution/blob/master/proposals/0239-codable-range.md): *Add Codable conformance to Range types* is [under review](https://forums.swift.org/t/se-0239-add-codable-conformance-to-range-types/18794). + +> [SE-0167](https://github.com/apple/swift-evolution/blob/master/proposals/0167-swift-encoders.md) introduced `Codable` conformance for some types in the standard +library, but not the `Range` family of types. This proposal adds that +conformance. +> +> `Range` is a very useful type to have conform to `Codable`. A good usage example is a range being sent to/from a client/server to convey a range of time using `Date`, or a safe operating temperature range using `Measurement`. ### Swift Forums -> TODO +[Ravi Kandhadai Madhavan](https://twitter.com/rkandhad) wrote [about](https://forums.swift.org/t/improving-os-log-using-custom-string-interpolation-and-compile-time-interpretation/18799) improving Swift APIs for Apple's [unified logging systems](https://developer.apple.com/videos/play/wwdc2016/721/). + +> We propose to change the Swift APIs for the Apple's unified logging system (namely, `os_log` and `os_signpost`) +to accept string interpolations instead of the printf-style format string and varargs combination that they currently accept. +This means Swift users can pass in string interpolations to the logging functions e.g. like `osLog("Fatal Error \(errno)")`. ### Finally -> TODO: something funny/fun. tweet, link, etc. +It's not only programming languages that are hard... [or is it](https://twitter.com/jckarter/status/1075156018198265856)? From 46fb08797c2cc25071c0c89a54b3453694cd616b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 9 Jan 2019 20:59:45 +0100 Subject: [PATCH 073/589] Run bundle update --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ef38c739..7d301687 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GEM concurrent-ruby (1.1.4) cork (0.3.0) colored2 (~> 3.1) - danger (5.11.0) + danger (5.11.1) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -52,7 +52,7 @@ GEM multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) - ffi (1.9.25) + ffi (1.10.0) forwardable-extended (2.6.0) gemoji (3.0.0) git (1.5.0) @@ -107,7 +107,7 @@ GEM octokit (~> 4.0) public_suffix (~> 2.0) typhoeus (~> 1.3) - html-pipeline (2.9.2) + html-pipeline (2.10.0) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) From 760ee825e647a24521ea0548928c2a6745737866 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 9 Jan 2019 21:20:36 +0100 Subject: [PATCH 074/589] Add more news --- _drafts/2019-01-10-issue-125.md | 43 +++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/_drafts/2019-01-10-issue-125.md b/_drafts/2019-01-10-issue-125.md index 4c111794..de365802 100644 --- a/_drafts/2019-01-10-issue-125.md +++ b/_drafts/2019-01-10-issue-125.md @@ -2,14 +2,9 @@ layout: post title: ! 'Issue #125' author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO --- -> TODO: intro comments +Hello all, and a belated happy New Year! May 2019 be a wonderful year to all of you... and Swift! @@ -24,27 +19,21 @@ sponsor: ### Swift Unwrapped -> TODO: Latest episode(s) of Swift Unwrapped +Jesse and JP [discussed](https://spec.fm/podcasts/swift-unwrapped/246766) SourceKit-LSP (Language Server Protocol), an implementation of the LSP for Swift and C-based languages. ### News and community -> TODO +[Saleem Abdulrasool](https://twitter.com/compnerd) shared [nightly builds for Swift on Windows](https://forums.swift.org/t/windows-nightlies/19174)! "This has sufficient bits built and packaged to be semi-usable"; a job well done! + +[John McCall](https://twitter.com/pathofshrines) shared [some interesting thoughts](https://twitter.com/pathofshrines/status/1074382960420368384) on open source language project management that is valid for Swift. ### Commits and pull requests [David Smith](https://twitter.com/Catfish_Man) merged [a pull request](https://github.com/apple/swift/pull/21235) improving `NSDictionary` to `Swift.Dictionary` bridging! 🎉 -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/21370) that enables shadowing for type lookups, which allows for Swift's `Result` not to cause any source-breaking changes as a result (no pun intended)! -### Rejected proposals - -> TODO +[Bruno Rocha](https://twitter.com/rockthebruno) merged [a pull request](https://github.com/apple/sourcekit-lsp/pull/24) that allows folding code structures for the Swift Language Server Protocol. ### Proposals in review @@ -64,6 +53,24 @@ conformance. to accept string interpolations instead of the printf-style format string and varargs combination that they currently accept. This means Swift users can pass in string interpolations to the logging functions e.g. like `osLog("Fatal Error \(errno)")`. +[Johannes Weiss](https://twitter.com/johannesweiss) shared [a revised proposal pitch](https://forums.swift.org/t/feedback-server-logging-api-with-revisions/19375) for the Swift Server logging API. + +> We have integrated most of the feedback from the discussion thread so even if you have read the previous version, you will find some changes that you hopefully agree with. To highlight a few of the major changes: +> +> - Logging metadata is now structures and now supports nested dictionaries and list values, in addition to strings of course. +> - only locally relevant metadata can now be passed to the individual log methods. +> - ship a multiplex logging solution with the API package +> +> The feedback model will be very similar to the one known from Swift Evolution. The community is asked to provide feedback in the way outlined below and after the review period finishes, the SSWG will -- based on the community feedback -- decide whether to promote the proposal to the [Sandbox](https://github.com/swift-server/sswg/blob/master/process/incubation.md#process-diagram) maturity level or not. + +[Ben Langmuir](https://twitter.com/benlangmuir) shared [some thoughts](https://forums.swift.org/t/rfc-building-swift-packages-in-build-script/18920) on building, testing and installing Swift packages. + +> We have a number of SwiftPM packages (swift-syntax, sourcekitd stress tester, and now SourceKit-LSP) that we want to be able to build, test and install along with the rest of the Swift toolchain in continuous integration and packaging infrastructure. I started looking into this to add sourcekit-lsp to Swift CI, and I ran into a number of difficulties. The key challenge is that we want to build and run these packages using the just-built toolchain, including the compiler, package manager, and corelibs, but our tooling is not setup well for that. The rest of this post dives into what the problems are and how I propose we tackle them. + +[Scott Perry](https://twitter.com/numist) pitched [a proposal](https://forums.swift.org/t/ordered-collection-diffing/18933) for "diffing" of ordered collections. + +> I'd like to pitch the formalization of ordered collections as well as the addition of diffing functionality and related types necessary to provide easy creation, representation, and application of ordered collection state transitions. + ### Finally It's not only programming languages that are hard... [or is it](https://twitter.com/jckarter/status/1075156018198265856)? From 67410723d840c7f28da44953405702d7a46669d2 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 10 Jan 2019 17:50:48 +0100 Subject: [PATCH 075/589] Move issue 125 to posts (#434) * Move issue 125 to posts * Add some last pull requests --- {_drafts => _posts}/2019-01-10-issue-125.md | 7 +++++++ 1 file changed, 7 insertions(+) rename {_drafts => _posts}/2019-01-10-issue-125.md (89%) diff --git a/_drafts/2019-01-10-issue-125.md b/_posts/2019-01-10-issue-125.md similarity index 89% rename from _drafts/2019-01-10-issue-125.md rename to _posts/2019-01-10-issue-125.md index de365802..b858514c 100644 --- a/_drafts/2019-01-10-issue-125.md +++ b/_posts/2019-01-10-issue-125.md @@ -35,6 +35,13 @@ Jesse and JP [discussed](https://spec.fm/podcasts/swift-unwrapped/246766) Source [Bruno Rocha](https://twitter.com/rockthebruno) merged [a pull request](https://github.com/apple/sourcekit-lsp/pull/24) that allows folding code structures for the Swift Language Server Protocol. +[Argyrios Kyrtzidis](https://twitter.com/akyrtzi) merged [a pull request](https://github.com/apple/swift/pull/21762) exposing parser details as a C API, allowing Swift clients, such as SwiftSyntax, to reuse compiler logics in-process. +That then gives a significant performance gain for syntax tree generation by avoiding any forms of cross-process serialization. 🏎 + +[Pavel Yaskevich](https://twitter.com/pyaskevich) merged [a pull request](https://github.com/apple/swift/pull/21756) diagnosing missing members via the new diagnostics framework. + +[Suyash Srijan](https://twitter.com/suyashsrijan) merged [a pull request](https://github.com/apple/swift/pull/21621) that adds a warning if usage of a `.none` enum case is ambiguous. + ### Proposals in review [SE-0239](https://github.com/apple/swift-evolution/blob/master/proposals/0239-codable-range.md): *Add Codable conformance to Range types* is [under review](https://forums.swift.org/t/se-0239-add-codable-conformance-to-range-types/18794). From 68f55a3d9e66cb10bbdb71f1191c9ccff3bd2b68 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 12 Jan 2019 00:17:07 +0100 Subject: [PATCH 076/589] Push initial 126 draft --- _drafts/2018-01-24-issue-126.md | 62 +++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 _drafts/2018-01-24-issue-126.md diff --git a/_drafts/2018-01-24-issue-126.md b/_drafts/2018-01-24-issue-126.md new file mode 100644 index 00000000..779da4b8 --- /dev/null +++ b/_drafts/2018-01-24-issue-126.md @@ -0,0 +1,62 @@ +--- +layout: post +title: ! 'Issue #126' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Swift Unwrapped + +> TODO: Latest episode(s) of Swift Unwrapped + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +[SE-0239](https://github.com/apple/swift-evolution/blob/master/proposals/0239-codable-range.md): *Add `Codable` conformance to `Range` types* was [accepted](https://forums.swift.org/t/se-0239-add-codable-conformance-to-range-types/18794/50). + +> Thank you everyone for the very insightful feedback provided during this review. It provided some great insights into the Swift's community uses and desires on Codable. +> +> Regarding the proposal itself, the Core Team has decided to accept it, with the proposal amended to include the details of the encoding format chosen. The data encoding chosen is an important semantic invariant of the API that is potentially observable by users and important for binary compatibility. Future proposals like this one that discuss adopting `Codable` should include details — and when necessary — rationale on the encoding chosen. Further, it would be valuable if the current chosen encodings for Standard Library types were also documented so that users using the default encodings for those types can either rely upon those encodings or know when they need to customize their encoding logic for a specific task. +> +> In addition, the Core Team decided to extend the proposal to include Codable conformance for ContiguousArray, which was similarly missing from the Standard Library. This felt like a case that required no additional review discussion. + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 52ec14a209b62240f29d92ff717ac102563283b5 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 12 Jan 2019 20:41:44 +0100 Subject: [PATCH 077/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7d301687..4dcb1342 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -44,7 +44,7 @@ GEM em-websocket (0.5.1) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) - ethon (0.11.0) + ethon (0.12.0) ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) From 066a4f5bf690921dbd9d2209ea9bc711f56b7e56 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 23 Jan 2019 18:04:12 +0100 Subject: [PATCH 078/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4dcb1342..65d89ed8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -233,7 +233,7 @@ GEM multipart-post (2.0.0) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.10.0) + nokogiri (1.10.1) mini_portile2 (~> 2.4.0) octokit (4.13.0) sawyer (~> 0.8.0, >= 0.5.3) @@ -280,4 +280,4 @@ DEPENDENCIES octokit BUNDLED WITH - 1.17.1 + 2.0.1 From 1478a981befe9011610f9ce10f158f7aae7ca271 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 23 Jan 2019 19:26:27 +0100 Subject: [PATCH 079/589] Update new draft to include the Swift Community Podcast --- new_draft.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/new_draft.sh b/new_draft.sh index 8b30e877..1c2b616a 100755 --- a/new_draft.sh +++ b/new_draft.sh @@ -64,9 +64,9 @@ sponsor: > TODO -### Swift Unwrapped +### Podcasts -> TODO: Latest episode(s) of Swift Unwrapped +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast ### News and community From 51d45db9580203eca802e98ce6315c054c14fd68 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 23 Jan 2019 19:26:47 +0100 Subject: [PATCH 080/589] Finish the draft for issue 126 --- _drafts/2018-01-24-issue-126.md | 62 ----------------- _drafts/2019-01-24-issue-126.md | 114 ++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 62 deletions(-) delete mode 100644 _drafts/2018-01-24-issue-126.md create mode 100644 _drafts/2019-01-24-issue-126.md diff --git a/_drafts/2018-01-24-issue-126.md b/_drafts/2018-01-24-issue-126.md deleted file mode 100644 index 779da4b8..00000000 --- a/_drafts/2018-01-24-issue-126.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -layout: post -title: ! 'Issue #126' -author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Swift Unwrapped - -> TODO: Latest episode(s) of Swift Unwrapped - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -[SE-0239](https://github.com/apple/swift-evolution/blob/master/proposals/0239-codable-range.md): *Add `Codable` conformance to `Range` types* was [accepted](https://forums.swift.org/t/se-0239-add-codable-conformance-to-range-types/18794/50). - -> Thank you everyone for the very insightful feedback provided during this review. It provided some great insights into the Swift's community uses and desires on Codable. -> -> Regarding the proposal itself, the Core Team has decided to accept it, with the proposal amended to include the details of the encoding format chosen. The data encoding chosen is an important semantic invariant of the API that is potentially observable by users and important for binary compatibility. Future proposals like this one that discuss adopting `Codable` should include details — and when necessary — rationale on the encoding chosen. Further, it would be valuable if the current chosen encodings for Standard Library types were also documented so that users using the default encodings for those types can either rely upon those encodings or know when they need to customize their encoding logic for a specific task. -> -> In addition, the Core Team decided to extend the proposal to include Codable conformance for ContiguousArray, which was similarly missing from the Standard Library. This felt like a case that required no additional review discussion. - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_drafts/2019-01-24-issue-126.md b/_drafts/2019-01-24-issue-126.md new file mode 100644 index 00000000..ae817c47 --- /dev/null +++ b/_drafts/2019-01-24-issue-126.md @@ -0,0 +1,114 @@ +--- +layout: post +title: ! 'Issue #126' +author: btb +--- + +Last week we saw the introduction of a new [Swift Community Podcast](https://www.swiftcommunitypodcast.org). +The podcast is set up in a similar way (and inspired by) this very Newsletter, +fostering the Swift Community, encouraging anyone to help out. + +I think this is a really exciting project and am looking forward to seeing the +Swift community bring it to life! + +And without further ado, here is an update on the last two weeks in Swift open +source. + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-9670](https://bugs.swift.org/browse/SR-9670) [Compiler] Driver should accept `-serialize-diagnostics-path` for the interpret mode +- [SR-9677](https://bugs.swift.org/browse/SR-9677) [Comiler] Using break with unresolved label inside loops produces misleading diagnostic + +### Podcasts + +John, Garric and Chris [introduce](https://www.swiftcommunitypodcast.org/episodes/1) the Swift Community podcast, talking about its concept and their first impressions of Swift. + +### News and community + +[Jeremy Howard](https://twitter.com/jeremyphoward) finished [a research project](https://www.fast.ai/2019/01/10/swift-numerics/) trying to answer the question: is Swift a good language for high performance numeric programming in Mac and Linux? + +> I think this has the potential to be great for data science. + +[Joe Groff](https://twitter.com/jckarter) shared [a prototype implementation](https://forums.swift.org/t/opaque-result-types/15645/250) of opaque result types. + +### Commits and pull requests + +[Arnold Schwaighofer](https://github.com/aschwaighofer) merged [a pull request](https://github.com/apple/swift/pull/21933) that has non-escaping context allocated on the stack. + +[John McCall](https://twitter.com/pathofshrines) merged [a pull request](https://github.com/apple/swift/pull/21932) that combines two code paths, fixing an edge case neither one could handle. 🎉 + +### Accepted proposals + +[SE-0239](https://github.com/apple/swift-evolution/blob/master/proposals/0239-codable-range.md): *Add `Codable` conformance to `Range` types* was [accepted](https://forums.swift.org/t/se-0239-add-codable-conformance-to-range-types/18794/50). + +> Thank you everyone for the very insightful feedback provided during this review. It provided some great insights into the Swift's community uses and desires on Codable. +> +> Regarding the proposal itself, the Core Team has decided to accept it, with the proposal amended to include the details of the encoding format chosen. The data encoding chosen is an important semantic invariant of the API that is potentially observable by users and important for binary compatibility. Future proposals like this one that discuss adopting `Codable` should include details — and when necessary — rationale on the encoding chosen. Further, it would be valuable if the current chosen encodings for Standard Library types were also documented so that users using the default encodings for those types can either rely upon those encodings or know when they need to customize their encoding logic for a specific task. +> +> In addition, the Core Team decided to extend the proposal to include `Codable` conformance for `ContiguousArray`, which was similarly missing from the Standard Library. This felt like a case that required no additional review discussion. + +### Proposals in review + +[SE-0240](https://github.com/apple/swift-evolution/blob/master/proposals/0240-ordered-collection-diffing.md): *Ordered Collection Diffing* is [under review](https://forums.swift.org/t/se-0240-ordered-collection-diffing/19514). + +> This proposal describes additions to the standard library that provide an interchange format for diffs as well as diffing/patching functionality for ordered collection types. +> +> Representing, manufacturing, and applying transactions between states today requires writing a lot of error-prone code. This proposal is inspired by the convenience of the `diffutils` suite when interacting with text files, and the reluctance to solve similar problems in code with `libgit2`. +> +> Many state management patterns would benefit from improvements in this area, including undo/redo stacks, generational stores, and syncing differential content to/from a service. + +### Swift Forums + +[Stephen Celis](https://twitter.com/stephencelis) and [Greg Titus](https://twitter.com/gregtitus) shared [a proposal pitch](https://forums.swift.org/t/key-path-expressions-as-functions/19587) to allow key path expressions as functions. + +> One-off closures that traverse from a root type to a value are common in Swift. Consider the following `User` struct: + +{% highlight swift %} +struct User { + let email: String + let isAdmin: Bool +} +{% endhighlight %} + +> Applying `map` allows the following code to gather an array of emails from a source user array: + +{% highlight swift %} +users.map { $0.email } +{% endhighlight %} + +> Similarly, `filter` can collect an array of admins: + +{% highlight swift %} +users.filter { $0.isAdmin } +{% endhighlight %} + +> These ad hoc closures are short and sweet but Swift already has a shorter and sweeter syntax that can describe this: key paths. + +[Loïc Lecrenier]() shared [a pitch](https://forums.swift.org/t/support-for-fuzz-testers-in-swift-packages/19494) to support fuzz testers for Swift packages. + +> Recently, I wrote a coverage-guided Swift [fuzzer](https://github.com/loiclec/FuzzCheck) similar to `libFuzzer`, but I found that SwiftPM did not allow me to specify the build settings I needed, and I had to fork SwiftPM to make my project work. +> +> Using a coverage-guided fuzzer requires the tested targets to be instrumented with LLVM’s [SanitizerCoverage](https://clang.llvm.org/docs/SanitizerCoverage.html), which is kind of possible to do now with the option `-sanitize=fuzzer` when using a development version of `swiftc`. And it is possible to add that option to a package because SwiftPM supports custom build settings thanks to [SE-0238](https://github.com/apple/swift-evolution/blob/master/proposals/0238-package-manager-build-settings.md), but only for targets that are declared in the root package, not for targets declared in a dependency. +> +> Moreover, instrumenting a target makes its resulting binary unfit to be used for any other purpose than fuzzing, so I believe it would be best to isolate the products of a “fuzzing” build by using a separate build configuration than debug or release. + +[Saleem Abdulrasool](https://twitter.com/compnerd) shared [a progress update](https://forums.swift.org/t/swift-corelibs-foundation-windows-and-build-option-defaults-recommendations/19463) on Swift for Windows. + +> Working my way through the `swift-corelibs-foundation` for Windows, I think I have gotten to the point where I believe that the last items preventing Windows support for Foundation can now be enumerated: +> +> - Porting the remaining interfaces in Process, Thread, FileManager, and Host +> - Fixing the VWT handling for ForeignClassMetadata strategy +> - Fixing protocol witness table emission to be exported from the standard library +> - Identifying the desired behaviours for curl/libxml2 linkage +> +> The first three are more technical, the implementation for the interfaces just need someone dedicated enough to work through the surface and with some time. The second would be something that is more involved, the third is just a bug. +> +> [..] For those interested in the rest of the Windows port, especially those interested in helping getting Foundation running on Windows, do checkout the [work in progress pull request](https://github.com/apple/swift-corelibs-foundation/pull/1812). I would certainly love some help! + +### Finally + +// Welcome to the [world of software development](https://twitter.com/jckarter/status/1085303872883613696). From 3d20f3f8ce3dea11fd623308de5bf3ccf1e825dc Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 24 Jan 2019 17:46:03 +0100 Subject: [PATCH 081/589] Publish 126 --- {_drafts => _posts}/2019-01-24-issue-126.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2019-01-24-issue-126.md (100%) diff --git a/_drafts/2019-01-24-issue-126.md b/_posts/2019-01-24-issue-126.md similarity index 100% rename from _drafts/2019-01-24-issue-126.md rename to _posts/2019-01-24-issue-126.md From 50fbb2c3ae63dee54e54a983b0e9e188ef180f18 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 24 Jan 2019 17:49:09 +0100 Subject: [PATCH 082/589] Push initial issue 127 draft --- _drafts/2019-02-07-issue-127.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-02-07-issue-127.md diff --git a/_drafts/2019-02-07-issue-127.md b/_drafts/2019-02-07-issue-127.md new file mode 100644 index 00000000..4a7f2f28 --- /dev/null +++ b/_drafts/2019-02-07-issue-127.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #127' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 3554b7c33fd74c7bf34e3586f6a3e33bdf7f4f12 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 24 Jan 2019 18:56:10 +0100 Subject: [PATCH 083/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index ee8c8204..52e51c11 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 2,600 subscribers and over 6,900 followers on Twitter. +There are over 2,800 subscribers and over 7,400 followers on Twitter.

Sponsored Links

From ee620b90cddf5c7dccb0e69ea2033a43cbe19be0 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 27 Jan 2019 15:51:30 +0100 Subject: [PATCH 084/589] Update sponsorship.md --- sponsorship.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 52e51c11..ab531af9 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,12 +60,15 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
|   Issue |   Status | |:-|:-| -| 10 January | Open | -| 24 January | Open | -| 07 February | Open | -| 21 February | Open | -| 07 March | Open | -| 21 March | Open | +| February 07 | **Reserved** | +| February 21 | **Booked** | +| March 07 | Open | +| March 21 | Open | +| April 04 | Open | +| April 18 | Open | +| May 2 | Open | +| May 16 | Open | +| May 30 | Open | {: class="table table-striped table-bordered"}
From dec8bb62401ff125473b19afad7a2bee6e478779 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 28 Jan 2019 12:48:40 +0100 Subject: [PATCH 085/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index ab531af9..221680e6 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,7 +60,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
|   Issue |   Status | |:-|:-| -| February 07 | **Reserved** | +| February 07 | **Booked** | | February 21 | **Booked** | | March 07 | Open | | March 21 | Open | From f52e8561612a317c024b07d209bd03c3b17565e0 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 28 Jan 2019 12:53:55 +0100 Subject: [PATCH 086/589] Add sponsor --- _drafts/2019-02-07-issue-127.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_drafts/2019-02-07-issue-127.md b/_drafts/2019-02-07-issue-127.md index 4a7f2f28..678abd18 100644 --- a/_drafts/2019-02-07-issue-127.md +++ b/_drafts/2019-02-07-issue-127.md @@ -3,10 +3,10 @@ layout: post title: ! 'Issue #127' author: btb sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO + link: https://github.com/exyte/Macaw + heading: The easiest way to create your own UI controls for iOS + body: Unfortunately, there is no standard components in iOS to compose drawings, so we are forced to use cumbersome rendering directly on graphics context. Community of iOS developers on Github offers several frameworks to describe graphic components as a scene of primitives. Nowadays, Macaw is the most powerful framework allowing you to create custom components, charts, diagrams and use SVG files. It's an open source project with 4K+ starts on Github, so take it, use it, and make your life easier. + displaylink: github.com/exyte/Macaw --- > TODO: intro comments From 14549400b11f9284ff61052c88efd459088d9ce3 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 30 Jan 2019 22:10:35 +0100 Subject: [PATCH 087/589] Update sponsorship.md --- sponsorship.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 221680e6..8337f857 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -61,9 +61,9 @@ Sponsored Links should be relevant to the Swift programming community. To sponso |   Issue |   Status | |:-|:-| | February 07 | **Booked** | -| February 21 | **Booked** | -| March 07 | Open | -| March 21 | Open | +| February 21 | **Booked** | +| March 07 | **Booked** | +| March 21 | **Booked** | | April 04 | Open | | April 18 | Open | | May 2 | Open | From ead62635f3d275984acc5ba0bc25c3bbada29fef Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 1 Feb 2019 23:09:01 +0100 Subject: [PATCH 088/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 65d89ed8..92cbd6cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GEM concurrent-ruby (1.1.4) cork (0.3.0) colored2 (~> 3.1) - danger (5.11.1) + danger (5.13.0) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) From 96d93f0a052eafc42e920871c1857212edf7b062 Mon Sep 17 00:00:00 2001 From: Luke Reichold Date: Sun, 3 Feb 2019 01:03:25 -0600 Subject: [PATCH 089/589] Fix 'compiler' typo in Issue 126 (#437) --- _posts/2019-01-24-issue-126.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2019-01-24-issue-126.md b/_posts/2019-01-24-issue-126.md index ae817c47..56b7ab5f 100644 --- a/_posts/2019-01-24-issue-126.md +++ b/_posts/2019-01-24-issue-126.md @@ -21,7 +21,7 @@ source. ### Starter tasks - [SR-9670](https://bugs.swift.org/browse/SR-9670) [Compiler] Driver should accept `-serialize-diagnostics-path` for the interpret mode -- [SR-9677](https://bugs.swift.org/browse/SR-9677) [Comiler] Using break with unresolved label inside loops produces misleading diagnostic +- [SR-9677](https://bugs.swift.org/browse/SR-9677) [Compiler] Using break with unresolved label inside loops produces misleading diagnostic ### Podcasts From ef9c342247df3de4a1e0c7087b14edfbdcf282c6 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 4 Feb 2019 18:44:10 +0100 Subject: [PATCH 090/589] Add starter tasks --- _drafts/2019-02-07-issue-127.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_drafts/2019-02-07-issue-127.md b/_drafts/2019-02-07-issue-127.md index 678abd18..ee3b17a4 100644 --- a/_drafts/2019-02-07-issue-127.md +++ b/_drafts/2019-02-07-issue-127.md @@ -17,7 +17,10 @@ sponsor: ### Starter tasks -> TODO +- [SR-9738](https://bugs.swift.org/browse/SR-9738) [Compiler] Poor error message when calling @dynamicCallable with incorrect parameter types +- [SR-9781](https://bugs.swift.org/browse/SR-9781) [Compiler] Crash on concrete typealias access through existential metatype +- [SR-9784](https://bugs.swift.org/browse/SR-9784) [Compiler] Crash on accessing type alias through protocol-type instance +- [SR-9789](https://bugs.swift.org/browse/SR-9789) [Compiler] Use "pretty" nullability in generated ObjC headers ### Podcasts From 8f91c245ebb55e11c8751746a839255c5b5cb2b4 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 4 Feb 2019 18:47:21 +0100 Subject: [PATCH 091/589] Add podcast section --- _drafts/2019-02-07-issue-127.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_drafts/2019-02-07-issue-127.md b/_drafts/2019-02-07-issue-127.md index ee3b17a4..fd4d5575 100644 --- a/_drafts/2019-02-07-issue-127.md +++ b/_drafts/2019-02-07-issue-127.md @@ -24,7 +24,9 @@ sponsor: ### Podcasts -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +On Swift Unwrapped, Jesse and JP discuss [Key Path Expressions as Functions](https://spec.fm/podcasts/swift-unwrapped/262630). + +On the Swift Community Podcast, Garric, Chris and myself discuss [Scaling A Codeless Open Source Swift Community](https://www.swiftcommunitypodcast.org/episodes/2). ### News and community From cf6a7b6cdbddf418fe8257e2cb2ac288a4d5f10b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 4 Feb 2019 20:32:19 +0100 Subject: [PATCH 092/589] Update proposal script to get proposal name Closes #428 --- proposal.rb | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/proposal.rb b/proposal.rb index 433ac6a2..d775e0c9 100644 --- a/proposal.rb +++ b/proposal.rb @@ -1,5 +1,8 @@ #!/usr/bin/env ruby +require 'net/http' +require 'uri' + unless ARGV.length == 3 abort('Usage: url-to-proposal url-to-forums status') end @@ -28,4 +31,27 @@ message = proposal_number -puts "[SE-#{proposal_number}](#{proposal_url}) #{status}(#{forum_url})." +org_repository = proposal_url + +def raw_url(original_url) + sanitized_url = original_url.sub('https://github.com', '') + parts = sanitized_url + .split('/') + .reject { |e| e.empty? } + organization = parts[0] + repository = parts[1] + branch = parts[3] # skips "blob" + file_path = parts[4..parts.length].join('/') + + start = 'https://raw.githubusercontent.com' + + "#{start}/#{organization}/#{repository}/#{branch}/#{file_path}" +end + +request = Net::HTTP.get(URI.parse(raw_url(proposal_url))) + +title = request.each_line.first # "# Deprecate String Index Encoded Offsets" + .tr('#', '') # " Deprecate String Index Encoded Offsets" + .strip # "Deprecate String Index Encoded Offsets" + +puts "[SE-#{proposal_number}](#{proposal_url}): *#{title}* #{status}(#{forum_url})." From 67e703c30a1dc5155403e8e8ba9839be0235b738 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 4 Feb 2019 20:32:29 +0100 Subject: [PATCH 093/589] Add some more to the draft --- _drafts/2019-02-07-issue-127.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/_drafts/2019-02-07-issue-127.md b/_drafts/2019-02-07-issue-127.md index fd4d5575..cb4e483e 100644 --- a/_drafts/2019-02-07-issue-127.md +++ b/_drafts/2019-02-07-issue-127.md @@ -9,7 +9,7 @@ sponsor: displaylink: github.com/exyte/Macaw --- -> TODO: intro comments +Reflection on 1+ year of curating the Brief @@ -30,11 +30,14 @@ On the Swift Community Podcast, Garric, Chris and myself discuss [Scaling A Code ### News and community -> TODO +Apple released the first Xcode 10.2 beta some time ago. The [release notes](https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_beta_release_notes/swift_5_release_notes_for_xcode_10_2_beta) +are now available on the website, without having to login to access the PDF anymore! ### Commits and pull requests -> TODO +[Rintaro Ishizaki](https://twitter.com/rintaro) merged [a pull request](https://github.com/apple/swift/pull/22177) +that fixes a SourceKit regression in Swift 5 — within about 12 hours after it +was reported! ### Accepted proposals @@ -50,7 +53,13 @@ On the Swift Community Podcast, Garric, Chris and myself discuss [Scaling A Code ### Proposals in review -> TODO +[SE-0241](https://github.com/apple/swift-evolution/blob/master/proposals/0241-string-index-explicit-encoding-offset.md): *Deprecate String Index Encoded Offsets* is [under review](https://forums.swift.org/t/se-0241-explicit-encoded-offsets-for-string-indices/19929). + +> [SE-0180](https://github.com/apple/swift-evolution/blob/master/proposals/0180-string-index-overhaul.md) introduced a computed variable and initializer surrounding the concept of an `encodedOffset` for serialization purposes. Unfortunately, that approach is flawed for its intended purpose and is commonly misused in ways that Swift 5 is [more likely to expose](https://bugs.swift.org/browse/SR-9749). It is too late in the Swift 5.0 release to solve all existing problems, so we propose deprecating `encodedOffset` and introducing a targeted, semantics-preserving alternative. +> +> Unfortunately, [SE-0180](https://github.com/apple/swift-evolution/blob/master/proposals/0180-string-index-overhaul.md)’s approach of a single notion of `encodedOffset` is flawed. A string can be serialized with a choice of encodings, and the offset is therefore encoding-dependent and requires access to the contents of the string to calculate. A comment in [SE-0180](https://github.com/apple/swift-evolution/blob/master/proposals/0180-string-index-overhaul.md)’s example source mentioned that `encodedOffset` assumes UTF-16, which happened to be the only encoding used internally by String at the time (for offset purposes). +> +> Furthermore, the majority of uses of `encodedOffset` in the wild are not following [SE-0180](https://github.com/apple/swift-evolution/blob/master/proposals/0180-string-index-overhaul.md)’s intended purpose and are sensitive to encoding changes. `encodedOffset` is frequently misused under the assumption that all Characters are comprised of a single code unit, which is error-prone and Swift 5 might surface the underlying bugs in more situations. It is also sometimes used for mapping Cocoa string indices, which happens to work in Swift 4 but might not in Swift 5, and Foundation already provides better alternatives. ### Swift Forums From 2843c98292f1f24b7b6af19e2b39e7ba91674079 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 4 Feb 2019 20:34:01 +0100 Subject: [PATCH 094/589] =?UTF-8?q?Replace=20tabs=20with=20spaces=20?= =?UTF-8?q?=F0=9F=98=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proposal.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/proposal.rb b/proposal.rb index d775e0c9..def1e4a7 100644 --- a/proposal.rb +++ b/proposal.rb @@ -34,18 +34,18 @@ org_repository = proposal_url def raw_url(original_url) - sanitized_url = original_url.sub('https://github.com', '') - parts = sanitized_url - .split('/') - .reject { |e| e.empty? } - organization = parts[0] - repository = parts[1] - branch = parts[3] # skips "blob" - file_path = parts[4..parts.length].join('/') - - start = 'https://raw.githubusercontent.com' - - "#{start}/#{organization}/#{repository}/#{branch}/#{file_path}" + sanitized_url = original_url.sub('https://github.com', '') + parts = sanitized_url + .split('/') + .reject { |e| e.empty? } + organization = parts[0] + repository = parts[1] + branch = parts[3] # skips "blob" + file_path = parts[4..parts.length].join('/') + + start = 'https://raw.githubusercontent.com' + + "#{start}/#{organization}/#{repository}/#{branch}/#{file_path}" end request = Net::HTTP.get(URI.parse(raw_url(proposal_url))) From 28d48a4fe64dba5fe87f18ed5d23bf1db80b208d Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 6 Feb 2019 21:21:12 +0100 Subject: [PATCH 095/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 8337f857..5f76d994 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 2,800 subscribers and over 7,400 followers on Twitter. +There are over 3,400 subscribers and over 7,500 followers on Twitter.

Sponsored Links

From ea1137034793d3d150b0b4abf4ea8db59687620e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 6 Feb 2019 21:34:34 +0100 Subject: [PATCH 096/589] Add remaining things --- _drafts/2019-02-07-issue-127.md | 61 ++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/_drafts/2019-02-07-issue-127.md b/_drafts/2019-02-07-issue-127.md index cb4e483e..7923d9ea 100644 --- a/_drafts/2019-02-07-issue-127.md +++ b/_drafts/2019-02-07-issue-127.md @@ -9,7 +9,25 @@ sponsor: displaylink: github.com/exyte/Macaw --- -Reflection on 1+ year of curating the Brief +It has been [more than a year](https://twitter.com/swiftlybrief/status/1090341325277417473) +since I took over curating the Swift Weekly Brief from [Jesse](https://twitter.com/jesse_squires). + +When Jesse announced that issue 100 would be the Brief's final issue, I reached +out to him, having helped out with the Brief in the past, to take over the project. + +Not only did I really care about this project, but I also felt that it would be +a shame to lose this resource for all of you... and myself. I happily took over +the project (and still feel very fortunate to continue the effort to this day!) +and here we are. + +I hope to continue the effort for the foreseeable future! That said, keeping up +a newsletter is no easy feat and [any help](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/CONTRIBUTING.md) +is very much appreciated. + +I want to thank all of the readers, sponsors and specifically contributors over +the last year. You all rock! + +Here is to the next year of the Brief! 🏎 @@ -30,26 +48,47 @@ On the Swift Community Podcast, Garric, Chris and myself discuss [Scaling A Code ### News and community +[Johannes Weiss](https://twitter.com/johannesweiss/) announced [Swift 4.2.2 and monthly Swift 4.2.X releases for Linux](https://forums.swift.org/t/announcing-swift-4-2-2-and-monthly-swift-4-2-x-dot-releases-for-linux/20148)! + +> [..] from now on we will be releasing monthly Swift 4.2.x dot versions for Linux over the next few months. That means you can expect Swift 4.2.3 by the end of February 2019, 4.2.4 by the end of March 2019 and so on. + +On the Swift.org blog, [Andrew Trick](https://twitter.com/AndrewTrick) +wrote [about Swift 5's Exclusivity Enforcement](https://swift.org/blog/swift-5-exclusivity/). + Apple released the first Xcode 10.2 beta some time ago. The [release notes](https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_beta_release_notes/swift_5_release_notes_for_xcode_10_2_beta) are now available on the website, without having to login to access the PDF anymore! +[John McCall](https://twitter.com/pathofshrines)'s [presentation](https://www.youtube.com/watch?v=wyAbV8AM9PM) +on Coroutine Representations and ABIs in LLVM is now available! + +[Joe Groff](https://twitter.com/jckarter) and [Doug Gregor](https://github.com/DougGregor)'s +[presentation](https://www.youtube.com/watch?v=G3bpj-4tWVU) on Efficiently +Implementing Runtime Metadata is now available as well. + +[Slava Pestov](https://twitter.com/slava_pestov/) shared [a thread](https://twitter.com/slava_pestov/status/1092845931131817985) +about the ability to Swift compiler to be able to build an Abstract Syntax Tree (AST) Type from a mangled type string stored in the binary’s debug info. + ### Commits and pull requests [Rintaro Ishizaki](https://twitter.com/rintaro) merged [a pull request](https://github.com/apple/swift/pull/22177) that fixes a SourceKit regression in Swift 5 — within about 12 hours after it was reported! -### Accepted proposals - -> TODO +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r/) merged [a pull request](https://github.com/apple/swift-package-manager/pull/1966) +to automatically add package dependencies using SwiftSyntax and libSwiftPM. 🎉 -### Returned proposals +[Suyash Srijan](https://twitter.com/suyashsrijan) merged [a pull request](https://github.com/apple/swift/pull/22231) +resolves an issue where using a `typealias` as an argument to `@escaping` on a generic function inside a protocol would trigger an error diagnostic. -> TODO +### Accepted proposals -### Rejected proposals +[SE-0240](https://github.com/apple/swift-evolution/blob/master/proposals/0240-ordered-collection-diffing.md): *Ordered Collection Diffing* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0240-ordered-collection-diffing/20008). -> TODO +> The proposal is accepted with modifications, specifically: +> +> - The algorithm's semantic guarantees have been weakened to specify that it will produce a difference to get from the `self` state to the `other` state, but not guarantee the shortest such difference. The intent is to allow the standard library to provide a balanced algorithm that provides the shortest difference when possible (e.g., for inputs with fewer differences) but won't exhibit quadratic behavior for large inputs with many differences. +> - The name of the algorithm itself is changed from `shortestEditScript(from:)` to `difference(from:)`. +> - The name of the collection of differences is changed from `OrderedCollectionDifference` to `CollectionDifference`. ### Proposals in review @@ -61,10 +100,6 @@ was reported! > > Furthermore, the majority of uses of `encodedOffset` in the wild are not following [SE-0180](https://github.com/apple/swift-evolution/blob/master/proposals/0180-string-index-overhaul.md)’s intended purpose and are sensitive to encoding changes. `encodedOffset` is frequently misused under the assumption that all Characters are comprised of a single code unit, which is error-prone and Swift 5 might surface the underlying bugs in more situations. It is also sometimes used for mapping Cocoa string indices, which happens to work in Swift 4 but might not in Swift 5, and Foundation already provides better alternatives. -### Swift Forums - -> TODO - ### Finally -> TODO: something funny/fun. tweet, link, etc. +Swift is hard. Especially if [you want it to be](https://twitter.com/jckarter/status/1093180314526965760). From 0563b3d62187de3a8807930134cd51b7e2f8dd3e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 7 Feb 2019 16:03:52 +0100 Subject: [PATCH 097/589] Move issue 127 to posts (#438) * Move issue 127 to posts * Add sourcekitd stress tester post * Update 2019-02-07-issue-127.md --- {_drafts => _posts}/2019-02-07-issue-127.md | 3 +++ 1 file changed, 3 insertions(+) rename {_drafts => _posts}/2019-02-07-issue-127.md (97%) diff --git a/_drafts/2019-02-07-issue-127.md b/_posts/2019-02-07-issue-127.md similarity index 97% rename from _drafts/2019-02-07-issue-127.md rename to _posts/2019-02-07-issue-127.md index 7923d9ea..8230eeac 100644 --- a/_drafts/2019-02-07-issue-127.md +++ b/_posts/2019-02-07-issue-127.md @@ -55,6 +55,9 @@ On the Swift Community Podcast, Garric, Chris and myself discuss [Scaling A Code On the Swift.org blog, [Andrew Trick](https://twitter.com/AndrewTrick) wrote [about Swift 5's Exclusivity Enforcement](https://swift.org/blog/swift-5-exclusivity/). +[Nathan Hawes](https://github.com/nathawes/) also wrote on the Swift.org blog, +about [the `sourcekitd` Stress Tester](https://swift.org/blog/sourcekitd-stress-tester/). + Apple released the first Xcode 10.2 beta some time ago. The [release notes](https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_beta_release_notes/swift_5_release_notes_for_xcode_10_2_beta) are now available on the website, without having to login to access the PDF anymore! From 28fecf53ae819e982fb687303c6459d2667825a5 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 7 Feb 2019 23:13:04 +0100 Subject: [PATCH 098/589] Add initial 128 draft --- _drafts/2019-02-21-issue-128.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-02-21-issue-128.md diff --git a/_drafts/2019-02-21-issue-128.md b/_drafts/2019-02-21-issue-128.md new file mode 100644 index 00000000..754e112f --- /dev/null +++ b/_drafts/2019-02-21-issue-128.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #128' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 361013cd491212300476bd9ece5664f61e1f81a7 Mon Sep 17 00:00:00 2001 From: Zigii Wong Date: Mon, 11 Feb 2019 04:34:41 +0800 Subject: [PATCH 099/589] Update author's twitter (#440) --- _posts/2019-01-24-issue-126.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2019-01-24-issue-126.md b/_posts/2019-01-24-issue-126.md index 56b7ab5f..50c10ee4 100644 --- a/_posts/2019-01-24-issue-126.md +++ b/_posts/2019-01-24-issue-126.md @@ -88,7 +88,7 @@ users.filter { $0.isAdmin } > These ad hoc closures are short and sweet but Swift already has a shorter and sweeter syntax that can describe this: key paths. -[Loïc Lecrenier]() shared [a pitch](https://forums.swift.org/t/support-for-fuzz-testers-in-swift-packages/19494) to support fuzz testers for Swift packages. +[Loïc Lecrenier](https://twitter.com/loiclec) shared [a pitch](https://forums.swift.org/t/support-for-fuzz-testers-in-swift-packages/19494) to support fuzz testers for Swift packages. > Recently, I wrote a coverage-guided Swift [fuzzer](https://github.com/loiclec/FuzzCheck) similar to `libFuzzer`, but I found that SwiftPM did not allow me to specify the build settings I needed, and I had to fork SwiftPM to make my project work. > From c9e094c249bd2c86c41916fb00d43b47d5bd759b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 18 Feb 2019 19:44:00 +0100 Subject: [PATCH 100/589] Update sponsorship.md --- sponsorship.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 5f76d994..98b894eb 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -56,11 +56,10 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
-

Availability 2018

+

Availability 2019

|   Issue |   Status | |:-|:-| -| February 07 | **Booked** | | February 21 | **Booked** | | March 07 | **Booked** | | March 21 | **Booked** | From 56bc9978f4ba9e5e82aacee6a1c13fae4194abbb Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 18 Feb 2019 19:45:40 +0100 Subject: [PATCH 101/589] Update 2019-02-21-issue-128.md --- _drafts/2019-02-21-issue-128.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_drafts/2019-02-21-issue-128.md b/_drafts/2019-02-21-issue-128.md index 754e112f..9b24deae 100644 --- a/_drafts/2019-02-21-issue-128.md +++ b/_drafts/2019-02-21-issue-128.md @@ -3,10 +3,10 @@ layout: post title: ! 'Issue #128' author: btb sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO + link: https://try.instabug.com/swift-weekly + heading: Get Detailed Bug Reports from Users In-App + body: Tired of wasting time debugging your Swift app? Instabug's SDK is here to help you minimize your debugging time by providing you with complete device details, network logs, and reproduction steps with every bug report. All data is attached automatically. It only takes a line of code to setup. Signup now for free. + displaylink: https://try.instabug.com/swift-weekly --- > TODO: intro comments From 4ca867702c042d35fe974d939b4709085c18cc37 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 18 Feb 2019 21:19:48 +0100 Subject: [PATCH 102/589] Run bundle update --- Gemfile.lock | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 92cbd6cd..f5a8ad7c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GEM concurrent-ruby (1.1.4) cork (0.3.0) colored2 (~> 3.1) - danger (5.13.0) + danger (5.14.0) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -56,9 +56,9 @@ GEM forwardable-extended (2.6.0) gemoji (3.0.0) git (1.5.0) - github-pages (193) + github-pages (196) activesupport (= 4.2.10) - github-pages-health-check (= 1.8.1) + github-pages-health-check (= 1.16.0) jekyll (= 3.7.4) jekyll-avatar (= 0.6.0) jekyll-coffeescript (= 1.1.1) @@ -66,13 +66,13 @@ GEM jekyll-default-layout (= 0.1.4) jekyll-feed (= 0.11.0) jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.9.4) + jekyll-github-metadata (= 2.12.1) jekyll-mentions (= 1.4.1) jekyll-optional-front-matter (= 0.3.0) jekyll-paginate (= 1.1.0) jekyll-readme-index (= 0.2.0) jekyll-redirect-from (= 0.14.0) - jekyll-relative-links (= 0.5.3) + jekyll-relative-links (= 0.6.0) jekyll-remote-theme (= 0.3.1) jekyll-sass-converter (= 1.5.2) jekyll-seo-tag (= 2.5.0) @@ -92,20 +92,20 @@ GEM jekyll-theme-tactile (= 0.1.1) jekyll-theme-time-machine (= 0.1.1) jekyll-titles-from-headings (= 0.5.1) - jemoji (= 0.10.1) + jemoji (= 0.10.2) kramdown (= 1.17.0) liquid (= 4.0.0) listen (= 3.1.5) mercenary (~> 0.3) minima (= 2.5.0) - nokogiri (>= 1.8.2, < 2.0) + nokogiri (>= 1.8.5, < 2.0) rouge (= 2.2.1) terminal-table (~> 1.4) - github-pages-health-check (1.8.1) + github-pages-health-check (1.16.0) addressable (~> 2.3) dnsruby (~> 1.60) octokit (~> 4.0) - public_suffix (~> 2.0) + public_suffix (~> 3.0) typhoeus (~> 1.3) html-pipeline (2.10.0) activesupport (>= 2) @@ -144,8 +144,8 @@ GEM jekyll (~> 3.3) jekyll-gist (1.5.0) octokit (~> 4.2) - jekyll-github-metadata (2.9.4) - jekyll (~> 3.1) + jekyll-github-metadata (2.12.1) + jekyll (~> 3.4) octokit (~> 4.0, != 4.4.0) jekyll-mentions (1.4.1) html-pipeline (~> 2.3) @@ -157,7 +157,7 @@ GEM jekyll (~> 3.0) jekyll-redirect-from (0.14.0) jekyll (~> 3.3) - jekyll-relative-links (0.5.3) + jekyll-relative-links (0.6.0) jekyll (~> 3.3) jekyll-remote-theme (0.3.1) jekyll (~> 3.5) @@ -213,7 +213,7 @@ GEM jekyll (~> 3.3) jekyll-watch (2.1.2) listen (~> 3.0) - jemoji (0.10.1) + jemoji (0.10.2) gemoji (~> 3.0) html-pipeline (~> 2.2) jekyll (~> 3.0) @@ -240,7 +240,7 @@ GEM open4 (1.3.4) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (2.0.5) + public_suffix (3.0.3) rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) From e10bb94a7b70ca8c76e5f101c61b1a427a9fc191 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 18 Feb 2019 21:26:02 +0100 Subject: [PATCH 103/589] Add starter tasks, proposals --- _drafts/2019-02-21-issue-128.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/_drafts/2019-02-21-issue-128.md b/_drafts/2019-02-21-issue-128.md index 9b24deae..a507632f 100644 --- a/_drafts/2019-02-21-issue-128.md +++ b/_drafts/2019-02-21-issue-128.md @@ -17,7 +17,10 @@ sponsor: ### Starter tasks -> TODO +- [SR-9795](https://bugs.swift.org/browse/SR-9795) [Compiler] Cannot use `super` in lazy property: 'super' cannot be used outside of class members +- [SR-9851](https://bugs.swift.org/browse/SR-9851) [Compiler] Incorrect fixit for logical NOT operator on value of `Bool?` type +- [TF-46](https://bugs.swift.org/browse/TF-46) [Tests] Create unit tests for functions in TFUtilities. +- [TF-51](https://bugs.swift.org/browse/TF-51) [Stdlib] Check and diagnose that a `graph_op` is valid when creating a `GraphOperationInst` ### Podcasts @@ -33,19 +36,18 @@ sponsor: ### Accepted proposals -> TODO - -### Returned proposals - -> TODO +[SE-0241](https://github.com/apple/swift-evolution/blob/master/proposals/0241-string-index-explicit-encoding-offset.md): *Deprecate String Index Encoded Offsets* was [accepted](https://forums.swift.org/t/accepted-se-0241-explicit-encoded-offsets-for-string-indices/20540). -### Rejected proposals - -> TODO +> Feedback on the initial proposal was mostly positive, but several people expressed some reservations about some of the new API, and the authors agreed to reduce the proposal to a more minimal change. That new version generally met with approval, with a few dissents: +> +> - Some community members took the opportunity to register their disapproval of the lack of integer indexing into String. While those complaints are noted, this review was not the place to air them. +> - Lily Ballard expressed concern about the lack of structure of these encoded offsets and about their behavior when the offset does not correspond to a scalar boundary. The Core Team generally agrees with the proposal author that the offset not matching a scalar boundary is a programmer error for which trapping is consistent with Swift's general behavior on similar precondition violations. ### Proposals in review -> TODO +[SE-0242](https://github.com/apple/swift-evolution/blob/master/proposals/0242-default-values-memberwise.md): *Synthesize default values for the memberwise initializer* is [under review](https://forums.swift.org/t/se-0242-synthesize-default-values-for-the-memberwise-initializer/20618). + +> This proposal aims to solve a simple outstanding problem with the way the Swift compiler currently synthesizes the memberwise initializer for structures by synthesizing default values for properties with default initializers. ### Swift Forums From f23eae1c6d729dbc44126e5bbb664ed966835bb6 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 20 Feb 2019 22:11:33 +0100 Subject: [PATCH 104/589] Fill issue 128 with life --- _drafts/2019-02-21-issue-128.md | 46 +++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/_drafts/2019-02-21-issue-128.md b/_drafts/2019-02-21-issue-128.md index a507632f..799c5f07 100644 --- a/_drafts/2019-02-21-issue-128.md +++ b/_drafts/2019-02-21-issue-128.md @@ -24,15 +24,27 @@ sponsor: ### Podcasts -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +On the Swift Community Podcast, Jon Shier, Kelvin Ma and Chris Lattner discuss [the `Result` type](https://www.swiftcommunitypodcast.org/episodes/3) that is being introduced in Swift 5. ### News and community -> TODO +Xcode 10.2 beta 3 is shipping with a [stable ABI](https://twitter.com/jckarter/status/1097944089801052160). 🎉🎉🎉 + +[Ted Kremenek](https://twitter.com/tkremenek) wrote [a blog post](https://swift.org/blog/5-1-release-process/) laying out the Swift 5.1 release process. + +On the Swift blog, [Jordan Rose](https://twitter.com/UINT_MIN/) went in-depth on [ABI Stability and More](https://swift.org/blog/abi-stability-and-more/). Especially recommend taking a look at the nice summary at the end of the post! + +In another post on the Swift blog, [Joe Groff](https://twitter.com/jckarter) wrote about [Evolving Swift on Apple Platforms After ABI Stability](https://swift.org/blog/abi-stability-and-apple/). + +[Chris Eidhof](https://twitter.com/chriseidhof) and [Florian Kugler](https://twitter.com/floriankugler) have [open sourced](https://www.objc.io/blog/2019/02/12/open-sourcing-the-swift-talk-backend/) the Swift Talk backend, which is written in Swift. This adds another great resource to learn about Swift on the Server! + +[Erica Sadun](https://twitter.com/ericasadun) wrote [a blog post](https://ericasadun.com/2019/02/14/bad-things-extension-access-control/) on some inconsistencies with access control in combination with extensions. ### Commits and pull requests -> TODO +[Christian Schnorr](https://twitter.com/jenoxx) reported [a bug](https://forums.swift.org/t/intended-behavior-with-discardableresult/20343) with `@discardableResult` and [Suyash Srijan](https://twitter.com/suyashsrijan) merged [a pull request](https://github.com/apple/swift/pull/22518) to fix it... on the same day! 🏎 + +[Robert Widmann](https://twitter.com/CodaFi_) merged [a pull request](https://github.com/apple/swift/pull/21381) adding support for default arguments in enum cases. Still remaining: default arguments for subscripts and variadic elements in enum cases. 🎉 ### Accepted proposals @@ -51,8 +63,32 @@ sponsor: ### Swift Forums -> TODO +[Tellow Krinkle](https://twitter.com/TellowKrinkle) pitched [a proposal](https://forums.swift.org/t/pitch-genericizing-over-annotations-like-throws/20376) to introduce Generic `throws`. + +> Right now, you can make a function foo take a function that optionally throws, and only throw if the given function also throws, like this: + +{% highlight swift %} +func foo(_ body: () throws -> ()) rethrows {} +{% endhighlight %} + +> However, you can not make a function take an object with a method that optionally throws and only throw if it throws: + +{% highlight swift %} +// Not currently supported +func foo(_ body: T) throws follows T {} +{% endhighlight %} + +> This pitch would allow you to do that. + +[Kelvin Ma](http://github.com/kelvin13) shared [a `Vector` manifesto](https://forums.swift.org/t/vector-manifesto/20508) pitching a possible way of approaching the addition of a Vector type in Swift. + +> Vectors, understood as 2, 3, or 4-component numerical aggregates, are a fundamental currency type across many domains of programming. This document seeks to lay out a cohesive vision for adding standard vector support to the Swift language, with consideration for relevant long-term goals for the language type system. + +[Saleem Abdulrasool](https://twitter.com/compnerd) posted [another update](https://forums.swift.org/t/swift-win32-programming/20686) regarding Swift on Windows... with UI! + +> The Windows port has been coming along pretty well. Although it is not yet complete, it is now at the point where you can start doing interesting things with it. As such, I put together a little Hello World^WSwift program for Windows using just Swift! As the saying goes, [a picture](https://discourse-cdn-sjc1.com/swift/uploads/default/original/2X/5/565abe55e60e1ed30689483b73eb682b656ed177.png) is worth a thousand words ... ### Finally -> TODO: something funny/fun. tweet, link, etc. +Making working with floating points easier? [I'm all for it](https://twitter.com/nnnnnnnn/status/1093576188075958273).
+[And the greatest news of the week is...](https://twitter.com/jnadeau/status/1097946707302572032) 😎 From af8f1bd9458d30cdb653e50c638aba7b3045e136 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 20 Feb 2019 22:12:57 +0100 Subject: [PATCH 105/589] Add lazy intro --- _drafts/2019-02-21-issue-128.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_drafts/2019-02-21-issue-128.md b/_drafts/2019-02-21-issue-128.md index 799c5f07..913333a1 100644 --- a/_drafts/2019-02-21-issue-128.md +++ b/_drafts/2019-02-21-issue-128.md @@ -9,7 +9,7 @@ sponsor: displaylink: https://try.instabug.com/swift-weekly --- -> TODO: intro comments +A _lot_ has been happening in the last two weeks. I think a long intro would only distract you from all the interesting bits, so let's get into it... From ce741803621846db34bb051a1753b3fd4878f784 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 Feb 2019 17:02:13 +0100 Subject: [PATCH 106/589] Post issue 128, add 129 draft Closes #439 --- _drafts/2019-03-07-issue-129.md | 56 +++++++++++++++++++++ {_drafts => _posts}/2019-02-21-issue-128.md | 2 + 2 files changed, 58 insertions(+) create mode 100644 _drafts/2019-03-07-issue-129.md rename {_drafts => _posts}/2019-02-21-issue-128.md (97%) diff --git a/_drafts/2019-03-07-issue-129.md b/_drafts/2019-03-07-issue-129.md new file mode 100644 index 00000000..a2e06f37 --- /dev/null +++ b/_drafts/2019-03-07-issue-129.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #129' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. diff --git a/_drafts/2019-02-21-issue-128.md b/_posts/2019-02-21-issue-128.md similarity index 97% rename from _drafts/2019-02-21-issue-128.md rename to _posts/2019-02-21-issue-128.md index 913333a1..723921d3 100644 --- a/_drafts/2019-02-21-issue-128.md +++ b/_posts/2019-02-21-issue-128.md @@ -36,6 +36,8 @@ On the Swift blog, [Jordan Rose](https://twitter.com/UINT_MIN/) went in-depth on In another post on the Swift blog, [Joe Groff](https://twitter.com/jckarter) wrote about [Evolving Swift on Apple Platforms After ABI Stability](https://swift.org/blog/abi-stability-and-apple/). +... and in another one (!), [Erica Sadun](https://twitter.com/ericasadun) writes [about enhancing String literals delimiters](https://swift.org/blog/behind-se-0200/). 👏 + [Chris Eidhof](https://twitter.com/chriseidhof) and [Florian Kugler](https://twitter.com/floriankugler) have [open sourced](https://www.objc.io/blog/2019/02/12/open-sourcing-the-swift-talk-backend/) the Swift Talk backend, which is written in Swift. This adds another great resource to learn about Swift on the Server! [Erica Sadun](https://twitter.com/ericasadun) wrote [a blog post](https://ericasadun.com/2019/02/14/bad-things-extension-access-control/) on some inconsistencies with access control in combination with extensions. From 8ddd3ac06ba1631a813d62390fd034651fda88e5 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 Feb 2019 21:22:04 +0100 Subject: [PATCH 107/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 98b894eb..ef2c98ab 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,400 subscribers and over 7,500 followers on Twitter. +There are over 3,600 subscribers and over 7,600 followers on Twitter.

Sponsored Links

From f0cd922dd8ffabe2a254fe11de1e3ba7f50d1b09 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 Feb 2019 21:22:17 +0100 Subject: [PATCH 108/589] Update sponsorship.md --- sponsorship.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index ef2c98ab..76ed8313 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,7 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
|   Issue |   Status | |:-|:-| -| February 21 | **Booked** | | March 07 | **Booked** | | March 21 | **Booked** | | April 04 | Open | From a16538c3ce4b2e991f78670889822d2afde750ae Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 Feb 2019 21:23:36 +0100 Subject: [PATCH 109/589] Add sponsor for 129 --- _drafts/2019-03-07-issue-129.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_drafts/2019-03-07-issue-129.md b/_drafts/2019-03-07-issue-129.md index a2e06f37..1b33f9d1 100644 --- a/_drafts/2019-03-07-issue-129.md +++ b/_drafts/2019-03-07-issue-129.md @@ -3,10 +3,10 @@ layout: post title: ! 'Issue #129' author: btb sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO + link: https://skafos.ai  + heading: Skafos.ai is Machine Learning for iOS Developers + body: Skafos is the tool for iOS developers to deploy machine learning to their app. Get started with a pre-trained model, drop in the SDK and then updates are pushed to your app in the background. Sign up for the free beta today. + displaylink: skafos.ai  --- > TODO: intro comments From 65b6777ca12f1f03f019f6ad74bc981a3b1b4df0 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 Feb 2019 21:24:06 +0100 Subject: [PATCH 110/589] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c049fde2..696f1563 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ *A community-driven weekly newsletter about [Swift.org](https://swift.org)* -> Curated by [@jesse_squires](https://twitter.com/jesse_squires) and [@BasThomas](https://twitter.com/BasThomas). +> Started by [@jesse_squires](https://twitter.com/jesse_squires) and curated by [@BasThomas](https://twitter.com/BasThomas). From 5b4684971ec188072cb9b8270f68e7bdb4cc3ca7 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 Feb 2019 21:39:28 +0100 Subject: [PATCH 111/589] Update 2019-02-21-issue-128.md --- _posts/2019-02-21-issue-128.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2019-02-21-issue-128.md b/_posts/2019-02-21-issue-128.md index 723921d3..928d7d8d 100644 --- a/_posts/2019-02-21-issue-128.md +++ b/_posts/2019-02-21-issue-128.md @@ -6,7 +6,7 @@ sponsor: link: https://try.instabug.com/swift-weekly heading: Get Detailed Bug Reports from Users In-App body: Tired of wasting time debugging your Swift app? Instabug's SDK is here to help you minimize your debugging time by providing you with complete device details, network logs, and reproduction steps with every bug report. All data is attached automatically. It only takes a line of code to setup. Signup now for free. - displaylink: https://try.instabug.com/swift-weekly + displaylink: try.instabug.com/swift-weekly --- A _lot_ has been happening in the last two weeks. I think a long intro would only distract you from all the interesting bits, so let's get into it... From ecf74c72b2e0d3dcdc6de7ff6be82f97cd570039 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 Feb 2019 21:40:06 +0100 Subject: [PATCH 112/589] Update 2018-11-15-issue-122.md --- _posts/2018-11-15-issue-122.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-11-15-issue-122.md b/_posts/2018-11-15-issue-122.md index 814379b6..e95c6fcb 100644 --- a/_posts/2018-11-15-issue-122.md +++ b/_posts/2018-11-15-issue-122.md @@ -6,7 +6,7 @@ sponsor: link: https://try.instabug.com/swift-weekly heading: The Most Comprehensive Bug Reporting SDK for Swift Apps body: The top mobile companies like Lyft, Reddit, and PayPal rely on Instabug to iterate faster and enhance their app quality. Instabug's lightweight SDK lets you receive detailed bug reports directly from testers and users. A screenshot is attached automatically along with screen recordings, device details and repro-steps with each report. Instabug takes just one line of code to integrate the SDK.
Get 20% off for 3 months when you signup and subscribe to any plan. Enter offer code InstabugLovesSwiftWeekly - displaylink: https://try.instabug.com/swift-weekly + displaylink: try.instabug.com/swift-weekly --- We're very happy to announce that thanks to [Zigii Wong](https://twitter.com/wongzigii), Swift Weekly Brief will be available in Chinese as well! You can go to the website [here](https://swiftweekly.github.io/cn/), and you can contribute in [this repository](https://github.com/SwiftWeekly/cn). 🎉 From a7e6ec14d0f09aeddf88554fca5d259b5b2d6fb4 Mon Sep 17 00:00:00 2001 From: Federico Zanetello Date: Sun, 24 Feb 2019 09:01:53 +0700 Subject: [PATCH 113/589] =?UTF-8?q?Fix=20=E2=80=98groundwork=E2=80=99=20ty?= =?UTF-8?q?po=20(#442)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _posts/2018-05-03-issue-108.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-05-03-issue-108.md b/_posts/2018-05-03-issue-108.md index 7150a123..781ed50c 100644 --- a/_posts/2018-05-03-issue-108.md +++ b/_posts/2018-05-03-issue-108.md @@ -33,7 +33,7 @@ Google [announced](https://github.com/tensorflow/swift) Tensorflow for Swift. To [Michael Ilseman](https://github.com/milseman) merged [a pull request](https://github.com/apple/swift/pull/16226) that removes some `@inline` annotations, speeding up the compiler. -[Doug Gregor](https://github.com/DougGregor) merged [a pull request](https://github.com/apple/swift/pull/16249) that lays the grouwork to eliminate `SubstitutionList`, the old representation for a mapping of generic parameters to concrete types. To learn more about this, check out this [Twitter thread](https://twitter.com/slava_pestov/status/991148638683381760). +[Doug Gregor](https://github.com/DougGregor) merged [a pull request](https://github.com/apple/swift/pull/16249) that lays the groudwork to eliminate `SubstitutionList`, the old representation for a mapping of generic parameters to concrete types. To learn more about this, check out this [Twitter thread](https://twitter.com/slava_pestov/status/991148638683381760). [Pavel Yaskevich](https://github.com/xedin) merged [a pull request](https://github.com/apple/swift/pull/16300) that improves exhaustiveness checking in `switch`es. From e3d404ab4b9f47cc2fac771ffba4fabb3fba7fed Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 24 Feb 2019 13:49:50 +0100 Subject: [PATCH 114/589] Add starter tasks and more --- _drafts/2019-03-07-issue-129.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/_drafts/2019-03-07-issue-129.md b/_drafts/2019-03-07-issue-129.md index 1b33f9d1..b006f329 100644 --- a/_drafts/2019-03-07-issue-129.md +++ b/_drafts/2019-03-07-issue-129.md @@ -17,15 +17,21 @@ sponsor: ### Starter tasks -> TODO +- [TF-67](https://bugs.swift.org/browse/TF-67) [Autodiff] `BumpPtrAllocating` some classes that have `SmallBitVector` fields +- [TF-86](https://bugs.swift.org/browse/TF-86) [Tests] Use `expectEqual` instead of `expectTrue` +- [TF-93](https://bugs.swift.org/browse/TF-93) [Graph Program Extraction +] Deabstraction should properly diagnose recursion +- [TF-130](https://bugs.swift.org/browse/TF-130) [Graph Program Extraction] Add API to serialize a `@convention(tensorflow)` function as a graph ### Podcasts -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +https://www.swiftbysundell.com/podcast/42 ### News and community -> TODO +[Keith Smiley](https://twitter.com/SmileyKeith/) shared [an overview](https://gist.github.com/keith/3f01e1c9b763e9aceb70411927a0c42c) of Xcode build settings to compiler flags for Swift memory exclusivity. + +[Jordan Rose](https://twitter.com/UINT_MIN/) shared [an interesting easter egg](https://twitter.com/UINT_MIN/status/1098628355539124224): the [magic number](https://t.co/VE0jlyjZWA) for `swiftmodule` files is `E2 9C A8 0E`, or `✨14`, referring to the initial name for Swift and its (planned) release year. ### Commits and pull requests @@ -49,7 +55,7 @@ sponsor: ### Swift Forums -> TODO +https://forums.swift.org/t/a-swift-takes-flight/20845 ### Finally From ad4b4b32a967e5b33650ab26d3a0a8c02b07cb40 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 24 Feb 2019 22:13:12 +0100 Subject: [PATCH 115/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f5a8ad7c..e6044d49 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GEM concurrent-ruby (1.1.4) cork (0.3.0) colored2 (~> 3.1) - danger (5.14.0) + danger (5.15.0) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -249,7 +249,7 @@ GEM i18n ruby_dep (1.5.0) rubyzip (1.2.2) - safe_yaml (1.0.4) + safe_yaml (1.0.5) sass (3.7.3) sass-listen (~> 4.0.0) sass-listen (4.0.0) From 531b6022a4abf290278d0953326cc53fde5f6d41 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 6 Mar 2019 17:47:39 +0100 Subject: [PATCH 116/589] Run bundle update --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e6044d49..71831d49 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,7 +25,7 @@ GEM concurrent-ruby (1.1.4) cork (0.3.0) colored2 (~> 3.1) - danger (5.15.0) + danger (5.16.1) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -56,9 +56,9 @@ GEM forwardable-extended (2.6.0) gemoji (3.0.0) git (1.5.0) - github-pages (196) + github-pages (197) activesupport (= 4.2.10) - github-pages-health-check (= 1.16.0) + github-pages-health-check (= 1.16.1) jekyll (= 3.7.4) jekyll-avatar (= 0.6.0) jekyll-coffeescript (= 1.1.1) @@ -101,7 +101,7 @@ GEM nokogiri (>= 1.8.5, < 2.0) rouge (= 2.2.1) terminal-table (~> 1.4) - github-pages-health-check (1.16.0) + github-pages-health-check (1.16.1) addressable (~> 2.3) dnsruby (~> 1.60) octokit (~> 4.0) @@ -265,7 +265,7 @@ GEM ethon (>= 0.9.0) tzinfo (1.2.5) thread_safe (~> 0.1) - unicode-display_width (1.4.1) + unicode-display_width (1.5.0) PLATFORMS ruby From 175632780377c2cd64d14e7258d590c608e18983 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 6 Mar 2019 19:49:08 +0100 Subject: [PATCH 117/589] Add more meat to issue 129 --- _drafts/2019-03-07-issue-129.md | 77 ++++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 15 deletions(-) diff --git a/_drafts/2019-03-07-issue-129.md b/_drafts/2019-03-07-issue-129.md index b006f329..d0ca5266 100644 --- a/_drafts/2019-03-07-issue-129.md +++ b/_drafts/2019-03-07-issue-129.md @@ -9,7 +9,7 @@ sponsor: displaylink: skafos.ai  --- -> TODO: intro comments +In the last two weeks, a lot about Swift has been discussed. Proposals, ideas, improvements, and updates galore. @@ -25,38 +25,85 @@ sponsor: ### Podcasts -https://www.swiftbysundell.com/podcast/42 +Jesse and JP [talk about](https://spec.fm/podcasts/swift-unwrapped/279806) the pitch for an official style guide & formatter for Swift. + +[John Sundell](https://twitter.com/johnsundell) and [Ted Kremenek](https://twitter.com/tkremenek) [talk about](https://www.swiftbysundell.com/podcast/42) Swift 5, looking at ABI stability and what it means for the future of the language. ### News and community +Swift 4.2.3 for Linux [was released](https://forums.swift.org/t/swift-4-2-3/21089)! + [Keith Smiley](https://twitter.com/SmileyKeith/) shared [an overview](https://gist.github.com/keith/3f01e1c9b763e9aceb70411927a0c42c) of Xcode build settings to compiler flags for Swift memory exclusivity. [Jordan Rose](https://twitter.com/UINT_MIN/) shared [an interesting easter egg](https://twitter.com/UINT_MIN/status/1098628355539124224): the [magic number](https://t.co/VE0jlyjZWA) for `swiftmodule` files is `E2 9C A8 0E`, or `✨14`, referring to the initial name for Swift and its (planned) release year. -### Commits and pull requests +The Server Side Swift Conference [posted](https://www.serversideswift.info/videos) all its videos from their latest event. -> TODO +Ray Wenderlich [created](https://www.raywenderlich.com/server-side-swift) an overview of Server Side Swift resources. -### Accepted proposals +Swift will once again [participate](https://forums.swift.org/t/swift-to-participate-in-gsoc-2019/20937) in the Google Summer of Code project this year. -> TODO +[Jordan Rose](https://twitter.com/UINT_MIN) shed [some more light](https://twitter.com/UINT_MIN/status/1098628355539124224) on Swift's initial "Shiny" name and where this can still be found within the project. ✨ -### Returned proposals - -> TODO +### Proposals in review -### Rejected proposals +[SE-0243](https://github.com/apple/swift-evolution/blob/master/proposals/0243-codepoint-and-character-literals.md): *Integer-convertible character literals* is [under review](https://forums.swift.org/t/se-0243-codepoint-and-character-literals/21188). -> TODO +> Swift’s `String` type is designed for Unicode correctness and abstracts away the underlying binary representation of the string to model it as a `Collection` of grapheme clusters. This is an appropriate string model for human-readable text, as to a human reader, the atomic unit of a string is (usually) the extended grapheme cluster. When treated this way, many logical string operations “just work” the way users expect. +> +> However, it is also common in programming to need to express values which are intrinsically numeric, but have textual meaning, when taken as an ASCII value. We propose adding a new literal syntax takes single-quotes (`'`), and is transparently convertible to Swift’s integer types. This syntax, but not the behavior, will extend to all “single element” text literals, up to and including `Character`, and will become the preferred literal syntax these types. -### Proposals in review +[SE-0244](https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md): *Opaque Result Types* is [under review](https://forums.swift.org/t/se-0244-opaque-result-types/21252). -> TODO +> This proposal introduces the ability to hide the specific result type of a function from its callers. The result type is described only by its capabilities, for example, to say that a function returns a `Collection` without specifying which specific collection. Clients can use the resulting values freely, but the underlying concrete type is known only to the implementation of the function and need not be spelled out explicitly. ### Swift Forums -https://forums.swift.org/t/a-swift-takes-flight/20845 +[Saleem Abdulrasool](https://twitter.com/compnerd) shared [an interesting progress update](https://forums.swift.org/t/a-swift-takes-flight/20845) on Swift on Windows. + +> After the Swift/Win32 post, I figure that some people may be curious as to the actual state of Swift for Windows. Well, I would like to share a small status update to that end. +> +> This has been a rather interesting and fun journey. I feel that up until this point, we have been making progress, but the surface area is pretty high, particularly for a single person to take on. I have been chipping away at this for a while now. However, as of today, I think that the situation is about to change. I have finally managed to get the compiler, the support libraries, the runtime, standard library, libdispatch, and now, Foundation to build and run on Windows! + +Awesome work! 🎉 + +[Joe Groff](https://twitter.com/jckarter) pitched [a proposal](https://forums.swift.org/t/protocol-assoctype-t-shorthand-for-combined-protocol-and-associated-type-constraints-without-naming-the-constrained-type/21217) that introduces a shorthand for combined protocol and associated type constraints without naming the constrained type. + +> Swift's notation for generic constraints generally requires naming the things being constrained; you say that a particular generic parameter conforms to a protocol by naming the generic parameter and the protocol it conforms to, like ``, and you put further constraints on its associated types by naming them in a where clause, like `C.Element: Equatable`. However, opaque result types, generalized existentials, and other conceivable future language features need a way to describe constraints on a type that doesn't otherwise have a name; an opaque type is intentionally hidden from the interface, and an existential's contained type is dynamic and can change at runtime. I can see this evolving into its own major design discussion so I figured it's a good idea to spin this off from the initial opaque result types proposal. +> +> To kick things off, I'd like to suggest borrowing another idea from Rust here: In Rust, you can use `T: Trait` as shorthand for a combined constraint that `T` implements `Assoc` and that `T.Assoc` is same-type-constrained to `Type`, as if you'd written `T: Trait where T.Assoc = Type`. This shorthand can also be used in Rust's equivalents of opaque types (`impl Trait`) and existentials (`dyn Trait`) in addition to generic type constraints. If we were going to do something similar for Swift, we could generalize it a bit so that the shorthand can be used for both protocol and same-type constraints on associated types and to allow constraints between associated types. The result might look something like this: + +{% highlight swift %} +// Leading dot is used to refer to an associated type +T: Protocol<.Type == Int> // T: Protocol where T.Type == Int +T: Protocol<.TypeA == .TypeB> // T: Protocol where T.TypeA == T.TypeB +T: Protocol<.Type: OtherProtocol> // T: Protocol where T.Type: OtherProtocol +{% endhighlight %} + +[Tony Allevato](https://twitter.com/tony_allevato) and [Dave Abrahams](https://twitter.com/daveabrahams) pitched [a proposal](https://forums.swift.org/t/pitch-an-official-style-guide-and-formatter-for-swift/21025) to introduce an official style guide and formatter for Swift. + +> We propose that the Swift project adopt a set of code style +> guidelines and provide a formatting tool that lets users easily +> diagnose and update their code according to those guidelines. +> +> At the time of this writing, there is no single style agreed on +> by developers using Swift. Indeed, even Apple's own Swift +> projects on GitHub—such as the standard library, Foundation, +> Swift NIO, and so forth—have adopted their own varying styles. +> Furthermore, in many cases the code in those projects—despite +> the owners' best efforts—is not always completely consistent in +> terms of style. + +[Michael Ilseman](https://twitter.com/Ilseman) pitched [a proposal](https://forums.swift.org/t/pitch-contiguous-strings/21206) to introduce the concept of contiguous strings. + +> One of the most common API requests from performance-minded users of string is a way to get direct access to the raw underlying code units. Now that Swift 5 uses UTF-8 for its preferred encoding, we can provide this. +> +> “Contiguous strings” are strings that are capable of providing a pointer and length to validly encoded UTF-8 contents in constant time. + +[Johannes Weiss](https://twitter.com/johannesweiss) has [announced](https://forums.swift.org/t/development-open-for-swift-4-2-4-for-linux/21287) that development for Swift 4.2.4 for Linux is now open. + +> Having released Swift 4.2.3, the February 2019 release where we could land a good number of fixes, we're now happy to open the development of Swift 4.2.4 for Linux. ### Finally -> TODO: something funny/fun. tweet, link, etc. +The Swift team has a new [emotional support dog](https://twitter.com/jckarter/status/1100431977755234306)! 🐶 From 35d39f36ff7c4417cb845d57df0f7731254a3169 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 7 Mar 2019 18:49:46 +0100 Subject: [PATCH 118/589] Move from drafts to posts (#443) --- {_drafts => _posts}/2019-03-07-issue-129.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2019-03-07-issue-129.md (100%) diff --git a/_drafts/2019-03-07-issue-129.md b/_posts/2019-03-07-issue-129.md similarity index 100% rename from _drafts/2019-03-07-issue-129.md rename to _posts/2019-03-07-issue-129.md From f34a48873e22d393b6a039c9eda584b5a417e374 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 7 Mar 2019 23:03:32 +0100 Subject: [PATCH 119/589] Update 2019-03-07-issue-129.md --- _posts/2019-03-07-issue-129.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2019-03-07-issue-129.md b/_posts/2019-03-07-issue-129.md index d0ca5266..85e1b23f 100644 --- a/_posts/2019-03-07-issue-129.md +++ b/_posts/2019-03-07-issue-129.md @@ -3,10 +3,10 @@ layout: post title: ! 'Issue #129' author: btb sponsor: - link: https://skafos.ai  + link: https://skafos.ai heading: Skafos.ai is Machine Learning for iOS Developers body: Skafos is the tool for iOS developers to deploy machine learning to their app. Get started with a pre-trained model, drop in the SDK and then updates are pushed to your app in the background. Sign up for the free beta today. - displaylink: skafos.ai  + displaylink: skafos.ai --- In the last two weeks, a lot about Swift has been discussed. Proposals, ideas, improvements, and updates galore. From d870f9ad957b0426843cb4a180dc1a0e822389b2 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 7 Mar 2019 23:05:11 +0100 Subject: [PATCH 120/589] Update 2019-03-07-issue-129.md --- _posts/2019-03-07-issue-129.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_posts/2019-03-07-issue-129.md b/_posts/2019-03-07-issue-129.md index 85e1b23f..a82b87c9 100644 --- a/_posts/2019-03-07-issue-129.md +++ b/_posts/2019-03-07-issue-129.md @@ -19,8 +19,7 @@ In the last two weeks, a lot about Swift has been discussed. Proposals, ideas, i - [TF-67](https://bugs.swift.org/browse/TF-67) [Autodiff] `BumpPtrAllocating` some classes that have `SmallBitVector` fields - [TF-86](https://bugs.swift.org/browse/TF-86) [Tests] Use `expectEqual` instead of `expectTrue` -- [TF-93](https://bugs.swift.org/browse/TF-93) [Graph Program Extraction -] Deabstraction should properly diagnose recursion +- [TF-93](https://bugs.swift.org/browse/TF-93) [Graph Program Extraction] Deabstraction should properly diagnose recursion - [TF-130](https://bugs.swift.org/browse/TF-130) [Graph Program Extraction] Add API to serialize a `@convention(tensorflow)` function as a graph ### Podcasts From 10d454656bc6d8c460562a677bfb985933500f05 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Thu, 7 Mar 2019 21:49:33 -0800 Subject: [PATCH 121/589] Update .travis.yml (#444) use bundler 2.0 per docs: https://docs.travis-ci.com/user/languages/ruby/#bundler-20 --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index ff746472..e446e624 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,10 @@ sudo: false cache: bundler rvm: 2.5.1 +before_install: + - gem update --system + - gem install bundler + script: - bundle exec jekyll build --future --drafts - bundle exec danger From 409d7683132c48655748907f11757bee65c0517a Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Fri, 8 Mar 2019 12:25:13 -0800 Subject: [PATCH 122/589] Update Dangerfile (#445) Attempts to improve proselint --- Dangerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dangerfile b/Dangerfile index 89bcc649..38867bfd 100644 --- a/Dangerfile +++ b/Dangerfile @@ -25,6 +25,9 @@ Looks like you're publishing a new issue! 🎉 end # Check spelling and prose +prose.language = "en-us" +prose.ignore_acronyms = true +prose.ignore_numbers = true prose.ignored_words = [ "Swift", "iOS", "macOS", "watchOS", "tvOS", "iPhone", "iPad", "nonnull", "nullable", "nullability", "corelibs-foundation", "corelibs-libdispatch", "stdlib", "GCD", "SwiftPM", From cc3389838a9e042317ee24003b1cc1dd5043ee34 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 9 Mar 2019 13:57:02 +0100 Subject: [PATCH 123/589] Initial issue 130 draft --- _drafts/2019-03-21-issue-130.md | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 _drafts/2019-03-21-issue-130.md diff --git a/_drafts/2019-03-21-issue-130.md b/_drafts/2019-03-21-issue-130.md new file mode 100644 index 00000000..cb172c5f --- /dev/null +++ b/_drafts/2019-03-21-issue-130.md @@ -0,0 +1,59 @@ +--- +layout: post +title: ! 'Issue #130' +author: btb +sponsor: + link: https://skafos.ai + heading: Skafos.ai is Machine Learning for iOS Developers + body: Skafos is the tool for iOS developers to deploy machine learning to their app. Get started with a pre-trained model, drop in the SDK and then updates are pushed to your app in the background. Sign up for the free beta today. + displaylink: skafos.ai +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +- [TF-336](https://bugs.swift.org/browse/TF-336) [Python] Add unit testing infrastructure for Python 2 and 3 +- [TF-337](https://bugs.swift.org/browse/TF-337) [Python] `PythonObject` conformance to `Sequence` uses array indexing instead of `Python.iter(...)` +- [TF-342](https://bugs.swift.org/browse/TF-342) [Python] Adopt Python iterator C API +- [TF-351](https://bugs.swift.org/browse/TF-351) [AutoDiff] Fixit `.withoutDerivative()` is inserted to the wrong place + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +[Chris Lattner]](https://twitter.com/clattner_llvm) and [Brennan Saeta](https://twitter.com/bsaeta) gave [a talk](https://www.youtube.com/watch?v=s65BigoMV_I) on Swift for TensorFlow. + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 4dfbe922f04c29543d873d5f5ef2e1207095e2f2 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 12 Mar 2019 21:46:57 +0100 Subject: [PATCH 124/589] Add proposals and fix a markdown issue --- _drafts/2019-03-21-issue-130.md | 49 ++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/_drafts/2019-03-21-issue-130.md b/_drafts/2019-03-21-issue-130.md index cb172c5f..bb525352 100644 --- a/_drafts/2019-03-21-issue-130.md +++ b/_drafts/2019-03-21-issue-130.md @@ -28,7 +28,7 @@ sponsor: ### News and community -[Chris Lattner]](https://twitter.com/clattner_llvm) and [Brennan Saeta](https://twitter.com/bsaeta) gave [a talk](https://www.youtube.com/watch?v=s65BigoMV_I) on Swift for TensorFlow. +[Chris Lattner](https://twitter.com/clattner_llvm) and [Brennan Saeta](https://twitter.com/bsaeta) gave [a talk](https://www.youtube.com/watch?v=s65BigoMV_I) on Swift for TensorFlow. ### Commits and pull requests @@ -36,11 +36,32 @@ sponsor: ### Accepted proposals -> TODO +[SE-0242](https://github.com/apple/swift-evolution/blob/master/proposals/0242-default-values-memberwise.md): *Synthesize default values for the memberwise initializer* was [accepted](https://forums.swift.org/t/accepted-se-0242-synthesize-default-values-for-the-memberwise-initializer/21475). + +> The proposal is accepted, with a request that the original proposal be amended for clarification of actual behavior. The Core Team felt that the proposal should more explicitly illustrate the actual behavior in a few specific cases, as this was the crux of some of the back-and-forth in the review thread. Note: the proposal has been updated to include more details in the [_proposed solution_](https://github.com/apple/swift-evolution/blob/b5bbc5ae1f53189641951acfd50870f5b886859e/proposals/0242-default-values-memberwise.md#proposed-solution) section, as requested by the Core Team. ### Returned proposals -> TODO +[SE-0245](https://github.com/apple/swift-evolution/blob/master/proposals/0245-array-uninitialized-initializer.md): *Add an Array Initializer with Access to Uninitialized Storage* was [returned for revision](https://forums.swift.org/t/se-0245-add-an-array-initializer-with-access-to-uninitialized-storage/21469) as (part of) [SE-0223](https://github.com/apple/swift-evolution/blob/master/proposals/0223-array-uninitialized-initializer.md). + +> This proposal suggests a new initializer for `Array` and `ContiguousArray` +> that provides access to an array's uninitialized storage buffer. +> +> Some collection operations require working on a fixed-size buffer of uninitialized memory. +> For example, one O(*n*) algorithm for performing a stable partition of an array is as follows: +> +> 1. Create a new array the same size as the original array. +> 2. Iterate over the original array, +> copying matching elements to the beginning of the new array +> and non-matching elements to the end. +> 3. When finished iterating, reverse the slice of non-matching elements. +> +> Unfortunately, the standard library provides no way to create an array of a +> particular size without initializing every element. Even if we +> avoid initialization by manually allocating the memory using an +> `UnsafeMutableBufferPointer`, there's no way to convert that buffer into an +> array without copying the contents. There simply isn't a way to implement this +> particular algorithm with maximum efficiency in Swift. ### Rejected proposals @@ -48,7 +69,27 @@ sponsor: ### Proposals in review -> TODO +[SE-0247](https://github.com/apple/swift-evolution/blob/master/proposals/0247-contiguous-strings.md): *Contiguous Strings* is [under review](https://forums.swift.org/t/se-0247-contiguous-strings/21483). + +> One of the most common API requests from performance-minded users of string is a way to get direct access to the raw underlying code units. Now that [Swift 5 uses UTF-8](https://forums.swift.org/t/string-s-abi-and-utf-8/17676) for its preferred encoding, we can provide this. +> +> “Contiguous strings” are strings that are capable of providing a pointer and length to [validly encoded](https://en.wikipedia.org/wiki/UTF-8#Invalid_byte_sequences) UTF-8 contents in constant time. Contiguous strings include: +> +> * All native Swift string forms +> * Lazily bridged Cocoa strings that provide a pointer to contiguous ASCII +> * Any “shared string” concept we may add in the future + +[SE-0246](https://github.com/apple/swift-evolution/blob/master/proposals/0246-mathable.md): *Generic Math(s) Functions* is [under review](https://forums.swift.org/t/se-0246-generic-math-s-functions/21479). + +> This proposal introduces two new protocols to the standard library: `ElementaryFunctions` +> and `Real`. These protocols combine to provide "basic math functions" in generic contexts +> for floating-point and SIMD types, and provide a path to extend that functionality to +> planned complex types in the future. +> +> `BinaryFloatingPoint` (and the protocols it refines) provides a powerful set of +> abstractions for writing numerical code, but it does not include the transcendental +> operations defined by the C math library, which are instead imported by the platform +> overlay as a set of overloaded concrete free functions. ### Swift Forums From a7ec328574234a99f6df631b8eb715c5ce67778d Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 16 Mar 2019 14:04:52 +0100 Subject: [PATCH 125/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 71831d49..1a100eee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,7 +22,7 @@ GEM colorize (0.8.1) commonmarker (0.17.13) ruby-enum (~> 0.5) - concurrent-ruby (1.1.4) + concurrent-ruby (1.1.5) cork (0.3.0) colored2 (~> 3.1) danger (5.16.1) From d36b60fdbbe7b7fc83dd5d93d6b0f8914baee1ca Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 16 Mar 2019 14:27:20 +0100 Subject: [PATCH 126/589] Add more things --- _drafts/2019-03-21-issue-130.md | 62 +++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 10 deletions(-) diff --git a/_drafts/2019-03-21-issue-130.md b/_drafts/2019-03-21-issue-130.md index bb525352..963bb583 100644 --- a/_drafts/2019-03-21-issue-130.md +++ b/_drafts/2019-03-21-issue-130.md @@ -9,7 +9,8 @@ sponsor: displaylink: skafos.ai --- -> TODO: intro comments +Last week, Apple [announced](https://developer.apple.com/wwdc19/) this year's +WWDC, while Swift is steadily progressing to what's next after Swift 5. @@ -22,17 +23,15 @@ sponsor: - [TF-342](https://bugs.swift.org/browse/TF-342) [Python] Adopt Python iterator C API - [TF-351](https://bugs.swift.org/browse/TF-351) [AutoDiff] Fixit `.withoutDerivative()` is inserted to the wrong place -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - ### News and community [Chris Lattner](https://twitter.com/clattner_llvm) and [Brennan Saeta](https://twitter.com/bsaeta) gave [a talk](https://www.youtube.com/watch?v=s65BigoMV_I) on Swift for TensorFlow. ### Commits and pull requests -> TODO +After about three years, [John Holdsworth](https://twitter.com/Injection4Xcode) +merged [a pull request](https://github.com/apple/swift/pull/22863) +implementing [SE-0068](https://github.com/apple/swift-evolution/blob/master/proposals/0068-universal-self.md): *Expanding Swift `Self` to class members and value types*! 💪 ### Accepted proposals @@ -63,11 +62,27 @@ sponsor: > array without copying the contents. There simply isn't a way to implement this > particular algorithm with maximum efficiency in Swift. -### Rejected proposals +### Proposals in review -> TODO +[SE-0248](https://github.com/apple/swift-evolution/blob/master/proposals/0248-string-gaps-missing-apis.md): *String Gaps and Missing APIs* is [under review](https://github.com/apple/swift-evolution/blob/master/proposals/0248-string-gaps-missing-apis.md). -### Proposals in review +> String and related types are missing trivial and obvious functionality, much +> of which currently exists internally but has not been made API. We propose +> adding 9 new methods/properties and 3 new code unit views. +> +> These missing APIs address [commonly encountered](https://forums.swift.org/t/efficiently-retrieving-utf8-from-a-character-in-a-string/19916) +> gaps and [missing functionality](https://bugs.swift.org/browse/SR-9955) for +> users of String and its various types, often leading developers to +> [reinvent](https://github.com/apple/swift-nio-http2/blob/master/Sources/NIOHPACK/HPACKHeader.swift#L412) +> the same trivial definitions. +> +> We propose: +> +> * 6 simple APIs on Unicode’s various encodings +> * 2 generic initializers for string indices and ranges of indices +> * `Substring.base`, equivalent to `Slice.base` +> * Make `Character.UTF8View` and `Character.UTF16View` public +> * Add `Unicode.Scalar.UTF8View` [SE-0247](https://github.com/apple/swift-evolution/blob/master/proposals/0247-contiguous-strings.md): *Contiguous Strings* is [under review](https://forums.swift.org/t/se-0247-contiguous-strings/21483). @@ -93,7 +108,34 @@ sponsor: ### Swift Forums -> TODO +[Doug Gregor](https://twitter.com/dgregor79/) pitched [a proposal](https://forums.swift.org/t/pitch-key-path-member-lookup/21579) around Key Path Member Lookup. + +> Dynamic member lookup allows a type to opt in to extending member lookup +> ("dot" syntax) for arbitrary member names, turning them into a string that +> can then be resolved at runtime. Dynamic member lookup allows +> interoperability with dynamic languages where the members of a particular +> instance can only be determined at runtime... but no earlier. Dynamic member +> lookups therefore tend to work with type-erased wrappers around foreign +> language objects (e.g., `PyVal` for an arbitrary Python object), which don't +> provide much static type information. +> +> [We propose to] introduce a new attribute `@keyPathMemberLookup` that can be +> placed on the definition of a type. For such types, "dot" syntax to access a +> member will be rewritten as a use of a special subscript whose argument is a +> key path describing the member. + +[Manolo van Ee](https://forums.swift.org/u/orobio/summary) wrote [a post](https://forums.swift.org/t/reverse-generics-and-opaque-result-types/21608) with thoughts on Opaque Result types. + +> I've been trying to wrap my head around [SE-0244](https://forums.swift.org/t/se-0244-opaque-result-types/21252): *Opaque Result Types* and +> recently I had some realizations that helped me understand the proposal +> better. I noticed I'm not the only one confused about it, so I thought I'd +> write down some things that might help others to get a better grasp of the +> concept as well. +> +> In doing so, I'd also like to try and rebrand opaque result types, or at +> least the underlying mechanism, to something I'm calling 'reverse generics'. +> I think viewing this all from a slightly different perspective helps a lot +> in understanding the concepts involved. ### Finally From 53fe476995930a6df4d8d817c2054cad31e03b6a Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 20 Mar 2019 20:51:50 +0100 Subject: [PATCH 127/589] Add more things --- _drafts/2019-03-21-issue-130.md | 67 ++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/_drafts/2019-03-21-issue-130.md b/_drafts/2019-03-21-issue-130.md index 963bb583..bb9abc0b 100644 --- a/_drafts/2019-03-21-issue-130.md +++ b/_drafts/2019-03-21-issue-130.md @@ -27,12 +27,24 @@ WWDC, while Swift is steadily progressing to what's next after Swift 5. [Chris Lattner](https://twitter.com/clattner_llvm) and [Brennan Saeta](https://twitter.com/bsaeta) gave [a talk](https://www.youtube.com/watch?v=s65BigoMV_I) on Swift for TensorFlow. +SwiftNIO 2 is upon us, having started [its convergence](https://forums.swift.org/t/swiftnio-2-repository-convergence-plan/21387). It includes [improvements to the public API](https://github.com/apple/swift-nio/blob/master/docs/public-api.md) and comes with a useful [migration guide](https://github.com/apple/swift-nio/blob/master/docs/migration-guide-NIO1-to-NIO2.md). 🚀 + +Johannes Weiss [shared](https://forums.swift.org/t/swift-log-is-open/21750) +that `swift-log` is now [available on GitHub](https://github.com/apple/swift-log). + +> [..] `swift-log` is only the start of a logging that works across the whole ecosystem. + ### Commits and pull requests After about three years, [John Holdsworth](https://twitter.com/Injection4Xcode) merged [a pull request](https://github.com/apple/swift/pull/22863) implementing [SE-0068](https://github.com/apple/swift-evolution/blob/master/proposals/0068-universal-self.md): *Expanding Swift `Self` to class members and value types*! 💪 +[Eric Eckstein](https://github.com/eeckstein) merged [a pull request](https://github.com/apple/swift/pull/23249) +that eliminates memory allocations from code making heavy use of generics, protocols with associated types, conditional conformances and various other language features: + +> These are temporary allocations made by the Swift runtime, while building type metadata. While in most cases the results are cached and reach a steady state, this will still help startup time. For casts to protocols where the type conditionally conforms, speeds up runtime too. + ### Accepted proposals [SE-0242](https://github.com/apple/swift-evolution/blob/master/proposals/0242-default-values-memberwise.md): *Synthesize default values for the memberwise initializer* was [accepted](https://forums.swift.org/t/accepted-se-0242-synthesize-default-values-for-the-memberwise-initializer/21475). @@ -64,6 +76,14 @@ implementing [SE-0068](https://github.com/apple/swift-evolution/blob/master/prop ### Proposals in review +[SE-0250](https://github.com/apple/swift-evolution/blob/master/proposals/0250-swift-style-guide-and-formatter.md): *Swift Code Style Guidelines and Formatter* is [under review](https://forums.swift.org/t/se-0250-swift-code-style-guidelines-and-formatter/21795). + +> We propose that the Swift project adopt a set of code style guidelines and provide a formatting tool that lets users easily diagnose and update their code according to those guidelines. These guidelines would not be mandatory for all projects, but encouraged for Swift code to follow for general consistency. + +[SE-0249](https://github.com/apple/swift-evolution/blob/master/proposals/0249-key-path-literal-function-expressions.md): *Key Path Expressions as Functions* is [under review](https://forums.swift.org/t/se-0249-key-path-expressions-as-functions/21780). + +> This proposal introduces the ability to use the key path expression `\Root.value` wherever functions of `(Root) -> Value` are allowed. + [SE-0248](https://github.com/apple/swift-evolution/blob/master/proposals/0248-string-gaps-missing-apis.md): *String Gaps and Missing APIs* is [under review](https://github.com/apple/swift-evolution/blob/master/proposals/0248-string-gaps-missing-apis.md). > String and related types are missing trivial and obvious functionality, much @@ -108,6 +128,16 @@ implementing [SE-0068](https://github.com/apple/swift-evolution/blob/master/prop ### Swift Forums +[Michael Ilseman](https://twitter.com/ilseman) shared [some background information](https://forums.swift.org/t/piercing-the-string-veil/21700) +about what is available in String’s ABI in Swift 5. + +> String’s ABI encodes information for performant processing and future flexibility, allowing the standard library to run faster and producer smaller and more flexible code. But, this information is not available as API for low-level programming as it’s hidden behind the abstraction of the String type. With this information formally part of `String`'s ABI, we should lift the veil of the `String` type and start exposing these as API. + +[Michael Munday](https://forums.swift.org/u/mundaym/summary) shared [an update](https://forums.swift.org/t/fixing-enums-on-big-endian-systems/21730) +summarizing the implementation of the `enum` layout. + +> The issues this post is concerned with affect enums with multiple cases, one or more of which has a payload. In the Swift compiler enums fitting this description are implemented either as a single-payload enum or a multi-payload enum. A single-payload enum consists of exactly one case with a payload as well as one or more empty cases. Multi-payload enums are any other enum with multiple cases and one or more payloads. In particular, multi-payload enums are used whenever there are multiple cases with payloads regardless of whether the payloads have the same type. + [Doug Gregor](https://twitter.com/dgregor79/) pitched [a proposal](https://forums.swift.org/t/pitch-key-path-member-lookup/21579) around Key Path Member Lookup. > Dynamic member lookup allows a type to opt in to extending member lookup @@ -137,6 +167,41 @@ implementing [SE-0068](https://github.com/apple/swift-evolution/blob/master/prop > I think viewing this all from a slightly different perspective helps a lot > in understanding the concepts involved. +[Tom Doron](https://twitter.com/TomerDoron) shared [a proposal](https://forums.swift.org/t/feedback-server-metrics-api/21353) +for a Server Metrics API. + +> Almost all production server software needs to emit metrics information for observability. The SSWG aims to provide a number of packages that can be shared across the whole Swift Server ecosystem so we need some amount of standardization. Because it's unlikely that all parties can agree on one full metrics implementation, this proposal is attempting to establish a metrics API that can be implemented by various metrics backends which then post the metrics data to backends like prometheus, graphite, publish over statsd, write to disk, etc. +> +> As outlined above, we should standardize on an API that if well adopted would allow application owners to mix and match libraries from different parties with a consistent metrics collection solution. + +[Vinicius Vendramini](https://twitter.com/vvendra) pitched [a proposal](https://forums.swift.org/t/pitch-introduce-custom-attributes/21335) +to introduce custom attributes. + +> Swift currently supports marking declarations with attributes, such as `@objc` and `@deprecated`. The compiler uses these attributes to change the way it interprets the corresponding code. However, there is no support for declaring and using new attributes to suit the needs of a project or library. This proposal aims to change that. + +[Dan Zheng](https://github.com/dan-zheng) and [Richard Wei](https://twitter.com/rxwei) pitched [a proposal](https://forums.swift.org/t/pitch-introduce-static-callables/21732) +to introduce (static) callables in Swift. + +> This proposal introduces [callables](https://en.wikipedia.org/wiki/Callable_object) to Swift. Values that behave like functions can take advantage of this syntactic sugar, to look like a function call when they are called. +> +> In a nutshell, we propose to introduce a new declaration syntax with the keyword `call`: + +{% highlight swift %} +struct Adder { + var base: Int + call(_ x: Int) -> Int { + return base + x + } +} +{% endhighlight %} + +> Values that have a call member can be applied like a function, forwarding arguments to the call member. + +{% highlight swift %} +let add3 = Adder(base: 3) +add3(10) // => 13 +{% endhighlight %} + ### Finally -> TODO: something funny/fun. tweet, link, etc. +Ever created a ["small"](https://twitter.com/oskargroth/status/1106693954991476745) memory leak? 🚰 From 6dfd1571bfa4099ea9d729e89cb641a7542e5e2a Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 Mar 2019 19:11:15 +0100 Subject: [PATCH 128/589] Move 130 to posts (#447) --- {_drafts => _posts}/2019-03-21-issue-130.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2019-03-21-issue-130.md (100%) diff --git a/_drafts/2019-03-21-issue-130.md b/_posts/2019-03-21-issue-130.md similarity index 100% rename from _drafts/2019-03-21-issue-130.md rename to _posts/2019-03-21-issue-130.md From a7213a4b4039ebec2d17b3f113265c514abd0700 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 23 Mar 2019 00:18:27 +0100 Subject: [PATCH 129/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 76ed8313..51729cb8 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,600 subscribers and over 7,600 followers on Twitter. +There are over 3,600 subscribers and over 7,700 followers on Twitter.

Sponsored Links

From 4cb7c4805f772e2b4f7283055887833f47aabbc5 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 23 Mar 2019 19:43:27 +0100 Subject: [PATCH 130/589] Push initial draft for issue 131 --- _drafts/2019-04-04-issue-131.md | 165 ++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 _drafts/2019-04-04-issue-131.md diff --git a/_drafts/2019-04-04-issue-131.md b/_drafts/2019-04-04-issue-131.md new file mode 100644 index 00000000..aed57fea --- /dev/null +++ b/_drafts/2019-04-04-issue-131.md @@ -0,0 +1,165 @@ +--- +layout: post +title: ! 'Issue #131' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +- [TF-360](https://bugs.swift.org/browse/TF-360) [Tests] Create unit test for `TensorFlow.h:convertSwiftTypeToTF` +- [TF-361](https://bugs.swift.org/browse/TF-361) [Python interop] Python member lookup error gives bad error message + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +[Michael Ilseman](https://twitter.com/ilseman/) wrote [about `UTF-8` `String`](https://swift.org/blog/utf8-string/) +on the Swift.org blog. + +> Swift 5 switches the preferred encoding of strings from `UTF-16` to `UTF-8` +> while preserving efficient Objective-C-interoperability. Because the `String` +> type abstracts away these low-level concerns, no source-code changes from +> developers should be necessary, but it’s worth highlighting some of the +> benefits this move gives us now and in the future. + +### Commits and pull requests + +[Nathan Hawes](https://github.com/nathawes) merged [a pull request](https://github.com/apple/swift/pull/23448) +to fix variable renaming in switches. + +### Accepted proposals + +[SE-0248](https://github.com/apple/swift-evolution/blob/master/proposals/0248-string-gaps-missing-apis.md): *String Gaps and Missing APIs* was [accepted](https://forums.swift.org/t/se-0248-string-gaps-and-missing-apis/21588/5). + + +> This proposal has been accepted. Thank you to everyone who participated in the +> review of this proposal. + +[SE-0245](https://github.com/apple/swift-evolution/blob/master/proposals/0245-array-uninitialized-initializer.md): *Add an Array Initializer with Access to Uninitialized Storage* was [accepted](https://forums.swift.org/t/se-0245-add-an-array-initializer-with-access-to-uninitialized-storage/21469/18). + +> Based on the review feedback, SE-0245 has been accepted as written. Thank you +> to everyone who reviewed this proposal and provided feedback! + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +[SE-0251](https://github.com/apple/swift-evolution/blob/master/proposals/0251-simd-additions.md): *SIMD additions* is [under review](https://forums.swift.org/t/se-0251-simd-additions/21957). + +> A few teams within Apple have requested additions to the new SIMD types and +> protocols to better support their use cases. In addition, there are some +> features we punted out of the original review because we were up against a +> hard time deadline to which we would like to give further consideration. + +### Swift Forums + +[Joe Groff](https://twitter.com/jckarter/) shares why the closure syntax uses [the `in` keyword](https://forums.swift.org/t/history-why-does-closure-syntax-use-the-keyword-in/21885/2). + +> It's my fault, sorry. In the early days of Swift, we had a closure syntax +> that was very similar to traditional Javascript, +> `func (arg: Type, arg: Type) -> Return { ... }`. While this is nice and +> regular syntax, it is of course also very bulky and awkward if you're trying +> to support expressive functional APIs, such as `map`/`filter` on collections, +> or if you want libraries to be able to provide closure-based APIs that feel +> like extensions of the language. +> +> Our earliest adopters at Apple complained about this, and mandated that we +> support Ruby-style trailing closure syntax. +> This is tricky to fit into a C-style syntax like Swift's, and we tried many +> different iterations, including literally Ruby's `{|args| }` syntax, but many +> of them suffered from ambiguities or simply distaste and revolt from our +> early adopters. We wanted something that still looked like other parts of the +> language, but which could be parsed unambiguously and could span the breadth +> of use cases from a fully explicit function signature to extremely compact. +> +> We had already taken `in` as a keyword, we couldn't use `->` like Java does +> because it's already used to denote the return type, and we were concerned +> that using `=>` like C# would be too visually confusing. `in` made +> `xs.map { x in f(x) }` look vaguely like `for x in xs { f(x) }`, and people +> hated it less than the alternatives. + +[Nate Chandler](https://twitter.com/neightchan) pitched [a proposal](https://forums.swift.org/t/pitch-implicit-returns-from-single-expression-functions/21898) for implicit +returns from Single-Expression Functions. + +> Swift provides a pleasant shorthand for short closures: if a closure contains +> just a single expression, that expression is implicitly returned — the +> `return` keyword can be omitted. We should provide this shorthand for +> functions as well. + +[Doug Gregor](https://twitter.com/dgregor79) +pitched [a proposal](https://forums.swift.org/t/pitch-property-delegates/21895) +to add Property Delegates. + +> There are property implementation patterns that come up repeatedly. Rather +> than hardcode a fixed set of patterns into the compiler, we should provide a +> general "property delegate" mechanism to allow these patterns to be defined +> as libraries. +> +> This is an alternative approach to some of the problems intended to be +> addressed by the [2015-2016 property behaviors proposal](https://github.com/apple/swift-evolution/blob/master/proposals/0030-property-behavior-decls.md). +> Some of the examples are the same, but this proposal is a completely +> different approach designed to be simpler, easier to understand for users, +> and less invasive in the compiler implementation. There is a section that +> discusses the substantive differences from that design at the end of this +> proposal. + +[Brent Royal-Gordon](https://twitter.com/brentdax) +pitched [a proposal](https://forums.swift.org/t/pitch-static-and-class-subscripts/21850) +to allow `static` and `class` subscripts. + +> We propose allowing `static subscript` and, in classes, `class subscript` +> declarations. These could be used through either `TypeName[index]` or +> `TypeName.self[index]` and would have all of the capabilities you would +> expect of a subscript. We also propose extending dynamic member lookup and +> key paths to static properties by using static subscripts. + +[Michael Ilseman]() gave [an update](https://forums.swift.org/t/string-consumption/21907) +on "`String` Consumption". + +> **Collection consumers** +> +> Processing a string, or any `Collection` really, typically involves tracking +> and advancing a position (i.e. an `Index`). This makes something akin to +> `Slice` a great basis to add consuming operations, which advance indices from +> the front (or back if bidirectional). +> +> There are at least 3 ways to surface this: +> +> 1. A new wrapper type +> 2. Add these to `Slice` +> 3. Add these to all `Collection`s that are their own `SubSequence` +> +> Here's [an example](https://gist.github.com/milseman/f9b5528345db3a36bbdd138af52c5cda) +> of approach 3, which would put this functionality in a lot of namespaces +> (`Slice`, `Substring`, even `Data`). Having these broadly available could +> help discoverability, but we also don’t want to pollute namespaces. These are +> all "mutating" because they advance indices, but not because they modify the +> underlying collection. We need to see some usage to evaluate the tradeoffs. +> +> **Regex** +> +> I wrote more about regexes [here](https://gist.github.com/milseman/bb39ef7f170641ae52c13600a512782f#one-possible-approach) +> Regexes did not make it in Swift 5, but we should still pursue them. + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From b91fd432ed51484e745cef4d360f9f4182d9965b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 23 Mar 2019 19:43:36 +0100 Subject: [PATCH 131/589] Run bundle update --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1a100eee..e787065a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -131,9 +131,9 @@ GEM jekyll-coffeescript (1.1.1) coffee-script (~> 2.2) coffee-script-source (~> 1.11.1) - jekyll-commonmark (1.2.0) + jekyll-commonmark (1.3.0) commonmarker (~> 0.14) - jekyll (>= 3.0, < 4.0) + jekyll (>= 3.7, < 5.0) jekyll-commonmark-ghpages (0.1.5) commonmarker (~> 0.17.6) jekyll-commonmark (~> 1) @@ -211,7 +211,7 @@ GEM jekyll-seo-tag (~> 2.0) jekyll-titles-from-headings (0.5.1) jekyll (~> 3.3) - jekyll-watch (2.1.2) + jekyll-watch (2.2.1) listen (~> 3.0) jemoji (0.10.2) gemoji (~> 3.0) From 67be6340ab482eebd505e21f2febce89c82eabed Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 26 Mar 2019 23:06:23 +0100 Subject: [PATCH 132/589] 252 in review --- _drafts/2019-04-04-issue-131.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/_drafts/2019-04-04-issue-131.md b/_drafts/2019-04-04-issue-131.md index aed57fea..4d60ae1a 100644 --- a/_drafts/2019-04-04-issue-131.md +++ b/_drafts/2019-04-04-issue-131.md @@ -63,6 +63,21 @@ to fix variable renaming in switches. ### Proposals in review +[SE-0252](https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md): *Key Path Member Lookup* is [under review](https://forums.swift.org/t/se-0252-key-path-member-lookup/22172). + +> This proposal attempts to enable stronger-typed version of the dynamic member +> lookup by extending functionality of an existing `@dynamicMemberLookup` +> attribute with key path based variants. +> +> Dynamic member lookup allows a type to opt in to extending member lookup +> ("dot" syntax) for arbitrary member names, turning them into a string that +> can then be resolved at runtime. Dynamic member lookup allows +> interoperability with dynamic languages where the members of a particular +> instance can only be determined at runtime... but no earlier. Dynamic member +> lookups, therefore, tend to work with type-erased wrappers around foreign +> language objects (e.g., `PyVal` for an arbitrary Python object), which don't +> provide much static type information. + [SE-0251](https://github.com/apple/swift-evolution/blob/master/proposals/0251-simd-additions.md): *SIMD additions* is [under review](https://forums.swift.org/t/se-0251-simd-additions/21957). > A few teams within Apple have requested additions to the new SIMD types and From 2edfd8138f9bfa898eeb5ca3fcc700640fe043c0 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 26 Mar 2019 23:10:35 +0100 Subject: [PATCH 133/589] Add more swift evolution updates --- _drafts/2019-04-04-issue-131.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/_drafts/2019-04-04-issue-131.md b/_drafts/2019-04-04-issue-131.md index 4d60ae1a..b394b8a7 100644 --- a/_drafts/2019-04-04-issue-131.md +++ b/_drafts/2019-04-04-issue-131.md @@ -44,10 +44,15 @@ to fix variable renaming in switches. [SE-0248](https://github.com/apple/swift-evolution/blob/master/proposals/0248-string-gaps-missing-apis.md): *String Gaps and Missing APIs* was [accepted](https://forums.swift.org/t/se-0248-string-gaps-and-missing-apis/21588/5). - > This proposal has been accepted. Thank you to everyone who participated in the > review of this proposal. +[SE-0247](https://github.com/apple/swift-evolution/blob/master/proposals/0247-contiguous-strings.md): *Contiguous Strings* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modification-se-0247-contiguous-strings/22111). + +> The proposal is accepted with one small naming modification: `isContiguous` +> and `makeContiguous()` have been renamed to `isContiguousUTF8` and +> `makeContiguousUTF8()`, respectively. + [SE-0245](https://github.com/apple/swift-evolution/blob/master/proposals/0245-array-uninitialized-initializer.md): *Add an Array Initializer with Access to Uninitialized Storage* was [accepted](https://forums.swift.org/t/se-0245-add-an-array-initializer-with-access-to-uninitialized-storage/21469/18). > Based on the review feedback, SE-0245 has been accepted as written. Thank you @@ -55,7 +60,25 @@ to fix variable renaming in switches. ### Returned proposals -> TODO +[SE-0244](https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md): *Opaque Result Types* was [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0244-opaque-result-types/22115). + +> The core team has considered the feedback from the review so far and has +> decided the proposal should be returned for revision. +> +> This proposal and implementation lay important groundwork, but it is clear +> from the review that work described in the "future directions" section is +> necessary to make this a complete and well-integrated language feature. There +> are also similarities to and differences with another feature of generalized +> existentials. +> +> In order to better consider this proposal as one of a series of potential +> additions to the language, the core team is recommending that the proposal +> authors put together a manifesto outlining in more detail the full arc of +> these features, similar to the generics manifesto. +> +> The authors expect to be able to present such a document soon, and rework +> this proposal to fit into that context, at which point we will re-open the +> review. ### Rejected proposals From 44b80b6b865e9c66fc3c694cdb9886f8db19bc48 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 27 Mar 2019 22:20:46 +0100 Subject: [PATCH 134/589] 243 rejected --- _drafts/2019-04-04-issue-131.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/_drafts/2019-04-04-issue-131.md b/_drafts/2019-04-04-issue-131.md index b394b8a7..54c44c88 100644 --- a/_drafts/2019-04-04-issue-131.md +++ b/_drafts/2019-04-04-issue-131.md @@ -82,7 +82,14 @@ to fix variable renaming in switches. ### Rejected proposals -> TODO +[SE-0243](https://github.com/apple/swift-evolution/blob/master/proposals/0243-codepoint-and-character-literals.md): *Integer-convertible character literals* was [rejected](https://forums.swift.org/t/se-0243-codepoint-and-character-literals/21188/341). + +> The review for SE-0243 has ended and the proposal has been rejected. +> +> To move forward on this topic, and to help the community converge on more of +> a consensus around these features, the core team recommends breaking this +> proposal out into two separate proposals that could be re-pitched and +> (depending on the pitch outcome) re-run. ### Proposals in review From 384fa2247c93d88b1925e087e87000faf5d4fb78 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 27 Mar 2019 22:23:36 +0100 Subject: [PATCH 135/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e787065a..148e621c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -131,7 +131,7 @@ GEM jekyll-coffeescript (1.1.1) coffee-script (~> 2.2) coffee-script-source (~> 1.11.1) - jekyll-commonmark (1.3.0) + jekyll-commonmark (1.3.1) commonmarker (~> 0.14) jekyll (>= 3.7, < 5.0) jekyll-commonmark-ghpages (0.1.5) @@ -233,7 +233,7 @@ GEM multipart-post (2.0.0) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.10.1) + nokogiri (1.10.2) mini_portile2 (~> 2.4.0) octokit (4.13.0) sawyer (~> 0.8.0, >= 0.5.3) From 60356c651c0cd2e9a6e5bbe19168d8d97e320f6b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 29 Mar 2019 23:00:36 +0100 Subject: [PATCH 136/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 148e621c..979b2f60 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -235,7 +235,7 @@ GEM no_proxy_fix (0.1.2) nokogiri (1.10.2) mini_portile2 (~> 2.4.0) - octokit (4.13.0) + octokit (4.14.0) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) pathutil (0.16.2) From a4fd2f30a81b12036d952a7b555a039c10f58ee3 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 29 Mar 2019 23:10:16 +0100 Subject: [PATCH 137/589] Add more proposal updates --- _drafts/2019-04-04-issue-131.md | 71 ++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/_drafts/2019-04-04-issue-131.md b/_drafts/2019-04-04-issue-131.md index 54c44c88..66285227 100644 --- a/_drafts/2019-04-04-issue-131.md +++ b/_drafts/2019-04-04-issue-131.md @@ -9,7 +9,7 @@ sponsor: displaylink: TODO --- -> TODO: intro comments +Xcode 10.2, Swift 5, Swift 5.1, _tons_ of proposals @@ -42,6 +42,11 @@ to fix variable renaming in switches. ### Accepted proposals +[SE-0249](https://github.com/apple/swift-evolution/blob/master/proposals/0249-key-path-literal-function-expressions.md): *Key Path Expressions as Functions* was [accepted](https://forums.swift.org/t/accepted-se-0249-key-paths-expressions-as-functions/22287). + +> Hi everyone, The review period has now ended and this proposal has been +> accepted. Thanks for your feedback during the review! + [SE-0248](https://github.com/apple/swift-evolution/blob/master/proposals/0248-string-gaps-missing-apis.md): *String Gaps and Missing APIs* was [accepted](https://forums.swift.org/t/se-0248-string-gaps-and-missing-apis/21588/5). > This proposal has been accepted. Thank you to everyone who participated in the @@ -53,6 +58,44 @@ to fix variable renaming in switches. > and `makeContiguous()` have been renamed to `isContiguousUTF8` and > `makeContiguousUTF8()`, respectively. +[SE-0246](https://github.com/apple/swift-evolution/blob/master/proposals/0246-mathable.md): *Generic Math(s) Functions* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0246-generic-math-functions/22244). + +> Hi, everybody. The review for SE-0246: Generic Math Functions ran from March +> 11th through the 25th. This review was extended several times in order to +> make some adjustments in response to feedback gathered during the review. +> The core team would be interested in getting feedback from reviewers on how +> they felt about this rapid iteration, and in particular on whether they felt +> it detracted from the process overall. +> +> Feedback was positive on the general idea of providing a standard way of +> accessing this functionality. Some suggestions were made that the authors +> agreed with and chose to immediately incorporate into the proposal, leading +> to extension of the review period. The main suggestions that weren't +> incorporated into mid-review revisions were as follows: +> +> - Several people expressed unhappiness that `log` meant the natural logarithm +> (base _e_). Unfortunately, as observed in the review, the most obvious +> alternative name for the natural logarithm is ln, which is not a good +> programming name: it's too short and too visually similar to keywords like +> `in`. `log` for the natural logarithm is also extensively precedented in +> many programming languages, including C, Swift's most obvious antecedent (and +> the way that people have gained access to this functionality in Swift before +> this proposal). Ultimately, the core team believes that sticking with `log` is +> the best choice even if there's some risk of people using it when they meant +> `log10` or `log2`. +> +> - There was a suggestion that create a `Math` module might create conflicts +> with names used by other libraries today. The core team agrees that this is +> an issue which needs further study and work, but decided to define it away +> for this proposal by simply merging the proposed Math module directly into +> the Swift module, which already has some similar math functions (such as `min` +> and `floor`); there didn't seem to be a strong motivation for separating out +> the functions proposed here. +> +> Therefore, SE-0246 is accepted with the modifications that the `Math` library +> should not be added and that the proposed new entities in it should instead +> be added directly to Swift. + [SE-0245](https://github.com/apple/swift-evolution/blob/master/proposals/0245-array-uninitialized-initializer.md): *Add an Array Initializer with Access to Uninitialized Storage* was [accepted](https://forums.swift.org/t/se-0245-add-an-array-initializer-with-access-to-uninitialized-storage/21469/18). > Based on the review feedback, SE-0245 has been accepted as written. Thank you @@ -93,6 +136,32 @@ to fix variable renaming in switches. ### Proposals in review +[SE-0253](https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md): *Introduce callables* is [under review](https://forums.swift.org/t/se-0253-static-callables/22243). + +> This proposal introduces [callables](https://en.wikipedia.org/wiki/Callable_object) +> to Swift. Callables are values that define function-like behavior and can be +> applied using function application syntax. +> +> In a nutshell, we propose to introduce a new declaration syntax with the +> keyword `call`: + +{% highlight swift %} +struct Adder { + var base: Int + call(_ x: Int) -> Int { + return base + x + } +} +{% endhighlight %} + +> Values that have a `call` member can be applied like functions, forwarding +> arguments to the `call` member. + +{% highlight swift %} +let add3 = Adder(base: 3) +add3(10) // => 13 +{% endhighlight %} + [SE-0252](https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md): *Key Path Member Lookup* is [under review](https://forums.swift.org/t/se-0252-key-path-member-lookup/22172). > This proposal attempts to enable stronger-typed version of the dynamic member From 2b26a5c24e05050a161227d1dd49d75c432f4b4f Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 29 Mar 2019 23:16:22 +0100 Subject: [PATCH 138/589] Update sponsorship.md --- sponsorship.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 51729cb8..0b3dae67 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,13 +60,19 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
|   Issue |   Status | |:-|:-| -| March 07 | **Booked** | -| March 21 | **Booked** | -| April 04 | Open | -| April 18 | Open | -| May 2 | Open | -| May 16 | Open | -| May 30 | Open | +| April 04 | Open | +| April 18 | Open | +| May 2 | Open | +| May 16 | Open | +| May 30 | Open | +| June 13 | Open | +| June 27 | Open | +| July 11 | Open | +| July 25 | Open | +| August 8 | Open | +| August 22 | Open | +| September 5 | Open | +| September 19 | Open | {: class="table table-striped table-bordered"}
From d65fa0a406df0aef05ea1fa28572a49ddcf9ba80 Mon Sep 17 00:00:00 2001 From: Federico Zanetello Date: Mon, 1 Apr 2019 18:26:04 +0700 Subject: [PATCH 139/589] Fix sentence (#451) --- _posts/2018-10-04-issue-119.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-10-04-issue-119.md b/_posts/2018-10-04-issue-119.md index 364ef826..a5d66e6f 100644 --- a/_posts/2018-10-04-issue-119.md +++ b/_posts/2018-10-04-issue-119.md @@ -44,7 +44,7 @@ Enjoy the newsletter and have a great weekend and week! ### Accepted proposals -[SE-0221](https://github.com/apple/swift-evolution/blob/master/proposals/0221-character-properties.md): *Character Properties* was [acceptance status was updated](https://forums.swift.org/t/accepted-with-modification-se-0221-character-properties/14944/3). +[SE-0221](https://github.com/apple/swift-evolution/blob/master/proposals/0221-character-properties.md): *Character Properties* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modification-se-0221-character-properties/14944/3). > The core team has resolved to change the status of this proposal to **accepted** with modification, deferring the `.isEmoji` property to a later proposal. > From f8358f3298c0ac5f90e2e3d3ba008ce151be0fde Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 3 Apr 2019 21:34:21 +0200 Subject: [PATCH 140/589] Add more proposal updates --- _drafts/2019-04-04-issue-131.md | 37 +++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/_drafts/2019-04-04-issue-131.md b/_drafts/2019-04-04-issue-131.md index 66285227..50d07801 100644 --- a/_drafts/2019-04-04-issue-131.md +++ b/_drafts/2019-04-04-issue-131.md @@ -2,11 +2,6 @@ layout: post title: ! 'Issue #131' author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO --- Xcode 10.2, Swift 5, Swift 5.1, _tons_ of proposals @@ -22,7 +17,8 @@ Xcode 10.2, Swift 5, Swift 5.1, _tons_ of proposals ### Podcasts -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +In episode 73 of Swift Unwrapped, Jesse and JP [discuss](https://spec.fm/podcasts/swift-unwrapped/288713) +`UTF-8` Strings in Swift 5. ### News and community @@ -42,6 +38,13 @@ to fix variable renaming in switches. ### Accepted proposals +[SE-0252](https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md): *Key Path Member Lookup* was [accepted](https://forums.swift.org/t/accepted-se-0252-key-path-member-lookup/22570/2). + +> The review of this proposal has been unanimously positive. Leading up to the +> end of the review period the feedback tapered off, and the Core Team decided +> to move ahead and conclude the review a couple days early and accept the +> proposal. + [SE-0249](https://github.com/apple/swift-evolution/blob/master/proposals/0249-key-path-literal-function-expressions.md): *Key Path Expressions as Functions* was [accepted](https://forums.swift.org/t/accepted-se-0249-key-paths-expressions-as-functions/22287). > Hi everyone, The review period has now ended and this proposal has been @@ -136,6 +139,28 @@ to fix variable renaming in switches. ### Proposals in review +[SE-0256](https://github.com/apple/swift-evolution/blob/master/proposals/0256-contiguous-collection.md): *Introduce `{Mutable}ContiguousCollection` protocol* is [under review](https://forums.swift.org/t/se-0256-introduce-mutable-contiguouscollection-protocol/22569). + +> This proposal introduces two new protocols: `ContiguousCollection`, which +> refines `Collection`, and `MutableContiguousCollection`, which refines +> `MutableCollection`. Both provide guaranteed access to an underlying +> unsafe buffer. + +[SE-0255](https://github.com/apple/swift-evolution/blob/master/proposals/0255-omit-return.md): *Implicit returns from single-expression functions* is [under review](https://forums.swift.org/t/se-0255-implicit-returns-from-single-expression-functions/22544). + +> Swift provides a pleasant shorthand for short closures: if a closure contains +> just a single expression, that expression is implicitly returned--the `return` +> keyword can be omitted. We should provide this shorthand for functions as +> well. + +[SE-0254](https://github.com/apple/swift-evolution/blob/master/proposals/0254-static-subscripts.md): *Static and class subscripts* is [under review](https://forums.swift.org/t/se-0254-static-and-class-subscripts/22537). + +> We propose allowing `static subscript` and, in classes, `class subscript` +> declarations. These could be used through either `TypeName[index]` or +> `TypeName.self[index]` and would have all of the capabilities you would +> expect of a subscript. We also propose extending dynamic member lookup to +> static properties by using static subscripts. + [SE-0253](https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md): *Introduce callables* is [under review](https://forums.swift.org/t/se-0253-static-callables/22243). > This proposal introduces [callables](https://en.wikipedia.org/wiki/Callable_object) From d97537fdf7ef9b07962dd5108286cb4e4127e504 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 4 Apr 2019 16:26:32 +0200 Subject: [PATCH 141/589] Post issue 131 Closes #448 --- {_drafts => _posts}/2019-04-04-issue-131.md | 54 +++++++++++++++++++-- 1 file changed, 50 insertions(+), 4 deletions(-) rename {_drafts => _posts}/2019-04-04-issue-131.md (83%) diff --git a/_drafts/2019-04-04-issue-131.md b/_posts/2019-04-04-issue-131.md similarity index 83% rename from _drafts/2019-04-04-issue-131.md rename to _posts/2019-04-04-issue-131.md index 50d07801..eec47acb 100644 --- a/_drafts/2019-04-04-issue-131.md +++ b/_posts/2019-04-04-issue-131.md @@ -4,7 +4,11 @@ title: ! 'Issue #131' author: btb --- -Xcode 10.2, Swift 5, Swift 5.1, _tons_ of proposals +A busy two weeks: the long-awaiting Swift 5 was released, alongside Xcode 10.2. +It took a while, but it is awesome to see this great release come to life. + +Furthermore, Swift 5.1 is already being worked on, and there are _tons_ of +proposals ongoing, so you can expect a lot more interesting things to come! @@ -13,7 +17,8 @@ Xcode 10.2, Swift 5, Swift 5.1, _tons_ of proposals ### Starter tasks - [TF-360](https://bugs.swift.org/browse/TF-360) [Tests] Create unit test for `TensorFlow.h:convertSwiftTypeToTF` -- [TF-361](https://bugs.swift.org/browse/TF-361) [Python interop] Python member lookup error gives bad error message +- [TF-416](https://bugs.swift.org/browse/TF-416) [Python interop] Produce error upon second usage of `PythonLibrary.useVersion` +- [TF-419](https://bugs.swift.org/browse/TF-419) Improve tensor printing ### Podcasts @@ -31,11 +36,23 @@ on the Swift.org blog. > developers should be necessary, but it’s worth highlighting some of the > benefits this move gives us now and in the future. +SwiftNIO 2 [has been released](https://forums.swift.org/t/swiftnio-2/22136)! + +Swift 5 [has been released](https://swift.org/blog/swift-5-released/)! You can +find the release notes [here](https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_release_notes/swift_5_release_notes_for_xcode_10_2). + ### Commits and pull requests [Nathan Hawes](https://github.com/nathawes) merged [a pull request](https://github.com/apple/swift/pull/23448) to fix variable renaming in switches. +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/23734) +that adds support for default arguments on subscripts. 🎉 + +[Ben Langmuir](https://twitter.com/benlangmuir) merged [a pull request](https://github.com/apple/swift/pull/23674) +that fixes an infinite looping looking up superclasses, the same day it was +[reported](https://bugs.swift.org/browse/SR-10236). 🏎 + ### Accepted proposals [SE-0252](https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md): *Key Path Member Lookup* was [accepted](https://forums.swift.org/t/accepted-se-0252-key-path-member-lookup/22570/2). @@ -244,6 +261,16 @@ returns from Single-Expression Functions. > `return` keyword can be omitted. We should provide this shorthand for > functions as well. +[David Smith](https://twitter.com/Catfish_Man) pitched [a proposal](https://forums.swift.org/t/pitch-add-a-string-initializer-with-access-to-uninitialized-storage/22611) +to add a `String` initializer with access to uninitialized storage. + +> I've been working on improving the performance of `NSString`-to-`String` +> bridging, and Michael Ilseman pointed out that the more we can build it out +> of public API rather than adding a bunch of private stuff for Foundation's +> use, the better off everyone is. +> +> This new initializer is designed to be consistent with the [recently-accepted similar initializer on `Array`](https://github.com/apple/swift-evolution/blob/master/proposals/0245-array-uninitialized-initializer.md). + [Doug Gregor](https://twitter.com/dgregor79) pitched [a proposal](https://forums.swift.org/t/pitch-property-delegates/21895) to add Property Delegates. @@ -261,6 +288,25 @@ to add Property Delegates. > discusses the substantive differences from that design at the end of this > proposal. +[Saleem Abdulrasool]() shared [an update](https://forums.swift.org/t/swift-windows/22458) +on Swift on Windows. + +> I think at this point, with pending patches, we should be able to claim that +> Windows support is as good as macOS and Linux! +> +> I have been working on Foundation as well, which is in a better shape than +> before. It is possible to build it on Windows, though there is pending work +> to refactor the build a slight bit which will improve things and enable the +> nightlies to build Foundation as well. However, getting the library to build +> is only the beginning and running through the test suite should help get some +> level of confidence in the library functioning properly. +> +> The Windows instructions have been updated to reflect all of this +> information, and it should be possible for others to replicate this work as +> well. Overall, it seems that most of the compiler, runtime, and core +> libraries are now usable on Windows with the test coverage quickly converging +> to the point where it is nearly as good as the other supported platforms! + [Brent Royal-Gordon](https://twitter.com/brentdax) pitched [a proposal](https://forums.swift.org/t/pitch-static-and-class-subscripts/21850) to allow `static` and `class` subscripts. @@ -271,7 +317,7 @@ to allow `static` and `class` subscripts. > expect of a subscript. We also propose extending dynamic member lookup and > key paths to static properties by using static subscripts. -[Michael Ilseman]() gave [an update](https://forums.swift.org/t/string-consumption/21907) +[Michael Ilseman](https://twitter.com/ilseman) gave [an update](https://forums.swift.org/t/string-consumption/21907) on "`String` Consumption". > **Collection consumers** @@ -301,4 +347,4 @@ on "`String` Consumption". ### Finally -> TODO: something funny/fun. tweet, link, etc. +Syntax [is still hard](https://twitter.com/jesse_squires/status/1113547347756064768)... From c544dd88cee9f0206eaeca6f00637a5d382b8856 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 4 Apr 2019 16:48:45 +0200 Subject: [PATCH 142/589] Remove Google+ social share (#450) --- _includes/social_share.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/_includes/social_share.html b/_includes/social_share.html index f153ccec..a4752dcf 100644 --- a/_includes/social_share.html +++ b/_includes/social_share.html @@ -25,9 +25,6 @@
  • -
  • - -
  • {% if page.next.url %}
  • Next From 714892c994cee8ac3abac3a4a765a089b9396e77 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 5 Apr 2019 19:55:36 +0200 Subject: [PATCH 143/589] Push 132 draft --- _drafts/2019-04-18-issue-132.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-04-18-issue-132.md diff --git a/_drafts/2019-04-18-issue-132.md b/_drafts/2019-04-18-issue-132.md new file mode 100644 index 00000000..5f0b54bb --- /dev/null +++ b/_drafts/2019-04-18-issue-132.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #132' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From f36f432c470ee6db50f3b1963fe1032862da7879 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 10 Apr 2019 23:32:27 +0200 Subject: [PATCH 144/589] Update sponsorship.md --- sponsorship.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 0b3dae67..884b192f 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,600 subscribers and over 7,700 followers on Twitter. +There are over 3,700 subscribers and over 7,800 followers on Twitter.

    Sponsored Links

    @@ -60,7 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
    |   Issue |   Status | |:-|:-| -| April 04 | Open | | April 18 | Open | | May 2 | Open | | May 16 | Open | From 84269d726dcd1c6efb8e64b20e16c2395ddf7e8d Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 18 Apr 2019 17:25:19 +0200 Subject: [PATCH 145/589] Run gem update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 979b2f60..a893b3e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,7 +107,7 @@ GEM octokit (~> 4.0) public_suffix (~> 3.0) typhoeus (~> 1.3) - html-pipeline (2.10.0) + html-pipeline (2.11.0) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) @@ -250,7 +250,7 @@ GEM ruby_dep (1.5.0) rubyzip (1.2.2) safe_yaml (1.0.5) - sass (3.7.3) + sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) From 2809165d4acb9994a971427333a7cae50a30418a Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 18 Apr 2019 17:33:51 +0200 Subject: [PATCH 146/589] Update sponsorship --- sponsorship.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 884b192f..1b6681df 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -62,7 +62,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso |:-|:-| | April 18 | Open | | May 2 | Open | -| May 16 | Open | +| May 16 | **Booked** | | May 30 | Open | | June 13 | Open | | June 27 | Open | @@ -72,6 +72,14 @@ Sponsored Links should be relevant to the Swift programming community. To sponso | August 22 | Open | | September 5 | Open | | September 19 | Open | +| October 3 | Open | +| October 17 | Open | +| October 31 | Open | +| November 14 | Open | +| November 21 | **Booked** | +| November 28 | Open | +| December 12 | Open | +| December 26 | **No issue** | {: class="table table-striped table-bordered"}
    From a0e3b14c330fd92a94c96a8af4234aa24e095210 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 18 Apr 2019 18:05:07 +0200 Subject: [PATCH 147/589] Publish 132 Closes #452 --- _drafts/2019-04-18-issue-132.md | 56 ------------------------ _posts/2019-04-18-issue-132.md | 75 +++++++++++++++++++++++++++++++++ sponsorship.md | 4 +- 3 files changed, 77 insertions(+), 58 deletions(-) delete mode 100644 _drafts/2019-04-18-issue-132.md create mode 100644 _posts/2019-04-18-issue-132.md diff --git a/_drafts/2019-04-18-issue-132.md b/_drafts/2019-04-18-issue-132.md deleted file mode 100644 index 5f0b54bb..00000000 --- a/_drafts/2019-04-18-issue-132.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: post -title: ! 'Issue #132' -author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2019-04-18-issue-132.md b/_posts/2019-04-18-issue-132.md new file mode 100644 index 00000000..779fa885 --- /dev/null +++ b/_posts/2019-04-18-issue-132.md @@ -0,0 +1,75 @@ +--- +layout: post +title: ! 'Issue #132' +author: btb +sponsor: + link: https://mindgrub.bamboohr.com/jobs/view.php?id=94 + heading: iOS Developer + body: Are you a mobile developer with 4+ years of experience, proficient in Objective-C or Swift and can help develop mobile applications? If so, we are interested in speaking with you! Contact us using the link provided. + displaylink: mindgrub.com +--- + +A short but sweet issue this week. Sorry for the cliché — but it's true! + + + +{% include sponsor.html %} + +### News and community + +[Ian Partridge](https://twitter.com/alfa) wrote [a blog post](https://developer.ibm.com/swift/2019/04/17/announcing-kitura-2-7-and-more/) announcing Kitura 2.7, which +uses SwiftNIO 2.0. + +[Johannes Weiss](https://twitter.com/johannesweiss) announced [the release of `swift-log` 1.0.0](https://forums.swift.org/t/swift-log-1-0-0/22927). 📝 + +Apple [released](https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_1_release_notes/) Xcode 10.2.1. + +[Michael Ilseman](https://twitter.com/ilseman)'s talk at try! Swift Tokyo, [The Philosopher's String](https://www.youtube.com/watch?v=lMhGnTFA9CI&feature=youtu.be), is now available. 🧙‍♂️ + +[Timothy Ekl](https://twitter.com/timothyekl) wrote [a blog post](https://www.timekl.com/blog/2019/04/14/swift-generics-evolution/) to make the topic of the [future of Generics](https://forums.swift.org/t/improving-the-ui-of-generics/22814) more accessible. + +[Lily Vulcano](https://twitter.com/millenomi) put together [a list](https://bugs.swift.org/browse/SR-10347) of the remaining `NSUnimplemented()` bits in `swift-corelibs-foundation`. 🎉 + +### Accepted proposals + +[SE-0244](https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md): *Opaque Result Types* was [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0244-opaque-result-types/22115) and later [accepted](https://forums.swift.org/t/accepted-se-0244-opaque-result-types/23294). + +> The core team agrees that this proposal lays important groundwork that can be built on further in ways laid out in the author's [Generics UI Improvements overview](https://forums.swift.org/t/improving-the-ui-of-generics/). This write-up helped clarify the context of the proposal both for reviewers and the core team itself. +> +> Several reviewers felt that being able to name opaque types is an important feature for many use cases. This is clearly a useful feature and would be a good next step, but the core team thinks that the feature as proposed consists of a reasonable "minimum viable product" to land now, and then can be added to through subsequent proposals. + +### Returned proposals + +[SE-0253](https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md): *Introduce callables* was [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0253-static-callables/23290). + +> The core team is very positive about the idea of this feature, but would like +> to see some changes to the proposal, followed by another round of public +> review. As such, the proposal is returned for revision. + +### Rejected proposals + +[SE-0256](https://github.com/apple/swift-evolution/blob/master/proposals/0256-contiguous-collection.md): *Introduce `{Mutable}ContiguousCollection` protocol* was [rejected](https://forums.swift.org/t/se-0256-introduce-mutable-contiguouscollection-protocol/22569/8). + +> The Core Team did not feel the motivation behind the proposal warranted expanding the `Collection` protocol hierarchy. The `Collection` hierarchy is already quite rich, and any motivation to expanding it in the Standard Library needs to meet a high bar in general utility. At this time the proposed change was deemed too niche to motivate that change. + +### Proposals in review + +[SE-0258](https://github.com/apple/swift-evolution/blob/master/proposals/0258-property-delegates.md): *Property Delegates* is [under review](https://forums.swift.org/t/se-0258-property-delegates/23139). + +> There are property implementation patterns that come up repeatedly. Rather than hardcode a fixed set of patterns into the compiler, we should provide a general "property delegate" mechanism to allow these patterns to be defined as libraries. +> +> This is an alternative approach to some of the problems intended to be addressed by the [2015-2016 property behaviors proposal](https://github.com/apple/swift-evolution/blob/master/proposals/0030-property-behavior-decls.md). + +[SE-0257](https://github.com/apple/swift-evolution/blob/master/proposals/0257-elide-comma.md): *Eliding commas from multiline expression lists* is [under review](https://forums.swift.org/t/se-0257-eliding-commas-from-multiline-expression-lists/22889). + +> Swift requires a semicolon "`;`" to separate statements unless those statements are separated by newlines, in which case the semicolon can be elided. Currently, Swift requires a comma "`,`" to separate expressions even when those statements are separated by newlines. We should ease this restriction, allowing the comma between two expressions to be elided when they are separated by a newline. + +### Swift Forums + +[Daniel Hartbit](https://twitter.com/dhartbit), [Vini Vendramini](https://twitter.com/vvendra), and [https://github.com/DougGregor](https://twitter.com/dgregor79) pitched [a proposal](https://forums.swift.org/t/pitch-static-custom-attributes-round-2/22938) for custom static attributes. + +> Swift currently supports marking declarations with compiler-defined attributes, such as `@objc` and `@deprecated`. The compiler uses these attributes to customize the way it interprets the corresponding code. As a first step towards opening attributes to users and library authors, this proposal introduces static custom attributes which exist only at compile time, allowing tools that parse Swift code to use them as markers. + +### Finally + +I mean, [why not?](https://i.redd.it/l5xkrl38gxs21.jpg) diff --git a/sponsorship.md b/sponsorship.md index 1b6681df..aada6411 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -18,7 +18,7 @@ There are over 3,700 subscribers and over 7,8

    Sponsored Links

    -There is a single Sponsored Link available per issue for $150. +There is a single Sponsored Link available per issue for $200. This is featured prominently at the beginning of an issue — after the opening comments but before the first section headline. These links are great to get conferences, developer tools, workshops, products, or services noticed by subscribers and followers. Sponsored Links should be relevant to the Swift programming community. To sponsor an issue, get in touch using the button below. @@ -60,7 +60,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso

    |   Issue |   Status | |:-|:-| -| April 18 | Open | +| April 18 | **Booked** | | May 2 | Open | | May 16 | **Booked** | | May 30 | Open | From 72fd6ecaa7f3aec19e8a8106854b708799827a1b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 18 Apr 2019 18:58:40 +0200 Subject: [PATCH 148/589] Update 2019-04-18-issue-132.md --- _posts/2019-04-18-issue-132.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2019-04-18-issue-132.md b/_posts/2019-04-18-issue-132.md index 779fa885..dadfcf63 100644 --- a/_posts/2019-04-18-issue-132.md +++ b/_posts/2019-04-18-issue-132.md @@ -66,7 +66,7 @@ Apple [released](https://developer.apple.com/documentation/xcode_release_notes/x ### Swift Forums -[Daniel Hartbit](https://twitter.com/dhartbit), [Vini Vendramini](https://twitter.com/vvendra), and [https://github.com/DougGregor](https://twitter.com/dgregor79) pitched [a proposal](https://forums.swift.org/t/pitch-static-custom-attributes-round-2/22938) for custom static attributes. +[Daniel Hartbit](https://twitter.com/dhartbit), [Vini Vendramini](https://twitter.com/vvendra), and [Doug Gregor](https://twitter.com/dgregor79) pitched [a proposal](https://forums.swift.org/t/pitch-static-custom-attributes-round-2/22938) for custom static attributes. > Swift currently supports marking declarations with compiler-defined attributes, such as `@objc` and `@deprecated`. The compiler uses these attributes to customize the way it interprets the corresponding code. As a first step towards opening attributes to users and library authors, this proposal introduces static custom attributes which exist only at compile time, allowing tools that parse Swift code to use them as markers. From faa1d0ebbeca4c7aafb4d909ecaf4f7dea8a6dd1 Mon Sep 17 00:00:00 2001 From: Federico Zanetello Date: Mon, 22 Apr 2019 13:08:54 +0700 Subject: [PATCH 149/589] Remove brackets (#454) --- _posts/2018-11-15-issue-122.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2018-11-15-issue-122.md b/_posts/2018-11-15-issue-122.md index e95c6fcb..a372d6d3 100644 --- a/_posts/2018-11-15-issue-122.md +++ b/_posts/2018-11-15-issue-122.md @@ -101,7 +101,7 @@ Vapor is [splitting out](https://forums.swift.org/t/niokit-codablekit/17706) two [Johannes Weiss](https://twitter.com/johannesweiss/) shared [the plan](https://forums.swift.org/t/plan-for-nio-2-and-swift-5/17791) for SwiftNIO 2 and how that ties into Swift 5. -> As I'm sure you are aware, the first Swift 5 branches will be cut soon and needless to say SwiftNIO wants to be able to make full use of the new features/improvements upcoming in Swift 5 (for example native UTF8 `String`s). On top that, SwiftNIO already accumulated [a number of issues/[pull requests]](https://github.com/apple/swift-nio/issues?q=is%3Aopen+is%3Aissue+milestone%3A2.0.0) that can only be addressed with a new major SwiftNIO 2.0.0 release. +> As I'm sure you are aware, the first Swift 5 branches will be cut soon and needless to say SwiftNIO wants to be able to make full use of the new features/improvements upcoming in Swift 5 (for example native UTF8 `String`s). On top that, SwiftNIO already accumulated [a number of issues/pull requests](https://github.com/apple/swift-nio/issues?q=is%3Aopen+is%3Aissue+milestone%3A2.0.0) that can only be addressed with a new major SwiftNIO 2.0.0 release. > > Our plan is to therefore release SwiftNIO 2.0 together with Swift 5.0. NIO 2 will require Swift 5 and will be a breaking release. Don't expect everything to break when you need to migrate from NIO 1 to NIO 2 but there will be likely a number of things that can hopefully be fixed mostly through search & replace. We will maintain a list of changes with strategies to resolve this. From 85a6c814701b7be3455501f4041d6e084150cc8a Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 22 Apr 2019 23:27:54 +0200 Subject: [PATCH 150/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a893b3e5..16655ef8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -233,7 +233,7 @@ GEM multipart-post (2.0.0) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.10.2) + nokogiri (1.10.3) mini_portile2 (~> 2.4.0) octokit (4.14.0) sawyer (~> 0.8.0, >= 0.5.3) From 03f049e98d0912b7a4b3c0e1ada3b39fcc25f81c Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 27 Apr 2019 13:01:43 +0200 Subject: [PATCH 151/589] Run bundle update --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 16655ef8..74812999 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (4.2.10) + activesupport (4.2.11.1) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) @@ -54,12 +54,12 @@ GEM faraday (~> 0.8) ffi (1.10.0) forwardable-extended (2.6.0) - gemoji (3.0.0) + gemoji (3.0.1) git (1.5.0) - github-pages (197) - activesupport (= 4.2.10) + github-pages (198) + activesupport (= 4.2.11.1) github-pages-health-check (= 1.16.1) - jekyll (= 3.7.4) + jekyll (= 3.8.5) jekyll-avatar (= 0.6.0) jekyll-coffeescript (= 1.1.1) jekyll-commonmark-ghpages (= 0.1.5) @@ -113,7 +113,7 @@ GEM http_parser.rb (0.6.0) i18n (0.9.5) concurrent-ruby (~> 1.0) - jekyll (3.7.4) + jekyll (3.8.5) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) From 62e4fa2ab9d9541b7b74ecebcea17adfc5b6250b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 28 Apr 2019 13:36:07 +0200 Subject: [PATCH 152/589] Post initial 133 draft --- _drafts/2019-05-02-issue-133.md | 83 +++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 _drafts/2019-05-02-issue-133.md diff --git a/_drafts/2019-05-02-issue-133.md b/_drafts/2019-05-02-issue-133.md new file mode 100644 index 00000000..d99f9a31 --- /dev/null +++ b/_drafts/2019-05-02-issue-133.md @@ -0,0 +1,83 @@ +--- +layout: post +title: ! 'Issue #133' +author: btb +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +- [TF-447](https://bugs.swift.org/browse/TF-447) [Standard Library] Improve TensorShape printing +- [TF-448](https://bugs.swift.org/browse/TF-448) [Standard Library] Improve Tensor type documentation + +### Podcasts + +On the Swift by Sundell podcast, [John Sundell](https://twitter.com/johnsundell) and [Michael Ilseman](https://twitter.com/ilseman/) discuss [String, its implementation, and its related APIs](https://www.swiftbysundell.com/podcast/46). + +On the Swift Community Podcast, [Matt Dias](https://twitter.com/mdiasdev), [Barbie Vanaiki](https://twitter.com/barbieinbeta), [John Sundell](https://twitter.com/johnsundell), and I discuss [the state of the Swift community](https://www.swiftcommunitypodcast.org/episodes/4). + +### News and community + +> TODO + +### Commits and pull requests + +[Thomas Roughton](https://twitter.com/_torust) merged [a pull request](https://github.com/apple/swift/pull/24198) introducing `String` to `Float` performance improvements and benchmarks. + +[Michael Gottesman](https://twitter.com/gottesmang) merged [a pull request](https://github.com/apple/swift/pull/24314) introducing stronger compile-time checking of ownership in the Swift Intermediate Language (SIL), also allowing an improved Auto Reference Counting (ARC) optimizer. + +### Accepted proposals + +[SE-0255](https://github.com/apple/swift-evolution/blob/master/proposals/0255-omit-return.md): *Implicit returns from single-expression functions* was [accepted](https://forums.swift.org/t/accepted-se-0255-implicit-returns-from-single-expression-functions/23581/2). + +> The review demonstrated clear support for this syntax for property and subscript getters, where the need to return simple single expressions is common. +> +> On eliding the `return` from functions, the review feedback was more divided. While there was support from some reviewers, others expressed the view that the feature should be restricted to just getters. However, on reviewing the feedback, the core team does not see a strong case was made against applying it to functions as well, when weighed against the benefits of a single uniform rule. + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +[SE-0259](https://github.com/apple/swift-evolution/blob/master/proposals/0259-approximately-equal.md): *Approximate Equality for Floating Point* is [under review](https://forums.swift.org/t/se-0259-approximate-equality-for-floating-point/23627). + +> The internet is full advice about what not to do when comparing floating-point values: +> +> - "Never compare floats for equality." +> - "Always use an epsilon." +> - "Floating-point values are always inexact." +> +> Much of this advice is false, and most of the rest is technically correct but misleading. +> Almost none of it provides specific and correct recommendations for what you *should* +> do if you need to compare floating-point numbers. +> +> There is no uniformly correct notion of "approximate equality", and there is no uniformly +> correct tolerance that can be applied without careful analysis, but we can define +> approximate equality functions that are better than what most people will come up with +> without assistance from the standard library. + +### Swift Forums + +[Alexander Momchilov](https://forums.swift.org/u/alexanderm/summary) shared [an overview of the state of data structures](https://forums.swift.org/t/adding-more-data-structures-to-the-standard-library/23651) in Swift. + +> We have just `Set` (unordered), `Dictionary` (unordered), and `Array`. No concurrent collections (value types solves most of the issues here, but it doesn't solve things like the classic produce-consumer, for example), no linked lists, queues, stacks, bimaps, multimaps, or sort ordered collections. + +Be sure to read [the thread](https://forums.swift.org/t/adding-more-data-structures-to-the-standard-library/23651) for some insightful discussion on the topic. + +[Michael Ilseman](https://twitter.com/Ilseman) pitched [a proposal](https://forums.swift.org/t/pitch-offsetting-indices-and-relative-ranges/23837) for convenience syntax applying an integer offset to an existing index. + +> Applying offsets to indices and using relative ranges brings ease of use improvements to all Collections and is a convenient tools for reducing bugs in `Int`-indexed Collections. It also makes types like String more approachable in casual contexts, such as for programming puzzles and learning. + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 31df1585fa666fc94a04b016ae8c55af24386e40 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 2 May 2019 18:53:35 +0200 Subject: [PATCH 153/589] Post issue 133 Fixes #455 --- {_drafts => _posts}/2019-05-02-issue-133.md | 25 ++++++++++++--------- 1 file changed, 14 insertions(+), 11 deletions(-) rename {_drafts => _posts}/2019-05-02-issue-133.md (71%) diff --git a/_drafts/2019-05-02-issue-133.md b/_posts/2019-05-02-issue-133.md similarity index 71% rename from _drafts/2019-05-02-issue-133.md rename to _posts/2019-05-02-issue-133.md index d99f9a31..07884e1f 100644 --- a/_drafts/2019-05-02-issue-133.md +++ b/_posts/2019-05-02-issue-133.md @@ -4,7 +4,14 @@ title: ! 'Issue #133' author: btb --- -> TODO: intro comments +I hope all of you had a wonderful last two weeks! I wanted to share that I +recently [tweeted](https://twitter.com/BasThomas/status/1121102492958433281) +reaching out to people to talk about iOS, careers and more. And it has been +a really rewarding experience! It is quite different from a newsletter like +the Swift Weekly Brief, but it is great to get to interact with the Swift +community like this! + +And with that I wish all of you another two good weeks. Until the next issue :) @@ -23,7 +30,7 @@ On the Swift Community Podcast, [Matt Dias](https://twitter.com/mdiasdev), [Barb ### News and community -> TODO +[Slava Pestov](https://twitter.com/slava_pestov) shared [a thread](https://twitter.com/slava_pestov/status/1123025223522164742) on insights building a compiler, touching on how to make it performant by designing it in a way where not everything has to happen sequentially. ### Commits and pull requests @@ -39,14 +46,6 @@ On the Swift Community Podcast, [Matt Dias](https://twitter.com/mdiasdev), [Barb > > On eliding the `return` from functions, the review feedback was more divided. While there was support from some reviewers, others expressed the view that the feature should be restricted to just getters. However, on reviewing the feedback, the core team does not see a strong case was made against applying it to functions as well, when weighed against the benefits of a single uniform rule. -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - ### Proposals in review [SE-0259](https://github.com/apple/swift-evolution/blob/master/proposals/0259-approximately-equal.md): *Approximate Equality for Floating Point* is [under review](https://forums.swift.org/t/se-0259-approximate-equality-for-floating-point/23627). @@ -68,6 +67,10 @@ On the Swift Community Podcast, [Matt Dias](https://twitter.com/mdiasdev), [Barb ### Swift Forums +[Daryle Walker](https://twitter.com/CTMacUser) wrote [an "anti" pitch](https://forums.swift.org/t/anti-pitch-just-say-no-to-protocols-on-structural-types/24043) reasoning about why it might not be a good idea two allow protocol conformance on tuples. + +> If you think that slapping a protocol on a tuple is awesome, you're probably not the only one to come up with it. The problem comes from the fact that tuple type declarations are global (modulo that a scope can access all the components' types). What happens if you bring in a library that already had the protocol added to a tuple type you wanted to add? What happens if two different libraries do this? Would there be some kind of priority system? Since you can differentiate function overloads with protocol conformance, what if you didn't want a particular tuple type to have a conformance? There's no way to remove a conformance. + [Alexander Momchilov](https://forums.swift.org/u/alexanderm/summary) shared [an overview of the state of data structures](https://forums.swift.org/t/adding-more-data-structures-to-the-standard-library/23651) in Swift. > We have just `Set` (unordered), `Dictionary` (unordered), and `Array`. No concurrent collections (value types solves most of the issues here, but it doesn't solve things like the classic produce-consumer, for example), no linked lists, queues, stacks, bimaps, multimaps, or sort ordered collections. @@ -80,4 +83,4 @@ Be sure to read [the thread](https://forums.swift.org/t/adding-more-data-structu ### Finally -> TODO: something funny/fun. tweet, link, etc. +Do we have [a competitor](https://twitter.com/jckarter/status/1120538032166395905) for Greg's haikus? 🤔 From 330176c88e72909710d44e60c3016f0d9dfbf43c Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 2 May 2019 18:54:33 +0200 Subject: [PATCH 154/589] Update sponsorship.md --- sponsorship.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index aada6411..c6bd2daf 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,8 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
    |   Issue |   Status | |:-|:-| -| April 18 | **Booked** | -| May 2 | Open | | May 16 | **Booked** | | May 30 | Open | | June 13 | Open | From a0d15e167ef3aa92062d251d3e2495bee4d10b18 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 2 May 2019 18:54:51 +0200 Subject: [PATCH 155/589] Run bundle update --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 74812999..b2bb85e6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,7 +6,7 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.5.2) + addressable (2.6.0) public_suffix (>= 2.0.2, < 4.0) claide (1.0.2) claide-plugins (0.9.2) @@ -255,9 +255,9 @@ GEM sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sawyer (0.8.1) - addressable (>= 2.3.5, < 2.6) - faraday (~> 0.8, < 1.0) + sawyer (0.8.2) + addressable (>= 2.3.5) + faraday (> 0.8, < 2.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) From 8296c584b7f4261bca8c4e13d78fdb0f266c2aff Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 2 May 2019 19:40:28 +0200 Subject: [PATCH 156/589] Push issue 134 --- _drafts/2019-05-16-issue-134.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-05-16-issue-134.md diff --git a/_drafts/2019-05-16-issue-134.md b/_drafts/2019-05-16-issue-134.md new file mode 100644 index 00000000..394e1fe3 --- /dev/null +++ b/_drafts/2019-05-16-issue-134.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #134' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From fe395502e3be279b910bc294c75b90158589b538 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 9 May 2019 09:34:19 +0200 Subject: [PATCH 157/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index c6bd2daf..c8d99e5b 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,700 subscribers and over 7,800 followers on Twitter. +There are over 3,700 subscribers and over 7,900 followers on Twitter.

    Sponsored Links

    From 151d2591b7784d7a8ba2b5649d9109a452f56195 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 10 May 2019 07:22:13 +0200 Subject: [PATCH 158/589] Add sponsor --- _drafts/2019-05-16-issue-134.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_drafts/2019-05-16-issue-134.md b/_drafts/2019-05-16-issue-134.md index 394e1fe3..96f9b239 100644 --- a/_drafts/2019-05-16-issue-134.md +++ b/_drafts/2019-05-16-issue-134.md @@ -3,10 +3,10 @@ layout: post title: ! 'Issue #134' author: btb sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO + link: https://try.instabug.com/swift-weekly + heading: The Most Comprehensive Bug Reporting SDK for iOS Apps + body: The top mobile companies like Lyft, Reddit, and EA Games rely on Instabug to iterate faster and enhance their app quality. Instabug lightweight SDK allows developers to receive detailed bug reports directly from testers and users. Instabug attaches screenshots, screen recordings, device details and repro-steps with each report. Try Instabug now - You just need one minute to integrate the SDK! Use the discount-code **InstabugLovesSwiftWeekly** and get a 20% discount for 3 months on all plans! + displaylink: try.instabug.com/swift-weekly --- > TODO: intro comments From 08d90dd485605bd66cda0b7f607d2812d5709b11 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 10 May 2019 07:24:18 +0200 Subject: [PATCH 159/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b2bb85e6..a2c4cb69 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -230,7 +230,7 @@ GEM jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) minitest (5.11.3) - multipart-post (2.0.0) + multipart-post (2.1.0) nap (1.1.0) no_proxy_fix (0.1.2) nokogiri (1.10.3) @@ -265,7 +265,7 @@ GEM ethon (>= 0.9.0) tzinfo (1.2.5) thread_safe (~> 0.1) - unicode-display_width (1.5.0) + unicode-display_width (1.6.0) PLATFORMS ruby From df60d9350099734d94972b4eb3162afc9d0dbf91 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 13 May 2019 20:53:56 +0200 Subject: [PATCH 160/589] Update sponsorship.md --- sponsorship.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index c8d99e5b..5e4bd094 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -61,10 +61,10 @@ Sponsored Links should be relevant to the Swift programming community. To sponso |   Issue |   Status | |:-|:-| | May 16 | **Booked** | -| May 30 | Open | -| June 13 | Open | +| May 30 | **Booked** | +| June 13 | **Booked** | | June 27 | Open | -| July 11 | Open | +| July 11 | **Reserved** | | July 25 | Open | | August 8 | Open | | August 22 | Open | From b70c31bf6fd840325d2a6480b225041c10c34662 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 15 May 2019 21:34:56 +0200 Subject: [PATCH 161/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a2c4cb69..b2c82ff7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -230,7 +230,7 @@ GEM jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) minitest (5.11.3) - multipart-post (2.1.0) + multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) nokogiri (1.10.3) From 5d29061c1562edd8b8ba2f867b806bdef89cf688 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 15 May 2019 22:06:03 +0200 Subject: [PATCH 162/589] Fill most of the body --- _drafts/2019-05-16-issue-134.md | 132 ++++++++++++++++++++++++++++---- 1 file changed, 118 insertions(+), 14 deletions(-) diff --git a/_drafts/2019-05-16-issue-134.md b/_drafts/2019-05-16-issue-134.md index 96f9b239..bb6a2414 100644 --- a/_drafts/2019-05-16-issue-134.md +++ b/_drafts/2019-05-16-issue-134.md @@ -9,27 +9,30 @@ sponsor: displaylink: try.instabug.com/swift-weekly --- -> TODO: intro comments +With WWDC coming up in just two and a half weeks time, there is still a lot +going on when it comes to Swift. {% include sponsor.html %} -### Starter tasks - -> TODO - ### Podcasts -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +Jesse and JP [discuss](https://spec.fm/podcasts/swift-unwrapped/295535) +"Removing Things From Swift", talking about implicit returns and eliding commas. ### News and community -> TODO +[Zhuowei Zhang](https://twitter.com/zhuowei) and [Max Desiatov](https://twitter.com/MaxDesiatov) +worked on [initial support for compiling Swift to WebAssembly](https://swiftwasm.org). 😱 + +[Dave DeLong](https://twitter.com/davedelong) and others started a [Swift Extended Library Working Group](https://github.com/swift-extended-library/selwg), a steering team that promotes the use of Swift for developing and deploying server applications. Very interesting stuff! ### Commits and pull requests -> TODO +[Raj Barik](https://github.com/rajbarik) merged [a pull request](https://github.com/apple/swift/pull/19820) +with an entire optimizer pass to convert existentials to generic parameters, +creating new opportunities for unboxing and devirtualization. ### Accepted proposals @@ -37,20 +40,121 @@ sponsor: ### Returned proposals -> TODO +[SE-0258](https://github.com/apple/swift-evolution/blob/master/proposals/0258-property-delegates.md): *Property Delegates* was [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0258-property-delegates/24080). -### Rejected proposals +> There was a lot of great discussion in this review, leading to some very +useful feedback for the Core Team and the proposal authors. That feedback can +be broken down into two categories: (1) procedural feedback about the state of +the proposal and its review and (2) technical feedback about the actual +proposal. Both are useful, and we'll consider each in turn. -> TODO +You can read [the full post](https://forums.swift.org/t/returned-for-revision-se-0258-property-delegates/24080). ### Proposals in review -> TODO +[SE-0260](https://github.com/apple/swift-evolution/blob/master/proposals/0260-library-evolution.md): *Library Evolution for Stable ABIs* is [under review](https://forums.swift.org/t/se-0260-library-evolution/24260/1). + +> One of Swift's goals is to be a good language for libraries with binary +compatibility concerns, such as those shipped as part of Apple's OSs. This +includes giving library authors the flexibility to add to their public +interface, and to change implementation details, without breaking binary +compatibility. At the same time, it's important that library authors be able to +opt out of this flexibility in favor of performance. + +[SE-0253](https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md): *Callable values of user-defined nominal types* is [under review](https://forums.swift.org/t/se-0253-callable-values-of-user-defined-nominal-types/24177). + +> This proposal introduces "statically" +[callable](https://en.wikipedia.org/wiki/Callable_object) values to Swift. +Callable values are values that define function-like behavior and can be called +using function call syntax. In contrast to dynamically callable values +introduced in +[SE-0216](https://github.com/apple/swift-evolution/blob/master/proposals/0216-dynamic-callable.md), +this feature supports statically declared arities, argument labels, and +parameter types, and is not constrained to primary type declarations. +> +> In a nutshell, values that have a method whose base name is `call` (referred to +as a "`call` method" for the rest of this proposal) can be called like a +function. The function call syntax forwards arguments to the corresponding +`call` method. + +{% highlight swift %} +struct Adder { + var base: Int + func call(_ x: Int) -> Int { + return base + x + } +} + +let add3 = Adder(base: 3) +add3(10) // => 13 +{% endhighlight %} ### Swift Forums -> TODO +[Michael Ilseman](https://twitter.com/ilseman/) shared [a case study](https://forums.swift.org/t/omitting-returns-in-string-case-study-of-se-0255/24283) omitting `return`s in `String`. + +> I’m a fan of [Nate Chandler](https://twitter.com/neightchan)’s [SE-0255](https://github.com/apple/swift-evolution/blob/master/proposals/0255-omit-return.md) which allows us to omit the `return` +keyword in a single-expression function or computed variables. Here is a case +study of SE-0255 as applied to `String`'s internal implementation. + +[Ding Ye](https://github.com/dingobye) pitched [a proposal](https://forums.swift.org/t/adding-ispowerof2-to-binaryinteger/24087) to add `isPowerOf2` to `BinaryInteger`. + +> Checking some mathematical properties of integers (e.g., parity, +divisibility, etc.) is widely used in scientific and engineering applications. +While Swift's standard library provides a convenient method `isMultiple(of:)` to +test whether an integer is a multiple of another, there are other cases that +are not yet supported. A frequently used one is to check if an integer is power +of two. This pitch would like to address this problem by adding a computed +property `isPowerOf2` to the `BinaryInteger` protocol. + +[Giuseppe Lanza](https://twitter.com/GLDeveloper) pitched [a proposal](https://forums.swift.org/t/pitch-stdlib-making-sorting-algorithm-choosable/24100) to make sorting +algorithms selectable. + +> It's currently unclear without peeking under the hood of swift implementation +is the algorithm used for sorting, changes to this algorithm (recently it +passed from introsort to timsort) and performances tradeoffs. +> +> Different sorting algorithms might be preferred depending on the problem +that needs to be solved. In certain cases it's important to know that the +sorting is stable, in other cases might be important to be sure that the +algorithm is in place. + +[Igor Kulman](https://twitter.com/igorkulman) pitched [a proposal](https://forums.swift.org/t/pitch-method-to-sum-numeric-arrays/24170) to add a `sum`-method to numeric arrays. + +> I currently sum the arrays using `.reduce(0,+)` which I do not mind by the code +is not that readable + +{% highlight swift %} +let total = expenses.map({ $0.amount }).reduce(0,+) +{% endhighlight %} + +> Another bigger problem than readability is that I encounter code like this +from other developers all the time: + +{% highlight swift %} +var sum = 0 +for expense in expenses { + sum = sum + expense.amount +} +{% endhighlight %} + +> This code might come from imperative thinking but it might also come from +not knowing how to use `.reduce()` which can look like an intimidating method. +A `.sum()` would be friendlier and much easier to use even to inexperienced +developers. + +[Philipp Heller](https://twitter.com/pxheller) pitched [a proposal](https://forums.swift.org/t/pitch-protocol-conformance-for-tuples-anonymous-structs/24207) to allow Protocol Conformance for Tuples and Anonymous Structs. + +> Currently, if you wish to pass some data to a function that requires the +data to conform to a specific protocol, you have to define some type that +conforms to the protocol and create an object with that type afterward. +> +> Right now tuples cannot be used as literals to construct structs. Assume +there is a function `prettyPrintAsJson(data: Encodable)` that you only need to +call once in your code. You would define a `struct` (or `class`) first and +create an instance of that type afterward. ### Finally -> TODO: something funny/fun. tweet, link, etc. +[Still going 💪](https://twitter.com/johannesweiss/status/1126254936801591296) +(puns are the best) From 11bae03fa7d74179840a30573fff7433c3f1acd6 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 16 May 2019 17:42:22 +0200 Subject: [PATCH 163/589] Post issue 134 Closes #456 --- {_drafts => _posts}/2019-05-16-issue-134.md | 4 ---- 1 file changed, 4 deletions(-) rename {_drafts => _posts}/2019-05-16-issue-134.md (99%) diff --git a/_drafts/2019-05-16-issue-134.md b/_posts/2019-05-16-issue-134.md similarity index 99% rename from _drafts/2019-05-16-issue-134.md rename to _posts/2019-05-16-issue-134.md index bb6a2414..982afc0e 100644 --- a/_drafts/2019-05-16-issue-134.md +++ b/_posts/2019-05-16-issue-134.md @@ -34,10 +34,6 @@ worked on [initial support for compiling Swift to WebAssembly](https://swiftwasm with an entire optimizer pass to convert existentials to generic parameters, creating new opportunities for unboxing and devirtualization. -### Accepted proposals - -> TODO - ### Returned proposals [SE-0258](https://github.com/apple/swift-evolution/blob/master/proposals/0258-property-delegates.md): *Property Delegates* was [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0258-property-delegates/24080). From fccf3b5d65927b041fd1ea04b78cab2993598dad Mon Sep 17 00:00:00 2001 From: Dave DeLong Date: Thu, 16 May 2019 12:11:12 -0600 Subject: [PATCH 164/589] Update 2019-05-16-issue-134.md (#457) Nothing to announce or discuss at this time. --- _posts/2019-05-16-issue-134.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/_posts/2019-05-16-issue-134.md b/_posts/2019-05-16-issue-134.md index 982afc0e..968efcf6 100644 --- a/_posts/2019-05-16-issue-134.md +++ b/_posts/2019-05-16-issue-134.md @@ -26,8 +26,6 @@ Jesse and JP [discuss](https://spec.fm/podcasts/swift-unwrapped/295535) [Zhuowei Zhang](https://twitter.com/zhuowei) and [Max Desiatov](https://twitter.com/MaxDesiatov) worked on [initial support for compiling Swift to WebAssembly](https://swiftwasm.org). 😱 -[Dave DeLong](https://twitter.com/davedelong) and others started a [Swift Extended Library Working Group](https://github.com/swift-extended-library/selwg), a steering team that promotes the use of Swift for developing and deploying server applications. Very interesting stuff! - ### Commits and pull requests [Raj Barik](https://github.com/rajbarik) merged [a pull request](https://github.com/apple/swift/pull/19820) From 0527d9c674d857ba6a47ab888448e4ecce42d747 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 23 May 2019 21:00:41 +0200 Subject: [PATCH 165/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b2c82ff7..4202ca87 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -52,7 +52,7 @@ GEM multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) - ffi (1.10.0) + ffi (1.11.1) forwardable-extended (2.6.0) gemoji (3.0.1) git (1.5.0) @@ -248,7 +248,7 @@ GEM ruby-enum (0.7.2) i18n ruby_dep (1.5.0) - rubyzip (1.2.2) + rubyzip (1.2.3) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From 3cc04f37a8dc79da9b46e3b75ccf7ce866540e2e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 23 May 2019 21:11:09 +0200 Subject: [PATCH 166/589] Add 135 draft --- _drafts/2019-05-30-issue-135.md | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 _drafts/2019-05-30-issue-135.md diff --git a/_drafts/2019-05-30-issue-135.md b/_drafts/2019-05-30-issue-135.md new file mode 100644 index 00000000..a8f5fb0c --- /dev/null +++ b/_drafts/2019-05-30-issue-135.md @@ -0,0 +1,60 @@ +--- +layout: post +title: ! 'Issue #135' +author: btb +sponsor: + link: https://www.eventbrite.com/e/swiftfest-2019-tickets-56501408233 + heading: SwiftFest Boston 2019, join the Swift re-evolution + body: 'SwiftFest is the most community-driven conferences focused on Swift that brings together engineers, architects, midnight-coders, and students in a highly social and vibrant environment. +

    +Topics: Swift and iOS, server-side Swift, architecture, augmented and virtual reality, open source, hardware projects, platforms, development-culture, security, TDD, etc. +

    +SwiftFest Boston - July, 29th-30th, get today your discounted ticket ($50 off) using the code **Swift-Weekly-50-Off**.' + displaylink: swiftfest.io +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 67ac5cde11b93e2c880a90438d8ec883b8b8a06e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 28 May 2019 20:36:27 +0200 Subject: [PATCH 167/589] Use deeplink + reorder paragraphs --- _drafts/2019-05-30-issue-135.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/_drafts/2019-05-30-issue-135.md b/_drafts/2019-05-30-issue-135.md index a8f5fb0c..e0b7e228 100644 --- a/_drafts/2019-05-30-issue-135.md +++ b/_drafts/2019-05-30-issue-135.md @@ -3,13 +3,12 @@ layout: post title: ! 'Issue #135' author: btb sponsor: - link: https://www.eventbrite.com/e/swiftfest-2019-tickets-56501408233 + link: https://www.eventbrite.com/e/swiftfest-2019-tickets-56501408233?discount=Swift-Weekly-50-Off heading: SwiftFest Boston 2019, join the Swift re-evolution - body: 'SwiftFest is the most community-driven conferences focused on Swift that brings together engineers, architects, midnight-coders, and students in a highly social and vibrant environment. + body: 'SwiftFest Boston - July, 29th-30th, get today your discounted ticket ($50 off) using the code **Swift-Weekly-50-Off**. +

    SwiftFest is the most community-driven conferences focused on Swift that brings together engineers, architects, midnight-coders, and students in a highly social and vibrant environment.

    -Topics: Swift and iOS, server-side Swift, architecture, augmented and virtual reality, open source, hardware projects, platforms, development-culture, security, TDD, etc. -

    -SwiftFest Boston - July, 29th-30th, get today your discounted ticket ($50 off) using the code **Swift-Weekly-50-Off**.' +Topics: Swift and iOS, server-side Swift, architecture, augmented and virtual reality, open source, hardware projects, platforms, development-culture, security, TDD, etc.' displaylink: swiftfest.io --- From 6d28006f38745d7e700b22b491525d25a1cb5631 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 28 May 2019 20:36:34 +0200 Subject: [PATCH 168/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4202ca87..0b4bd01b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -240,7 +240,7 @@ GEM open4 (1.3.4) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (3.0.3) + public_suffix (3.1.0) rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) From 9fb0165649a3fdf7bff388f55413d81daec7b4cf Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 30 May 2019 17:42:31 +0200 Subject: [PATCH 169/589] Post issue 135 Closes #458 --- _drafts/2019-05-30-issue-135.md | 59 ---------- _posts/2019-05-30-issue-135.md | 187 ++++++++++++++++++++++++++++++++ 2 files changed, 187 insertions(+), 59 deletions(-) delete mode 100644 _drafts/2019-05-30-issue-135.md create mode 100644 _posts/2019-05-30-issue-135.md diff --git a/_drafts/2019-05-30-issue-135.md b/_drafts/2019-05-30-issue-135.md deleted file mode 100644 index e0b7e228..00000000 --- a/_drafts/2019-05-30-issue-135.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -layout: post -title: ! 'Issue #135' -author: btb -sponsor: - link: https://www.eventbrite.com/e/swiftfest-2019-tickets-56501408233?discount=Swift-Weekly-50-Off - heading: SwiftFest Boston 2019, join the Swift re-evolution - body: 'SwiftFest Boston - July, 29th-30th, get today your discounted ticket ($50 off) using the code **Swift-Weekly-50-Off**. -

    SwiftFest is the most community-driven conferences focused on Swift that brings together engineers, architects, midnight-coders, and students in a highly social and vibrant environment. -

    -Topics: Swift and iOS, server-side Swift, architecture, augmented and virtual reality, open source, hardware projects, platforms, development-culture, security, TDD, etc.' - displaylink: swiftfest.io ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2019-05-30-issue-135.md b/_posts/2019-05-30-issue-135.md new file mode 100644 index 00000000..d302ed3d --- /dev/null +++ b/_posts/2019-05-30-issue-135.md @@ -0,0 +1,187 @@ +--- +layout: post +title: ! 'Issue #135' +author: btb +sponsor: + link: https://www.eventbrite.com/e/swiftfest-2019-tickets-56501408233?discount=Swift-Weekly-50-Off + heading: SwiftFest Boston 2019, join the Swift re-evolution + body: 'SwiftFest Boston - July, 29th-30th, get today your discounted ticket ($50 off) using the code **Swift-Weekly-50-Off**. +

    SwiftFest is the most community-driven conferences focused on Swift that brings together engineers, architects, midnight-coders, and students in a highly social and vibrant environment. +

    +Topics: Swift and iOS, server-side Swift, architecture, augmented and virtual reality, open source, hardware projects, platforms, development-culture, security, TDD, etc.' + displaylink: swiftfest.io +--- + +T-4 days for WWDC 2019! Oh yes, if somehow you missed that, it will start +after the weekend. Looking forward to everything that's new, including potential +news about the future of Swift... fingers crossed! + +For those that are attending, have an awesome time! _And_ also make sure to say +hello to [Kristaps](https://twitter.com/fassko)... he might have Swift Weekly +Brief [stickers](https://twitter.com/swiftlybrief/status/1133353935895445504) +to give out. Make sure to share pictures of where you put those :-) + +Also, and I missed to include this two weeks ago, +[John McCall](https://twitter.com/pathofshrines) shared +[something I wanted to point out](https://forums.swift.org/t/returned-for-revision-se-0258-property-delegates/24080) +to all of you reading, and in particular, those directly involved with the Swift +evolution process: + +> I'd like to thank the community for its patience and its commitment. I know +we've had a lot of proposals recently, and some of them have been contentious, +and it can be a lot of work to keep up with Swift Evolution. You really are +appreciated; thank you for everything you do to help make Swift a better +language. + +Well said. + + + +{% include sponsor.html %} + +### Starter task + +- [TF-449](https://bugs.swift.org/browse/TF-449) [Standard Library] +Conditionally conform `Optional` to `Differentiable` + +### News and community + +[Laurence Moroney](https://twitter.com/lmoroney) and [Chris Lattner](https://twitter.com/clattner_llvm) +talked [about how Swift has grown beyond mobile development](https://www.youtube.com/watch?v=z5M4otA4S3A). + +[Will Lisac](https://twitter.com/wlisac) open sourced [a set of Docker images](https://github.com/wlisac/swift-on-balena) +for Swift on Raspberry Pi and other ARM devices. + +### Commits and pull requests + +[Joe Groff](https://twitter.com/jckarter) merged [a pull request](https://github.com/apple/swift/pull/25030) +using the runtime hook mechanism to backward deploy [a bug fix](https://bugs.swift.org/browse/SR-10600). + +[Erik Eckstein](https://github.com/eeckstein) merged [a pull request](https://github.com/apple/swift/pull/24929) +allowing Swift’s optimizer to constant fold key path accesses down into direct +field accesses! + +### Accepted proposals + +[SE-0260](https://github.com/apple/swift-evolution/blob/master/proposals/0260-library-evolution.md): *Library Evolution for Stable ABIs* was [accepted](https://forums.swift.org/t/accepted-se-0260-library-evolution-for-stable-abis/24845). + +> Stable library evolution has been a goal of the Swift project since its +earliest days. SE-0260 builds on years of design and implementation effort, +and it is as much an announcement of the success of that work as it is a +proposal to change the language. Most of the formal content of the proposal is +carved deep into the bones of the language; it could not be made any other way +without grave consequences. All of this is to say that the basic outcome of +this review is at least a little preordained. +> +> Still, there are details that are worth debating. There were two basic +categories of discussion in the review: +> +> - Several reviewers provided concrete feedback on specific aspects of the +new attributes and compilation modes proposed by SE-0260. On balance, the Core +Team is satisfied with the language rules and names as proposed. +> +> - There was quite a lot of debate about the exact process of developing and +evolving stable libraries and the exact guarantees that Swift is making here. +While SE-0260 lays out the most basic rules for stable libraries, there are +many details like these that remain unsettled and which may have significant +consequences for the evolution of the implementation. The Core Team feels that +these details can be worked out in later proposals, and that any limitations on +the implementation will provide adequate incentive to ensure that they are. + +[SE-0253](https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md): *Callable values of user-defined nominal types* was [accepted with modification](https://forums.swift.org/t/accepted-with-modification-se-0253-callable-values-of-user-defined-nominal-types/24605). + +> [..] the core team decided to accept the proposal, with the request to change +`func call()` syntax to `func callFunction()`. The core team chose this +direction because it retains the 'call' nomenclature established by +[SE-0216](https://github.com/apple/swift-evolution/blob/master/proposals/0216-dynamic-callable.md), +but is a more verbose name that is less likely to already exist, or be +accidentally used for an unrelated purpose. + +After more feedback from the community, it was then [further revised](https://forums.swift.org/t/accepted-with-modification-se-0253-callable-values-of-user-defined-nominal-types/24605/166). + +> The Core Team discussed this and has decided to **further revise the +proposal** to name the operator function `func callAsFunction()`. We are +comfortable with enabling this functionality purely based on nothing more than +the name of a function, and we are not persuaded that `init` and `subscript` +(which both have substantially different semantic and syntactic rules and are +not simply functions) provide important precedents here requiring a new +declaration introducer. + +### Swift Forums + +[Pavol Vaskovic](https://twitter.com/palimondo) shared [an update on benchmark performance](https://forums.swift.org/t/towards-robust-performance-measurement/11490/26). + +> I’m happy to announce that by the beginning of March 2018, [a series of pull +requests](https://github.com/pulls?utf8=✓&q=is%3Amerged+is%3Apr+author%3Apalimondo+Janitor) +that applied **legacy factor** across the whole Swift Benchmark Suite (SBS) has +lowered the workloads of individual benchmarks to execute in the 20–1000 μs +range. My thanks go to [Erik Eckstein](https://github.com/eeckstein) for his +patient review and guidance. +> +> Point of this modification was to strengthen the resilience of our measurement +process against accumulated errors caused by context switches that happen every +10 ms on macOS. + +[Dale Buckley](https://twitter.com/Dale_Buckley) pitched [a proposal](https://forums.swift.org/t/pre-pitch-removeall-at/24820) +that introduces a `removeAll(at:)` function. + +> When dealing with collections of data, there are often times where it is +required to remove multiple elements from a collection at different indices +within the same operation. There are some common mistakes that can lead to +unperformant and buggy code when presented with this task. This proposal intends +to provide a simplified method to perform this operation in a safe and +performant way. + +[Doug Gregor](https://twitter.com/dgregor79) shared [a revised pitch](https://forums.swift.org/t/pitch-3-property-wrappers-formerly-known-as-property-delegates/24961) +for property wrappers. + +> I've revised the property delegates proposal again, albeit under a more +descriptive name ["property wrappers"](https://github.com/DougGregor/swift-evolution/blob/property-wrappers/proposals/0258-property-wrappers.md). +> +> - The name of the feature has been changed from "property delegates" to +"property wrappers" to better communicate how they work and avoid the existing +uses of the term "delegate" in the Apple developer community +> +> - When a property wrapper type has a no-parameter `init()`, properties that +use that wrapper type will be implicitly initialized via `init()`. +> +> - Support for property wrapper composition has been added, using a "nesting" +model. +> +> - A property with a wrapper can no longer have an explicit get or set +declared, to match with the behavior of existing, similar features +(`lazy`, `@NSCopying`). +> +> - A property with a wrapper does not need to be `final`. +> +> - Reduced the visibility of the synthesized storage property to `private`, +and expanded upon potential future directions to making it more visible. +> +> - Removed the restriction banning property wrappers from having names that +match the regular expression `_*[a-z].*.` +> +> - `Codable`, `Hashable`, and `Equatable` synthesis are now based on the +backing storage properties, which is a simpler model that gives more control +to the authors of property wrapper types. + +[Saleem Abdulrasool](https://twitter.com/compnerd) announced [Swift support in CMake](https://forums.swift.org/t/announcing-swift-support-in-cmake/24792/1)! + +> I have been working with upstream to integrate Swift support into CMake with +the Ninja generator so that it can be integrated into existing projects much +more conveniently. I would like to announce that the last of the initial set of +changes needed to support Swift in CMake have been merged now into CMake and I +expect that the next major release of CMake (3.15) to include the Swift support. + +... as well as [Swift REPL on Windows](https://forums.swift.org/t/comming-soon-to-a-terminal-near-you-swift-repl-on-windows/24917)! + +> I have gotten the REPL to the point where it now runs on Windows! There are +some improvements to be made still, primarily in the application of Data +Formatters. However, the expression evaluation appears to work now and overall. +If there are people who would like to get involved in the Windows port on the +lldb side - this provides an excellent opportunity to delve into lldb. It also +can expand easily into the compiler side if you start looking at the AST side +of things. + +### Finally + +[The real "Objective-C without the C"](https://twitter.com/harlanhaskins/status/1133210047952015360/photo/1) 🦕 From b8598cfdde90d46bec82224fd917647a6e206bbe Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 30 May 2019 17:44:53 +0200 Subject: [PATCH 170/589] Generate issue 136 draft --- _drafts/2019-06-13-issue-136.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-06-13-issue-136.md diff --git a/_drafts/2019-06-13-issue-136.md b/_drafts/2019-06-13-issue-136.md new file mode 100644 index 00000000..8a0dfb11 --- /dev/null +++ b/_drafts/2019-06-13-issue-136.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #136' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 180961e77dba5ce8bd9d0771db7063ec1f4d4085 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 2 Jun 2019 15:44:54 +0200 Subject: [PATCH 171/589] Add podcasts, finally --- _drafts/2019-06-13-issue-136.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/_drafts/2019-06-13-issue-136.md b/_drafts/2019-06-13-issue-136.md index 8a0dfb11..3d59b548 100644 --- a/_drafts/2019-06-13-issue-136.md +++ b/_drafts/2019-06-13-issue-136.md @@ -21,7 +21,13 @@ sponsor: ### Podcasts -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +In the latest episode of Swift Unwrapped, Jesse and JP talk [about](https://spec.fm/podcasts/swift-unwrapped/299640) +Swift Build Systems with [Keith Smiley](https://twitter.com/smileykeith). + +In the latest episode of the Swift Community Podcast, [Andrew Litteken](https://twitter.com/AndrewLitteken), +[Chris Lattner](https://twitter.com/clattner_llvm), and [Suyash Srijan](https://twitter.com/suyashsrijan) +an [introduction](https://www.swiftcommunitypodcast.org/episodes/5) to +contributing to the Swift Compiler. ### News and community @@ -53,4 +59,5 @@ sponsor: ### Finally -> TODO: something funny/fun. tweet, link, etc. +A [sequel](https://twitter.com/UINT_MIN/status/1134479584571736065) to last +week's "finally", and some Shakespeare [words to live by](https://twitter.com/jckarter/status/1134556191583920128). From b93d001f8eefddc0fdde2b938eb740f275426095 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 7 Jun 2019 22:24:29 +0200 Subject: [PATCH 172/589] Add sponsor --- _drafts/2019-06-13-issue-136.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_drafts/2019-06-13-issue-136.md b/_drafts/2019-06-13-issue-136.md index 3d59b548..95137fe3 100644 --- a/_drafts/2019-06-13-issue-136.md +++ b/_drafts/2019-06-13-issue-136.md @@ -3,10 +3,10 @@ layout: post title: ! 'Issue #136' author: btb sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO + link: https://semaphoreci.com/product/ios + heading: Forget slow iOS builds + body: Semaphore is now the fastest way to test and deploy iOS apps. Powerful CI/CD pipelines run 42% faster comparing to Travis and auto-scale to every git push. You pay only for what you use. Sign up free with GitHub and give it a try today. + displaylink: semaphoreci.com --- > TODO: intro comments From 3f2f10ec70c4abac47f0cb0df0b6f4481f23774f Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 11 Jun 2019 22:04:27 +0200 Subject: [PATCH 173/589] Allow for custom utm parameters (#460) * Allow for custom utm parameters * Fix indentation --- _includes/sponsor.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/_includes/sponsor.html b/_includes/sponsor.html index cefa1dc3..8398f6c8 100644 --- a/_includes/sponsor.html +++ b/_includes/sponsor.html @@ -1,12 +1,16 @@ {% assign issue_num = page.title | remove: 'Issue #' %} -{% assign utm_params = "?utm_campaign=Swift_Weekly_Brief&utm_medium=email_web&utm_source=Swift_Weekly_Brief_" %} +{% if page.sponsor.custom-utm %} + {% assign utm_params = page.sponsor.custom-utm %} +{% else %} + {% assign utm_params = "?utm_campaign=Swift_Weekly_Brief&utm_medium=email_web&utm_source=Swift_Weekly_Brief_" | append: issue_num %} +{% endif %} {% if page.sponsor %} {% else %}

    Interested in sponsoring Swift Weekly Brief? Learn more here.

    From 5d52698dedc3a0a9c1705c45adae02a5cf8dbe61 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 11 Jun 2019 22:04:45 +0200 Subject: [PATCH 174/589] Add custom utm for sponsor --- _drafts/2019-06-13-issue-136.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_drafts/2019-06-13-issue-136.md b/_drafts/2019-06-13-issue-136.md index 95137fe3..e7ae16e3 100644 --- a/_drafts/2019-06-13-issue-136.md +++ b/_drafts/2019-06-13-issue-136.md @@ -7,6 +7,7 @@ sponsor: heading: Forget slow iOS builds body: Semaphore is now the fastest way to test and deploy iOS apps. Powerful CI/CD pipelines run 42% faster comparing to Travis and auto-scale to every git push. You pay only for what you use. Sign up free with GitHub and give it a try today. displaylink: semaphoreci.com + custom-utm: '?utm_source=swiftweeklybrief&utm_medium=sponsor&utm_campaign=ios_20190613' --- > TODO: intro comments From 4e6e09886a6c0c8790bce3af0292b5caaf615c18 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 12 Jun 2019 09:06:49 +0200 Subject: [PATCH 175/589] Update sponsorship.md --- sponsorship.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 5e4bd094..ef5c2a59 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,700 subscribers and over 7,900 followers on Twitter. +There are over 3,700 subscribers and over 8,000 followers on Twitter.

    Sponsored Links

    @@ -60,8 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
    |   Issue |   Status | |:-|:-| -| May 16 | **Booked** | -| May 30 | **Booked** | | June 13 | **Booked** | | June 27 | Open | | July 11 | **Reserved** | From 48422eaa338cac3b559364dadc9959ba7dc70314 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 12 Jun 2019 23:08:04 +0200 Subject: [PATCH 176/589] 136 draft --- _drafts/2019-06-13-issue-136.md | 123 +++++++++++++++++++++++--------- 1 file changed, 91 insertions(+), 32 deletions(-) diff --git a/_drafts/2019-06-13-issue-136.md b/_drafts/2019-06-13-issue-136.md index e7ae16e3..9708bda8 100644 --- a/_drafts/2019-06-13-issue-136.md +++ b/_drafts/2019-06-13-issue-136.md @@ -10,55 +10,114 @@ sponsor: custom-utm: '?utm_source=swiftweeklybrief&utm_medium=sponsor&utm_campaign=ios_20190613' --- -> TODO: intro comments +So that was quite the week, wasn't it? So many interesting things announced at +WWDC. Although there were no groundbreaking announcements regarding Swift 6 or +the open source projects, but with SwiftUI, iPadOS, ~~Marzipan~~ Catalyst, and +more, the one word to sum up WWDC for me was +[overwhelming](https://twitter.com/basthomas/status/1137284397617623040). In +a good way, though! - +Looking forward to the amazing things we'll all get to do with these +announcements next. And if we're lucky, we might even get to see some of the +tools in open source and/or on other platforms... Here's hoping. -{% include sponsor.html %} +With all of that happening, it has been relatively (read: very) quiet when it +comes to proposals, although a few updates to proposals related to the new +announcements are underway, so expect updates in two weeks! -### Starter tasks + -> TODO +{% include sponsor.html %} ### Podcasts -In the latest episode of Swift Unwrapped, Jesse and JP talk [about](https://spec.fm/podcasts/swift-unwrapped/299640) -Swift Build Systems with [Keith Smiley](https://twitter.com/smileykeith). +In the latest episode of Swift Unwrapped, Jesse and JP talk +[about](https://spec.fm/podcasts/swift-unwrapped/299640) Swift Build Systems +with [Keith Smiley](https://twitter.com/smileykeith). -In the latest episode of the Swift Community Podcast, [Andrew Litteken](https://twitter.com/AndrewLitteken), -[Chris Lattner](https://twitter.com/clattner_llvm), and [Suyash Srijan](https://twitter.com/suyashsrijan) +In the latest episode of the Swift Community Podcast, +[Andrew Litteken](https://twitter.com/AndrewLitteken), +[Chris Lattner](https://twitter.com/clattner_llvm), +and [Suyash Srijan](https://twitter.com/suyashsrijan) an [introduction](https://www.swiftcommunitypodcast.org/episodes/5) to contributing to the Swift Compiler. ### News and community -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review +Apple introduced a new framework, +[SwiftUI](https://developer.apple.com/xcode/swiftui/), that brings a declarative +user interface builder to all Apple platforms. Now to wait for them to open +source it! 🤞 -> TODO +[Suyash Srijan](https://twitter.com/suyashsrijan) wrote +[an article](https://medium.com/@suyash.srijan/intro-to-swiftui-part-1-47361a3ffb2e) +on the language features of Swift that power SwiftUI. ### Swift Forums -> TODO +[John McCall](https://twitter.com/pathofshrines) pitched +[a proposal](https://forums.swift.org/t/pitch-function-builders/25167) for +Function Builders. + +> It's always been a goal of Swift to support declarative programming, and the +language can be quite good for it, but some kinds of "declaration" fit better +into the current language than others. In particular, heterogeneous trees with +a lot of hard-coded structure — such as JSON, HTML, and view hierarchies — +often feel a bit awkward to express using the ordinary tools of the language. +I think we can do better than that, and so I'm proposing a feature to enable a +new class of embedded DSL in Swift. + +You can read the draft proposal +[here](https://github.com/rjmccall/swift-evolution/blob/function-builders/proposals/XXXX-function-builders.md). + +[Ted Kremenek](https://twitter.com/tkremenek) also shared +[an update](https://forums.swift.org/t/important-evolution-discussion-of-the-new-dsl-feature-behind-swiftui/25168) +on the pitch above. + +> Those of you watching Apple's WWDC keynote today and introduction of SwiftUI +likely observed a new enhancement to the Swift language in the form a Domain +Specific Language +([DSL](https://en.wikipedia.org/wiki/Domain-specific_language)) that could be +used to build a UI in code. +> +> This is a feature that has not been discussed on Swift evolution. The work on +that feature has been very iterative with lots of experimentation. Those of us +involved in that work wanted to make sure we had a design we were happy with +before taking it back for discussion with the community. Further, while the +feature is general purpose, adding it to Swift is easier to motivate and +discuss the details with a compelling and concrete use case like SwiftUI. +> +> Speaking on behalf of the Core Team, here are the next steps to discuss and +review the feature: +> +> - The Core Team would like to run a formal review of the feature soon. +> - Before that review, we'd like to use the pitch thread for general +discussion and questions about the feature. +> +> While Apple has embraced the approach as part of SwiftUI, the evolution +review is intended to have a real and tangible impact on the shape of the +feature itself. + +[Nathan Harris](https://twitter.com/Mordil) shared +[a proposal](https://forums.swift.org/t/feedback-redisnio-a-nio-based-redis-driver/25521) +for a NIO-based Redis Driver. + +> **RedisNIO** is a module providing general implementations for connecting to +a Redis instance and executing commands against it using Redis' proprietary +[**Re**dis **S**eralization **P**rotocol (RESP)](https://redis.io/topics/protocol). +> +> These types are designed to work in a request / response loop, representing +individual connections to Redis. +> +> The goal of this library is to provide individual building blocks for working +with Redis, while still providing enough mechanisms "out of the box" so users +can get started immediately with Redis. + +You can read the full proposal +[here](https://github.com/swift-server/sswg/blob/master/proposals/0004-nio-redis.md). ### Finally -A [sequel](https://twitter.com/UINT_MIN/status/1134479584571736065) to last -week's "finally", and some Shakespeare [words to live by](https://twitter.com/jckarter/status/1134556191583920128). +A [sequel](https://twitter.com/UINT_MIN/status/1134479584571736065) to the +previous "finally", and some Shakespeare +[words to live by](https://twitter.com/jckarter/status/1134556191583920128). From 464c1e6994f3075890b7b95687ec458d12eed942 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 13 Jun 2019 19:26:37 +0200 Subject: [PATCH 177/589] Publish issue 136 (#462) --- {_drafts => _posts}/2019-06-13-issue-136.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2019-06-13-issue-136.md (100%) diff --git a/_drafts/2019-06-13-issue-136.md b/_posts/2019-06-13-issue-136.md similarity index 100% rename from _drafts/2019-06-13-issue-136.md rename to _posts/2019-06-13-issue-136.md From 10d693180d386e38b21f0f36e0ac7ac26da7ca41 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 26 Jun 2019 22:09:27 +0200 Subject: [PATCH 178/589] 137 draft --- _drafts/2019-06-27-issue-137.md | 95 +++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 _drafts/2019-06-27-issue-137.md diff --git a/_drafts/2019-06-27-issue-137.md b/_drafts/2019-06-27-issue-137.md new file mode 100644 index 00000000..30e6a545 --- /dev/null +++ b/_drafts/2019-06-27-issue-137.md @@ -0,0 +1,95 @@ +--- +layout: post +title: ! 'Issue #137' +author: btb +--- + +It has at this point already been more than two and a half weeks since WWDC +2019. While many are looking into the new tech announced there, as well as +playing with the beta software, this is what has been going on in the Swift.org +open source projects over the last two weeks. + + + +{% include sponsor.html %} + +### News and community + +Woot! This is so amazing: https://github.com/grpc/grpc-swift/releases/tag/1.0.0-alpha.1 . I'm super thrilled to see the first gprc-swift on top of SwiftNIOHTTP2 land. + +### Commits and pull requests + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/25449) +implementing composition of property wrappers. + +[A pull request](https://github.com/apple/swift/pull/25408) was merged that +makes Dictionaries to not be rewritten into a call expression after type +checking. The new way is to keep the `LiteralExpr` around and just stash a +reference to the right initializer. + +[Davide Italiano](https://github.com/dcci) merged [a pull request](https://github.com/apple/swift-lldb/pull/1693) +that fixes a bug by simply removing code! + +[Owen Voorhees](https://twitter.com/owenvoorhees) opened [a pull request](https://github.com/apple/swift/pull/25510) +fully qualifies names for types with the same name in either different modules, +or different scopes. The diagnostic would be really confusing, and this change +improves that. + +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/25615) +cleaning up the implementation of lazy property's underlying storage. + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Proposals in review + +[SE-0258](https://github.com/apple/swift-evolution/blob/master/proposals/0258-property-wrappers.md): *Property Wrappers* is [under a second review](https://forums.swift.org/t/se-0258-property-wrappers-second-review/25843). + +> Doug Gregor has provided the following list of differences from the previous +revision: +> +> - The name of the feature has been changed from "property delegates" to +"property wrappers" to better communicate how they work and avoid the existing +uses of the term "delegate" in the Apple developer community +> - When a property wrapper type has a no-parameter `init()`, properties that +use that wrapper type will be implicitly initialized via `init()`. +> - Support for property wrapper composition has been added, using a "nesting" +model. +> - A property with a wrapper can no longer have an explicit get or set +declared, to match with the behavior of existing, similar features (`lazy`, +`@NSCopying`). +> - A property with a wrapper does not need to be `final`. +> - Reduced the visibility of the synthesized storage property to `private`. +> - When a wrapper type provides `wrapperValue`, the (computed) `$` variable is +internal (at most) and the backing storage variable gets the prefix `$$` (and +remains `private`). +> - Removed the restriction banning property wrappers from having names that +match the regular expression `_*[a-z].*`. +> - `Codable`, `Hashable`, and `Equatable` synthesis are now based on the +backing storage properties, which is a simpler model that gives more control to +the authors of property wrapper types. +> - Improved type inference for property wrapper types and clarified that the +type of the wrappedValue property is used as part of this inference. See the +"Type inference" section. +> - Renamed the value property to `wrappedValue` to avoid conflicts. +> - Initial values and explicitly-specified initializer arguments can both be +used together; see the `@Clamping` example. + +### Swift Forums + +https://forums.swift.org/t/move-swiftuis-identifiable-protocol-and-related-types-into-the-standard-library/25713 + +Move SwiftUI’s Identifiable protocol and related types into the standard library + +https://forums.swift.org/t/partial-nightlies-for-android-sdk/25909 + +(Partial) Nightlies for android SDK + +### Finally + +[No more 🤖 calls](https://twitter.com/jckarter/status/1141067402387439616). From f6b50efdcfa7d120842d51f9aea4c3ce1849fd02 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Jun 2019 10:52:17 +0200 Subject: [PATCH 179/589] More things --- _drafts/2019-06-27-issue-137.md | 61 +++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/_drafts/2019-06-27-issue-137.md b/_drafts/2019-06-27-issue-137.md index 30e6a545..bcb03ec6 100644 --- a/_drafts/2019-06-27-issue-137.md +++ b/_drafts/2019-06-27-issue-137.md @@ -4,10 +4,10 @@ title: ! 'Issue #137' author: btb --- -It has at this point already been more than two and a half weeks since WWDC -2019. While many are looking into the new tech announced there, as well as -playing with the beta software, this is what has been going on in the Swift.org -open source projects over the last two weeks. +It has at this point already been more than two and a half weeks since WWDC. +While many are looking into the new tech announced there, as well as playing +with the beta software, this is what has been going on in the Swift.org open +source projects over the last two weeks. @@ -15,7 +15,15 @@ open source projects over the last two weeks. ### News and community -Woot! This is so amazing: https://github.com/grpc/grpc-swift/releases/tag/1.0.0-alpha.1 . I'm super thrilled to see the first gprc-swift on top of SwiftNIOHTTP2 land. +[Brennan Saeta](https://twitter.com/bsaeta) shared that Swift for Tensorflow +[will be holding weekly open design meetings](https://twitter.com/bsaeta/status/1137014498995257344). + +[Johannes Weiss](https://twitter.com/johannesweiss) shared the release of +[grpc-swift](https://github.com/grpc/grpc-swift/releases/tag/1.0.0-alpha.1), +the first Swift gRPC (Remote Procedure Calls) built on top of `SwiftNIOHTTP2`. + +The second [Server Side Swift Conference](https://www.serversideswift.info/2019/) +will be held on October 30th and November 1st, 2019, in Copenhagen, Denmark. ### Commits and pull requests @@ -38,14 +46,6 @@ improves that. [Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/25615) cleaning up the implementation of lazy property's underlying storage. -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - ### Proposals in review [SE-0258](https://github.com/apple/swift-evolution/blob/master/proposals/0258-property-wrappers.md): *Property Wrappers* is [under a second review](https://forums.swift.org/t/se-0258-property-wrappers-second-review/25843). @@ -80,15 +80,40 @@ type of the wrappedValue property is used as part of this inference. See the > - Initial values and explicitly-specified initializer arguments can both be used together; see the `@Clamping` example. -### Swift Forums +An amendment for [SE-0240](https://github.com/apple/swift-evolution/blob/master/proposals/0240-ordered-collection-diffing.md): *Ordered Collection Diffing* is [under review](https://forums.swift.org/t/amendment-se-0240-ordered-collection-diffing/26084). -https://forums.swift.org/t/move-swiftuis-identifiable-protocol-and-related-types-into-the-standard-library/25713 +> This amendment is to add a new method, `inverse()`, to the +`CollectionDifference` type. -Move SwiftUI’s Identifiable protocol and related types into the standard library +### Swift Forums -https://forums.swift.org/t/partial-nightlies-for-android-sdk/25909 +[Matthew Johnson](https://twitter.com/anandabits) pitched [a proposal](https://forums.swift.org/t/move-swiftuis-identifiable-protocol-and-related-types-into-the-standard-library/25713) +to move SwiftUI's `Identifiable` protocol and related types to the standard +library. -(Partial) Nightlies for android SDK +> Swift UI introduces an `Identifiable` protocol as well as the related +`IdentifierValuePair` and `IdentifierValuePairs` types and the `identified(by:)` +method. +> +> I believe that `Identifiable` is a "currency" protocol with relevance to an +extremely broad range of Swift code and should therefore be moved into the +standard library along with the related types and method. These will be useful +to any generic code that works with values that represent a snapshot of the +state of an entity. + +[Saleem Abdulrasool]() shared [there will be nightly builds](https://forums.swift.org/t/partial-nightlies-for-android-sdk/25909) +for the Android SDK. + +> I've been working on getting nightlies of the Android SDK - the Swift +standard library, libdispatch (and swift SDK overlay), as well as libxml2 and +curl. Foundation is something which will take a bit more work, but is easily +added. These are not exactly perfect, but should get you fairly up-to-date +builds of the Swift standard library and libdispatch for the moment. +> +> All of these builds are being done on Windows, but the generated artifacts +are consumable on other targets as well (i.e. you can use this with an +up-to-date toolchain on Windows, Linux, or Darwin). They currently target +Android API level 21. ### Finally From d7106537bedc980af10f5c0db8ce58b7fcb115ca Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Jun 2019 17:26:59 +0200 Subject: [PATCH 180/589] Publish issue 137 --- {_drafts => _posts}/2019-06-27-issue-137.md | 78 +++++++++++++++++++++ 1 file changed, 78 insertions(+) rename {_drafts => _posts}/2019-06-27-issue-137.md (57%) diff --git a/_drafts/2019-06-27-issue-137.md b/_posts/2019-06-27-issue-137.md similarity index 57% rename from _drafts/2019-06-27-issue-137.md rename to _posts/2019-06-27-issue-137.md index bcb03ec6..aa9e72e1 100644 --- a/_drafts/2019-06-27-issue-137.md +++ b/_posts/2019-06-27-issue-137.md @@ -87,6 +87,84 @@ An amendment for [SE-0240](https://github.com/apple/swift-evolution/blob/master/ ### Swift Forums +[Michael Gottesman]() shared [what Swift support in CMake means for Swift's build](https://forums.swift.org/t/what-does-swift-support-in-cmake-mean-for-swifts-build/24828/14). + +> I was thinking about this a little bit and I actually think that there are +two additional motivating actions here we are not considering: +> +> 1. We could use this to break the dependency of Swift based tools (e.x. +swift-syntax) that Swift's CMake builds on building the standard library. +> +> 2. CMake for free will let us integrate Swift code into swiftc itself +trivially. + +You can read the full overview [here](https://forums.swift.org/t/what-does-swift-support-in-cmake-mean-for-swifts-build/24828/14). + +[Ankit Aggarwal]() shared [that he has been working on test discovery on Linux](https://forums.swift.org/t/test-discovery-on-linux/26203). + +> I've been slowly [working](https://github.com/apple/swift-package-manager/pull/2174) +on test discovery for Linux and I think the implementation is in a reasonable +state now. I've tested it on some OSS Swift packages but it would be great if +others can try it out and report any issues they run into. It can be enabled by +passing the `--enable-test-discovery` flag to the swift test invocation. + +[Ian Partridge](https://twitter.com/alfa) shared [meeting notes](https://forums.swift.org/t/june-12th-2019/26023) +for the June 12th Swift Server Working Group meeting. + +> Docker: Mishal joined to discuss publishing nightlies to Docker Hub. Happy to +scope out doing this - it would involve some infra work from Apple but in +principle happy to do this. We would prioritise Swift 5.1 convergence nightlies, +add `master` afterwards. Would prioritise having the latest build available, +historical builds can come later. Just full images, not slim. +> +> Ubuntu 14.04 update: there are still users although usage is believed to be +low. Mishal will check the stats. When we switch it off, we'll start with +`master`. +> +> Naming collisions: Johannes explained the current status, post discussions +around WWDC. There are a number of separate but related problems. + +[Artem Redkin](https://twitter.com/artemredkin) created [a proposal](https://forums.swift.org/t/feedback-nio-based-http-client/26149) +for an HTTP Client Library. + +> There are a number of projects implemented their own HTTP client libraries. +This shows that there is a need for generic, multi-purpose, non-blocking, +asynchronous HTTP client library built on top of SwiftNIO. The Swift Server +Working Group aims to provide a number of packages that could be shared between +different projects, and I think the proposed HTTP client library would be a +good fit for those projects and other use-cases. +> +> Having one, community-driven project that can be shared between different +projects will hopefully solve the need to implement this functionality in every +project from scratch. + +[Pavel Yaskevich](https://github.com/xedin) opened a discussion [to document +feature/syntax use and error/warning scenarios for proposals](https://forums.swift.org/t/additions-to-proposal-process-to-document-feature-syntax-use-and-error-warning-scenarios/26037). + +> Since we already have ABI, API resilience and Source Compatibility sections +in the proposal template I think it might make sense to expand on that and make +sure that proposal is considering not only correct +syntax/use, but also accounts for (even if basic) scenarios when new +feature/syntax is used incorrectly or in an (temporary) unsupported way. +> +> I think it would make sense for proposals to state explicitly, in a separate +section, what is supported and what is not (listing possibilities for future +improvements), what is the possible initial set of diagnostic messages and some +basic error/warning scenarios as well as what are the ways current feature might +interact with other features already implemented in the language. +> +> New attributes/keywords could be a good example - it would be very helpful to +list contexts where new attribute/keyword could be used and what error message +should be used for the rest. What are the special cases and areas of the future +improvement e.g. currently could only be used on functions but later support +could be expanded to properties and subscripts. How does new attribute/keyword +interact with existing ones e.g. `@autoclosure` vs. `@escaping` or +`@autoclosure` vs. `inout`. +> +> I think having documentation like that in the proposal would make +implementation as well as code review much easier, and would be generally +helpful for posterity. + [Matthew Johnson](https://twitter.com/anandabits) pitched [a proposal](https://forums.swift.org/t/move-swiftuis-identifiable-protocol-and-related-types-into-the-standard-library/25713) to move SwiftUI's `Identifiable` protocol and related types to the standard library. From 87ee7336c9b2cb6d9b917bd99ff0886ad05224f3 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Jun 2019 17:27:20 +0200 Subject: [PATCH 181/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0b4bd01b..62b04f2b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -240,7 +240,7 @@ GEM open4 (1.3.4) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (3.1.0) + public_suffix (3.1.1) rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) From 3ea2c5bbfd58af182feb256106d39d7bd8331eaa Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 4 Jul 2019 13:50:29 +0200 Subject: [PATCH 182/589] Update sponsorship.md --- sponsorship.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index ef5c2a59..0b680584 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,8 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
    |   Issue |   Status | |:-|:-| -| June 13 | **Booked** | -| June 27 | Open | | July 11 | **Reserved** | | July 25 | Open | | August 8 | Open | From 41ec17d1387c3a3aceb5273fdab28ff4e83bf7b2 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 9 Jul 2019 21:06:35 +0200 Subject: [PATCH 183/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 0b680584..ba04f38d 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -61,7 +61,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso |   Issue |   Status | |:-|:-| | July 11 | **Reserved** | -| July 25 | Open | +| July 25 | **Reserved** | | August 8 | Open | | August 22 | Open | | September 5 | Open | From 6b1b9c8aa18367fd55834204a042514de9174f27 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 9 Jul 2019 21:07:38 +0200 Subject: [PATCH 184/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index ba04f38d..4d1eda56 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -61,7 +61,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso |   Issue |   Status | |:-|:-| | July 11 | **Reserved** | -| July 25 | **Reserved** | +| July 25 | **Booked** | | August 8 | Open | | August 22 | Open | | September 5 | Open | From 4808918d28ae7cb9946364fc6df8de24d9a256ca Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 10 Jul 2019 22:30:05 +0200 Subject: [PATCH 185/589] Add issue 139 draft --- _drafts/2019-07-25-issue-139.md | 57 +++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 _drafts/2019-07-25-issue-139.md diff --git a/_drafts/2019-07-25-issue-139.md b/_drafts/2019-07-25-issue-139.md new file mode 100644 index 00000000..5809286c --- /dev/null +++ b/_drafts/2019-07-25-issue-139.md @@ -0,0 +1,57 @@ +--- +layout: post +title: ! 'Issue #139' +author: btb +sponsor: + link: https://www.pragmaconference.com/ + heading: Pragma Conference 2019 in Bologna - Italy + body: 'Join us on 9th October for 4 amazing workshops, continuing on 10th - 11th October for 18 sessions with the greatest international speakers. Be part of something unforgettable: meet the experts, talk with fellow developers and discover new technologies, all in the charming Bologna, while eating some fine food. +
    More than a conference, in the Italian way.' + displaylink: pragmaconference.com +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From c06d331d1fafcfecc32486e463a204210b90c322 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs Date: Thu, 11 Jul 2019 17:52:10 +0300 Subject: [PATCH 186/589] July 11 issue (#466) * create 138 draft and fill first things * Added first PR * Added SR-10987 PR * Added new things to issue * Remove spaces * Added funny and some other items to the issue * Add Starter tasks and remove TODO * Added AsyncHTTPClient to the issue * Added PRs and Swiftbrew * Added new stuff and proof read * Proof read * Added intro * Added intro and accepted proposal * Added Swift format * Added info about new review * Remove sponsors * Update 2019-07-11-issue-138.md --- _drafts/2019-07-11-issue-138.md | 111 ++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 _drafts/2019-07-11-issue-138.md diff --git a/_drafts/2019-07-11-issue-138.md b/_drafts/2019-07-11-issue-138.md new file mode 100644 index 00000000..191dad1d --- /dev/null +++ b/_drafts/2019-07-11-issue-138.md @@ -0,0 +1,111 @@ +--- +layout: post +title: ! 'Issue #138' +author: fassko +--- + +It's already the middle of summer and lot of people are having summer break. Despite that, the Swift team and community members have been active as always. A lot of important pull requests have been merged and created. Not mentioning a lot of active discussions on the forums. + + + +{% include sponsor.html %} + +### Starter tasks + +* [SR-11066](https://bugs.swift.org/browse/SR-11066) [Compiler] False positive "never mutated" warning when property with mutating getter is accessed on value +* [SR-11033](https://bugs.swift.org/browse/SR-11033) [Compiler] Add option in Swift driver to disable color diagnostics +* [SR-10979](https://bugs.swift.org/browse/SR-10979) [Compiler] Add FixIt for "Operator implementation without matching operator declaration" + +### Podcasts + +In the latest Swift by Sundell episode, [John Sundell](https://twitter.com/johnsundell) and [Chris Lattner](https://twitter.com/clattner_llvm) talked about Swift's past, present and future. + +Property Wrappers are becoming an important topic in the Swift community. That's why [JP](https://twitter.com/simjp) and [Jesse](https://twitter.com/jesse_squires) are discussing that in [the latest Swift Unwrapped podcast episode](https://spec.fm/podcasts/swift-unwrapped/302918). + +### News and community + +[Jeremy Howard](https://twitter.com/jeremyphoward) and [Chris Lattner](https://twitter.com/clattner_llvm) shared [a blog post](https://medium.com/tensorflow/fast-ais-deep-learning-from-the-foundations-with-swift-for-tensorflow-3ee7dfb68387) about releasing Swift for TensorFlow v0.4. + +[Artem Redkin](https://twitter.com/artemredkin) and other contributors released [AsyncHTTPClient version 1.0.0-alpha.1](https://github.com/swift-server/async-http-client) - a Swift NIO2 based HTTP client recently approved to 'sandbox' by the Swift Server Work Group. + +[Swiftbrew](https://github.com/swiftbrew/Swiftbrew/releases) - Homebrew for Swift packages 0.1.1 has been released. A package manager that installs prebuilt Swift command line tool packages, or Homebrew for Swift packages. + +[Argyrios Kyrtzidis](https://twitter.com/akyrtzi) pushed a first commit to the [Swift Format](https://github.com/apple/swift-format) repository. Swift-format provides the formatting technology for SourceKit-LSP and the building blocks for doing code formatting transformations. + +### Commits and pull requests + +[Jordan Rose](https://twitter.com/UINT_MIN) merged [a pull request](https://github.com/apple/swift/pull/25624) showing 'some' type origins in diagnostics, like 'aka' for sugared types. + +[Pavel Yaskevich](https://twitter.com/pyaskevich) merged [a pull request](https://github.com/apple/swift/pull/25892) that resolves [SR-10987](https://bugs.swift.org/browse/SR-10987): Compiler crashes on invalid reference to `subscript` member. + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/25884) which allows property wrapper types to support a second access pattern for instance properties of classes. + +[John McCall](https://forums.swift.org/u/john_mccall/summary) merged [a pull request](https://github.com/apple/swift/pull/25926) that adds support for opaque result types when applying a function builder to a function. + +[Scott Perry](https://twitter.com/numist) merged [a pull request](https://github.com/apple/swift/pull/25794) that dramatically improves the runtime performance of collection diffing. + +[Xiaodi Wu](https://twitter.com/xwu) merged [a pull request](https://github.com/apple/swift/pull/25745) that helps to reorganize `Decimal.swift`, aligning two implementations. This resolves [SR-3126](https://github.com/apple/swift/pull/25745). + +[Scott Perry](https://twitter.com/numist) merged [a pull request](https://github.com/apple/swift/pull/25826) that adds `CollectionDifference.inverse()` and test coverage. + +[John McCall](https://forums.swift.org/u/john_mccall/summary) merged [a pull request](https://github.com/apple/swift/pull/26019) which fixes mangling dependent protocol conformances. + +### Accepted proposals + +[SE-0258](https://github.com/apple/swift-evolution/blob/master/proposals/0258-property-wrappers.md): *Property Wrappers* was [accepted with modifications](https://forums.swift.org/t/se-0258-property-wrappers-third-review/26399). + +> There was a lot more great discussion in this review, and while there were some questions and reservations, overall the community expressed strong support for accepting the proposal. The Core Team agrees and has decided to accept SE-0258 with only one minor change: we would like to accept the community's suggestion that the initialValue: argument label on wrapper initializers be renamed to wrappedValue: to match the property name. The Core Team feels that this is a minor enough change to make without a further round of review. + +### Proposals in review + +[SE-0261](https://github.com/apple/swift-evolution/blob/master/proposals/0261-identifiable.md): *Identifiable Protocol* is [under review](https://forums.swift.org/t/se-0261-identifiable-protocol/26602). + +> This proposal introduces an `Identifiable` protocol, a general concept that is broadly useful - for diff algorithms, user interface libraries, and other generic code - to correlate snapshots of the state of an entity in order to identify changes. It is a fundamental notion that deserves representation in the standard library. +> +> Swift-evolution thread: [Move SwiftUI's `Identifiable` and related types into the standard library](https://forums.swift.org/t/move-swiftuis-identifiable-protocol-and-related-types-into-the-standard-library/25713) + +### Swift Forums + +[Johannes Weiss](https://twitter.com/johannesweiss) shared [meeting notes](https://forums.swift.org/t/june-27th-2019/26580) from the June 27th Swift Server Working Group meeting. + +> [Naming](https://forums.swift.org/t/redisnio-name-brainstorm/26521) and more [naming](https://forums.swift.org/t/nioapns-naming-brainstorm/26520): +> * summary: there are no good solutions so we need a compromise +> * we might be overthinking the problem but existing clashes have shown how hard it is to unbreak a clash +> * after a lot of discussion we came to the conclusion that 'despite nobody liking cutesy names very much there are the most lightweight workable solution'. However we won't prescribe cute names +> * try to stay unique, cutesy/clearly unique name preferred for the time being + +[Argyrios Kyrtzidis](https://twitter.com/akyrtzi) explained about plans to [integrate libSyntax into the compiler pipeline](https://forums.swift.org/t/integrating-libsyntax-into-the-compiler-pipeline/26605). + +> We have been developing libSyntax (and SwiftSyntax as the Swift counterpart) whose purpose is to represent the syntax of Swift source code with full fidelity (including whitespace), enable structured editing, provide immutable, thread-safe data structures, and support incremental re-parsing. + +[Anthony Platanios](https://twitter.com/eaplatanios) started a discussion about [removing the `Comparable` constraint for `Numeric.Magnitude`](https://forums.swift.org/t/removing-the-comparable-constraint-for-numeric-magnitude/26498). + +> As part of Swift for TensorFlow we have been working towards designing a set of protocols that more closely resemble mathematical concepts and can, for example, be used for conveniently implementing numerical optimizers. In trying to integrate our changes with the standard library we bumped into an issue related to Numeric. We have already designed a few protocols (e.g., VectorProtocol and PointwiseMultiplicative) for which we support automatic conformance derivation for aggregate types (e.g., structs containing tensors). We want to also support Numeric derivations for such aggregate structures and the current issue is that the Comparable constraint on Magnitude is causing some issues as it's not straightforward what the semantics should be. + +[Ted Kremenek](https://twitter.com/tkremenek) pointed out post by [Argyrios Kyrtzidis](https://twitter.com/akyrtzi) about [bringing formatting technology to SourceKit-LSP](https://forums.swift.org/t/formatting-technology-for-sourcekit-lsp-and-other-tools/26560). + +> Formatting is integral to the experience of editing source code which why it is included in the LSP specification. This functionality, however, is currently missing from SourceKit-LSP. We want to provide users a great out-of-the-box experience of using SourceKit-LSP, across all editors and platforms, and first-class support for formatting is a critical piece of the experience. +> +> For SourceKit-LSP we'd like to have formatting functionality that is: +> +> 1. Fast and capable of real-time, "as you type", performance +> 2. Be robust and work even in the presence of invalid code +> 3. Work in contexts that may only provide a string of Swift source code for context such as snippets in code-review + +An excellent pitch by [Owen Voorhees](https://forums.swift.org/u/owenv/summary) explaining [another attempt in passing arrays as variadic arguments](https://forums.swift.org/t/pitch-another-attempt-at-passing-arrays-as-varargs-with-implementation/26718). + +> This proposal introduces a new expression, `#variadic`, which may appear in the argument list of a function or subscript call. `#variadic` allows the user to pass an `Array`'s elements in lieu of variadic arguments. This enables cleaner API interfaces and allows for the manual forwarding of variadic arguments. + +[Richard L Zarth III](https://forums.swift.org/u/rlziii/summary) pitched [an idea to allow for compile-time checked intervals for parameters expecting literal values](https://forums.swift.org/t/pitch-allow-for-compile-time-checked-intervals-for-parameters-expecting-literal-values/26743). + +> Certainly methods are written to primarily accept literal values. However, when using types such as Int or Double there is no way to check at compile time that the supplied arguments are valid for a given interval/range. We must rely on run time checks that could cause for adverse side effects which may be difficult to handle. + +[Tom Doron](https://twitter.com/TomerDoron) [informed](https://forums.swift.org/t/feedback-swift-statsd-client-implementation/26848) about the [SSWG-0007](https://github.com/swift-server/sswg/blob/master/proposals/SSWG-0007.md): *`Statsd` Client* review. + +> After the [discussion thread](https://forums.swift.org/t/discussion-swift-statsd-client-implementation/26109), we are proposing this as a final revision of this proposal and enter the proposal review phase which will run until the 29th July 2019. +> +> The feedback model will be very similar to the one known from Swift Evolution. The community is asked to provide feedback in the way outlined below and after the review period finishes, the SSWG will -- based on the community feedback -- decide whether to promote the proposal to the [Sandbox}(https://github.com/swift-server/sswg/blob/master/process/incubation.md#process-diagram) maturity level or not. + +### Finally + +Sometimes [variable names can be quite long](https://developer.apple.com/documentation/contacts/cnlabelcontactrelationeldercousinmotherssiblingsdaughterorfatherssistersdaughter). From 0c150d5c050f01bc1f308dfcebc246efa311cf14 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 11 Jul 2019 18:50:45 +0200 Subject: [PATCH 187/589] Move 138 to posts (#467) * Move 138 to posts * Add sponsor * Update 2019-07-11-issue-138.md --- {_drafts => _posts}/2019-07-11-issue-138.md | 6 ++++++ 1 file changed, 6 insertions(+) rename {_drafts => _posts}/2019-07-11-issue-138.md (94%) diff --git a/_drafts/2019-07-11-issue-138.md b/_posts/2019-07-11-issue-138.md similarity index 94% rename from _drafts/2019-07-11-issue-138.md rename to _posts/2019-07-11-issue-138.md index 191dad1d..d32159c5 100644 --- a/_drafts/2019-07-11-issue-138.md +++ b/_posts/2019-07-11-issue-138.md @@ -2,6 +2,12 @@ layout: post title: ! 'Issue #138' author: fassko +sponsor: + link: https://www.eventbrite.com/e/swiftfest-2019-tickets-56501408233?discount=Swift-Weekly-99-Off + heading: SwiftFest Boston 2019, all the talks are live! + body: 'SwiftFest is the most community-driven conferences focused on Swift that brings together engineers, architects, midnight-coders, and students in a highly social and vibrant environment. This year you can learn about Swift, SwiftUI, augmented and virtual reality, accessibility, NFC, machine learning, development-culture, security, TDD, etc. +

    SwiftFest Boston - July, 29th-30th, get your discounted ticket today ($99 off) using the code **Swift-Weekly-99-Off**.' + displaylink: swiftfest.io/schedule --- It's already the middle of summer and lot of people are having summer break. Despite that, the Swift team and community members have been active as always. A lot of important pull requests have been merged and created. Not mentioning a lot of active discussions on the forums. From a803a3a6bc5e9701a16d7375e1631c5f7a010fdd Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 21 Jul 2019 10:00:45 +0200 Subject: [PATCH 188/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 62b04f2b..fd055de9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,7 +107,7 @@ GEM octokit (~> 4.0) public_suffix (~> 3.0) typhoeus (~> 1.3) - html-pipeline (2.11.0) + html-pipeline (2.11.1) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) From 99b45f8853ce4f3377037ab1412bd77aa4ae78be Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 21 Jul 2019 12:43:31 +0200 Subject: [PATCH 189/589] Flesh out the 139 draft Referencing #468 --- _drafts/2019-07-25-issue-139.md | 98 ++++++++++++++++++++++++++++++--- 1 file changed, 91 insertions(+), 7 deletions(-) diff --git a/_drafts/2019-07-25-issue-139.md b/_drafts/2019-07-25-issue-139.md index 5809286c..6bdd56d5 100644 --- a/_drafts/2019-07-25-issue-139.md +++ b/_drafts/2019-07-25-issue-139.md @@ -10,7 +10,8 @@ sponsor: displaylink: pragmaconference.com --- -> TODO: intro comments +It has been a while! The previous issue was beautifully crafted by [Kristaps +Grinbergs](https://twitter.com/fassko). Thanks again so much for that! @@ -18,7 +19,10 @@ sponsor: ### Starter tasks -> TODO +- [SR-11148](https://bugs.swift.org/browse/SR-11148) [Compiler] Separate `do` +and `while` blocks generate error from legacy diagnostic +- [SR-11159](https://bugs.swift.org/browse/SR-11159) [Compiler] Typechecker +crash on overloaded `enum` case ### Podcasts @@ -26,11 +30,35 @@ sponsor: ### News and community -> TODO +SwiftNIO 2.4.0 [shipped](https://twitter.com/johannesweiss/status/1149427820948545537), +containing an important fix for everybody using HTTP/1 + upgraders, for example +WebSocket. You can read the analysis of the issue [here](https://github.com/IBM-Swift/Kitura-WebSocket-NIO/issues/35). + +[Kevin Sweeney](https://twitter.com/kts) shared [the release of Swift 5.0.2](https://forums.swift.org/t/swift-5-0-2/27008) +for Linux. + +[Edd Wilder-James](https://twitter.com/edd) shared [an update](https://twitter.com/edd/status/1149438747609448449) +on expanding Tensorflow in the open, announcing a special interest group for +Multi-Level Intermediate Representation (MLIR), an intermediate representation +and compiler framework. + +[Tom Doron](https://twitter.com/TomerDoron) shared [meeting notes](https://forums.swift.org/t/july-11th-2019/26986) +of the Swift on the server workgroup meeting on July 11th. ### Commits and pull requests -> TODO +[Armen Mkrtchian](https://twitter.com/armen_mkrtchian) merged +[a pull request](https://github.com/apple/swift/pull/25309) with non-ASCII +String case-conversion benchmarks that uncovered optimization opportunities for +ASCII strings. + +[David Smith](https://twitter.com/Catfish_Man) merged [a pull request](https://github.com/apple/swift/pull/26007) +that implements those optimizations uncovered by Armen! 🏎 + +[Erik Eckstein](https://github.com/eeckstein) merged [a pull request](https://github.com/apple/swift/pull/25978) +that makes Swift traps more user-friendly. By encoding the error message in the +DWARF line table, you'll see the message in `.dSYM`-symbolicated backtraces and +crash reports, without strings leaking in your binaries. ### Accepted proposals @@ -46,12 +74,68 @@ sponsor: ### Proposals in review -> TODO +[SE-0261](https://github.com/apple/swift-evolution/blob/master/proposals/0261-identifiable.md): *Identifiable Protocol* is [under review](https://forums.swift.org/t/se-0261-identifiable-protocol/26602). + +> This proposal introduces an `Identifiable` protocol, a general concept that +is broadly useful — for diff algorithms, user interface libraries, and other +generic code — to correlate snapshots of the state of an entity in order to +identify changes. It is a fundamental notion that deserves representation in +the standard library. ### Swift Forums -> TODO +[Delisa Mason](https://twitter.com/kattrali) pitched [a proposal](https://forums.swift.org/t/stdlib-cleanup-callback-for-fatal-swift-errors/26977) to introduce a cleanup +callback for fatal Swift errors. + +> In the event of a fatal error caused by Swift code, there is no direct way to +get the error message and context from Swift without out-of-process log parsing. +Fatal errors "fall through" to signal handlers at which point the crash context +is lost. The goal of this proposal is to provide a native Swift cleanup callback +for fatal errors without the complexity of signal handlers nor allowing +attempted recovery. This context could be written to disk or logged in a custom +format or aggregated for later analysis. + +[Soroush Khanlou]() pitched [a proposal](https://forums.swift.org/t/require-parameter-names-when-referencing-to-functions/27048) +to require parameter names when referencing to functions. + +> Some of you may remember [SE-0220](https://github.com/apple/swift-evolution/blob/master/proposals/0220-count-where.md) +my proposal that added the `count(where:)` function to sequences. This proposal +was ultimately accepted in time for Swift 5, but sadly [had to be reverted](https://github.com/apple/swift/pull/22289) +because it was causing issues with the type checker. +> +> The issue was that when you reference `count`, in an expression like +`myArray.count * 5`, you could be referring to the count property, with type +`Int`, or the `count(where:)` function, which has type +`((Element) -> Bool) -> Int`, which you can refer to in shorthand as `count`. +When Swift tries to resolve what version of the `*` function to use, it has to +run through a lot more potential implementations, which explode combinatorially +as you increase the number of operators in the expression. +> +> I've thought about this problem for a while and chatted with a few folks about +the issue, and I think the simplest path forward to solve this is to require +parameter names when referencing functions. + +[Iggy Drougge](https://twitter.com/idrougge) pitched [a proposal](https://forums.swift.org/t/compilation-conditions-for-word-size/26995) +to add compilation conditions for word size. + +> A lot of code written to support more than one platform contains `#if arch()` +conditions to handle differences between 32-bit or 64-bit platforms or little +and big endian CPUs. This may turn into long statements like `#if arch(x86_64) +|| arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)`, +enumerating every (currently) supported architecture which must be handled by +that `#if ... #endif` clause. + +[Jari Koopman](https://twitter.com/LotUDev) shared [a proposal](https://forums.swift.org/t/feedback-swift-prometheus-implementation/26928) +to implement a Swift Prometheus implementation. + +> Prometheus is one of the most widely used libraries for metrics in the +serverside world. SwiftPrometheus is a client side implementation in Swift, +with the ability to use it both connected to & separately from swift-metrics. +> +> With Prometheus being one of the most widely used metric reporting tools, +it's a buildstone that can not be left out in a serverside ecosystem. This +package is created for everyone to use & build upon for their metric reporting. ### Finally -> TODO: something funny/fun. tweet, link, etc. +[Your argument is... valid?!](https://twitter.com/UINT_MIN/status/1149409709968912384) From 3f30b27b8ebd04ad6d107d00c891344d8fadd3c5 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 25 Jul 2019 15:04:59 +0200 Subject: [PATCH 190/589] Finish 139 Referencing #468 --- _drafts/2019-07-25-issue-139.md | 39 +++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/_drafts/2019-07-25-issue-139.md b/_drafts/2019-07-25-issue-139.md index 6bdd56d5..8950e895 100644 --- a/_drafts/2019-07-25-issue-139.md +++ b/_drafts/2019-07-25-issue-139.md @@ -13,6 +13,8 @@ sponsor: It has been a while! The previous issue was beautifully crafted by [Kristaps Grinbergs](https://twitter.com/fassko). Thanks again so much for that! +With all the heat (in Europe, at least...) I hope you're keeping it cool. + {% include sponsor.html %} @@ -24,10 +26,6 @@ and `while` blocks generate error from legacy diagnostic - [SR-11159](https://bugs.swift.org/browse/SR-11159) [Compiler] Typechecker crash on overloaded `enum` case -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - ### News and community SwiftNIO 2.4.0 [shipped](https://twitter.com/johannesweiss/status/1149427820948545537), @@ -45,6 +43,14 @@ and compiler framework. [Tom Doron](https://twitter.com/TomerDoron) shared [meeting notes](https://forums.swift.org/t/july-11th-2019/26986) of the Swift on the server workgroup meeting on July 11th. +[Johannes Weiss](https://twitter.com/johannesweiss) shared [an API-breakage +checker](https://twitter.com/johannesweiss/status/1151390949320384512) has been +added to the SwiftNIO repository. + +[Doug Gregor](https://twitter.com/dgregor79) once more [asked](https://twitter.com/dgregor79/status/1152280218083586051) +to include projects to the Source Compatibility Suite, which is used to detect +breaking changes. + ### Commits and pull requests [Armen Mkrtchian](https://twitter.com/armen_mkrtchian) merged @@ -60,18 +66,6 @@ that makes Swift traps more user-friendly. By encoding the error message in the DWARF line table, you'll see the message in `.dSYM`-symbolicated backtraces and crash reports, without strings leaking in your binaries. -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - ### Proposals in review [SE-0261](https://github.com/apple/swift-evolution/blob/master/proposals/0261-identifiable.md): *Identifiable Protocol* is [under review](https://forums.swift.org/t/se-0261-identifiable-protocol/26602). @@ -82,6 +76,19 @@ generic code — to correlate snapshots of the state of an entity in order to identify changes. It is a fundamental notion that deserves representation in the standard library. +[SE-0262](https://github.com/apple/swift-evolution/blob/master/proposals/0262-demangle.md): *Demangle Function* is [under review](https://forums.swift.org/t/se-0262-demangle-function/27199). + +> Introduce a new standard library function, `demangle`, that takes a mangled +Swift symbol, like `$sSS7cStringSSSPys4Int8VG_tcfC`, and output the human readable +Swift symbol, like `Swift.String.init(cString: Swift.UnsafePointer) -> Swift.String`. +> +> Currently in Swift, if a user is given an unreadable mangled symbol, they're +most likely to use the `swift-demangle` tool to get the demangled version. +However, this is a little awkward when you want to demangle a symbol in-process +in Swift. One could create a new `Process` from Foundation and set it up to +launch a new process within the process to use `swift-demangle`, but the +standard library can do better and easier. + ### Swift Forums [Delisa Mason](https://twitter.com/kattrali) pitched [a proposal](https://forums.swift.org/t/stdlib-cleanup-callback-for-fatal-swift-errors/26977) to introduce a cleanup From 702f17b7167d841a9b804c9c1513a8d0ee5a32b8 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 25 Jul 2019 15:06:16 +0200 Subject: [PATCH 191/589] Add 140 draft --- _drafts/2019-08-08-issue-140.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-08-08-issue-140.md diff --git a/_drafts/2019-08-08-issue-140.md b/_drafts/2019-08-08-issue-140.md new file mode 100644 index 00000000..94fbb401 --- /dev/null +++ b/_drafts/2019-08-08-issue-140.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #140' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 115e6306f0e2713cd45f74946a7aec777f2cf7ce Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 25 Jul 2019 15:08:49 +0200 Subject: [PATCH 192/589] Publish 139 (#470) Closes #468 --- {_drafts => _posts}/2019-07-25-issue-139.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2019-07-25-issue-139.md (100%) diff --git a/_drafts/2019-07-25-issue-139.md b/_posts/2019-07-25-issue-139.md similarity index 100% rename from _drafts/2019-07-25-issue-139.md rename to _posts/2019-07-25-issue-139.md From 74150990d66b0d353db07034897866af97139c93 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 7 Aug 2019 06:34:20 +0200 Subject: [PATCH 193/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index fd055de9..6193a88a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GEM tzinfo (~> 1.1) addressable (2.6.0) public_suffix (>= 2.0.2, < 4.0) - claide (1.0.2) + claide (1.0.3) claide-plugins (0.9.2) cork nap From e66ced07ec50c8105411ce1fd9b41d77a46abb1c Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 8 Aug 2019 17:24:00 +0200 Subject: [PATCH 194/589] Post issue 140 Closes #471 --- _drafts/2019-08-08-issue-140.md | 56 ------------------ _posts/2019-08-08-issue-140.md | 101 ++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 56 deletions(-) delete mode 100644 _drafts/2019-08-08-issue-140.md create mode 100644 _posts/2019-08-08-issue-140.md diff --git a/_drafts/2019-08-08-issue-140.md b/_drafts/2019-08-08-issue-140.md deleted file mode 100644 index 94fbb401..00000000 --- a/_drafts/2019-08-08-issue-140.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: post -title: ! 'Issue #140' -author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2019-08-08-issue-140.md b/_posts/2019-08-08-issue-140.md new file mode 100644 index 00000000..aff9af6d --- /dev/null +++ b/_posts/2019-08-08-issue-140.md @@ -0,0 +1,101 @@ +--- +layout: post +title: ! 'Issue #140' +author: btb +--- + +Podcast episodes to listen to, interesting proposals and tools that help you go +through all Swift packages. And more. + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-11198](https://bugs.swift.org/browse/SR-11198) [Compiler] Compiler crash on `inout`-to-pointer used with `@autoclosure` param returning optional +- [SR-11261](https://bugs.swift.org/browse/SR-11261) [Compiler] Parser recovery for keyword after `case` declaration + +### Podcasts + +In the latest Swift Community Podcast, [Kateryna](https://twitter.com/gridnaka), [Paul](https://twitter.com/twostraws), [Erica](https://twitter.com/ericasadun), and [John](https://twitter.com/johnsundell) talk about [their first impressions](https://www.swiftcommunitypodcast.org/episodes/6) on SwiftUI. + +In the latest Swift Unwrapped episode, [Jesse](https://twitter.com/jesse_squires) and [JP](https://twitter.com/simjp) discuss [Generic Math Functions and Approximate Equality](https://spec.fm/podcasts/swift-unwrapped/305700). + +### News and community + +[Dave Verwer](https://twitter.com/daveverwer) announced [The SwiftPM Library](https://daveverwer.com/blog/launching-the-swiftpm-library/), a Swift Package Manager search engine. + +In lights of the Combine release, [Jasdev Singh](https://twitter.com/jasdev) wrote [a post](https://jasdev.me/duals) explaining reactive and imperative programming. + +### Commits and pull requests + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/26369) that "fixes a glaring algorithmic problem in code [he] wrote *checks notes* six years ago". 😅 + +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/26356) that gets them closer to having local variables with `lazy` and property wrappers. + +[Andrew Trick](https://github.com/atrick) merged [a pull request](https://github.com/apple/swift/pull/26440) where exclusivity enforcement is not just about safety - it also enables better optimizations. + +### Accepted proposals + +[SE-0261](https://github.com/apple/swift-evolution/blob/master/proposals/0261-identifiable.md): *Identifiable Protocol* was [accepted](https://forums.swift.org/t/accepted-se-0261-identifiable-protocol/27358). + +> The proposal was positively received as addressing a common need for which a standard protocol is appropriate. +> +> During review, there were some concerns about the use of the property `id`, with some preferring `identifier` to avoid clashes with existing properties, while others stated they would have the same problem with `id`. The core team feels that id, as the term of art, is the better choice. Future [language features](https://forums.swift.org/t/se-0261-identifiable-protocol/26602/166) should provide a path to resolve clashes. + +### Proposals in review + +[SE-0263](https://github.com/apple/swift-evolution/blob/master/proposals/0263-string-uninitialized-initializer.md): *Add a String Initializer with Access to Uninitialized Storage* is [under review](https://forums.swift.org/t/se-0263-add-a-string-initializer-with-access-to-uninitialized-storage/27417). + +> This proposal suggests a new initializer for `String` that provides access to a String's uninitialized storage buffer. +> +> `String` today is well-suited to interoperability with raw memory buffers when a contiguous buffer is already available, such as when dealing with `malloc`ed C strings. However, there are quite a few situations where no such buffer is available, requiring a temporary one to be allocated and copied into. One example is bridging `NSString` to `String`, which currently uses standard library internals to get good performance when using `CFStringGetBytes`. Another, also from the standard library, is `Int` and `Float`, which currently create temporary stack buffers and do extra copying. We expect libraries like SwiftNIO will also find this useful for dealing with streaming data. + +### Swift Forums + +[Dean Harel](https://github.com/deanha) pitched [a proposal](https://forums.swift.org/t/a-dedicated-function-for-evaluating-void-returning-closures-when-optional-instance-is-not-nil/27367) for a dedicated function for evaluating `Void` returning closures when an `Optional` instance is not `nil`. + +> A transformation of the shape, one that returns nothing, is not uncommon in our day-to-day tasks, and in my opinion deserves a name which clearly and conspicuously translates the writer's intent in call-site. +> +> In this respect, another Container type in Swift that has been added a dedicated method to handle such "transformations" is the Array type. Consider the following functions: + +{% highlight swift %} +func map(_ transform: (Element) throws -> T) rethrows -> [T] +func forEach(_ body: (Element) throws -> Void) rethrows +{% endhighlight %} + +> While we would all agree that `forEach(_:)` is not a necessity, we can also agree that for the task of printing all elements in an array, this: + +{% highlight swift %} +[4, 2].forEach { print($0) } +{% endhighlight %} + +> reads much nicer than this: + +{% highlight swift %} +_ = [4, 2].map { print($0) } +{% endhighlight %} + +Thus I propose adding a parallel function to `Array`'s `forEach(_:)`, taking advantage of a similar naming for convenience: + +{% highlight swift %} +public extension Optional { + func forValue(_ body: (Wrapped) throws -> Void) rethrows { + guard let value = self else { return } + try body(value) + } +} +{% endhighlight %} + +[Giuseppe Lanza](https://twitter.com/GLDeveloper) pitched [a proposal](https://forums.swift.org/t/pitch-unrequired-in-function-signature-for-optional-closure-parameters/27577) to support `@unrequired` in function signatures for optional closure parameters. + +> From a perspective of a framework writer it is important to provide clear and understandable documentation for the correct usage of their APIs. Swift allows us to write functions that are at some extent self documenting, and clearly define what the function will actually do. + +[Franz Busch](https://twitter.com/FranzJBusch) pitched [a proposal](https://forums.swift.org/t/pitch-support-for-binary-dependencies/27620) to add support for binary dependencies in the Swift Package Manager. + +> This draft introduces support for binary dependencies in SwiftPM. It will allow vendors to upload artifacts for all supported platforms which will be resolved, downloaded and linked by SwiftPM. There are still some open things left, which can be found at the bottom, but we wanted to get community feedback before we continue with this. + +### Finally + +[You can do everything you set your mind to.](https://twitter.com/isEqualToDan/status/1154400902083743744) From 2c3456df7dbf718f0e5e627b6831de6c295ceaeb Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 9 Aug 2019 22:34:48 +0200 Subject: [PATCH 195/589] Post 141 draft --- _drafts/2019-08-22-issue-141.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-08-22-issue-141.md diff --git a/_drafts/2019-08-22-issue-141.md b/_drafts/2019-08-22-issue-141.md new file mode 100644 index 00000000..ba7bab1b --- /dev/null +++ b/_drafts/2019-08-22-issue-141.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #141' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 1f4cdfb040057c944e0a3ab510ce04b3272bff03 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 9 Aug 2019 22:35:07 +0200 Subject: [PATCH 196/589] Update sponsorship.md --- sponsorship.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 4d1eda56..898652e9 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,9 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
    |   Issue |   Status | |:-|:-| -| July 11 | **Reserved** | -| July 25 | **Booked** | -| August 8 | Open | | August 22 | Open | | September 5 | Open | | September 19 | Open | From c85f174800cbe4225cfb2a307665b8c79b9b81b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2019 15:44:31 +0200 Subject: [PATCH 197/589] Bump nokogiri from 1.10.3 to 1.10.4 (#474) Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.3 to 1.10.4. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.3...v1.10.4) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6193a88a..896c29bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -233,7 +233,7 @@ GEM multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.10.3) + nokogiri (1.10.4) mini_portile2 (~> 2.4.0) octokit (4.14.0) sawyer (~> 0.8.0, >= 0.5.3) From 721b506fe047bef0f529ef54292e691c44e5dc48 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 21 Aug 2019 23:25:57 +0200 Subject: [PATCH 198/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 896c29bd..267123b2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,7 +39,7 @@ GEM terminal-table (~> 1) danger-prose (2.0.7) danger - dnsruby (1.61.2) + dnsruby (1.61.3) addressable (~> 2.5) em-websocket (0.5.1) eventmachine (>= 0.12.9) @@ -107,7 +107,7 @@ GEM octokit (~> 4.0) public_suffix (~> 3.0) typhoeus (~> 1.3) - html-pipeline (2.11.1) + html-pipeline (2.12.0) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) From c1fba9ced89d6c738558fc069773efb2cd29f769 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 21 Aug 2019 23:27:26 +0200 Subject: [PATCH 199/589] Run bundle update after updating bundler --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 267123b2..14efa286 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -280,4 +280,4 @@ DEPENDENCIES octokit BUNDLED WITH - 2.0.1 + 2.0.2 From 131698e3c6b9dc1f8de5de43549868bfadea6703 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs Date: Thu, 22 Aug 2019 08:14:32 +0300 Subject: [PATCH 200/589] Issue 141 (#473) * Added starter bug * First draft Also updated gems * Added PR * Added forum entry and one starter bug * Added new stuff * remove sponsor block * intro text * typos * Remove sponsor and text fixes * Fixed typos * Update 2019-08-22-issue-141.md * Remove empty sections --- _drafts/2019-08-22-issue-141.md | 90 +++++++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 21 deletions(-) diff --git a/_drafts/2019-08-22-issue-141.md b/_drafts/2019-08-22-issue-141.md index ba7bab1b..826da827 100644 --- a/_drafts/2019-08-22-issue-141.md +++ b/_drafts/2019-08-22-issue-141.md @@ -1,15 +1,10 @@ --- layout: post title: ! 'Issue #141' -author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO +author: fassko --- -> TODO: intro comments +Summer is almost over and it seems that the Swift community is getting ready for some big product announcements later this year. Nevertheless we had quite an intense last two weeks in the Swift.org open source projects. @@ -17,40 +12,93 @@ sponsor: ### Starter tasks -> TODO +* [SR-11295](https://bugs.swift.org/browse/SR-11295) [Compiler] There should be a warning for unnecessary casts +* [SR-11321](https://bugs.swift.org/browse/SR-11321) [SwiftPM] `generate-xcodeproj` does not generate relative search paths correctly ### Podcasts -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +In the [latest Swift by Sundell podcast](https://www.swiftbysundell.com/podcast/54), [John Sundell](https://twitter.com/johnsundell), [Benedikt Terhechte](https://twitter.com/terhechte) and [Bas Broek](https://twitter.com/basthomas) dive into the new APIs and features in iOS 13 and iPadOS, as well as Swift 5.1. ### News and community -> TODO +[Cory Benfield](https://twitter.com/Lukasaoz) gave [a heads up](https://twitter.com/Lukasaoz/status/1161323863411777537) that if we are using SwiftNIO HTTP/2, we need to upgrade as soon as possible. -### Commits and pull requests +> All `swift-nio-http2` users, please update to `swift-nio-http2` version 1.5.0 urgently. +> +> A number of HTTP/2 server implementations have been discovered to be at risk of a number of different denial of service attacks. SwiftNIO HTTP/2 has been affected by several of these vulnerabilities. This disclosure covers all of them. +> +> All SwiftNIO HTTP/2 versions between 1.0.0 and 1.4.0 inclusive are affected. + +[Julian Lettner](https://github.com/yln/) shared a [blog post](https://swift.org/blog/tsan-support-on-linux/) about the thread sanitizer for Swift on Linux. If you have any questions head down to the [forum discussion](https://forums.swift.org/t/swift-org-blog-thread-sanitizer-for-swift-on-linux/27872). + +> The Swift language guarantees [memory safety](https://docs.swift.org/swift-book/LanguageGuide/MemorySafety.html) in single threaded environments. However, conflicting accesses in multithreaded code lead to data races. Data races in Swift cause unexpected behavior and can even lead to memory corruption, breaking Swift’s memory safety. [Thread Sanitizer](https://developer.apple.com/documentation/code_diagnostics/thread_sanitizer) is a bug-finding tool that diagnoses data races at run time. It instruments code during compilation and detects data races when they happen during execution. -> TODO +[Bruno Rocha](https://twitter.com/rockthebruno) wrote a great [blog post](https://swiftrocks.com/using-lldb-manually-xcode-console-tricks.html) on advanced `lldb` tricks for Swift - injecting and changing code on the fly. -### Accepted proposals +[Ole Begemann](https://twitter.com/olebegemann) tweeted about [autodiscovery of test methods](https://twitter.com/olebegemann/status/1160846803274801152) on Linux and other non-Darwin platforms. +It was introduced in [pull request 2174](https://github.com/apple/swift-package-manager/pull/2174). -> TODO +> Autodiscovery of test methods on Linux* is now a thing in recent Swift 5.1 snapshots. You should be able to delete LinuxMain.swift and run your tests with: +> +> `swift test --enable-test-discovery` -### Returned proposals +[Joe Groff](https://twitter.com/jckarter) tweeted that [now you can implement](https://twitter.com/jckarter/status/1161298507527000064) the wrapper as a static subscript with access to `self`. This was done in [pull request 25884](https://github.com/apple/swift/pull/25884) by [Doug Gregor](https://github.com/DougGregor). Be careful and use this at your own risk! -> TODO +[Slava Pestov](https://twitter.com/slava_pestov) tweeted that [we could learn from JavaScript](https://twitter.com/slava_pestov/status/1160616505589030914) that delayed parsing is a cool trick. + +> Delayed parsing is a cool trick. I know JS implementations do it too. The idea is you can skip building AST for some parts of a source file. In order to correctly parse code following a delayed range, you still have to run the lexer - but it suffices to just count matching braces + +### Commits and pull requests -### Rejected proposals +[Jonas Devlieghere](https://github.com/JDevlieghere) merged [a pull request](https://github.com/apple/swift/pull/26673) that moves Xcode support to C++14. It's useful to mention that [LLVM and clang are now compiling with C++14](http://llvm.org/D66195) as well. You can discuss it [here](https://forums.swift.org/t/llvm-is-now-on-c-14/27931). -> TODO +[Doug Gregor](https://twitter.com/dgregor79) created [a pull request](https://github.com/apple/swift/pull/26700) that will simplify one-way constraints to Equal. ### Proposals in review -> TODO +A [new proposal](https://forums.swift.org/t/proposal-sswg-incubation-process-change-discourage-use-of-unsafe/27921) from the Swift Server Workgroup about an incubation process change. Feedback period will be till August 29. + +> When using *Unsafe* in Swift, Swift becomes as "safe" as C(++). [Research](https://msrc-blog.microsoft.com/2019/07/18/we-need-a-safer-systems-programming-language/) shows [that](https://langui.sh/2019/07/23/apple-memory-safety/) about [70%](https://alexgaynor.net/2019/aug/12/introduction-to-memory-unsafety-for-vps-of-engineering/) of the security vulnerabilities are related to memory safety issues. +> +> Swift and SwiftNIO try to offer programmers fast and safe APIs which should mostly make the use of *Unsafe* constructs unnecessary. If that is not the case, we appreciate feature requests to add API allowing to use safe APIs to the respective projects. ### Swift Forums -> TODO +The Swift on Server Workgroup had a meeting on July 25th, 2019 and [Tanner Nelson](https://twitter.com/tanner0101) shared [notes](https://forums.swift.org/t/july-25th-2019/27732). + +[Ben Cohen](https://twitter.com/airspeedswift) started a discussion whether it's appropriate to provide a default implementation relying on `ObjectIdentifier`. This is a continued discussion from [SE-0261: Identifiable Protocol](https://forums.swift.org/t/accepted-se-0261-identifiable-protocol/27358). + +> To set expectations clearly: the proposal has been accepted and the default implementation will ship in Swift 5.1. There is no possibility of it being removed from that release, given the point we are at in the convergence of 5.1, regardless of the direction of this discussion. + +[Michael Gottesman](https://twitter.com/gottesmang) shared [news](https://forums.swift.org/t/stdlibcore-now-always-lowers-ownership-after-running-the-diagnostic-passes/27832) that `stdlibCore` now always lowers ownership after running the diagnostic passes. + +> ...I flipped the switch causing stdlibCore to always lower ownership /after/ running the diagnostic passes. This is a large milestone for ownership in general since this is the first time we have exposed some passes downstream of the Mandatory Inlining to ownership in the build itself (vs tests). It will ensure that changes in tree do not break basic functionality when we are in this mode (something that I have run into). + +[Suyash Srijan](https://twitter.com/suyashsrijan) pitched [a proposal](https://forums.swift.org/t/pitch-didset-semantics/27858) about `didSet` semantics. + +> This proposal aims to make a small change to the semantics of didSet, so that the call to the property's getter is skipped if the user does not refer to the oldValue in the body of the observer. It also aims to make another change, where the lack of a willSet and the presence of a unparameterised didSet could allow for modifications to happen in-place. + +[Saleem Abdulrasool](https://twitter.com/compnerd) shared that now [you can use the Swift Package Manager on Windows](https://forums.swift.org/t/swift-package-manager-on-windows-sure-why-not/27884). + +[Morten Bek Ditlevsen](https://forums.swift.org/u/Morten_Bek_Ditlevsen) started [a discussion](https://forums.swift.org/t/future-directions-of-property-wrappers/27934) about future directions of Property Wrappers. + +[Suyash Srijan](https://twitter.com/suyashsrijan) started [a discussion](https://forums.swift.org/t/class-constrained-protocol-extension-has-incorrect-mutatingness/27962) about class-constrained protocol extensions that have incorrect mutatingness. + +[Kelvin Ma](https://github.com/kelvin13) posted [a question](https://forums.swift.org/t/why-are-these-evolution-proposals-not-moving-forward/27996): why aren't some evolution proposals moving forward? + +> I’m opening this thread because one of my proposals, [Synthesized `Comparable` for pure enumerations](https://github.com/apple/swift-evolution/pull/1053), has been sitting with its swift evolution PR open for nearly a month with no action from core team members who would have the authority to bring it to review. the proposal text is finished, raised issues have been addressed, and its [implementation branch](https://github.com/apple/swift/pull/25696) has been untouched for about two months now. By all means, the proposal has fulfilled all the requirements to go to community review (except for CI tests, which can only be triggered by members with write-access), yet still, no review has been scheduled. + +[Marc Rasi](https://forums.swift.org/u/marcrasi) shared an idea about [building `.swiftmodules` for SourceKit](https://forums.swift.org/t/building-swiftmodules-for-sourcekit/28030) + +> I'm working on adding SourceKit to Google's internal source tooling. The architecture is a server that runs one instance of SourceKit per user, and uses those instances of SourceKit to serve requests from IDEs. +> +> To make this work on code that imports modules, I need to give SourceKit access to the appropriate ".swiftmodule" files. + +[Ben Langmuir](https://twitter.com/benlangmuir) noted that a preview version of [SourceKit-LSP](https://github.com/apple/sourcekit-lsp) is now included in the [nightly toolchain downloads](https://swift.org/download/#snapshots) for both Swift 5.1 Development and Trunk Development (`master`). + +[Dale Buckley](https://forums.swift.org/u/dlbuckley) started a discussion about [default protocol implementation inheritance behaviour](https://forums.swift.org/t/default-protocol-implementation-inheritance-behaviour-the-current-situation-and-what-if-anything-should-be-done-about-it/28049). The original bug was reported [here](https://bugs.swift.org/browse/SR-103). + ### Finally -> TODO: something funny/fun. tweet, link, etc. +It is summertime now, need to do some [gardening](https://github.com/apple/swift/pull/26650). From 8d850fc2106015231a3cfe75d01ab15bd95c7d6e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 22 Aug 2019 18:24:02 +0200 Subject: [PATCH 201/589] Publish 141 (#475) Closes #472 --- {_drafts => _posts}/2019-08-22-issue-141.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2019-08-22-issue-141.md (100%) diff --git a/_drafts/2019-08-22-issue-141.md b/_posts/2019-08-22-issue-141.md similarity index 100% rename from _drafts/2019-08-22-issue-141.md rename to _posts/2019-08-22-issue-141.md From 8a8784e048afac061118028538ab14c67ce4afae Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 22 Aug 2019 18:29:37 +0200 Subject: [PATCH 202/589] Add 142 draft References #476 --- _drafts/2019-09-05-issue-142.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-09-05-issue-142.md diff --git a/_drafts/2019-09-05-issue-142.md b/_drafts/2019-09-05-issue-142.md new file mode 100644 index 00000000..e3eaffda --- /dev/null +++ b/_drafts/2019-09-05-issue-142.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #142' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From f8fb70795825c35ddb2549fb2b78881cc0daf291 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 4 Sep 2019 07:33:06 +0200 Subject: [PATCH 203/589] Update sponsorship.md --- sponsorship.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 898652e9..aa230362 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,700 subscribers and over 8,000 followers on Twitter. +There are over 3,800 subscribers and over 8,200 followers on Twitter.

    Sponsored Links

    @@ -60,7 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
    |   Issue |   Status | |:-|:-| -| August 22 | Open | | September 5 | Open | | September 19 | Open | | October 3 | Open | From 784fb24cc192b8487467b37e7e1e7b5cea7fa626 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 5 Sep 2019 16:37:11 +0200 Subject: [PATCH 204/589] Post issue 142 Closes #476 --- _drafts/2019-09-05-issue-142.md | 56 ------------ _posts/2019-09-05-issue-142.md | 151 ++++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+), 56 deletions(-) delete mode 100644 _drafts/2019-09-05-issue-142.md create mode 100644 _posts/2019-09-05-issue-142.md diff --git a/_drafts/2019-09-05-issue-142.md b/_drafts/2019-09-05-issue-142.md deleted file mode 100644 index e3eaffda..00000000 --- a/_drafts/2019-09-05-issue-142.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: post -title: ! 'Issue #142' -author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2019-09-05-issue-142.md b/_posts/2019-09-05-issue-142.md new file mode 100644 index 00000000..1cbffb39 --- /dev/null +++ b/_posts/2019-09-05-issue-142.md @@ -0,0 +1,151 @@ +--- +layout: post +title: ! 'Issue #142' +author: btb +--- + +While I have the feeling I've had a busy two weeks, it seems like I haven't +been the only one... + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-11397](https://bugs.swift.org/browse/SR-11397) [Standard Library] `FixedWidthInteger.init?(_: radix:)` fails for `Self` with short `bitWidth` +- [SR-11418](https://bugs.swift.org/browse/SR-11418) [Compiler / Standard Library] Add Graph Algorithm benchmarks to test `unowned`, `weak`, and `unmanaged` +- [SR-11419](https://bugs.swift.org/browse/SR-11419) [Compiler] `missing_witnesses_general` Should only be emitted in IDE mode +- [SR-11420](https://bugs.swift.org/browse/SR-11420) [Compiler] Protocol Stubs Should Suggest Requirement Stubs for Renames As Well +- [SR-11421](https://bugs.swift.org/browse/SR-11421) [Compiler] Checked Cast Diagnostics Should Be More Specific When Literals Are Involved + +### Podcasts + +On the latest episode of Swift Unwrapped, Jesse and JP [discussed](https://spec.fm/podcasts/swift-unwrapped/307679) +Binary Dependencies in Swift Package Manager. + +### News and community + +Swift 5.0.3 for Linux [has been released](https://forums.swift.org/t/swift-5-0-3-for-linux/28523). + +[Jordan Rose](https://twitter.com/UINT_MIN) wrote [a document](https://github.com/apple/swift/blob/master/docs/CToSwiftNameTranslation.md) +describing Swift's C-to-Swift name translation, featuring `enum`s and +`swift_wrapper` structs. + +[Will Lisac](https://twitter.com/wlisac) shared that [Swift Docker images for Raspberry Pi 4](https://github.com/wlisac/swift-on-balena) +are now available. + +[Slava Pestov](https://twitter.com/slava_pestov) shared [a Twitter thread](https://twitter.com/slava_pestov/status/1166519010135019520) +detailing an optimization for name lookup. + +[Bruno Rocha](https://twitter.com/rockthebruno) shared [a post](https://swiftrocks.com/introsort-timsort-swifts-sorting-algorithm.html) +detailing the sorting algorithms Swift uses. + +### Commits and pull requests + +[David Smith](https://twitter.com/Catfish_Man) merged [a pull request](https://github.com/apple/swift/pull/26630) +that removes the Swift runtime and standard library's dependency on Foundation. + +[Erik Eckstein](https://github.com/eeckstein) merged [a pull request](https://github.com/apple/swift/pull/26803) +that eliminates temporary copies during in-place updates of enum payloads. + +[Michael Gottessmann](https://twitter.com/gottesmang) merged [a pull request](https://github.com/apple/swift/pull/26956) +demonstrating how much a bug and benchmark can help: the NIO `ChannelPipeline` +benchmark now runs in half the time! 😱🏎 + +### Returned proposals + +[SE-0262](https://github.com/apple/swift-evolution/blob/master/proposals/0262-demangle.md): *Demangle Function* was [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0262-demangle-function/28186). + +> The core team supports having standardized functionality for turning a Swift +symbol name into a human-readable string for logging, debugging, and crash +reporting purposes. However, many important design points were raised in the +review of SE-0262, and so we are returning the proposal for revision. + +### Rejected proposals + +[SE-0042](https://github.com/apple/swift-evolution/blob/master/proposals/0042-flatten-method-types.md): *Flattening the function type of unapplied method references* was [rejected](https://forums.swift.org/t/formally-revoking-se-0042/28174). + +> SE-0042 was formally [accepted](https://forums.swift.org/t/accepted-se-0042-flattening-the-function-type-of-unapplied-method-references/1926) +more than three years ago. However, since the proposal was accepted before +having a working implementation was a requirement, and the change would be +source breaking, and also require massive rewrites of the compiler; it is now +clear that this proposal will never actually be implemented. It has been obvious +for a long time. + +### Proposals in review + +[SE-0263](https://github.com/apple/swift-evolution/blob/master/proposals/0263-string-uninitialized-initializer.md): *Add a String Initializer with Access to Uninitialized Storage* is [under review](https://forums.swift.org/t/se-0263-add-a-string-initializer-with-access-to-uninitialized-storage/27417). + +> This proposal suggests a new initializer for `String` that provides access to +a String's uninitialized storage buffer. +> +> `String` today is well-suited to interoperability with raw memory buffers +when a contiguous buffer is already available, such as when dealing with +`malloc`ed C strings. However, there are quite a few situations where no such +buffer is available, requiring a temporary one to be allocated and copied into. +One example is bridging `NSString` to `String`, which currently uses standard +library internals to get good performance when using `CFStringGetBytes`. +Another, also from the standard library, is `Int` and `Float`, which currently +create temporary stack buffers and do extra copying. We expect libraries like +SwiftNIO will also find this useful for dealing with streaming data. + +### Swift Forums + +[Michael Ilseman](https://twitter.com/Ilseman) pitched [a proposal](https://forums.swift.org/t/offset-indexing-and-slicing/28333) improving Offset Indexing and Slicing. + +> This pitch introduces `OffsetBound`, which can represent a position in a +collection specified as an offset from either the start or end of the collection +(i.e. the collection’s “bounds”). This covers an expressivity gap in collection +APIs by providing easy and safe means to fetch an index or element from such an +offset as well as convenient slicing. +> +> If you would like to try it out, you can just copy-paste from +[this gist](https://gist.github.com/milseman/1461e4f3e195974a5d1ad76cefdd6961), +which includes the functionality as well as test cases and examples. + +[Dan Zheng](https://twitter.com/dancherp) proposed [adding "does `X` conform to `Y`?"](https://forums.swift.org/t/adding-a-does-x-conform-to-y-request/28349) +to the request evaluator. + +> I wonder if there are plans to add a "does X conform to Y" request to the +[request evaluator](https://github.com/apple/swift/blob/tensorflow/docs/RequestEvaluator.md) system (or other ways to unify conformance lookup logic)? +> +> I'm curious because there multiple ways to perform conformance lookup (and +find associated type witnesses), some of which have caused bugs for the +[differentiable programming project](https://forums.swift.org/t/pre-pitch-swift-differentiable-programming-design-overview/25992), which needs `Differentiable` conformance +lookup and associated type witness lookup during Sema, SILGen, and SIL +transforms. +> +> In my experience, the static function `TypeChecker::conformsToProtocol` has +been the most reliable way of obtaining a conformance (over +`ModuleDecl::lookupConformance` and `ModuleDecl::conformsToProtocol`), but it +is available only during Sema, not during SIL. + +[Owen Voorhees](https://twitter.com/owenvoorhees) shared some thoughts [on the future of the Diagnostics User Experience](https://forums.swift.org/t/future-of-diagnostics-ux/28178). + +> Lately, I've been thinking about how the diagnostics user experience for Swift +could be improved in the long term. I thought it would be valuable to start a +conversation around what kind of improvements people would like to see and what +we can learn from other compilers, maybe resulting in some kind of rough +roadmap if there's enough interest. + +[Giuseppe Lanza](https://twitter.com/GLDeveloper) pitched [a proposal](https://forums.swift.org/t/allowing-explicit-escaping-for-optional-closures-in-function-parameters/28334) +allowing explicit `@escaping` for optional closures in function parameters. + +>> A closure is said to escape a function when the closure is passed as an argument +>> to the function, but is called after the function returns . When you declare a +>> function that takes a closure as one of its parameters, you can write @escaping +>> before the parameter’s type to indicate that the closure is allowed to escape. +> +> Quote from the [Swift documentation](https://docs.swift.org/swift-book/LanguageGuide/Closures.html) +> +> This statement is not always true when considering optional closures passed +as function parameters. +> +> This proposal aims to uniform the behaviour of optional closures with the +well-known behaviour of non-optional closures when passed as function +parameters. + +### Finally + +[Swift "`weak`ly" Brief?](https://twitter.com/jckarter/status/1167087565100339202) From 59fdf2417a869da454c786c94d27a0ae775deb0b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 12 Sep 2019 19:25:00 +0200 Subject: [PATCH 205/589] Post 143 Closes #477 --- _drafts/2019-09-12-issue-143.md | 132 ++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 _drafts/2019-09-12-issue-143.md diff --git a/_drafts/2019-09-12-issue-143.md b/_drafts/2019-09-12-issue-143.md new file mode 100644 index 00000000..a64ce1d3 --- /dev/null +++ b/_drafts/2019-09-12-issue-143.md @@ -0,0 +1,132 @@ +--- +layout: post +title: ! 'Issue #143' +author: btb +--- + +A lot of new hardware to talk and think about from Tuesday's Apple Event. +And a lot of new software to look forward to — which includes a whole lot of +the features the Swift team has been working on. I'm very much looking forward +to the new software in particular, and the app updates it will bring. + + + +{% include sponsor.html %} + +### News and community + +The Gradle team [announced](https://blog.gradle.org/introducing-the-swift-plugins) +Swift support to compile, link and install applications and libraries, C++ +interoperability, dependency management and more. + +[Justin Rose](https://twitter.com/UINT_MIN) shared [a document](https://github.com/apple/swift/blob/master/docs/CToSwiftNameTranslation.md) +explaining name translation from C to Swift. + +### Commits and pull requests + +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/27033) +that directly leads to the elimination of over 400 lines of code from the +compiler. 🎉 + +[Johannes Weiss](https://twitter.com/johannesweiss) merged [a pull request](https://github.com/apple/swift-nio/pull/1130) +enabling the thread sanitizer for SwiftNIO, now that it works well enough on +Linux, thanks to [Julian Lettner](https://github.com/yln). + +### Proposals in review + +[SE-0263](https://github.com/apple/swift-evolution/blob/master/proposals/0263-string-uninitialized-initializer.md): *Add a String Initializer with Access to Uninitialized Storage* is [under review](https://forums.swift.org/t/se-0263-add-a-string-initializer-with-access-to-uninitialized-storage/27417). + +> This proposal suggests a new initializer for `String` that provides access to +a String's uninitialized storage buffer. +> +> `String` today is well-suited to interoperability with raw memory buffers when +a contiguous buffer is already available, such as when dealing with `malloc`ed +C strings. However, there are quite a few situations where no such buffer is +available, requiring a temporary one to be allocated and copied into. One +example is bridging `NSString` to `String`, which currently uses standard +library internals to get good performance when using `CFStringGetBytes`. +Another, also from the standard library, is `Int` and `Float`, which currently +create temporary stack buffers and do extra copying. We expect libraries like +SwiftNIO will also find this useful for dealing with streaming data. + +### Swift Forums + +Davide Mendolia pitched [a proposal](https://forums.swift.org/t/generic-covariance-to-improve-api-usage/28719) +to introduce generalized Generic Coveriance. + +> As far as I know, only Arrays support Generic Covariance. Is it possible to +generalize it or to introduce in core elements like `Result` and allow libraries +like Combine to use it? + +{% highlight swift %} +class Base { +} +class Derived: Base { +} + +class ArrayBase { + func foo(x: [Derived]) -> [Base] { return x } +} +{% endhighlight %} + +> Would allow simplification of the following code instead of throwing errors +and require casting. Somethings that's already done today for `Optional`s and +`Array`. + +{% highlight swift %} +class JustBase { + func foo(x: Just) -> Just { return x } // Compiler Error: Cannot convert return expression of type 'Just' to return type 'Just' +} + +class ResultBase { + func foo(x: Result) -> Result { return x } // Compiler Error: Cannot convert return expression of type 'Result' to return type 'Result' +} +{% endhighlight %} + +[Richard Wei](https://twitter.com/rxwei) shared [a proposal](https://forums.swift.org/t/differentiable-programming-mega-proposal/28547) +for Differentiable Programming. + +> We have completed a comprehensive proposal for the differentiable programming +feature we’ve been incubating over the last 1.5 years. We’ve gone over many +iterations on the feature design, and have partially completed the +implementation. Now we are ready to start a discussion on Swift Evolution, +specifically on upstreaming and standardizing the feature. +> +> Since this proposal is overly long (\~60 pages), we hope to start by merging +it into the `docs/` directory via [this pull request](https://github.com/apple/swift/pull/27034), +and draft bite-sized proposals that contain references to the mega-proposal. + +You can find the full proposal [here](https://github.com/dan-zheng/swift/blob/differentiable-programming/docs/DifferentiableProgramming.md). + +[Gwynne Raskind](https://twitter.com/_AngeloidBeta) +pitched [a proposal](https://forums.swift.org/t/yet-another-varargs-splat-proposal/28649) +to support varargs "splat". + +> Forwarding variadic arguments has come up fairly often in discussion, and I +thought I'd try my hand at working up a proposal, with a focus on arguments +against the oft-proposed "prefix operator" syntax. + +You can find the full proposal [here](https://github.com/gwynne/swift-evolution/blob/splat-proposal/proposals/NNNN-forward-array-to-variadic-args.md). + +[Owen Voorhees]() pitched [a proposal](https://forums.swift.org/t/pitch-extended-error-messages/28754) +to extend the capabilities of error messages. + +> As a follow up from [Future of Diagnostics UX](https://forums.swift.org/t/future-of-diagnostics-ux/28178) +a couple weeks back, I wanted to further explore the idea of "extended +diagnostic messages" and see if they would be a good fit for Swift. What follows +is a rough pitch for what that might look like. I'm not sure if this will/should +result in an evolution proposal, but I think writing this up using the pitch +format makes it easy to evaluate and discuss alternatives. +> +> I'm interested in any and all feedback people have on whether they'd find +this useful! I'm especially interested in hearing from anyone who has worked +with Rust/Elm in the past and can comment on the benefits & drawbacks of their +approaches to diagnostics. + +[Johannes Weiss](https://twitter.com/johannesweiss) shared [meeting notes](https://forums.swift.org/t/august-11th-2019/28553) +from the Swift on the Server Working Group that took place on August 8. + +### Finally + +[I know, I know...](https://twitter.com/netflix/status/1171794533140463617) +Still a good joke in my books. From 68893b82490f0fef73e2513cc7f1889ac067e189 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 12 Sep 2019 19:25:51 +0200 Subject: [PATCH 206/589] Run bundle update --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 14efa286..146ffdc7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -6,8 +6,8 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.6.0) - public_suffix (>= 2.0.2, < 4.0) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) claide (1.0.3) claide-plugins (0.9.2) cork @@ -248,7 +248,7 @@ GEM ruby-enum (0.7.2) i18n ruby_dep (1.5.0) - rubyzip (1.2.3) + rubyzip (1.2.4) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From b4fded8fd4ccfc9df50754bf3c5e595f663e7f59 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 12 Sep 2019 19:28:19 +0200 Subject: [PATCH 207/589] Draft 144 Ref #478 --- _drafts/2019-09-26-issue-144.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-09-26-issue-144.md diff --git a/_drafts/2019-09-26-issue-144.md b/_drafts/2019-09-26-issue-144.md new file mode 100644 index 00000000..e45ad6ab --- /dev/null +++ b/_drafts/2019-09-26-issue-144.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #144' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From f6d36fbf737690b2b9fcb8487e7bc6901c6f34c3 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 12 Sep 2019 19:28:47 +0200 Subject: [PATCH 208/589] Actually post 143 --- {_drafts => _posts}/2019-09-12-issue-143.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2019-09-12-issue-143.md (100%) diff --git a/_drafts/2019-09-12-issue-143.md b/_posts/2019-09-12-issue-143.md similarity index 100% rename from _drafts/2019-09-12-issue-143.md rename to _posts/2019-09-12-issue-143.md From 7bb4f9fc3cd1c6e5f6dca073dac11e93cde858dd Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 13 Sep 2019 08:52:26 +0200 Subject: [PATCH 209/589] Update 2019-09-12-issue-143.md --- _posts/2019-09-12-issue-143.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2019-09-12-issue-143.md b/_posts/2019-09-12-issue-143.md index a64ce1d3..d19db909 100644 --- a/_posts/2019-09-12-issue-143.md +++ b/_posts/2019-09-12-issue-143.md @@ -19,7 +19,7 @@ The Gradle team [announced](https://blog.gradle.org/introducing-the-swift-plugin Swift support to compile, link and install applications and libraries, C++ interoperability, dependency management and more. -[Justin Rose](https://twitter.com/UINT_MIN) shared [a document](https://github.com/apple/swift/blob/master/docs/CToSwiftNameTranslation.md) +[Jordan Rose](https://twitter.com/UINT_MIN) shared [a document](https://github.com/apple/swift/blob/master/docs/CToSwiftNameTranslation.md) explaining name translation from C to Swift. ### Commits and pull requests From 115f4cdb44ecfd09852dee267cca101703991593 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 26 Sep 2019 21:27:56 +0200 Subject: [PATCH 210/589] Run bundle update --- Gemfile.lock | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 146ffdc7..68476d7a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -56,7 +56,7 @@ GEM forwardable-extended (2.6.0) gemoji (3.0.1) git (1.5.0) - github-pages (198) + github-pages (200) activesupport (= 4.2.11.1) github-pages-health-check (= 1.16.1) jekyll (= 3.8.5) @@ -73,7 +73,7 @@ GEM jekyll-readme-index (= 0.2.0) jekyll-redirect-from (= 0.14.0) jekyll-relative-links (= 0.6.0) - jekyll-remote-theme (= 0.3.1) + jekyll-remote-theme (= 0.4.0) jekyll-sass-converter (= 1.5.2) jekyll-seo-tag (= 2.5.0) jekyll-sitemap (= 1.2.0) @@ -98,7 +98,7 @@ GEM listen (= 3.1.5) mercenary (~> 0.3) minima (= 2.5.0) - nokogiri (>= 1.8.5, < 2.0) + nokogiri (>= 1.10.4, < 2.0) rouge (= 2.2.1) terminal-table (~> 1.4) github-pages-health-check (1.16.1) @@ -159,7 +159,8 @@ GEM jekyll (~> 3.3) jekyll-relative-links (0.6.0) jekyll (~> 3.3) - jekyll-remote-theme (0.3.1) + jekyll-remote-theme (0.4.0) + addressable (~> 2.0) jekyll (~> 3.5) rubyzip (>= 1.2.1, < 3.0) jekyll-sass-converter (1.5.2) @@ -229,7 +230,7 @@ GEM jekyll (~> 3.5) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.11.3) + minitest (5.12.0) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) @@ -248,7 +249,7 @@ GEM ruby-enum (0.7.2) i18n ruby_dep (1.5.0) - rubyzip (1.2.4) + rubyzip (2.0.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From 2f4568c0318ea4f9c0e325a8a9c8d5a5643314a4 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 26 Sep 2019 23:36:41 +0200 Subject: [PATCH 211/589] Push 144 Closes #478 --- _drafts/2019-09-26-issue-144.md | 56 ------------- _posts/2019-09-26-issue-144.md | 135 ++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+), 56 deletions(-) delete mode 100644 _drafts/2019-09-26-issue-144.md create mode 100644 _posts/2019-09-26-issue-144.md diff --git a/_drafts/2019-09-26-issue-144.md b/_drafts/2019-09-26-issue-144.md deleted file mode 100644 index e45ad6ab..00000000 --- a/_drafts/2019-09-26-issue-144.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: post -title: ! 'Issue #144' -author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2019-09-26-issue-144.md b/_posts/2019-09-26-issue-144.md new file mode 100644 index 00000000..54f6ec76 --- /dev/null +++ b/_posts/2019-09-26-issue-144.md @@ -0,0 +1,135 @@ +--- +layout: post +title: ! 'Issue #144' +author: btb +--- + +Full steam ahead: with Swift 5.1 released and the release process for Swift 5.2 +outlined, we can look forward to another wave of improvements to the Swift +language coming up. + + + +{% include sponsor.html %} + +### Starter task + +- [SR-11511](https://bugs.swift.org/browse/SR-11511) [Compiler] A returning +value of `Array` should give a warning, like `Optional` + +### Podcasts + +Jesse and JP [discussed the Swift 5.1 release](https://spec.fm/podcasts/swift-unwrapped/308610) +with [Doug Gregor](https://twitter.com/dgregor79). + +### News and community + +[Ted Kremenek](https://twitter.com/tkremenek) wrote [a blog post](https://swift.org/blog/swift-5-1-released/) +describing the Swift 5.1 release and all of its changes. + +[Nicole Jacque](https://twitter.com/racer_girl27) shared [the Swift 5.2 release +process](https://swift.org/blog/5-2-release-process/), "a release meant to +include significant quality and performance enhancements." + +[Adam Fish](https://twitter.com/adam_fish) announced [iOS bitcode support for +Rust](https://twitter.com/adam_fish/status/1174603574283685888). + +[Victor Guerra](https://twitter.com/vguerra) shared [a talk](https://www.youtube.com/watch?v=1VOWzfULX2w) +about using Swift as syntactic sugar for Multi-Level Intermediate Representation +in Swift for TensorFlow. + +In other Swift for TensorFlow news, [Brad Larson](https://twitter.com/bradlarson) +announced [the release of Swift for TensorFlow 0.5](https://twitter.com/bradlarson/status/1176594180971233285). + +[Mishal Shah](https://twitter.com/mishaldshah) announced [Swift 5.1 availability +on Docker](https://twitter.com/mishaldshah/status/1176280650308968448). + +[Derik Ramirez](https://twitter.com/rderik) shared [a blog post](https://rderik.com/blog/building-a-server-client-aplication-using-apple-s-network-framework/) +on building a server-client application using `Network.framework`. + +### Proposals in review + +[SE-0264](https://github.com/apple/swift-evolution/blob/master/proposals/0264-stdlib-preview-package.md): *Standard Library Preview Package* is [under review](https://forums.swift.org/t/se-0264-standard-library-preview-package/29068). + +> We propose the addition of a new package, `SwiftPreview`, which will form the +initial landing spot for certain additions to the Swift standard library. +> +> Adding this package serves the goal of allowing for rapid adoption of new +standard library features, enabling sooner real-world feedback, and allowing for +an initial period of time where that feedback can lead to source- and +ABI-breaking changes if needed. +> +> As a secondary benefit, it will reduce technical challenges for new community +members implementing new features in the standard library. +> +> In the first iteration, this package will take the following: +> +> - free functions and methods, subscripts, and computed properties via +extensions, that do not require access to the internal implementation of +standard library types and that could reasonably be emitted into the client +> - new types (for example, a sorted dictionary, or useful property wrapper +implementations) +> - new protocols, with conformance of existing library types to those protocols +as appropriate +> +> The package will not include features that need to be matched with language +changes, nor functions that cannot practically be implemented without access to +existing type internals or other non-public features such as LLVM builtins. + +### Swift Forums + +[Xi Ge](https://twitter.com/xge_apple) pitched [a compiler proposal](https://forums.swift.org/t/proposal-emitting-source-information-file-during-compilation/28794) +to emit source information during compilation. + +> To enhance the user experience of diagnostics on locally built modules, we +propose emitting an additional file during compilation to keep track of the +source locations of decls (`.sourceinfo` file). Mapping from decl USRs to source +locations in the local file system, the file is always emitted as a side product +of Swift modules into a private sub-directory (`swiftmodule/private`). This +'private' sub-directory will be present in a local build but excluded for +packaging a Swift module for client consumption. A source location is encoded +as an absolute path to the source file and the byte offset inside the source +file. + +[James H](https://forums.swift.org/u/jamesgh) asked [about Swift's performance](https://forums.swift.org/t/swift-performance/28776) on the server. + +> I want to know if there are any plans to effort improving Swift's performance? +Benchmark after benchmark have...pretty dismal... metrics for Swift when +compared to other systems languages. +> +> Now you could make an argument that benchmarks aren't necessarily +representative of real-world use-cases. + +> The current Swift implementation is still nowhere near representative of the +performance that should be possible, since we've been primarily in the "make it +work" phase of development, and are only now starting to get into the "make it +fast" work. + +[Daryle Walker](https://twitter.com/CTMacUser) pitched [a proposal](https://forums.swift.org/t/partial-sorting/28941/7) +to allow for partial sorting in Swift. + +> Just cruising the C++ algorithm list and wondered about `std::partial_sort` +and `std::nth_element`. +> +> But I'm still wondering why would these be needed, outside of implementing +other sorting things? Stopping at a point much smaller then the whole collection +doesn't help too much because you still have to scan the whole thing. +> +> Can any of these be implemented stably? + +[Elviro Rocca](https://twitter.com/_logicist) asked for [an update](https://forums.swift.org/t/whats-the-state-of-modify-yield/29171) on `modify` and `yield`. + +> The idea of an `@Atomic` wrapper is also cited as an example in the proposal, +so I thought it could be implemented, but it seems that you can't actually do +that because you cannot ensure that read-write-read processes actually happen +atomically + +> [..] atomic anything will require compiler support when not explicitly working +with pointers or global stored properties. Even with `modify`, Swift's formal +model is still move-in/move-out with assumed/enforced exclusivity, not +by-address. (`modify` gets it to move-in/move-out rather than copy-in/copy-out, +but not all the way to by-address. That's still considered an optimization.) + +### Finally + +[Only constants 😭](https://twitter.com/olebegemann/status/1172885004243865601) From 8bae063d9039f6a67cabee73bb080c1e029fb239 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 26 Sep 2019 23:38:11 +0200 Subject: [PATCH 212/589] Add 145 draft --- _drafts/2019-10-10-issue-145.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2019-10-10-issue-145.md diff --git a/_drafts/2019-10-10-issue-145.md b/_drafts/2019-10-10-issue-145.md new file mode 100644 index 00000000..7dcfe129 --- /dev/null +++ b/_drafts/2019-10-10-issue-145.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #145' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From c12123e2916e422d406bf2fef4a069c76b69e6b8 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 3 Oct 2019 14:40:26 +0200 Subject: [PATCH 213/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 68476d7a..540c6651 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -48,7 +48,7 @@ GEM ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) - faraday (0.15.4) + faraday (0.16.2) multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) @@ -230,7 +230,7 @@ GEM jekyll (~> 3.5) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.12.0) + minitest (5.12.2) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) From 436fb19a1a674fcd0aabf964320342aead3d8fd5 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 4 Oct 2019 20:46:09 +0200 Subject: [PATCH 214/589] Update sponsorship.md --- sponsorship.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index aa230362..8d5dee78 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,16 +60,12 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
    |   Issue |   Status | |:-|:-| -| September 5 | Open | -| September 19 | Open | -| October 3 | Open | -| October 17 | Open | -| October 31 | Open | -| November 14 | Open | +| October 10 | Open | +| October 24 | Open | +| November 7 | Open | | November 21 | **Booked** | -| November 28 | Open | -| December 12 | Open | -| December 26 | **No issue** | +| December 5 | Open | +| December 19 | Open | {: class="table table-striped table-bordered"}
    From c0ac82b7778dbda89e51727321728308b0981116 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 4 Oct 2019 21:04:42 +0200 Subject: [PATCH 215/589] Fill 145 draft References #479 --- _drafts/2019-10-10-issue-145.md | 40 ++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/_drafts/2019-10-10-issue-145.md b/_drafts/2019-10-10-issue-145.md index 7dcfe129..794f31fb 100644 --- a/_drafts/2019-10-10-issue-145.md +++ b/_drafts/2019-10-10-issue-145.md @@ -29,7 +29,9 @@ sponsor: ### Commits and pull requests -> TODO +https://github.com/apple/swift/pull/20420 + +> Finally merged a patch that I’ve been poking at since November. If you’re working on a build system and you’re implementing the “`-emit-module` first, then build” optimization, try adding `-Xfrontend -experimental-skip-non-inlinable-function-bodies` ### Accepted proposals @@ -45,11 +47,43 @@ sponsor: ### Proposals in review -> TODO +[SE-0266](https://github.com/apple/swift-evolution/blob/master/proposals/0266-synthesized-comparable-for-enumerations.md): *Synthesized `Comparable` conformance for `enum` types* is [under review](https://forums.swift.org/t/se-0266-synthesized-comparable-conformance-for-enum-types/29457). + +> [SE-185](https://github.com/apple/swift-evolution/blob/master/proposals/0185-synthesize-equatable-hashable.md) +introduced synthesized, opt-in `Equatable` and `Hashable` conformances for +eligible types. Their sibling protocol `Comparable` was left out at the time, +since it was less obvious what types ought to be eligible for a synthesized +`Comparable` conformance and where a comparison order might be derived from. +This proposal seeks to allow users to opt-in to synthesized `Comparable` +conformances for `enum` types without raw values or associated values not +themselves conforming to `Comparable`, a class of types which I believe make +excellent candidates for this feature. The synthesized comparison order would be +based on the declaration order of the `enum` cases, and then the lexicographic +comparison order of the associated values for an `enum` case tie. ### Swift Forums -> TODO +[Michael Ilseman](https://twitter.com/ilseman/) pitched [a proposal](https://forums.swift.org/t/prototype-protocol-powered-generic-trimming-searching-splitting/29415) +for protocol-powered generic trimming, searching, and splitting Collections. + +> This prototype demonstrates two main protocols, `CollectionConsumer` and +`CollectionSearcher`, and a suite of API generic over them. +> +> Native regex literals will be built on top of generic functionality and used +with generic APIs. These can be broken down into 4 stages: +> +> 1. Consumers: nibbling off the front or back of a Collection +> 2. Searchers: finding a needle in a haystack (i.e. a Collection) +> 3. Validators: constructing types in the process of consuming/searching +> 4. [Destructuring Pattern Matching Syntax](https://gist.github.com/milseman/bb39ef7f170641ae52c13600a512782f#syntax-for-destructing-matching): +Like `~=`, but can bind a value +> +> Each stage delivers important API and syntax improvements to users alongside +powerful extension points for libraries. Native regex literals would conform to +these protocols and leverage new syntax, allowing them to be used by the same +generic APIs. +> +> This prototype covers stages 1 and 2. ### Finally From 7392c72b341cfa9f98f936a9f200e42fec12763f Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 10 Oct 2019 17:45:06 +0200 Subject: [PATCH 216/589] Run bundle update --- Gemfile.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 540c6651..4b6b208a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -48,7 +48,7 @@ GEM ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) - faraday (0.16.2) + faraday (0.17.0) multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) @@ -56,13 +56,13 @@ GEM forwardable-extended (2.6.0) gemoji (3.0.1) git (1.5.0) - github-pages (200) + github-pages (201) activesupport (= 4.2.11.1) github-pages-health-check (= 1.16.1) jekyll (= 3.8.5) jekyll-avatar (= 0.6.0) jekyll-coffeescript (= 1.1.1) - jekyll-commonmark-ghpages (= 0.1.5) + jekyll-commonmark-ghpages (= 0.1.6) jekyll-default-layout (= 0.1.4) jekyll-feed (= 0.11.0) jekyll-gist (= 1.5.0) @@ -99,7 +99,7 @@ GEM mercenary (~> 0.3) minima (= 2.5.0) nokogiri (>= 1.10.4, < 2.0) - rouge (= 2.2.1) + rouge (= 3.11.0) terminal-table (~> 1.4) github-pages-health-check (1.16.1) addressable (~> 2.3) @@ -134,10 +134,10 @@ GEM jekyll-commonmark (1.3.1) commonmarker (~> 0.14) jekyll (>= 3.7, < 5.0) - jekyll-commonmark-ghpages (0.1.5) + jekyll-commonmark-ghpages (0.1.6) commonmarker (~> 0.17.6) - jekyll-commonmark (~> 1) - rouge (~> 2) + jekyll-commonmark (~> 1.2) + rouge (>= 2.0, < 4.0) jekyll-default-layout (0.1.4) jekyll (~> 3.0) jekyll-feed (0.11.0) @@ -245,11 +245,11 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) - rouge (2.2.1) + rouge (3.11.0) ruby-enum (0.7.2) i18n ruby_dep (1.5.0) - rubyzip (2.0.0) + rubyzip (1.3.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From 4c11357e7e38cde131f425ac9a7cc38534188a20 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 10 Oct 2019 18:12:22 +0200 Subject: [PATCH 217/589] Post 145 Closes #479 --- _drafts/2019-10-10-issue-145.md | 90 ------------------ _posts/2019-10-10-issue-145.md | 159 ++++++++++++++++++++++++++++++++ 2 files changed, 159 insertions(+), 90 deletions(-) delete mode 100644 _drafts/2019-10-10-issue-145.md create mode 100644 _posts/2019-10-10-issue-145.md diff --git a/_drafts/2019-10-10-issue-145.md b/_drafts/2019-10-10-issue-145.md deleted file mode 100644 index 794f31fb..00000000 --- a/_drafts/2019-10-10-issue-145.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -layout: post -title: ! 'Issue #145' -author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -https://github.com/apple/swift/pull/20420 - -> Finally merged a patch that I’ve been poking at since November. If you’re working on a build system and you’re implementing the “`-emit-module` first, then build” optimization, try adding `-Xfrontend -experimental-skip-non-inlinable-function-bodies` - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -[SE-0266](https://github.com/apple/swift-evolution/blob/master/proposals/0266-synthesized-comparable-for-enumerations.md): *Synthesized `Comparable` conformance for `enum` types* is [under review](https://forums.swift.org/t/se-0266-synthesized-comparable-conformance-for-enum-types/29457). - -> [SE-185](https://github.com/apple/swift-evolution/blob/master/proposals/0185-synthesize-equatable-hashable.md) -introduced synthesized, opt-in `Equatable` and `Hashable` conformances for -eligible types. Their sibling protocol `Comparable` was left out at the time, -since it was less obvious what types ought to be eligible for a synthesized -`Comparable` conformance and where a comparison order might be derived from. -This proposal seeks to allow users to opt-in to synthesized `Comparable` -conformances for `enum` types without raw values or associated values not -themselves conforming to `Comparable`, a class of types which I believe make -excellent candidates for this feature. The synthesized comparison order would be -based on the declaration order of the `enum` cases, and then the lexicographic -comparison order of the associated values for an `enum` case tie. - -### Swift Forums - -[Michael Ilseman](https://twitter.com/ilseman/) pitched [a proposal](https://forums.swift.org/t/prototype-protocol-powered-generic-trimming-searching-splitting/29415) -for protocol-powered generic trimming, searching, and splitting Collections. - -> This prototype demonstrates two main protocols, `CollectionConsumer` and -`CollectionSearcher`, and a suite of API generic over them. -> -> Native regex literals will be built on top of generic functionality and used -with generic APIs. These can be broken down into 4 stages: -> -> 1. Consumers: nibbling off the front or back of a Collection -> 2. Searchers: finding a needle in a haystack (i.e. a Collection) -> 3. Validators: constructing types in the process of consuming/searching -> 4. [Destructuring Pattern Matching Syntax](https://gist.github.com/milseman/bb39ef7f170641ae52c13600a512782f#syntax-for-destructing-matching): -Like `~=`, but can bind a value -> -> Each stage delivers important API and syntax improvements to users alongside -powerful extension points for libraries. Native regex literals would conform to -these protocols and leverage new syntax, allowing them to be used by the same -generic APIs. -> -> This prototype covers stages 1 and 2. - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2019-10-10-issue-145.md b/_posts/2019-10-10-issue-145.md new file mode 100644 index 00000000..2db603cb --- /dev/null +++ b/_posts/2019-10-10-issue-145.md @@ -0,0 +1,159 @@ +--- +layout: post +title: ! 'Issue #145' +author: btb +--- + +I've had a great week in Paris, attending and giving a workshop at FrenchKit. +I hope you've all had a great week too! + +I also wanted to mention that this month is [Hacktoberfest](https://hacktoberfest.digitalocean.com), +a yearly, month-long celebration of open source software. A perfect time to +contribute to (Swift) open source! + +And with that, here's what's been cookin' in the last two weeks in terms of +Swift.org and other Apple open source projects. + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-11574](https://bugs.swift.org/browse/SR-11574) [Compiler] Using `try` +instead of `throws` should have a better diagnostic +- [SR-11580](https://bugs.swift.org/browse/SR-11580) [SwiftSyntax] +`FloatLiteralExprSyntax` and `IntegerLiteralExprSyntax` should have comuted +properties that return their `Int`/`Float` value +- [SR-11588](https://bugs.swift.org/browse/SR-11588) [Compiler] Warn about +derived `Hashable` implementation if there's a custom `Equatable` + +### Podcasts + +Jesse and JP [discussed](https://spec.fm/podcasts/swift-unwrapped/309982) the Standard Library Preview Package. + +### Commits and pull requests + +[Bruno Rocha](https://twitter.com/rockthebruno) merged [a pull request](https://github.com/apple/sourcekit-lsp/pull/163) +adding support for local refactoring of Swift code in SourceKit-LSP! + +[Zoe Carver](https://github.com/zoecarver) opened [a pull request](https://github.com/apple/swift/pull/27551) +with optimizations for Swift that enables constant-folding of string comparisons. + +[Harlan Haskins](http://twitter.com/harlanhaskins) merged [a pull request](https://github.com/apple/swift/pull/20420) +that adds an experimental flag to skip non-inlinable function bodies and turns +it on for the standard library and overlay `.swiftmodules`. + +> If you’re working on a build system and you’re implementing the +"`-emit-module` first, then build" optimization, try adding +`-Xfrontend -experimental-skip-non-inlinable-function-bodies`. + +### Returned proposals + +[SE-0263](https://github.com/apple/swift-evolution/blob/master/proposals/0263-string-uninitialized-initializer.md): *Add a String Initializer with Access to Uninitialized Storage* was [returned for revision](https://forums.swift.org/t/se-0263-review-2-add-a-string-initializer-with-access-to-uninitialized-storage/29663). + +> This proposal suggests a new initializer for `String` that provides access +to a String's uninitialized storage buffer. +> +> `String` today is well-suited to interoperability with raw memory buffers +when a contiguous buffer is already available, such as when dealing with +`malloc`ed C strings. However, there are quite a few situations where no such +buffer is available, requiring a temporary one to be allocated and copied into. +One example is bridging `NSString` to `String`, which currently uses standard +library internals to get good performance when using `CFStringGetBytes`. +Another, also from the standard library, is `Int` and `Float`, which currently +create temporary stack buffers and do extra copying. We expect libraries like +SwiftNIO will also find this useful for dealing with streaming data. + +### Proposals in review + +[SE-0265](https://github.com/apple/swift-evolution/blob/master/proposals/0265-offset-indexing-and-slicing.md): *Offset-Based Access to Indices, Elements, and Slices* is [under review](https://forums.swift.org/t/se-0265-offset-based-access-to-indices-elements-and-slices/29596). + +> This proposal introduces `OffsetBound`, which can represent a position in a +collection specified as an offset from either the beginning or end of the +collection (i.e. the collection’s “bounds”). Corresponding APIs provide a more +convenient abstraction over indices. The goal is to alleviate an expressivity +gap in collection APIs by providing easy and safe means to access elements, +indices, and slices from such offsets. + +[SE-0266](https://github.com/apple/swift-evolution/blob/master/proposals/0266-synthesized-comparable-for-enumerations.md): *Synthesized `Comparable` conformance for `enum` types* is [under review](https://forums.swift.org/t/se-0266-synthesized-comparable-conformance-for-enum-types/29457). + +> [SE-185](https://github.com/apple/swift-evolution/blob/master/proposals/0185-synthesize-equatable-hashable.md) +introduced synthesized, opt-in `Equatable` and `Hashable` conformances for +eligible types. Their sibling protocol `Comparable` was left out at the time, +since it was less obvious what types ought to be eligible for a synthesized +`Comparable` conformance and where a comparison order might be derived from. +This proposal seeks to allow users to opt-in to synthesized `Comparable` +conformances for `enum` types without raw values or associated values not +themselves conforming to `Comparable`, a class of types which I believe make +excellent candidates for this feature. The synthesized comparison order would be +based on the declaration order of the `enum` cases, and then the lexicographic +comparison order of the associated values for an `enum` case tie. + +### Swift Forums + +[Doug Gregor](https://twitter.com/dgregor79) announced [a Swift compiler driver +reimplementation in Swift](https://forums.swift.org/t/new-project-announcement-swift-compiler-driver-reimplementation-in-swift/29696)! + +> [The swift-driver project](https://github.com/apple/swift-driver) is a new +implementation of the Swift compiler driver that is intended to replace the +existing driver with a more extensible, maintainable, and robust code base. The +Swift compiler’s driver is what handles the build of a Swift module: it runs the +Swift compiler frontend to compile source code to object files, the linker to +link those object files into a library or executable, and so on, and contains +much of the knowledge of how to produce working programs for any given platform. +The driver is the main program that build systems (e.g. SwiftPM, `xcodebuild`, +`make`, `ninja`) interact with to compile Swift code, so it is a key piece of +infrastructure for building Swift code. The new swift-driver is architected as a +Swift library, allowing for deeper integration with the Swift Package Manager. + +[Michael Ilseman](https://twitter.com/ilseman/) pitched [a proposal](https://forums.swift.org/t/prototype-protocol-powered-generic-trimming-searching-splitting/29415) +for protocol-powered generic trimming, searching, and splitting Collections. + +> This prototype demonstrates two main protocols, `CollectionConsumer` and +`CollectionSearcher`, and a suite of API generic over them. +> +> Native regex literals will be built on top of generic functionality and used +with generic APIs. These can be broken down into 4 stages: +> +> 1. Consumers: nibbling off the front or back of a Collection +> 2. Searchers: finding a needle in a haystack (i.e. a Collection) +> 3. Validators: constructing types in the process of consuming/searching +> 4. [Destructuring Pattern Matching Syntax](https://gist.github.com/milseman/bb39ef7f170641ae52c13600a512782f#syntax-for-destructing-matching): +Like `~=`, but can bind a value +> +> Each stage delivers important API and syntax improvements to users alongside +powerful extension points for libraries. Native regex literals would conform to +these protocols and leverage new syntax, allowing them to be used by the same +generic APIs. +> +> This prototype covers stages 1 and 2. + +[Jon Gilbert](https://forums.swift.org/u/vitamin/summary) pitched [a proposal](https://forums.swift.org/t/compositional-initialization/29535) +to add support for Compositional Initalization. + +> This proposal introduces an opt-in protocol, PropertyInitializable, which provides two new init methods: +> +> - failable init from a collections of extensible, typesafe keypath-value +Property objects +> - non-failable init to clone from another instance, mutating select properties +> +> The name “compositional init” means that this proposal allows the state of an +object or struct to be assembled compositionally from sets of properties +(including another instance). Compositional initialization allows mutations to +be encapsulated in a clear, type-safe way. + +[Gustaf Kugelberg](https://forums.swift.org/u/greatape/summary) pitched [a +proposal](https://forums.swift.org/t/expressiblebytupleliteral-instead-of-tuples-conforming-to-protocols/29626) +to introduce `ExpressibleByTupleLiteral` instead of tuples conforming to +protocols. + +> As can be seen from the forum history, many people have suggested ways to +make it possible to conform tuple types to protocols. It is perhaps most natural +when the conformance can be synthesized, - in my personal usage it's certainly +conformance to `Equatable` and `Hashable` that I've wanted to confer on my tuple +typed keys. + +### Finally + +With halloween around the corner, take a look [at this spooky quiz](https://twitter.com/jckarter/status/1180206902732419072)! 👻 From 54b6e140715e448a0e37638427e4146772e08f74 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 12 Oct 2019 17:21:36 +0200 Subject: [PATCH 218/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4b6b208a..5bdb4b19 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -249,7 +249,7 @@ GEM ruby-enum (0.7.2) i18n ruby_dep (1.5.0) - rubyzip (1.3.0) + rubyzip (2.0.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From 70eb21ad7a92e721c722ccc71339efd9b52224c3 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 12 Oct 2019 17:34:13 +0200 Subject: [PATCH 219/589] Initial 146 References #480 --- _drafts/2019-10-24-issue-146.md | 76 +++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 _drafts/2019-10-24-issue-146.md diff --git a/_drafts/2019-10-24-issue-146.md b/_drafts/2019-10-24-issue-146.md new file mode 100644 index 00000000..6ec36e3c --- /dev/null +++ b/_drafts/2019-10-24-issue-146.md @@ -0,0 +1,76 @@ +--- +layout: post +title: ! 'Issue #146' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +Swift 5.1.1 was [released](https://forums.swift.org/t/swift-5-1-1-released-linux-only/29732). + +[Sahin Yort](https://github.com/thesayyn) added [initial support for SwiftPM](https://github.com/bazelbuild/rules_swift/pull/329) +to Bazel! + +[Ian Partridge](https://twitter.com/alfa) wrote [a blog post](https://medium.com/@ianpartridge/swift-development-in-docker-using-visual-studio-code-remote-b84d035e70db) +on doing Swift development in Docker using Visual Studio Code Remote. + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +[Joe Groff](https://twitter.com/jckarter) shared [some thoughts](https://forums.swift.org/t/improving-the-representation-of-polymorphic-interfaces-in-sil-with-substituted-function-types/29711) +on improving the representation of polymorphic interfaces in SIL with +"substituted function types". + +> Swift Intermediate Language (SIL) has a lot of incidental complexity arising +from representational issues in how we handle the types of +polymorphically-callable functions such as protocol witnesses, class methods, +and closures. Here is a proposed design for substituted function types, which +tries to address some of these issues. +> +> To implement a polymorphic interface, such as a protocol method or class +method, the different implementations have to share a common generic +machine-level calling convention, even though each implementation has a +different concrete function type derived from the specific parent type it +provides an implementation for. + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 7201c0620b0367d8ee3a8d00b7b2b284eee2de59 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 24 Oct 2019 10:45:59 +0100 Subject: [PATCH 220/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5bdb4b19..7d82eec7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -56,7 +56,7 @@ GEM forwardable-extended (2.6.0) gemoji (3.0.1) git (1.5.0) - github-pages (201) + github-pages (202) activesupport (= 4.2.11.1) github-pages-health-check (= 1.16.1) jekyll (= 3.8.5) @@ -249,7 +249,7 @@ GEM ruby-enum (0.7.2) i18n ruby_dep (1.5.0) - rubyzip (2.0.0) + rubyzip (1.3.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From 21fc2fa37950a24290aa9a720d5a5ab930f39110 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 24 Oct 2019 14:06:44 +0100 Subject: [PATCH 221/589] Publish 146 Fixes #480 --- _drafts/2019-10-24-issue-146.md | 76 --------- _posts/2019-10-24-issue-146.md | 287 ++++++++++++++++++++++++++++++++ 2 files changed, 287 insertions(+), 76 deletions(-) delete mode 100644 _drafts/2019-10-24-issue-146.md create mode 100644 _posts/2019-10-24-issue-146.md diff --git a/_drafts/2019-10-24-issue-146.md b/_drafts/2019-10-24-issue-146.md deleted file mode 100644 index 6ec36e3c..00000000 --- a/_drafts/2019-10-24-issue-146.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -layout: post -title: ! 'Issue #146' -author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -Swift 5.1.1 was [released](https://forums.swift.org/t/swift-5-1-1-released-linux-only/29732). - -[Sahin Yort](https://github.com/thesayyn) added [initial support for SwiftPM](https://github.com/bazelbuild/rules_swift/pull/329) -to Bazel! - -[Ian Partridge](https://twitter.com/alfa) wrote [a blog post](https://medium.com/@ianpartridge/swift-development-in-docker-using-visual-studio-code-remote-b84d035e70db) -on doing Swift development in Docker using Visual Studio Code Remote. - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -[Joe Groff](https://twitter.com/jckarter) shared [some thoughts](https://forums.swift.org/t/improving-the-representation-of-polymorphic-interfaces-in-sil-with-substituted-function-types/29711) -on improving the representation of polymorphic interfaces in SIL with -"substituted function types". - -> Swift Intermediate Language (SIL) has a lot of incidental complexity arising -from representational issues in how we handle the types of -polymorphically-callable functions such as protocol witnesses, class methods, -and closures. Here is a proposed design for substituted function types, which -tries to address some of these issues. -> -> To implement a polymorphic interface, such as a protocol method or class -method, the different implementations have to share a common generic -machine-level calling convention, even though each implementation has a -different concrete function type derived from the specific parent type it -provides an implementation for. - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2019-10-24-issue-146.md b/_posts/2019-10-24-issue-146.md new file mode 100644 index 00000000..aceea819 --- /dev/null +++ b/_posts/2019-10-24-issue-146.md @@ -0,0 +1,287 @@ +--- +layout: post +title: ! 'Issue #146' +author: btb +--- + +Swift is seeing continuous improvements over the last weeks, including a new +bunch of changes that are backed by interesting proposals. + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-11619](https://bugs.swift.org/browse/SR-11619) [Compiler] Spurious error +"anonymous closure argument not contained in a closure" in `#if false` +- [SR-11636](https://bugs.swift.org/browse/SR-11636) [Compiler] Accessing +covariant `Self` from stored property initializer in extension segfaults +- [TF-935](https://bugs.swift.org/browse/TF-935) [Autodiff] Add +`-enable-experimental-forward-mode-differentiation` flag + +### Podcasts + +[John Sundell](https://twitter.com/johnsundell) and [Josh Shaffer](https://twitter.com/joshshaffer) +discuss [SwiftUI](https://www.swiftbysundell.com/podcast/59), including the +Swift features that power it. + +### News and community + +Swift 5.1.1 was [released](https://forums.swift.org/t/swift-5-1-1-released-linux-only/29732). + +[Pavel Yaskevich](https://github.com/xedin/) wrote [a blog post](https://swift.org/blog/new-diagnostic-arch-overview/) +about the architectural improvements they've been making to get better type +error messages, and goes into detail as to how this works under the hood. + +[Sahin Yort](https://github.com/thesayyn) added [initial support for SwiftPM](https://github.com/bazelbuild/rules_swift/pull/329) +to Bazel! + +With the release of [`async-http-client` 1.0.0](https://github.com/swift-server/async-http-client/releases/tag/1.0.0), +there now is a stable release! + +Along `async-http-client`, SwiftNIO shipped [version 2.9.0](https://github.com/apple/swift-nio/releases/tag/2.9.0). + +[Alex Lorenz](https://github.com/hyp) announced [`llvm-project`](https://forums.swift.org/t/the-github-swift-specific-split-llvm-project-repositories-are-now-read-only/29911), +a monorepository for all LLVM-related Swift projects. + +[Ian Partridge](https://twitter.com/alfa) wrote [a blog post](https://medium.com/@ianpartridge/swift-development-in-docker-using-visual-studio-code-remote-b84d035e70db) +on doing Swift development in Docker using Visual Studio Code Remote. + +### Commits and pull requests + +[David Smith](https://twitter.com/Catfish_Man) merged [a pull request](https://github.com/apple/swift/pull/27670) +improving the performance for decoding data into ASCII... by a factor of 500! 🤯 + +### Accepted proposals + +[SE-0263](https://github.com/apple/swift-evolution/blob/master/proposals/0263-string-uninitialized-initializer.md): *Add a String Initializer with Access to Uninitialized Storage* was [accepted](https://forums.swift.org/t/accepted-se-0263-add-a-string-initializer-with-access-to-uninitialized-storage/30057). + +> The proposal has been accepted. + +Well, that's as clear as it gets. :) + +[SE-0266](https://github.com/apple/swift-evolution/blob/master/proposals/0266-synthesized-comparable-for-enumerations.md): *Synthesized `Comparable` conformance for `enum` types* was [accepted](https://forums.swift.org/t/accepted-se-0266-synthesized-comparable-conformance-for-enum-types/29854). + +> The proposal was received positively, and removes boilerplate code for many +common cases. +> +> Concern was raised by some reviewers regarding the implicit reliance on source +ordering to synthesize the conformance. The core team feels this behavior is +justified based on several factors: +> +> - other features currently expose source ordering for enums (`CaseIterable` +order and `rawValue` assignment). +> - `<` implementations on enums can easily be written in a way where adding +new cases may not break compilation; comparable conformance must always be +considered when adding cases even today. +> - conforming a type to a protocol requires an understanding of what that +conformance means and how it is being fulfilled. "It compiles" is never enough. +> +> Much of the review was occupied with discussion of adding support for structs +and raw-representable enums. The core team would welcome further pitches +weighing the pros and cons of these additions. + +### Returned proposals + +[SE-0264](https://github.com/apple/swift-evolution/blob/master/proposals/0264-stdlib-preview-package.md): *Standard Library Preview Package* was [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0264-standard-library-preview-package/29865). + +> The review for SE-0264 has concluded. We had a uniformly positive response to +the idea of previewing standard library content, but many people had questions +and concerns about how the process and versioning was supposed to work. Then +John McCall [advanced](https://forums.swift.org/t/se-0264-standard-library-preview-package/29068/21) +the idea of having separately-versioned packages for each proposal. Several +people were favorably disposed, and we didn't hear any objections from anyone +including the proposers. The core team is, by and large, persuaded that this +approach has many advantages and would like to see a revised proposal that +includes it. +> +> Thanks to all for your engagement, and for making this process work. Even when +a review goes back for revision, we are still making progress, together, on the +evolution of Swift. + +The last sentence also being a good reminder that any input into the evolution +process is greatly appreciated. + +### Proposals in review + +[SE-0267](https://github.com/apple/swift-evolution/blob/master/proposals/0267-where-on-contextually-generic.md): *`where` clauses on contextually generic declarations* is [under review](https://forums.swift.org/t/se-0267-where-clauses-on-contextually-generic-declarations/30051). + +> This proposal aims to lift the mostly artificial restriction on attaching +`where` clauses to declarations that reference only outer generic parameters. +Simply put, this means you no longer have to worry about the `'where' clause +cannot be attached` error inside most generic contexts. + +[SE-0268](https://github.com/apple/swift-evolution/blob/master/proposals/0268-didset-semantics.md): *Refine `didSet` Semantics* is [under review](https://forums.swift.org/t/se-0268-refine-didset-semantics/30049). + +> Introduce two changes to `didSet` semantics - +> +> 1. If a `didSet` observer does not reference the `oldValue` in its body, then +the call to fetch the `oldValue` will be skipped. We refer to this as a "simple" +`didSet`. +> 2. If we have a "simple" `didSet` and no `willSet`, then we could allow +modifications to happen in-place. +> +> Currently, Swift always calls the property's getter to get the `oldValue` if +we have a `didSet` observer, even if the observer does not refer to the +`oldValue` in its body. +> +> This might look harmless, but it is doing redundant work (by allocating +storage and loading a value which isn't used). It could also be expensive if the +getter performs some non-trivial task and/or returns a large value. +> +> For example: + +```swift +struct Container { + var items: [Int] = .init(repeating: 1, count: 100) { + didSet { + // Do some stuff, but don't access oldValue + } + } + + mutating func update() { + for index in 0.. This will create 100 copies of the array to provide the `oldValue`, even +though they're not used at all. + +### Swift Forums + +[Joe Groff](https://twitter.com/jckarter) shared [some thoughts](https://forums.swift.org/t/improving-the-representation-of-polymorphic-interfaces-in-sil-with-substituted-function-types/29711) +on improving the representation of polymorphic interfaces in SIL with +"substituted function types". + +> Swift Intermediate Language (SIL) has a lot of incidental complexity arising +from representational issues in how we handle the types of +polymorphically-callable functions such as protocol witnesses, class methods, +and closures. Here is a proposed design for substituted function types, which +tries to address some of these issues. +> +> To implement a polymorphic interface, such as a protocol method or class +method, the different implementations have to share a common generic +machine-level calling convention, even though each implementation has a +different concrete function type derived from the specific parent type it +provides an implementation for. + +[Nate Cook](https://twitter.com/nnnnnnnn) pitched [a proposal](https://forums.swift.org/t/pitch-add-rangeset-and-related-collection-operations/29961) +to add `RangeSet` and related `Collection` operations. + +> We can use a range to address a single range of consecutive elements in a +collection, but the standard library doesn't currently provide a way to access +discontiguous elements. This proposes the addition of a `RangeSet` type that +can store the location of any number of collections indices, along with +collection operations that let us use a range set to access or modify the +collection. In addition, because these operations depend on mutable collection +algorithms that we've long wanted in the standard library, this proposal +includes those too. + +[Ted Krememenk](https://twitter.com/tkremenek) shared [some thoughts](https://forums.swift.org/t/trajectory-for-evaluating-adding-automatic-differentiation-to-swift/30048) on +evaluating adding Automatic Differentiation to Swift. + +> One of the efforts of the Swift for TensorFlow project has been to explore +adding features like [Automatic Differentiation](https://en.wikipedia.org/wiki/Automatic_differentiation) +to the Swift language. This is a powerful capability that can significantly +enrich Swift’s potential as a programming language for scientific computing, +numerics, and machine learning. +> +> Speaking on behalf of the Swift Core Team, we are interested in evaluating +incorporating this capability directly into the Swift language. +> +> [..] +> +> To summarize: +> +> - An implementation of Automatic differentiation will be added to the +compiler, guarded under a flag (or flags) to indicate it is an experimental +feature. This will be done directly on `master`. +> +> Once implementations are ready, each component of the feature will go through +the Swift Evolution process. Until that time, the experimental feature will not +be included in official Swift releases. + +[Jordan Rose](https://twitter.com/UINT_MIN) pitched [a proposal](https://forums.swift.org/t/backwards-deployable-conformances/29876) +allowing backwards-deployable conformances. + +> Let's say it's suddenly vitally important that Int conforms to Collection. + +```swift +extension Int: Collection { + public var startIndex: Int { 0 } + public var endIndex: Int { self.bitWidth } + public subscript(index: Int) -> Int { (self >> index) & 1 } +} +``` + +> What's the problem? Well, to start, none of these accessors exist in iOS 13, +which means that if someone tries to use this new conformance in iOS, their app +will just crash when running on iOS 13. [That's a limitation of shipping Swift +as part of the OS.](https://swift.org/blog/abi-stability-and-apple/) +> +> There are two ways to resolve this today: `@available` with a set of minimum +OS versions, or `@_alwaysEmitIntoClient`. But that still doesn't stop someone +from writing this code... + +```swift +let someInt = 42 +myArray.append(contentsOf: someInt) +``` + +> ...and trying to run that on iOS 13, where the conformance doesn't exist. If +the `append(contentsOf:)` is not optimized away, this will cause problems. +> +> In theory, we have the same two options for how to deal with this: restrict +the use of the conformance with availability, or emit the conformance into +client binaries. I'll discuss each of those in turn and then a secret third +option that I think is the best choice. + +You can read the full proposal pitch [here](https://forums.swift.org/t/backwards-deployable-conformances/29876). + +[Lantua](https://forums.swift.org/u/lantua/summary) asked [for clarification](https://forums.swift.org/t/source-compatibility/29814) +on source compatability, and [Brent Royal-Gordon](https://twitter.com/brentdax) +gave a great answer: + +> There are two kinds of Swift releases: +> +> - "Non-breaking release": Language changes that would break any existing Swift +code are not permitted. Any code that was valid before should continue to build +and function the same way. +> +> - "Source-breaking release": Some language changes may affect existing, valid +code, either making it invalid or changing its behavior. A source-breaking +release will add a new version to the compiler's -swift-version flag; +specifying the previous version will cause it to emulate the old compiler's +behavior in situations where it's changed, and usually emit deprecation warnings +telling the user what to update for the new version.* +> +> However, things are not quite as black-and-white as this. A +non-source-breaking release may sometimes include very small changes—bug fixes, +new overloads—that could theoretically break existing code, as long as we +believe the breakage will be very small or nonexistent in practice and the +benefit is worth the risk. This is very much a judgement call and the core team +is typically involved with these decisions. + +You can read the full answer [here](https://forums.swift.org/t/source-compatibility/29814/2). + +[Frederick Kellison-Linn]() pitched [a proposal](https://forums.swift.org/t/instance-level-polymorphism/30087) +to add suppport for instance-level polymorphism. + +> I've seen some similar ideas discussed on the forums (notably [Polymorphic +methods in enums](https://forums.swift.org/t/polymorphic-methods-in-enums/15093)) +which are focused around the idea of improving the experience of attaching +case-specific behavior to enums without having a totally fragmented +implementation. I encountered this issue yet again yesterday and wanted to +solicit feedback on some thoughts I had about potential solutions. + +### Finally + +Together, you can make everything [less horrible](https://twitter.com/Catfish_Man/status/1186424549455224832). +Teamwork is great! From f66c3ff6bab9af7a8ae033b05fee144fa20f703e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 26 Oct 2019 17:11:44 +0200 Subject: [PATCH 222/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7d82eec7..318de261 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -249,7 +249,7 @@ GEM ruby-enum (0.7.2) i18n ruby_dep (1.5.0) - rubyzip (1.3.0) + rubyzip (2.0.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From 2703df8661cd9bb333578a73954ab9b125bdf164 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 26 Oct 2019 23:23:01 +0200 Subject: [PATCH 223/589] Fix typo for Ted Kremenek name (#483) --- _posts/2019-10-24-issue-146.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2019-10-24-issue-146.md b/_posts/2019-10-24-issue-146.md index aceea819..c4ce8645 100644 --- a/_posts/2019-10-24-issue-146.md +++ b/_posts/2019-10-24-issue-146.md @@ -184,7 +184,7 @@ collection. In addition, because these operations depend on mutable collection algorithms that we've long wanted in the standard library, this proposal includes those too. -[Ted Krememenk](https://twitter.com/tkremenek) shared [some thoughts](https://forums.swift.org/t/trajectory-for-evaluating-adding-automatic-differentiation-to-swift/30048) on +[Ted Kremenek](https://twitter.com/tkremenek) shared [some thoughts](https://forums.swift.org/t/trajectory-for-evaluating-adding-automatic-differentiation-to-swift/30048) on evaluating adding Automatic Differentiation to Swift. > One of the efforts of the Swift for TensorFlow project has been to explore From b78a750ef57b9b2a3a03d57694197ea0822dbbe3 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 27 Oct 2019 20:43:57 +0000 Subject: [PATCH 224/589] Initial dark mode (#481) * Initial dark mode * Code is very !important * Make post title font bolder in Dark mode --- css/style.css | 99 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 19 deletions(-) diff --git a/css/style.css b/css/style.css index 4e100447..3479242b 100644 --- a/css/style.css +++ b/css/style.css @@ -1,7 +1,59 @@ /* COMMON ELEMENTS */ +:root { + color-scheme: light dark; + + --background: #ffffff; + --body-text: #606060; + + --special-text: #444444; + --attribute-social-visited: #444444; + --attribute-subscribe-hover: #444444; + + --date: #666666; + --tagline: #666666; + --attribute-social-hover: #666666; + --attribute-subscribe-visited: #666666; + --attribute-sharing: #666666; + + --attribute: #f05138; + --attribute-visited: #f05138; + --attribute-sharing-hover: #f05138; + + --attribute-hover: #fbaf40; + --hr-border: #d7d7d7; + + --code: #c7254e; + --code-background: #f9f2f4; + --codeblock-background: #f5f5f5; + + --post-title-font-weight: lighter; +} + +/* DARK MODE */ +@media (prefers-color-scheme: dark) { + :root { + --background: #1c1c1c; + --body-text: #b2b2b2; + + --special-text: #7c7c7c; + + --tagline: #b2b2b2; + + --attribute: #f7492e; + --attribute-hover: #f7ad2e; + + --code: #000000; + --code-background: #959595; + --codeblock-background: #939393; + + --post-title-font-weight: 300; /* 400 is normal */ + } +} + body { - background-color: #ffffff; + background-color: var(--background); + color: var(--body-text); padding-bottom: 1rem; padding-top: 1rem; } @@ -13,7 +65,7 @@ body p { } hr { - border-color: #d7d7d7; + border-color: var(--hr-border); width: 50%; } @@ -25,18 +77,27 @@ hr { text-align: center; } +code { + color: var(--code); + background-color: var(--code-background); +} + +pre { + background-color: var(--codeblock-background) !important; +} + /* LINKS */ a { - color: #f05138; + color: var(--attribute); } a:link { - border-bottom: 1px dotted #f05138; + border-bottom: 1px dotted var(--attribute); } a:visited { - color: #f05138; + color: var(--attribute-visited); border-width: 0px; text-decoration: none; } @@ -44,8 +105,8 @@ a:visited { a:hover, .tagline a:hover, .lead a:hover { - color: #fbaf40; - border-color: #fbaf40; + color: var(--attribute-hover); + border-color: var(--attribute-hover); text-decoration: none; } @@ -78,12 +139,12 @@ header h2 { .tagline a, .lead a, .author-name a { - color: #444444; - border-bottom: 1px dotted #444444; + color: var(--special-text); + border-bottom: 1px dotted var(--special-text); } .tagline, .lead { - color: #666666; + color: var(--tagline); } /* SPONSOR */ @@ -106,7 +167,7 @@ header h2 { .post-title { font-size: 40px; - font-weight: lighter; + font-weight: var(--post-title-font-weight); } .post-subtitle { @@ -117,7 +178,7 @@ header h2 { .post-date { font-weight: normal; - color: #666666; + color: var(--date); display: inline-block; } @@ -131,16 +192,16 @@ header h2 { .sharing a, .sharing a:visited, .sharing a:link { - color: #666666; + color: var(--attribute-sharing); } .sharing ul li a:hover { - color: #f05138; + color: var(--attribute-sharing-hover); text-decoration: none; } blockquote { - color: #666; + color: var(--body-text); font-size: 16px; margin-left: 22px; } @@ -149,11 +210,11 @@ blockquote { .subscribe a, .subscribe a:visited { - color: #666666; + color: var(--attribute-subscribe-visited); } .subscribe ul li a:hover { - color: #444444; + color: var(--attribute-subscribe-hover); text-decoration: none; } @@ -189,7 +250,7 @@ blockquote { footer a, footer a:visited, .social a, .social a:visited { - color: #444444; + color: var(--attribute-social-visited); } .social ul li a { @@ -197,7 +258,7 @@ footer a, footer a:visited, } .social ul li a:hover { - color: #666666; + color: var(--attribute-social-hover); text-decoration: none; } From 9ea68820ff98863fd5880c8b3d408d54d118fc70 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 6 Nov 2019 19:25:03 +0100 Subject: [PATCH 225/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 318de261..b9fb80e1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -230,11 +230,11 @@ GEM jekyll (~> 3.5) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.12.2) + minitest (5.13.0) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.10.4) + nokogiri (1.10.5) mini_portile2 (~> 2.4.0) octokit (4.14.0) sawyer (~> 0.8.0, >= 0.5.3) From 9a2a32700561be8d5d3cdf05a0e616ec799b94c0 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 6 Nov 2019 20:00:49 +0100 Subject: [PATCH 226/589] Add draft --- _drafts/2019-11-07-issue-147.md | 167 ++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 _drafts/2019-11-07-issue-147.md diff --git a/_drafts/2019-11-07-issue-147.md b/_drafts/2019-11-07-issue-147.md new file mode 100644 index 00000000..a28e3c8a --- /dev/null +++ b/_drafts/2019-11-07-issue-147.md @@ -0,0 +1,167 @@ +--- +layout: post +title: ! 'Issue #147' +author: btb +--- + +With the [ServerSide.swift](https://www.serversideswift.info) conference having +taken place for the second year, there are a lot of exciting updates on Swift +on the server — and more! + + + +{% include sponsor.html %} + +### Podcasts + +In the latest Swift Unwrapped episode, Jesse and JP talk about the [new Swift +Compiler Driver](https://spec.fm/podcasts/swift-unwrapped/311779) project. + +### News and community + +The Swift for Tensorflow team wrote [an extensive manifesto](https://github.com/apple/swift/blob/master/docs/DifferentiableProgramming.md) +on differentiable programming in Swift. + +[Tanner Nelson](https://twitter.com/tanner0101/) wrote [a blog post](https://swift.org/blog/sswg-update/) +with an update on the progress in the Swift Server Work Group over the last year. + +[Andrea Scuderi](https://twitter.com/andreascuderi13) wrote [a blog post](https://medium.com/better-programming/whats-new-in-server-side-swift-3834e70d2281) +on ServerSide.swift. + +[Cory Benfield](https://twitter.com/Lukasaoz) shared [some contributions](https://twitter.com/Lukasaoz/status/1189835893106003969) +to the SwiftNIO project from a workshop at ServerSide.swift. + +### Commits and pull requests + +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r) merged [two](https://github.com/apple/swift/pull/28035) pull +[requests](https://github.com/apple/swift-package-manager/pull/2397) that +simplify the bootstrap script for the Swift Package manager. + +### Accepted proposals + +[SE-0267](https://github.com/apple/swift-evolution/blob/master/proposals/0267-where-on-contextually-generic.md): *`where` clauses on contextually generic declarations* was [accepted with a modification](https://forums.swift.org/t/se-0267-where-clauses-on-contextually-generic-declarations/30051/49). + +> The core team has decided to accept this proposal with one modification. The +proposal addresses the issue of conditional protocol requirements by disallowing +constraints involving `Self` from being applied to protocol requirements, but it +should also do so for non-`final` class methods, to avoid the same problem with +conditional dynamically-dispatched methods in classes. + +### Proposals in review + +[SE-0269](https://github.com/apple/swift-evolution/blob/master/proposals/0269-implicit-self-explicit-capture.md): *Increase availability of implicit `self` in `@escaping` closures when reference cycles are unlikely to occur* is [under review](https://forums.swift.org/t/se-0269-increase-availability-of-implicit-self-in-escaping-closures-when-reference-cycles-are-unlikely-to-occur/30376). + +> Modify the rule that all uses of `self` in escaping closures must be explicit +by allowing for implicit uses of `self` in situations where the user has already +made their intent explicit, or where strong reference cycles are otherwise +unlikely to occur. There are two situations covered by this proposal. The first +is when the user has explicitly captured `self` in the closure's capture list, +so that the following would compile without error: + +```swift +class Test { + var x = 0 + func execute(_ work: @escaping () -> Void) { + work() + } + func method() { + execute { [self] in + x += 1 + } + } +} +``` + +> Secondly, this proposal would make implicit `self` available in escaping +closures when `self` is a value type, so that the following would become valid: + +```swift +struct Test { + var x = 0 + func execute(_ work: @escaping () -> Void) { + work() + } + func method() { + execute { + x += 1 + } + } +} +``` + +### Swift Forums + +[Kaitlin Mahar](https://twitter.com/k__mahar) shared [a proposal](https://forums.swift.org/t/officially-supported-mongodb-driver/30324) +to officially support the MongoDB Driver for Swift on the server. + +> We’re currently working on adding an asynchronous SwiftNIO-based version of +our API to meet the SSWG incubation process minimal requirements. This is still +in the design phase, and we’d love to hear feedback from the community on what +we’ve come up with so far. +> +> **Current State and Future Plans** +> We initially developed MongoSwift about 18 months ago with a synchronous API +for use with the mobile/embedded version of MongoDB. However, we’ve increasingly +shifted our focus toward providing a great server-side experience. We did work +over the summer to implement automatic connection pooling in the driver and are +now tackling the crucial asynchronous API. +> +> The driver complies with nearly all of the MongoDB driver +[specifications](https://www.github.com/mongodb/specifications), which are +documents our team writes detailing everything from what a driver’s CRUD API +should look like to how it should select which server to send a command to. +These specs ensure consistent experiences using MongoDB across languages, while +still allowing room for implementations and public APIs to vary in +language-appropriate ways. + +[Owen Voorhees](https://twitter.com/owenvoorhees) pitched [a proposal](https://forums.swift.org/t/multi-pattern-and-conditionally-compiled-catch-clauses/30246) +to add multi-pattern and conditionally compiled `catch` clauses. + +> Currently, each `catch` clause in a `do`-`catch` statement may only contain a +single pattern and where clause, and may not be conditionally compiled using a +`#if` directive. This is inconsistent with the behavior of cases in switch +statements which provide similar functionality. It also makes some error +handling patterns awkward to express. This proposal extends the grammar of +`catch` clauses to support `#if` and a comma-separated list of patterns (with +optional `where` clauses), resolving this inconsistency. + +[Bryan Clark](https://twitter.com/clarkbw) asked [for ideas and concerns](https://forums.swift.org/t/github-swift-package-management-service/30406) +on how the GitHub package registry will work with the Swift Package Manager. + +> Our goal is to present a package management service specification which could +be implemented by anyone, not only GitHub. This spec will include necessary API +endpoints, package naming (URL spec), versioning system, and other elements +required or in addition to the basics. We plan to open source our implementation +(written in Go) such that others can contribute back to it and progress can be +made in the open. + +[Gwen Mittertreiner](https://github.com/gmittert) has been working on [adding support for Windows in the +Swift Package Manager](https://forums.swift.org/t/adding-support-for-windows-as-a-platform/30158). + +> I've been making progress on Windows support for SPM, and one of the things +I'd like to add now is adding Windows as a supported platform in the Package +Description. + +[Paul Fechner](https://github.com/GottaGetSwifty) pitched [a proposal](https://forums.swift.org/t/pre-pitch-codable-customization-using-propertywrappers/30244) +on `Codable` customization using Property Wrappers. + +> Currently the only method of adding custom Encoding/Decoding for `Codable` +Types (without a custom implementation) is by adding options to the +`Encoder`/`Decoder`. Although this is relatively fleshed out in +`JSON`(`En`/`De`)`Coder`, there are still some major pain points. +> +> 1. Options must be set for every (`En`/`De`)`coder` used +> 2. The option Types are separate so e.g. `dateEncodingStrategy` and +`dateDecodingStrategy` have separate implementations and are both required to +handle full serialization. +> 3. The options aren't Portable and each (en/de)coder must supply their own +options. Not even Swift's own `PropertyList`(`En`/`De`)`coder` has support for +the same options as it's JSON cousin. +> 4. It's all or nothing. E.g. If a Type or it's children need to use more than +a single `dateEncodingStrategy` they must manage it themselves. + +### Finally + +You have lacking documentation, and you have [awesome documentation](https://github.com/apple/swift/blob/master/docs/DifferentiableProgramming.md#calculus-is-fun). +(yes, the [banner](https://developer.apple.com/documentation/swift/string) here +is amazing, too.) From 5cdd16dd8abf2dd068cc9d07a15022268274c975 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 7 Nov 2019 18:59:59 +0100 Subject: [PATCH 227/589] Post 147 (#486) * Post 147 Resolves #482 * Add SE-0265 --- {_drafts => _posts}/2019-11-07-issue-147.md | 51 +++++++++++++++++++++ 1 file changed, 51 insertions(+) rename {_drafts => _posts}/2019-11-07-issue-147.md (72%) diff --git a/_drafts/2019-11-07-issue-147.md b/_posts/2019-11-07-issue-147.md similarity index 72% rename from _drafts/2019-11-07-issue-147.md rename to _posts/2019-11-07-issue-147.md index a28e3c8a..b6be4a54 100644 --- a/_drafts/2019-11-07-issue-147.md +++ b/_posts/2019-11-07-issue-147.md @@ -47,6 +47,57 @@ constraints involving `Self` from being applied to protocol requirements, but it should also do so for non-`final` class methods, to avoid the same problem with conditional dynamically-dispatched methods in classes. +## Returned proposals + +[SE-0265](https://github.com/apple/swift-evolution/blob/master/proposals/0265-offset-indexing-and-slicing.md): *Offset-Based Access to Indices, Elements, and Slices* was [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0265-offset-based-access-to-indices-elements-and-slices/30503). + +> Swift's indexing model is based on solid concepts that have held up well over +the years, but the verbosity of expressing positions at integer offsets from +known indices has been a persistent pain point. The Core Team feels that this +is a significant problem and is very happy to see a proposal aimed squarely at +it. +> +> `OffsetBound` allows the expression of abstract indices that aren't actually +valid in a collection. During the review, it was pointed out that, rather than +responding to this by clamping or reporting an error, we could use it to +improve expressivity: for example, if the user inserts something at `.last + 5`, +we could pad out to that index with some (user-provided) padding element. The +Core Team discussed this idea and ultimately decided to reject it. We feel that +it provides a simpler and more consistent programming experience overall if +abstract indices can always be thought of simply as sugar for computing a +specific valid index. +> +> It was also pointed out that anchoring abstract indices at the beginning and +end of a collection is fairly limiting; there are plenty of other interesting +ways of deriving indices, like finding the first index that matches a predicate. +The Core Team feels that it should not be a goal of this feature to totally +replace the need to work with concrete index values. In particular, this +shouldn't become an arbitrarily-complex expression-template language. +> +> That said, it's important that abstract indices compose nicely with concrete +indices. Programmers should feel like they can reliably use abstract indices +anywhere they could use concrete indices. That doesn't appear to be true of the +current proposal: in particular, programmers can slice between two abstract +indices or between two concrete indices, but not between a mix of either. The +Core Team feels it's important to avoid this kind of inconsistent-feeling +experience. +> +> Along the same vein, abstract indices can only be anchored relative to the +start and end of a collection. It is frequently useful to be able to anchor +relative to a concrete index, e.g. to slice from an index returned by +`firstIndex(where:)` to the fifth element past that. This pattern is not +addressed by the current proposal, and it's not clear whether the proposal can +be extended this way in the future. +> +> If necessary, the Core Team is willing to consider new language support for +slicing subscripts, either through new syntax or through new interpretations of +existing syntax. +> +> The proposal author also requested an opportunity to revise the proposal's +treatment of certain methods on `RangeReplaceableCollection`. +> +> Accordingly, SE-0265 is returned for revision. + ### Proposals in review [SE-0269](https://github.com/apple/swift-evolution/blob/master/proposals/0269-implicit-self-explicit-capture.md): *Increase availability of implicit `self` in `@escaping` closures when reference cycles are unlikely to occur* is [under review](https://forums.swift.org/t/se-0269-increase-availability-of-implicit-self-in-escaping-closures-when-reference-cycles-are-unlikely-to-occur/30376). From 859420e03c513799aa7c91610eff4aae26a87949 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 15 Nov 2019 10:20:00 +0100 Subject: [PATCH 228/589] Run bundle update --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index b9fb80e1..195561bb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -52,7 +52,7 @@ GEM multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) - ffi (1.11.1) + ffi (1.11.2) forwardable-extended (2.6.0) gemoji (3.0.1) git (1.5.0) @@ -107,7 +107,7 @@ GEM octokit (~> 4.0) public_suffix (~> 3.0) typhoeus (~> 1.3) - html-pipeline (2.12.0) + html-pipeline (2.12.2) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) @@ -249,7 +249,7 @@ GEM ruby-enum (0.7.2) i18n ruby_dep (1.5.0) - rubyzip (2.0.0) + rubyzip (1.3.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From 0d486d95e0158709c0d984290c0aa77fde1751e6 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 18 Nov 2019 22:20:48 +0100 Subject: [PATCH 229/589] bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 195561bb..ab220994 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -249,7 +249,7 @@ GEM ruby-enum (0.7.2) i18n ruby_dep (1.5.0) - rubyzip (1.3.0) + rubyzip (2.0.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From a4487b508b841ff0b06e7408cc01cdd8594bec14 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 20 Nov 2019 22:09:57 +0100 Subject: [PATCH 230/589] Push 148 draft References #487 --- _drafts/2019-11-21-issue-148.md | 98 +++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 _drafts/2019-11-21-issue-148.md diff --git a/_drafts/2019-11-21-issue-148.md b/_drafts/2019-11-21-issue-148.md new file mode 100644 index 00000000..b3a7370c --- /dev/null +++ b/_drafts/2019-11-21-issue-148.md @@ -0,0 +1,98 @@ +--- +layout: post +title: ! 'Issue #148' +author: btb +sponsor: + link: https://store.raywenderlich.com + heading: Master SwiftUI, Combine and Catalyst! + body: 'Three new books from the teams at raywenderlich.com: SwiftUI by Tutorials, Combine: Asynchronous Programming with Swift, and Catalyst by Tutorials. Build fluid and engaging declarative UI for your apps with SwiftUI, master native asynchronous programming with Swift using the Combine framework and run iOS apps natively on macOS with Catalyst!' + displaylink: store.raywenderlich.com +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-11724](https://bugs.swift.org/browse/SR-11724) [Compiler] Provide a diagnostic when a closure parameter is declared with type sugar +- [SR-11729](https://bugs.swift.org/browse/SR-11729) [llbuild] Add Chromium Tracing as export format option to `llbuild-analyze` +- [SR-11730](https://bugs.swift.org/browse/SR-11730) [llbuild] Improve GraphViz as export format option to `llbuild-analyze` +- [SR-11795](https://bugs.swift.org/browse/SR-11795) [Compiler] Replace `OSX` with `macOS` pretty much everywhere + +### News and community + +https://swift.org/blog/numerics/ + +https://forums.swift.org/t/swift-5-1-2-released/30620 + +[Saleem Abdulrasool](https://twitter.com/compnerd) gave [a talk](https://www.youtube.com/watch?v=Zjlxa1NIfJc) +on bringing Swift to Windows. + +[Alexis Beingessner](https://twitter.com/Gankra_) wrote [a blog post](https://gankra.github.io/blah/swift-abi/) +on how Swift achieved dynamic linking support. + +https://twitter.com/_plinth_/status/1194696147018944512 + +https://forums.swift.org/t/all-core-libraries-have-been-migrated-to-modern-cmake/30770 + +### Commits and pull requests + +[Zoe Carver](https://github.com/zoecarver) is working on [a pull request](https://github.com/apple/swift/pull/28260) +turning sequences of String comparisons into a fast switch. + +[Brent Royal-Gordon](https://twitter.com/brentdax) is working on [a pull request](https://github.com/apple/swift/pull/25656) +to make Swift `#file` strings include only the base name of the file, making +them a lot easier to digest. + +### Proposals in review + +[SE-0272](https://github.com/apple/swift-evolution/blob/master/proposals/0272-swiftpm-binary-dependencies.md): *Package Manager Binary Dependencies* is [under review](https://forums.swift.org/t/se-0272-package-manager-binary-dependencies/30753). + +> SwiftPM currently supports source-only packages for several languages, and +with a very proscriptive build model which considerably limits exactly how the +compilation of the source can be performed. While this makes packages consistent +and to some extent "simple", it limits their use in several important cases: +* Software vendors who wish to provide easy integration with the package + manager, but do not deliver source code, cannot integrate. +* Existing code bases which would like to integrate "simply" with SwiftPM, but + require more complicated build processes, have no recourse. + +[SE-0271](https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md): *Package Manager Resources* is [under review](https://forums.swift.org/t/se-0271-package-manager-resources/30730). + +> Packages should be able to contain images, data files, and other resources +needed at runtime. This proposal describes SwiftPM support for specifying such +package resources, and introduces a consistent way of accessing them from the +source code in the package. + +[SE-0270](https://github.com/apple/swift-evolution/blob/master/proposals/0270-rangeset-and-collection-operations.md): *Add Collection Operations on Noncontiguous Elements* is [under review](https://forums.swift.org/t/se-0270-add-collection-operations-on-noncontiguous-elements/30691). + +> We can use a `Range` to refer to a group of consecutive positions in a +collection, but the standard library doesn't currently provide a way to refer +to discontiguous positions in an arbitrary collection. I propose the addition +of a `RangeSet` type that can store any number of positions, along with +collection algorithms that operate on those positions. + +### Swift Forums + +https://forums.swift.org/t/infer-associated-types-as-generic-parameters-more-eagerly/30833 + +https://forums.swift.org/t/pre-pitch-runtime-type-guarantees/30842 + +https://forums.swift.org/t/rename-encodable-codingkeys/30571 + +https://forums.swift.org/t/pitch-exposing-the-memory-locations-of-class-instance-variables/30584 + +https://forums.swift.org/t/pitch-exposing-the-memory-locations-of-class-instance-variables/30584 + +https://forums.swift.org/t/se-0272-package-manager-binary-dependencies/30753 + +https://forums.swift.org/t/cross-import-overlays/30868 + +### Finally + +Formatting
    +   is
    + [hard](https://twitter.com/uliwitness/status/1193166769688580097). From 3daa2df2e12332d2238689c367aaf9d3acb17e0e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 Nov 2019 17:38:07 +0100 Subject: [PATCH 231/589] Publish 148 Closes #487 --- _drafts/2019-11-21-issue-148.md | 98 ------------------- _posts/2019-11-21-issue-148.md | 160 ++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+), 98 deletions(-) delete mode 100644 _drafts/2019-11-21-issue-148.md create mode 100644 _posts/2019-11-21-issue-148.md diff --git a/_drafts/2019-11-21-issue-148.md b/_drafts/2019-11-21-issue-148.md deleted file mode 100644 index b3a7370c..00000000 --- a/_drafts/2019-11-21-issue-148.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -layout: post -title: ! 'Issue #148' -author: btb -sponsor: - link: https://store.raywenderlich.com - heading: Master SwiftUI, Combine and Catalyst! - body: 'Three new books from the teams at raywenderlich.com: SwiftUI by Tutorials, Combine: Asynchronous Programming with Swift, and Catalyst by Tutorials. Build fluid and engaging declarative UI for your apps with SwiftUI, master native asynchronous programming with Swift using the Combine framework and run iOS apps natively on macOS with Catalyst!' - displaylink: store.raywenderlich.com ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -- [SR-11724](https://bugs.swift.org/browse/SR-11724) [Compiler] Provide a diagnostic when a closure parameter is declared with type sugar -- [SR-11729](https://bugs.swift.org/browse/SR-11729) [llbuild] Add Chromium Tracing as export format option to `llbuild-analyze` -- [SR-11730](https://bugs.swift.org/browse/SR-11730) [llbuild] Improve GraphViz as export format option to `llbuild-analyze` -- [SR-11795](https://bugs.swift.org/browse/SR-11795) [Compiler] Replace `OSX` with `macOS` pretty much everywhere - -### News and community - -https://swift.org/blog/numerics/ - -https://forums.swift.org/t/swift-5-1-2-released/30620 - -[Saleem Abdulrasool](https://twitter.com/compnerd) gave [a talk](https://www.youtube.com/watch?v=Zjlxa1NIfJc) -on bringing Swift to Windows. - -[Alexis Beingessner](https://twitter.com/Gankra_) wrote [a blog post](https://gankra.github.io/blah/swift-abi/) -on how Swift achieved dynamic linking support. - -https://twitter.com/_plinth_/status/1194696147018944512 - -https://forums.swift.org/t/all-core-libraries-have-been-migrated-to-modern-cmake/30770 - -### Commits and pull requests - -[Zoe Carver](https://github.com/zoecarver) is working on [a pull request](https://github.com/apple/swift/pull/28260) -turning sequences of String comparisons into a fast switch. - -[Brent Royal-Gordon](https://twitter.com/brentdax) is working on [a pull request](https://github.com/apple/swift/pull/25656) -to make Swift `#file` strings include only the base name of the file, making -them a lot easier to digest. - -### Proposals in review - -[SE-0272](https://github.com/apple/swift-evolution/blob/master/proposals/0272-swiftpm-binary-dependencies.md): *Package Manager Binary Dependencies* is [under review](https://forums.swift.org/t/se-0272-package-manager-binary-dependencies/30753). - -> SwiftPM currently supports source-only packages for several languages, and -with a very proscriptive build model which considerably limits exactly how the -compilation of the source can be performed. While this makes packages consistent -and to some extent "simple", it limits their use in several important cases: -* Software vendors who wish to provide easy integration with the package - manager, but do not deliver source code, cannot integrate. -* Existing code bases which would like to integrate "simply" with SwiftPM, but - require more complicated build processes, have no recourse. - -[SE-0271](https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md): *Package Manager Resources* is [under review](https://forums.swift.org/t/se-0271-package-manager-resources/30730). - -> Packages should be able to contain images, data files, and other resources -needed at runtime. This proposal describes SwiftPM support for specifying such -package resources, and introduces a consistent way of accessing them from the -source code in the package. - -[SE-0270](https://github.com/apple/swift-evolution/blob/master/proposals/0270-rangeset-and-collection-operations.md): *Add Collection Operations on Noncontiguous Elements* is [under review](https://forums.swift.org/t/se-0270-add-collection-operations-on-noncontiguous-elements/30691). - -> We can use a `Range` to refer to a group of consecutive positions in a -collection, but the standard library doesn't currently provide a way to refer -to discontiguous positions in an arbitrary collection. I propose the addition -of a `RangeSet` type that can store any number of positions, along with -collection algorithms that operate on those positions. - -### Swift Forums - -https://forums.swift.org/t/infer-associated-types-as-generic-parameters-more-eagerly/30833 - -https://forums.swift.org/t/pre-pitch-runtime-type-guarantees/30842 - -https://forums.swift.org/t/rename-encodable-codingkeys/30571 - -https://forums.swift.org/t/pitch-exposing-the-memory-locations-of-class-instance-variables/30584 - -https://forums.swift.org/t/pitch-exposing-the-memory-locations-of-class-instance-variables/30584 - -https://forums.swift.org/t/se-0272-package-manager-binary-dependencies/30753 - -https://forums.swift.org/t/cross-import-overlays/30868 - -### Finally - -Formatting
    -   is
    - [hard](https://twitter.com/uliwitness/status/1193166769688580097). diff --git a/_posts/2019-11-21-issue-148.md b/_posts/2019-11-21-issue-148.md new file mode 100644 index 00000000..db8a4063 --- /dev/null +++ b/_posts/2019-11-21-issue-148.md @@ -0,0 +1,160 @@ +--- +layout: post +title: ! 'Issue #148' +author: btb +sponsor: + link: https://store.raywenderlich.com + heading: Master SwiftUI, Combine and Catalyst! + body: 'Three new books from the teams at raywenderlich.com: SwiftUI by Tutorials, Combine: Asynchronous Programming with Swift, and Catalyst by Tutorials. Build fluid and engaging declarative UI for your apps with SwiftUI, master native asynchronous programming with Swift using the Combine framework and run iOS apps natively on macOS with Catalyst!' + displaylink: store.raywenderlich.com +--- + +I've been having a great last two weeks, including a trip to Spain for work — +it's always great to talk to the people in remote locations and meeting up with +them in person. + +I also feel (like some of you, probably) that the holidays are really just +around the corner. Swift Weekly Brief will be here for another two issues this +year; so don't worry about that. + +Speaking of the holiday feeling, it seems like a lot of interesting things are +still going on when it comes to Swift, as you can read about below. + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-11724](https://bugs.swift.org/browse/SR-11724) [Compiler] Provide a diagnostic when a closure parameter is declared with type sugar +- [SR-11729](https://bugs.swift.org/browse/SR-11729) [llbuild] Add Chromium Tracing as export format option to `llbuild-analyze` +- [SR-11730](https://bugs.swift.org/browse/SR-11730) [llbuild] Improve GraphViz as export format option to `llbuild-analyze` +- [SR-11795](https://bugs.swift.org/browse/SR-11795) [Compiler] Replace `OSX` with `macOS` pretty much everywhere + +### News and community + +[Steve Cannon](https://twitter.com/stephentyrone) wrote [a blog post](https://swift.org/blog/numerics/) +on swift.org on `Swift Numerics`, a new open source project, partially in lieu +of an implementation for [SE-0246](https://github.com/apple/swift-evolution/blob/master/proposals/0246-mathable.md). + +[Ted Kremenek](https://twitter.com/tkremenek) announced [Swift 5.1.2](https://forums.swift.org/t/swift-5-1-2-released/30620), +which includes an improved type-checking algorithm that has significant +performance benefits on code using function builders (such as SwiftUI code). + +[Saleem Abdulrasool](https://twitter.com/compnerd) gave [a talk](https://www.youtube.com/watch?v=Zjlxa1NIfJc) +on bringing Swift to Windows. + +[Alexis Beingessner](https://twitter.com/Gankra_) wrote [a blog post](https://gankra.github.io/blah/swift-abi/) +on how Swift achieved dynamic linking support. + +[Steve Hawley](https://twitter.com/_plinth_) announced [Binding Tools for Swift](http://plinth.org/techtalk/?p=580), +which allows C# to interoperate with Swift! + +[Saleem Abdulrasool](https://twitter.com/compnerd) announced that all core +libraries have been [migrated to modern CMake (3.51.1)](https://forums.swift.org/t/all-core-libraries-have-been-migrated-to-modern-cmake/30770). + +### Commits and pull requests + +[Zoe Carver](https://github.com/zoecarver) is working on [a pull request](https://github.com/apple/swift/pull/28260) +turning sequences of String comparisons into a fast switch. + +[Brent Royal-Gordon](https://twitter.com/brentdax) is working on [a pull request](https://github.com/apple/swift/pull/25656) +to make Swift `#file` strings include only the base name of the file, making +them a lot easier to digest. + +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/28399) +that fixes a `Self` type bug that required a mere 1000 line refactoring first. 😅 + +### Returned proposals + +[SE-0272](https://github.com/apple/swift-evolution/blob/master/proposals/0272-swiftpm-binary-dependencies.md): *Package Manager Binary Dependencies* was [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0272-package-manager-binary-dependencies/30994). + +> We had a uniformly positive response to the idea of supporting binary +dependencies in SwiftPM and the high-level design, but there are a number of +concerns that came up during review: +> +> - The option for disallowing binary dependencies was broadly considered to +not provided enough value to be included. It would also be good to clarify in +the proposal that opt-in/opt-out functionality can still be provided by clients +of libSwiftPM as a workflow feature. +> +> - Storing the checksum in the resolved file was seen redundant by some folks. +If a revision choses to omit this, we should instead propose to verify the +commit hash that is already stored there to achieve similar results. +> +> - Several posts mentioned that the API could be simplified and it would make +sense to reduce the complexity here since it isn't needed for the scoped down +version of the initial pitch that is being proposed here. +> +> - A number of points should be spelled out more concretely in the proposal: +verifications of the contents of the artifacts, the concrete layout of the ZIP +file and the behaviour if there is no artifact available for the target +platform. +> +> - Mirror support for this feature should be considered. That should include +adding a new command for specifying mirrors for binary artifacts. + +### Proposals in review + +[SE-0271](https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md): *Package Manager Resources* is [under review](https://forums.swift.org/t/se-0271-package-manager-resources/30730). + +> Packages should be able to contain images, data files, and other resources +needed at runtime. This proposal describes SwiftPM support for specifying such +package resources, and introduces a consistent way of accessing them from the +source code in the package. + +[SE-0270](https://github.com/apple/swift-evolution/blob/master/proposals/0270-rangeset-and-collection-operations.md): *Add Collection Operations on Noncontiguous Elements* is [under review](https://forums.swift.org/t/se-0270-add-collection-operations-on-noncontiguous-elements/30691). + +> We can use a `Range` to refer to a group of consecutive positions in a +collection, but the standard library doesn't currently provide a way to refer +to discontiguous positions in an arbitrary collection. I propose the addition +of a `RangeSet` type that can store any number of positions, along with +collection algorithms that operate on those positions. + +### Swift Forums + +[Slava Pestov](https://twitter.com/slava_pestov) pitched [a proposal](https://forums.swift.org/t/infer-associated-types-as-generic-parameters-more-eagerly/30833) +to infer associated types as generic parameters more eagerly. + +> This proposal changes associated type inference behavior to short-circuit a +large amount of inference work in the case where the conforming type defines a +generic parameter with the same name as an associated type. +> +> This breaks source compatibility with certain valid programs; in Swift 5.1, +it is possible for an associated type and a generic parameter with the same +name to have different types. However, the name lookup behavior in this case +was already very fragile. + +[Jon Hull](https://forums.swift.org/u/jon_hull) pitched [a proposal](https://forums.swift.org/t/pre-pitch-runtime-type-guarantees/30842) +for Runtime Type Guarantees. + +> There is always a tradeoff between safety and performance when writing +reusable code. Low level code either has to make assumptions about the values +being passed to it (e.g. a value is non-zero, or an array is non-empty) or it +has to check those assumptions. When these functions call one another, but +could also be called from the outside, you often find them repeatedly +performing the same check. + +[Karoy Lorentey](https://twitter.com/lorentey) pitched [a proposal](https://forums.swift.org/t/pitch-exposing-the-memory-locations-of-class-instance-variables/30584) +to expose the Memory Locations of Class Instance Variables. + +> For Swift to be successful as a systems programming language, it needs to +allow efficient use of the synchronization facilities provided by the +underlying computer architecture and operating system, such as primitive atomic +types or higher-level synchronization tools like `pthread_mutex_t` or +`os_unfair_lock`. Such constructs typically require us to provide a stable +memory location for the values they operate on. +> +> Swift provides a number of language and runtime constructs that are guaranteed +to have a stable memory location. +> +> However, Swift does not currently provide ways to reliably retrieve the +address of the memory location backing these variables -- with the exception of +dynamic variables, where all access is done through an explicit unsafe pointer +whose value is (obviously) known to the code that performs the access. + +### Finally + +Formatting
    +   is
    + [hard](https://twitter.com/uliwitness/status/1193166769688580097). From e7bd763f9d2290f99b7a66e5e9d7c82927f72cf3 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 3 Dec 2019 19:06:33 +0100 Subject: [PATCH 232/589] Update sponsorship.md --- sponsorship.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 8d5dee78..c3825b49 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,800 subscribers and over 8,200 followers on Twitter. +There are over 3,800 subscribers and over 8,500 followers on Twitter.

    Sponsored Links

    @@ -60,10 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
    |   Issue |   Status | |:-|:-| -| October 10 | Open | -| October 24 | Open | -| November 7 | Open | -| November 21 | **Booked** | | December 5 | Open | | December 19 | Open | {: class="table table-striped table-bordered"} From 0ba6b1c879ae9f4aeb86172f70416fac6a9ea49c Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 5 Dec 2019 20:27:09 +0100 Subject: [PATCH 233/589] Run bundle update --- Gemfile.lock | 124 +++++++++++++++++++++++++-------------------------- 1 file changed, 61 insertions(+), 63 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ab220994..f3ab88c8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,11 +1,12 @@ GEM remote: https://rubygems.org/ specs: - activesupport (4.2.11.1) - i18n (~> 0.7) + activesupport (6.0.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) + zeitwerk (~> 2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) claide (1.0.3) @@ -48,36 +49,35 @@ GEM ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) - faraday (0.17.0) + faraday (0.17.1) multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) - ffi (1.11.2) + ffi (1.11.3) forwardable-extended (2.6.0) gemoji (3.0.1) git (1.5.0) - github-pages (202) - activesupport (= 4.2.11.1) + github-pages (203) github-pages-health-check (= 1.16.1) jekyll (= 3.8.5) - jekyll-avatar (= 0.6.0) + jekyll-avatar (= 0.7.0) jekyll-coffeescript (= 1.1.1) jekyll-commonmark-ghpages (= 0.1.6) jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.11.0) + jekyll-feed (= 0.13.0) jekyll-gist (= 1.5.0) jekyll-github-metadata (= 2.12.1) - jekyll-mentions (= 1.4.1) - jekyll-optional-front-matter (= 0.3.0) + jekyll-mentions (= 1.5.1) + jekyll-optional-front-matter (= 0.3.2) jekyll-paginate (= 1.1.0) - jekyll-readme-index (= 0.2.0) - jekyll-redirect-from (= 0.14.0) - jekyll-relative-links (= 0.6.0) - jekyll-remote-theme (= 0.4.0) + jekyll-readme-index (= 0.3.0) + jekyll-redirect-from (= 0.15.0) + jekyll-relative-links (= 0.6.1) + jekyll-remote-theme (= 0.4.1) jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.5.0) - jekyll-sitemap (= 1.2.0) - jekyll-swiss (= 0.4.0) + jekyll-seo-tag (= 2.6.1) + jekyll-sitemap (= 1.4.0) + jekyll-swiss (= 1.0.0) jekyll-theme-architect (= 0.1.1) jekyll-theme-cayman (= 0.1.1) jekyll-theme-dinky (= 0.1.1) @@ -87,19 +87,18 @@ GEM jekyll-theme-midnight (= 0.1.1) jekyll-theme-minimal (= 0.1.1) jekyll-theme-modernist (= 0.1.1) - jekyll-theme-primer (= 0.5.3) + jekyll-theme-primer (= 0.5.4) jekyll-theme-slate (= 0.1.1) jekyll-theme-tactile (= 0.1.1) jekyll-theme-time-machine (= 0.1.1) - jekyll-titles-from-headings (= 0.5.1) - jemoji (= 0.10.2) + jekyll-titles-from-headings (= 0.5.3) + jemoji (= 0.11.1) kramdown (= 1.17.0) - liquid (= 4.0.0) - listen (= 3.1.5) + liquid (= 4.0.3) mercenary (~> 0.3) - minima (= 2.5.0) + minima (= 2.5.1) nokogiri (>= 1.10.4, < 2.0) - rouge (= 3.11.0) + rouge (= 3.13.0) terminal-table (~> 1.4) github-pages-health-check (1.16.1) addressable (~> 2.3) @@ -126,8 +125,8 @@ GEM pathutil (~> 0.9) rouge (>= 1.7, < 4) safe_yaml (~> 1.0) - jekyll-avatar (0.6.0) - jekyll (~> 3.0) + jekyll-avatar (0.7.0) + jekyll (>= 3.0, < 5.0) jekyll-coffeescript (1.1.1) coffee-script (~> 2.2) coffee-script-source (~> 1.11.1) @@ -140,36 +139,36 @@ GEM rouge (>= 2.0, < 4.0) jekyll-default-layout (0.1.4) jekyll (~> 3.0) - jekyll-feed (0.11.0) - jekyll (~> 3.3) + jekyll-feed (0.13.0) + jekyll (>= 3.7, < 5.0) jekyll-gist (1.5.0) octokit (~> 4.2) jekyll-github-metadata (2.12.1) jekyll (~> 3.4) octokit (~> 4.0, != 4.4.0) - jekyll-mentions (1.4.1) + jekyll-mentions (1.5.1) html-pipeline (~> 2.3) - jekyll (~> 3.0) - jekyll-optional-front-matter (0.3.0) - jekyll (~> 3.0) + jekyll (>= 3.7, < 5.0) + jekyll-optional-front-matter (0.3.2) + jekyll (>= 3.0, < 5.0) jekyll-paginate (1.1.0) - jekyll-readme-index (0.2.0) - jekyll (~> 3.0) - jekyll-redirect-from (0.14.0) - jekyll (~> 3.3) - jekyll-relative-links (0.6.0) - jekyll (~> 3.3) - jekyll-remote-theme (0.4.0) + jekyll-readme-index (0.3.0) + jekyll (>= 3.0, < 5.0) + jekyll-redirect-from (0.15.0) + jekyll (>= 3.3, < 5.0) + jekyll-relative-links (0.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.1) addressable (~> 2.0) - jekyll (~> 3.5) - rubyzip (>= 1.2.1, < 3.0) + jekyll (>= 3.5, < 5.0) + rubyzip (>= 1.3.0) jekyll-sass-converter (1.5.2) sass (~> 3.4) - jekyll-seo-tag (2.5.0) - jekyll (~> 3.3) - jekyll-sitemap (1.2.0) - jekyll (~> 3.3) - jekyll-swiss (0.4.0) + jekyll-seo-tag (2.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-swiss (1.0.0) jekyll-theme-architect (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) @@ -197,8 +196,8 @@ GEM jekyll-theme-modernist (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.5.3) - jekyll (~> 3.5) + jekyll-theme-primer (0.5.4) + jekyll (> 3.5, < 5.0) jekyll-github-metadata (~> 2.9) jekyll-seo-tag (~> 2.0) jekyll-theme-slate (0.1.1) @@ -210,31 +209,30 @@ GEM jekyll-theme-time-machine (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.1) - jekyll (~> 3.3) + jekyll-titles-from-headings (0.5.3) + jekyll (>= 3.3, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - jemoji (0.10.2) + jemoji (0.11.1) gemoji (~> 3.0) html-pipeline (~> 2.2) - jekyll (~> 3.0) + jekyll (>= 3.0, < 5.0) kramdown (1.17.0) - liquid (4.0.0) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) + liquid (4.0.3) + listen (3.2.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) mini_portile2 (2.4.0) - minima (2.5.0) - jekyll (~> 3.5) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) minitest (5.13.0) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.10.5) + nokogiri (1.10.7) mini_portile2 (~> 2.4.0) octokit (4.14.0) sawyer (~> 0.8.0, >= 0.5.3) @@ -245,10 +243,9 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) - rouge (3.11.0) + rouge (3.13.0) ruby-enum (0.7.2) i18n - ruby_dep (1.5.0) rubyzip (2.0.0) safe_yaml (1.0.5) sass (3.7.4) @@ -267,6 +264,7 @@ GEM tzinfo (1.2.5) thread_safe (~> 0.1) unicode-display_width (1.6.0) + zeitwerk (2.2.2) PLATFORMS ruby From f94b8d1ac7a687429939140a5b5d556534953245 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 5 Dec 2019 21:15:25 +0100 Subject: [PATCH 234/589] Publish 149 Closes #488 --- _posts/2019-12-05-issue-149.md | 182 +++++++++++++++++++++++++++++++++ css/syntax.css | 14 ++- 2 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 _posts/2019-12-05-issue-149.md diff --git a/_posts/2019-12-05-issue-149.md b/_posts/2019-12-05-issue-149.md new file mode 100644 index 00000000..1fee7665 --- /dev/null +++ b/_posts/2019-12-05-issue-149.md @@ -0,0 +1,182 @@ +--- +layout: post +title: ! 'Issue #149' +author: btb +--- + +Earlier today, I finished my last working day of the year. All the holiday +feelings are there now! I hope that you've had a great last weeks, including a +great Thanksgiving for those who celebrated it! + +And a big special thanks to [Kristaps](https://twitter.com/fassko) for helping +out with this issue; I would not have been able to write it without him. 🏎 + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-11884](https://bugs.swift.org/browse/SR-11884) [Compiler] Link-In +`ubsan_standalone` If libFuzzer is used in Isolation +- [SR-11885](https://bugs.swift.org/browse/SR-11885) [Compiler] Allow operator +functions to have extra arguments with default values +- [SR-11889](https://bugs.swift.org/browse/SR-11889) [Compiler] Use a +`Located` throughout the compiler instead of `std::pair` + +### Podcasts + +In [episode 82 of Swift Unwrapped](https://spec.fm/podcasts/swift-unwrapped/313353), +Jesse and JP talk about Swift's New Diagnostic Architecture. + +In Swift by Sundell #61, John Sundell and Tim Cordon discuss [Serverside Swift](https://swiftbysundell.com/podcast/61/). + +### News and community + +[Cory Benfield](https://twitter.com/Lukasaoz) shared [a security patch](https://forums.swift.org/t/cve-2019-8849-swiftnio-ssl-executable-stack/31100) +for SwiftNIO SSL. + +[Daniel Martin](https://twitter.com/dmartincy) wrote [a blog post](https://pspdfkit.com/blog/2019/intro-cpp-swift-developers/) +to introduce Swift developers to C++! + +[Kaitlin Mahar](https://twitter.com/k__mahar)'s talk at SwiftServer.conf is +[now available on video](https://www.youtube.com/watch?v=9-fdbG9jNt4), talking +about maintaining Swift libraries. + +### Accepted proposals + +[SE-0269](https://github.com/apple/swift-evolution/blob/master/proposals/0269-implicit-self-explicit-capture.md): *Increase availability of implicit `self` in `@escaping` closures when reference cycles are unlikely to occur* was [accepted](https://forums.swift.org/t/se-0269-increase-availability-of-implicit-self-in-escaping-closures-when-reference-cycles-are-unlikely-to-occur/30376/70). + +> This proposal has been accepted. The proposal discussion roughly divided into +two parts: +> +> 1. Discussion around hoisting the explicit mention of `self` into the closure +capture list as the alternative to repeatedly writing explicit `self` in a +closure body (and having the compiler fix-it encourage that style) +> 2. The expansion of implicit `self` around the specific case where the type of +`self` is a value type +> +> The discussion on both topics was deeply constructive and productive. The +core team wants to express their deep thanks to everyone who contributed to +this discussion. Some really fantastic insights were made from different +perspectives. +> +> In the end, the core team felt that the hoisting `self` in the closure +capture list provided a better experience where explicit `self` will still be +encouraged as it (a) more clearly captures the intent of explicitly mentioning +`self` and (b) syntactically will be cleaner in the cases where `self` is +uttered multiple times. +> +> The discussion around the expansion of implicit `self` was a bit more +fragmented on the review, but ultimately the core team sided with expanding the +use of implicit `self` as proposed. + +[SE-0271](https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md): *Package Manager Resources* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0271-package-manager-resources/31021). + +> The feedback was positive, but two larger issues were brought up: +> +> - the proposal states that resource bundles will be located next to the built +executable only on Linux, but that doesn't quite match up with how software is +packaged up there. In addition, resources will also automatically be found in +all locations specified [here](https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/FHS%20Bundles.md) +and there will be a commandline flag to add search paths to custom locations. +> - the proposal will limit the usefulness of SwiftPM commandline tools on +macOS. We will make it possible to use Xcode specific resources in SwiftPM +directly. +> +> The SwiftPM code owners decided to accept a revised version of the proposal +which addresses both of these issues. + +### Proposals in review + +[SE-0264](https://github.com/apple/swift-evolution/blob/master/proposals/0264-stdlib-preview-package.md): *Standard Library Preview Package* is [under review #2](https://forums.swift.org/t/se-0264-review-2-standard-library-preview-package/31288). + +> We propose changing the Swift Evolution process to publish accepted proposals +as individual SwiftPM packages, as well as a `SwiftPreview` package that bundles +these proposal packages together. This group of packages will form the initial +landing spot for certain additions to the Swift standard library. +> +> Adding these packages serves the goal of allowing for rapid adoption of new +standard library features, enabling sooner real-world feedback, and allowing +for an initial period of time where that feedback can lead to source- and +ABI-breaking changes if needed. + +### Swift Forums + +[Saleem Abdulrasool](https://twitter.com/compnerd) shared [an update](https://forums.swift.org/t/reducing-friction-for-development-prebuilt-vscode-images/31109) +on reducing friction to get started with Swift through prebuilt Docker images +with complete toolchains, multiple SDKs, and pre-configured VSCode! + +> An often cited problem for using Swift on other platforms is the effort +required to get everything working together. To help address this barrier to +entry, I have been exploring some options to reduce the initial friction for +development on other targets (e.g. android, Linux, etc). +> +> Now, I realize that some of my choices may be controversial for some, so, I +would like to preface this as I am **NOT** advocating that this be the only +development, merely an option for those that would like to use it. I personally +prefer to develop locally and use my editor of choice, so I can completely +understand why some may be frustrated with some of the tradeoffs made here. +Please note that I am not trying to remove those options, merely provide an +alternative which others can explore if it suits them. + +[Filip Sakel](https://forums.swift.org/u/filip-sakel/summary) pitched [a proposal](https://forums.swift.org/t/better-access-control-on-protocol-requirements/31237) +for Better Access Control on Protocol Requirements. + +> The main problem is that you have to write a lot of boilerplate code. For +every new requirement that you want to be inaccessible to the user for your own +internal Types, you have to: +> +> 1. Write the initial Protocol requirement (like the `publish` method in +`Publisher`). +> 2. Rewrite that requirement in the internal Protocol (like the `_publish` +method in `TrustedPublisher`). +> 3. Cancel the initial requirement with an extension implementation that throws +a fatal error (like the `publish` method in the extension of +`TrustedPublisher`). +> +> What I propose is enabling the marking of Protocol requirements with Access +Levels. + +[Brent Royal-Gordon](https://twitter.com/brentdax) pitched [a proposal](https://forums.swift.org/t/concise-magic-file-names/31297) +to introduce a concise version of `#file`. + +> Today, `#file` evaluates to a string literal containing the full path to the +current source file. We propose to instead have it evaluate to a human-readable +string containing the filename and module name, while preserving the existing +behavior in a new `#filePath` expression. + +[David Hart](https://twitter.com/dhartbit) pitched [a proposal](https://forums.swift.org/t/package-manager-conditional-target-dependencies/31306) +to add Package Manager Conditional Target Dependencies. + +> This proposal introduces the ability for Swift package authors to +conditionalize target dependencies on platform and configuration with a similar +syntax to the one introduced in +[SE-0238](0238-package-manager-build-settings.md) for build settings. This gives +developers more flexibility to describe complex target dependencies to support +multiple platforms or different configuration environments. + +[Sergej Jaskiewicz](https://twitter.com/broadway_lamb) pitched [a proposal](https://forums.swift.org/t/function-calls-in-key-paths/31307) +to add support for function calls in key paths. + +> Today a key path may only reference properties and subscripts: + +```swift +\Array.[0].count +``` + +> But cannot reference method calls: + +```swift +\Array.[0].lowercased().count +// ^ +// error: Invalid component of Swift key path +``` + +> Since Swift already supports subscripts, how hard can it be to implement +support for method calls in key paths? Sure, subscripts are different from +regular methods, but are they different enough to be an implementation problem? + +### Finally + +Swift 6 will include [breaking changes](https://twitter.com/jckarter/status/1197581728665092096)!!! diff --git a/css/syntax.css b/css/syntax.css index f920769d..971742bf 100644 --- a/css/syntax.css +++ b/css/syntax.css @@ -3,6 +3,18 @@ * Courtesy of GitHub.com */ +:root { + color-scheme: light dark; + + --comment: #999988; +} + +@media (prefers-color-scheme: dark) { + :root { + --comment: #ffffff; + } +} + .highlight pre, pre, .highlight .hll { background-color: #f8f8f8; border: 1px solid #ccc; padding: 6px 10px; border-radius: 3px; } .highlight .c { color: #999988; font-style: italic; } .highlight .err { color: #a61717; background-color: #e3d2d2; } @@ -10,7 +22,7 @@ .highlight .o { font-weight: bold; } .highlight .cm { color: #999988; font-style: italic; } .highlight .cp { color: #999999; font-weight: bold; } -.highlight .c1 { color: #999988; font-style: italic; } +.highlight .c1 { color: var(--comment); font-style: italic; } .highlight .cs { color: #999999; font-weight: bold; font-style: italic; } .highlight .gd { color: #000000; background-color: #ffdddd; } .highlight .gd .x { color: #000000; background-color: #ffaaaa; } From 95b5d3d444a65b982312b285ee05e3d3ba6151da Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 5 Dec 2019 21:18:51 +0100 Subject: [PATCH 235/589] Initial 150 References #489 --- _drafts/2019-12-19-issue-150.md | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 _drafts/2019-12-19-issue-150.md diff --git a/_drafts/2019-12-19-issue-150.md b/_drafts/2019-12-19-issue-150.md new file mode 100644 index 00000000..a83eb879 --- /dev/null +++ b/_drafts/2019-12-19-issue-150.md @@ -0,0 +1,61 @@ +--- +layout: post +title: ! 'Issue #150' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +150!!! + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-11892](https://bugs.swift.org/browse/SR-11892) [Compiler] Suggest +inheriting `NSObject` instead of providing stubs for `NSObjectProtocol` +- [SR-11900](https://bugs.swift.org/browse/SR-11900) [Compiler] `swift help` +doesn't work +- [SR-11902](https://bugs.swift.org/browse/SR-11902) [Compiler] Improve Error +Message for Auto-synthesized `Equatable` Conformance on Classes + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 40345d03dd9da7c6384cd334515d7ecf7487cb4b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 7 Dec 2019 18:30:55 +0100 Subject: [PATCH 236/589] Add anonymous struct proposal pitch References #489 --- _drafts/2019-12-19-issue-150.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/_drafts/2019-12-19-issue-150.md b/_drafts/2019-12-19-issue-150.md index a83eb879..167330ff 100644 --- a/_drafts/2019-12-19-issue-150.md +++ b/_drafts/2019-12-19-issue-150.md @@ -54,7 +54,25 @@ Message for Auto-synthesized `Equatable` Conformance on Classes ### Swift Forums -> TODO +[Matthew Johnson](https://twitter.com/anandabits) pitched [a proposal](https://forums.swift.org/t/anonymous-structs/31424) +to introduce anonymous structs. + +> This proposal introduces anonymous structs using closure-inspired syntactic +sugar as an alternative to a more verbose local struct declaration. As with +closures, trailing syntax is supported. +> +> While Swift has often been called a protocol-oriented language it still lacks +some features necessary to facilitate protocol-oriented library designs in +practice. One missing feature is syntactic support for ad-hoc, single-use +conformances on par with the expressivity that closures provide for ad-hoc, +single-use functions. +> +> Local type declarations involve a lot of syntactic ceremony that is +unnecessary for singe-use types. This ceremony includes a name, explicit +protocol conformance declarations, and fully written declarations for all +members. In addition to the ceremony of the local type declaration itself, use +of the type requires explicit instantiation, which may itself be verbose if +there are several stored properties to initialize. ### Finally From 4ade8aa9abb247d8505654414e0ab061e6d265af Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 19 Dec 2019 20:42:18 +0100 Subject: [PATCH 237/589] Run bundle update --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f3ab88c8..907cc743 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.1) + activesupport (6.0.2.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -106,7 +106,7 @@ GEM octokit (~> 4.0) public_suffix (~> 3.0) typhoeus (~> 1.3) - html-pipeline (2.12.2) + html-pipeline (2.12.3) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) From ecdbb65d97ad8f2d43bd9e7fd990c00ae00c6fe8 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 19 Dec 2019 21:57:02 +0100 Subject: [PATCH 238/589] Publish 150 Closes #489 --- _drafts/2019-12-19-issue-150.md | 79 ----------- _posts/2019-12-19-issue-150.md | 224 ++++++++++++++++++++++++++++++++ 2 files changed, 224 insertions(+), 79 deletions(-) delete mode 100644 _drafts/2019-12-19-issue-150.md create mode 100644 _posts/2019-12-19-issue-150.md diff --git a/_drafts/2019-12-19-issue-150.md b/_drafts/2019-12-19-issue-150.md deleted file mode 100644 index 167330ff..00000000 --- a/_drafts/2019-12-19-issue-150.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -layout: post -title: ! 'Issue #150' -author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -150!!! - - - -{% include sponsor.html %} - -### Starter tasks - -- [SR-11892](https://bugs.swift.org/browse/SR-11892) [Compiler] Suggest -inheriting `NSObject` instead of providing stubs for `NSObjectProtocol` -- [SR-11900](https://bugs.swift.org/browse/SR-11900) [Compiler] `swift help` -doesn't work -- [SR-11902](https://bugs.swift.org/browse/SR-11902) [Compiler] Improve Error -Message for Auto-synthesized `Equatable` Conformance on Classes - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -[Matthew Johnson](https://twitter.com/anandabits) pitched [a proposal](https://forums.swift.org/t/anonymous-structs/31424) -to introduce anonymous structs. - -> This proposal introduces anonymous structs using closure-inspired syntactic -sugar as an alternative to a more verbose local struct declaration. As with -closures, trailing syntax is supported. -> -> While Swift has often been called a protocol-oriented language it still lacks -some features necessary to facilitate protocol-oriented library designs in -practice. One missing feature is syntactic support for ad-hoc, single-use -conformances on par with the expressivity that closures provide for ad-hoc, -single-use functions. -> -> Local type declarations involve a lot of syntactic ceremony that is -unnecessary for singe-use types. This ceremony includes a name, explicit -protocol conformance declarations, and fully written declarations for all -members. In addition to the ceremony of the local type declaration itself, use -of the type requires explicit instantiation, which may itself be verbose if -there are several stored properties to initialize. - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2019-12-19-issue-150.md b/_posts/2019-12-19-issue-150.md new file mode 100644 index 00000000..ce89b812 --- /dev/null +++ b/_posts/2019-12-19-issue-150.md @@ -0,0 +1,224 @@ +--- +layout: post +title: ! 'Issue #150' +author: btb +--- + +One. Five. Zero. One hundred and fifty. 150 issues! What an awesome milestone +for this project, and fitting as the last issue in 2019 (this was accidental, +I swear!) + +My gratitude to none other than Jesse Squires first and foremost, for starting +this project and keeping it going up until issue 100. Thank you to Kristaps +Grinbergs for helping out behind the scenes over the last months, as well as +writing a few issues. Thanks to [all other authors](/authors) and those people +helping behind the scenes for everything. You are the ones making this +newsletter possible! + +Lastly, thank you all dearly for reading and sharing the newsletter! When I +took over this project from Jesse, I did so for two main reasons: I wanted to +keep up to date with what's going on with Swift, and have the possibility to +share that with all others interested as well. And I feel that has worked out +quite splendidly! Looking forward to continuing the journey in the next year. + +And with that said, before we jump into the news from over the last two weeks, +I want to wish you all a great end of 2019. + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-11900](https://bugs.swift.org/browse/SR-11900) [Compiler] `swift help` +doesn't work +- [SR-11905](https://bugs.swift.org/browse/SR-11905) [Compiler] Objective-C +interop allows creation of undefined behavior +- [SR-11918](https://bugs.swift.org/browse/SR-11918) [Compiler] Reject the +combination of `-enable-testing` and `-enable-library-evolution` + +### News and community + +[Tanner Nelson](https://twitter.com/tanner0101) announced [Vapor 4](https://forums.swift.org/t/whats-new-in-vapor-4/31832), +the fourth major release of the web framework for Swift! 🥳 + +[Paul Hudson](https://twitter.com/twostraws) announced [Swift for Good](https://www.swiftforgood.com), +a book covering 20 Swift topics written by 20 writers, with all revenue going +to charity! + +[Bruno Rocha](https://twitter.com/rockthebruno) wrote [a blog post](https://swiftrocks.com/how-optionset-works-inside-the-swift-compiler.html) +on how `OptionSet` works inside the Swift compiler. + +### Commits and pull requests + +[Ankit Aggarwal](https://twitter.com/aciidb0mb3r) merged [a pull request](https://github.com/apple/swift-package-manager/pull/2468) +that allows building and using the `swiftpm` binary that was built using +`swiftpm`. + +[Rintaro Ishizaki](https://twitter.com/rintaro) opened [a pull request](https://github.com/apple/swift/pull/28727) +that would allow for faster code completion by re-using the compiler instance +in SourceKit. Neat! + +[Erik Eckstein](https://github.com/eeckstein) merged [a pull request](https://github.com/apple/swift/pull/28407) +that allows a first pass at cross-module optimization, allowing generic +specialization across packages without manual `@inlinable` annotations. + +### Accepted proposals + +[SE-0268](https://github.com/apple/swift-evolution/blob/master/proposals/0268-didset-semantics.md): *Refine `didSet` Semantics* was [accepted](https://forums.swift.org/t/accepted-se-0268-refine-didset-semantics/31822). + +> The proposal has been accepted [as it was originally proposed](https://github.com/apple/swift-evolution/blob/35537af5e63a140c93521d78fdac3c9e2d9ad349/proposals/0268-didset-semantics.md), +prior to the second review. +> +> The change overall received considerable support, despite being +semantic-breaking in rare cases. Being able to make mutations in-place is an +important performance win and one that many current users might already be +expecting. +> +> The second review proposed a small alteration to the original proposal: to +warn on implicit use of `didSet`, because in the original review some reviewers +felt that accessing the implicit parameter in the body of the function +resulting in the fetching behavior could be harmful, so proposed a deprecation +warning to be silenced by adding the argument explicitly. During the second +review, it became clear that the feeling of most commenters was that the +increased verbosity (and new warnings) did not justify the change. The core +team agrees with the feedback, and so has accepted the original proposal. + +### Proposals in review + +[SE-0270](https://github.com/apple/swift-evolution/blob/master/proposals/0270-rangeset-and-collection-operations.md): *Add Collection Operations on Noncontiguous Elements* is [under review](https://forums.swift.org/t/se-0270-review-2-add-collection-operations-on-noncontiguous-elements/31653). + +> The proposal was returned for revision in order to investigate splitting it +into smaller pieces. Nate Cook, the proposal author, has chosen to make several +revisions, the most significant of which is to remove several sets of methods; +you can see the raw difference [here](https://github.com/apple/swift-evolution/commit/d61957df1af9fb283da8c0b3108dbea5e3f3b732). +The Core Team has elected to run a review of the proposal as revised rather +than sending it back into the pitch phase. +> +> It sometimes happens with re-reviews that the Core Team has substantively +approved parts of the proposal and is asking the community to provide feedback +on specific revisions. That is not the case here because the Core Team did not +feel like it received a strong signal on the core proposal. Accordingly, please +consider this to be a de novo review and provide feedback on the full proposal. + +[SE-0272](https://github.com/apple/swift-evolution/blob/master/proposals/0272-swiftpm-binary-dependencies.md): *Package Manager Binary Dependencies* is [under review](https://forums.swift.org/t/se-0272-review-2-package-manager-binary-dependencies/31668). + +> SwiftPM currently supports source-only packages for several languages, and +with a very proscriptive build model which considerably limits exactly how the +compilation of the source can be performed. While this makes packages consistent +and to some extent "simple", it limits their use in several important cases: +> +> - Software vendors who wish to provide easy integration with the package +manager, but do not deliver source code, cannot integrate. +> - Existing code bases which would like to integrate "simply" with SwiftPM, but +require more complicated build processes, have no recourse. +> +> For example, consider these use cases: +> +> - Someone wants to create a Swift package for +generating [LLVM](https://llvm.org) code. However, LLVM's build process is +far more complex than can be currently fit into SwiftPM's build model. This +makes building an *easy to use* package difficult. +> - A third-party wants to provide a Swift SDK for easily integrating their +service with server-side Swift applications. The SDK itself relies on +substantial amounts of internal infrastructure the company does not want to +make available as open source. +> - A large company has an internal team which wants to deliver a Swift package +for use in their iOS applications, but for for business reasons cannot publish +the source code. +> +> This proposal defines a new SwiftPM feature to allow SwiftPM to accept some +forms of "binary packages". This proposal is intentionally written to +address the above use cases *explicitly*, it **does not** define a general +purpose "binary artifact" mechanism intended to address other use cases (such as +accelerating build performance). + +[SE-0273](https://github.com/apple/swift-evolution/blob/master/proposals/0273-swiftpm-conditional-target-dependencies.md): *Package Manager Conditional Target Dependencies* is [under review](https://forums.swift.org/t/se-0273-package-manager-conditional-target-dependencies/31667). + +> This proposal introduces the ability for Swift package authors to +conditionalize target dependencies on platform and configuration with a similar +syntax to the one introduced in +[SE-0238](0238-package-manager-build-settings.md) for build settings. This +gives developers more flexibility to describe complex target dependencies to +support multiple platforms or different configuration environments. +> +> This proposal resolves two use cases that the current version of the Package +Manager doesn't support very well. In the first scenario, packages that span +multiple platforms may need to depend on different libraries depending on the +platform, as can be the case for low-level, platform-specific code. In a second +scenario, packages may want to link against libraries only in certain +configurations, for example when importing debug libraries, which do not make +sense to build and link in release builds, or when importing instrumentation +logic, which only make sense in release builds when the developer can not +benefit from debugging. +> +> This proposal attempts to bring solutions to those use cases by allowing +package authors to define under what build environments dependencies need to be +built and linked against targets. + +### Swift Forums + +[Joe Groff](https://twitter.com/jckarter) shared [some insights](https://forums.swift.org/t/generic-type-metadata-prespecialization/31659) +on generic type metadata prespecialization. + +> One source of memory and performance overhead in Swift code is the +instantiation and fetching of type metadata. Even though generic specialization +eliminates the need for type metadata in most fully-specialized code, we still +need the metadata in many frequently-occurring situations: +> +> - Objects always need their class metadata, which serves as the "isa" pointer +with the object's method table and other dynamic metadata. +> - When putting a value inside an existential box, the type metadata for the +value's type is stored in the box to represent its dynamic type. +> - When calling into unspecialized code, type metadata for the generic type +arguments has to be formed. Code may remain unspecialized because it crosses +ABI boundaries or is invoked via dynamic reflection. + +[Tom Doron](https://twitter.com/TomerDoron) shared [the Swift Server Work Group December 12th meeting notes](https://forums.swift.org/t/december-12th-2019/31735). + +> Ian Partridge and Chris Bailey let the group know that following a review by +IBM of its open source priorities, it has been decided that they will not be +continuing to work on Swift in 2020. As a result, they are both standing down +from the workgroup. +> +> Ian Partridge will work to hand over responsibilities for the Swift Docker +images and suggested a potential new owner from the community. + +[Ben Cohen](https://twitter.com/AirspeedSwift) pitched [a proposal](https://forums.swift.org/t/pitch-modify-accessors/31872) +to make Swift’s modify accessors a public feature. + +> We propose the introduction of a new keyword, `modify`, for implementing +mutable computed properties and subscripts, alongside the current `get` and +`set`. +> +> The bodies of `modify` implementations will be coroutines, and they will +introduce a new contextual keyword, `yield`, that will be used to yield a value +to be modified back to the caller. Control will resume after the `yield` when +the caller returns. +> +> This `modify` feature is currently available (but not supported) from Swift +5.0 as `_modify`, for experimentation purposes when reviewing this proposal. + +[Matthew Johnson](https://twitter.com/anandabits) pitched [a proposal](https://forums.swift.org/t/anonymous-structs/31424) +to introduce anonymous structs. + +> This proposal introduces anonymous structs using closure-inspired syntactic +sugar as an alternative to a more verbose local struct declaration. As with +closures, trailing syntax is supported. +> +> While Swift has often been called a protocol-oriented language it still lacks +some features necessary to facilitate protocol-oriented library designs in +practice. One missing feature is syntactic support for ad-hoc, single-use +conformances on par with the expressivity that closures provide for ad-hoc, +single-use functions. +> +> Local type declarations involve a lot of syntactic ceremony that is +unnecessary for singe-use types. This ceremony includes a name, explicit +protocol conformance declarations, and fully written declarations for all +members. In addition to the ceremony of the local type declaration itself, use +of the type requires explicit instantiation, which may itself be verbose if +there are several stored properties to initialize. + +### Finally + +A ["funny" Swift thing](https://twitter.com/slava_pestov/status/1206398538743193600). From e9b791e03d36b463ade99214beea82d658fafb73 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 19 Dec 2019 22:05:20 +0100 Subject: [PATCH 239/589] Update sponsorship.md --- sponsorship.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index c3825b49..f5ec61e2 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -40,12 +40,12 @@ Sponsored Links should be relevant to the Swift programming community. To sponso

    Examples of previous sponsors: -Issue #53, -Issue #56, Issue #60, Issue #63, Issue #75, -Issue #76 +Issue #76, +Issue #139, +Issue #148

    @@ -56,12 +56,25 @@ Sponsored Links should be relevant to the Swift programming community. To sponso


    -

    Availability 2019

    +

    Availability 2020

    |   Issue |   Status | |:-|:-| -| December 5 | Open | -| December 19 | Open | +| January 16 | Open | +| January 30 | Open | +| February 13 | Open | +| February 27 | Open | +| March 12 | Open | +| March 26 | Open | +| April 9 | Open | +| April 23 | Open | +| May 7 | Open | +| May 21 | Open | +| June 4 | Open | +| June 18 | Open | +| July 2 | Open | +| July 16 | Open | +| July 30 | Open | {: class="table table-striped table-bordered"}
    From f9c01b4aa09821b06c80133a49962a16153a3487 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 19 Dec 2019 22:08:48 +0100 Subject: [PATCH 240/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index f5ec61e2..22864159 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -75,7 +75,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso | July 2 | Open | | July 16 | Open | | July 30 | Open | -{: class="table table-striped table-bordered"} +{: class="table table-bordered"}
    From 1286516bfd0b596ef6c363c7fe271306d6843b73 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 2 Jan 2020 19:54:43 +0100 Subject: [PATCH 241/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 22864159..886985c2 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,800 subscribers and over 8,500 followers on Twitter. +There are over 3,800 subscribers and over 8,600 followers on Twitter.

    Sponsored Links

    From 3c1d612fe41cfa4ed209337ccaba70813f556fef Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 6 Jan 2020 23:46:44 +0100 Subject: [PATCH 242/589] Update Gemfile.lock --- Gemfile.lock | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 907cc743..f05177e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,11 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.2.1) + activesupport (5.2.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - zeitwerk (~> 2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) claide (1.0.3) @@ -49,7 +48,7 @@ GEM ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) - faraday (0.17.1) + faraday (0.17.3) multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) @@ -234,14 +233,15 @@ GEM no_proxy_fix (0.1.2) nokogiri (1.10.7) mini_portile2 (~> 2.4.0) - octokit (4.14.0) + octokit (4.15.0) + faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (3.1.1) rb-fsevent (0.10.3) - rb-inotify (0.10.0) + rb-inotify (0.10.1) ffi (~> 1.0) rouge (3.13.0) ruby-enum (0.7.2) @@ -261,10 +261,9 @@ GEM thread_safe (0.3.6) typhoeus (1.3.1) ethon (>= 0.9.0) - tzinfo (1.2.5) + tzinfo (1.2.6) thread_safe (~> 0.1) unicode-display_width (1.6.0) - zeitwerk (2.2.2) PLATFORMS ruby From be5629283bff469fdb1728b481bfcc152da4238e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 7 Jan 2020 10:06:45 +0100 Subject: [PATCH 243/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 886985c2..86108534 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -63,7 +63,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso | January 16 | Open | | January 30 | Open | | February 13 | Open | -| February 27 | Open | +| February 27 | **Reserved** | | March 12 | Open | | March 26 | Open | | April 9 | Open | From 43277d32b7154f137a8dae5132284b5cb07b643f Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 7 Jan 2020 10:46:07 +0100 Subject: [PATCH 244/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 86108534..b4295d02 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -63,7 +63,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso | January 16 | Open | | January 30 | Open | | February 13 | Open | -| February 27 | **Reserved** | +| February 27 | **Booked** | | March 12 | Open | | March 26 | Open | | April 9 | Open | From 757e5ac98c5631a06ac0469709fa4e67f1db57f9 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 7 Jan 2020 10:47:36 +0100 Subject: [PATCH 245/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index b4295d02..f62cc55e 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -63,7 +63,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso | January 16 | Open | | January 30 | Open | | February 13 | Open | -| February 27 | **Booked** | +| February 27 | **Booked** | | March 12 | Open | | March 26 | Open | | April 9 | Open | From ae55e046821ccbe1cd99f35e242589041c55a16c Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 15 Jan 2020 20:25:24 +0100 Subject: [PATCH 246/589] Update Gemfile.lock --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f05177e5..5723c554 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -52,7 +52,7 @@ GEM multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) - ffi (1.11.3) + ffi (1.12.1) forwardable-extended (2.6.0) gemoji (3.0.1) git (1.5.0) @@ -227,7 +227,7 @@ GEM jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.13.0) + minitest (5.14.0) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) From aa1cdd594985c95ae99cb6d5f9d0186ecd8297b7 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 15 Jan 2020 22:34:31 +0100 Subject: [PATCH 247/589] Issue 151 (#491) * First Issue 151 draft * Added another funny * Remove sponsor * Added some PRs and stuff from Github issue * Added new stuff from Github issue * Updated for review * Fix filename * Grammar and new SE in review * Moving to posts * Review pass * Move back to drafts Co-authored-by: Kristaps Grinbergs --- _drafts/2020-01-16-issue-151.md | 146 ++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 _drafts/2020-01-16-issue-151.md diff --git a/_drafts/2020-01-16-issue-151.md b/_drafts/2020-01-16-issue-151.md new file mode 100644 index 00000000..9f64f4f1 --- /dev/null +++ b/_drafts/2020-01-16-issue-151.md @@ -0,0 +1,146 @@ +--- +layout: post +title: ! 'Issue #151' +author: fassko +--- + +The holidays are over and during that time a lot has happened. + +* Swift 5.2 nightly builds are now [available](https://swift.org/download/#snapshots) +* folks have discussed and compared [Swift and C++](https://www.quora.com/What-are-similarities-and-differences-between-C-and-Swift) +* a book about Swift by Swift community members and creator of Swift [Chris Lattner](https://twitter.com/clattner_llvm) was [released](https://www.swiftforgood.com/) — and all proceeds go to charity! + +But now let's enjoy the news! + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-11989](https://bugs.swift.org/browse/SR-11989) Better diagnostic for invalid `enclosing self` property wrapper subscript +- [SR-12005](https://bugs.swift.org/browse/SR-12005) [Compiler] Add a smaller test case for AudioKit crash in 5.1 +- [SR-12022](https://bugs.swift.org/browse/SR-12022) [Compiler] Refactor `LiteralExpr` subclasses to combine common initializer code paths + +### Podcasts + +In [episode 83 of Swift Unwrapped](https://spec.fm/podcasts/swift-unwrapped/314852), Jesse and JP discuss Modify Accessors. + +In [Swift by Sundell #63](https://swiftbysundell.com/podcast/61/), [John Sundell](https://twitter.com/johnsundell), [Donny Wals](https://twitter.com/DonnyWals) and [Antoine van der Lee](https://twitter.com/twannl) talk about how Swift has changed in 2019, and where things might be headed in 2020. + +In [Empower Apps #34](https://www.empowerapps.show/34), [Leo Dion](https://twitter.com/leogdion) and [Tim Condon](https://twitter.com/0xtim) discuss Server-Side Swift and the Vapor Web Framework. + +### News and community + +[Xcode 11.3.1](https://developer.apple.com/documentation/xcode_release_notes/xcode_11_3_1_release_notes) was released. It included some improvements, like: + +* inspection of global variables in Swift +* reduced the size of dependency files (`.d`) produced by the Swift compiler. + +[John Sundell](https://twitter.com/johnsundell) shared a great article about [the decade of Swift](https://www.swiftbysundell.com/articles/the-decade-of-swift) and [announced](https://twitter.com/johnsundell/status/1211743896591568899) a static site generator built specifically for Swift developers called [Publish](https://github.com/johnsundell/publish). + +Sad news that Vapor Cloud will be shutting down on February 29th, but there are many good [alternatives](https://twitter.com/leogdion/status/1214179319318220802). + +[Joe Duffy](https://www.twitter.com/Joe_Duffy) wrote [a blog post](https://josephduffy.co.uk/partial-in-swift) about the tool [Partial](https://github.com/JosephDuffy/Partial) - a type-safe wrapper that mirrors the properties of the wrapped type but makes each property optional. + +[Always Right Institute](https://www.twitter.com/ar_institute) wrote [a tutorial](https://www.alwaysrightinstitute.com/microexpress-nio2/) on SwiftNIO 2. + +[Slava Pestov](https://twitter.com/slava_pestov) shared [some insights](https://twitter.com/slava_pestov/status/1215126454767357959?s=21) on how the lines of code in `CSDiag.cpp` have decreased between Swift versions. + +### Commits and pull requests + +[Doug Gregor](https://twitter.com/dgregor79) made [a pull request](https://github.com/apple/swift/pull/28515) that he's calling [a little side project](https://twitter.com/dgregor79/status/1215897492568494080?s=21) and it is coming in at 11x faster than the existing implementation for scanning the dependencies of a Swift file. + +[Rintaro Ishizaki](https://twitter.com/rintaro) merged [a pull request](https://github.com/apple/swift/pull/29086) that improves code completion when using `GenericSignature` methods to get `associatedtype` requirements. + +[Cory Benfield](https://twitter.com/Lukasaoz) created [a pull request](https://github.com/apple/swift/pull/29094) that adds `withContiguousStorageIfAvailable` to `SubString.UTF8View` in the Standard Library. This pull request also has a [second part](https://github.com/apple/swift/pull/29146). + +[Erik Eckstein](https://github.com/eeckstein) created [a pull request](https://github.com/apple/swift/pull/29068) that has some code size improvements for `Array` in the Standard Library. + +[Doug Gregor](https://twitter.com/dgregor79) made [a work-in-progress pull request](https://github.com/apple/swift/pull/29133) that has a refactoring/reimplementation of function builders to [make handling declarations possible](https://twitter.com/dgregor79/status/1216137755102568448?s=21). + +### Accepted proposals + +[SE-0273](https://github.com/apple/swift-evolution/blob/master/proposals/0273-swiftpm-conditional-target-dependencies.md): *Package Manager Conditional Target Dependencies* was [accepted](https://forums.swift.org/t/accepted-se-0273-package-manager-conditional-target-dependencies/31932). + +> Feedback was positive, and the proposal is accepted. Thanks to everyone who +participated! + +[SE-0272](https://github.com/apple/swift-evolution/blob/master/proposals/0273-swiftpm-conditional-target-dependencies.md): *Package Manager Binary Dependencies* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0272-package-manager-binary-dependencies/31926). + +> Feedback was sparse, but we had generally positive feedback during the first +round of review. Therefore the proposal has been accepted with modifications, +local binary targets will not be able to reference zipped artifacts. + +### Proposals in review + +[SE-0274](https://github.com/apple/swift-evolution/blob/master/proposals/0274-magic-file.md): *Concise Magic File Names* is [under review](https://forums.swift.org/t/se-0274-concise-magic-file-names/32373). + +> Today, `#file` evaluates to a string literal containing the full path to the current source file. We propose to instead have it evaluate to a human-readable string containing the filename and module name, while preserving the existing behavior in a new `#filePath` expression. +> +> Swift-evolution thread: [Concise Magic File Names](https://forums.swift.org/t/concise-magic-file-names/31297), [We need `#fileName`](https://forums.swift.org/t/we-need-filename/19781) + +[SE-0275](https://github.com/apple/swift-evolution/blob/0c709d72bcda5946b02067745c87217a7e3c48c8/proposals/0275-allow-more-characters-like-whitespaces-and-punctuations-for-escaped-identifiers.md): *Allow more characters (like whitespaces and punctuations) for escaped identifiers* is [under review](https://forums.swift.org/t/se-0275-allow-more-characters-like-whitespaces-and-punctuations-for-escaped-identifiers/32538). + +> Swift has a beautiful concise yet expressive syntax. As part of that, escaped identifiers are adopted to allow usage of reserved keywords. This proposal wants to extend the character allowance for escaped identifiers with more Unicode scalars, like whitespace and punctuation. It will enable to have method names (or other identifiers) with a more readable and natural language like the following: +> +> `func test validation should succeed when input is less than ten ()` + +[SE-0276](https://github.com/apple/swift-evolution/blob/master/proposals/0276-multi-pattern-catch-clauses.md): *Multi-Pattern Catch Clauses* is [under review](https://forums.swift.org/t/se-0276-multi-pattern-catch-clauses/32620). + +> Currently, each catch clause in a do-catch statement may only contain a single pattern and where clause. This is inconsistent with the behavior of cases in switch statements, which provide similar functionality. It also makes some error handling patterns awkward to express. This proposal extends the grammar of catch clauses to support a comma-separated list of patterns (with optional where clauses), resolving this inconsistency. +> +> Swift-evolution thread: [Thread](https://forums.swift.org/t/multi-pattern-and-conditionally-compiled-catch-clauses/30246) + +### Swift Forums + +[Steven Prichard](https://github.com/spprichard) explained his personal experience with [Open API Tools & Swift](https://forums.swift.org/t/open-api-tools-swift-personal-experience/31962). + +> I recently began a personal project in which I wanted to use Kubernetes (K8s) & Swift. To get started I created a library that was going to house all the K8s types, and the HTTP Client for communicating with the K8s API. With the goal of importing this library into all the other projects I had planned. Lucky enough for me, K8s uses the OpenAPI Spec, so generating the client code should be easy. I was mistaken, for Swift that is not the case. Specifically for any Swift client that you wanted to run on Linux. At the time of writing this, there did not exist a Swift Client that the Open-API code generation tool could generate that could be ran on Linux. I had concluded, with the help of others, that if I wanted a Pure-Swift Kubernetes library that could be ran on Linux I would have to write the HTTP Client code myself. + +[Gor Gyolchanyan](https://twitter.com/_technogen_) pitched an idea about [passing custom getter and setters to a property wrapper initializer](https://forums.swift.org/t/passing-custom-getter-and-setter-to-property-wrapper-initializer/32000). + +> A lot of use cases for property wrappers (like SwiftUI's `@Binding` or a simple `@Lazy`) rely on custom accessor closures of the form `() -> WrappedValue` and `(WrappedValue) -> Void` for the getter and the setter respectively. To that end, I'd like to suggest an improvement to the property wrapper mechanism to help improve the readability of such use cases. + +[Sergej Jaskiewicz](https://twitter.com/broadway_lamb) shared a proposal to [handle future cases of enums in libraries without binary stability concerns](https://forums.swift.org/t/pitch-handling-future-cases-of-enums-in-libraries-without-binary-stability-concerns/32026). + +> [SE-0192](https://github.com/apple/swift-evolution/blob/master/proposals/0192-non-exhaustive-enums.md) introduced a mechanism to add new cases to enums defined in the standard library and overlays in a source-compatible way. [SE-0260](https://github.com/apple/swift-evolution/blob/master/proposals/0260-library-evolution.md) later lifted this restriction, allowing to use this mechanism in all libraries built in library evolution mode. +> +> We propose to remove this restriction completely by: +> +> * allowing all library authors to mark their public enums as @frozen; +> * warning the clients that exhaustively switch over a non-frozen enum declared in another module, * suggesting them to add an @unknown default case. + + +[Steve K. Chiu](https://forums.swift.org/u/steve_k_chiu) [pitched](https://forums.swift.org/t/pitch-property-as-fallback-shortcut-to-self-property/32060) how to make `self.property` more readable at the point of use. + +> The motivation is pretty much the same as [SE-0009](https://github.com/apple/swift-evolution/blob/master/proposals/0009-require-self-for-accessing-instance-members.md) +> +> That is, we need a shorter form of self.property that is more readable at the point of use. +> +> The idea is: +> +> Add fallback lookup for identifier starts with single `_` (ex. \_name), if the identifier is not a local variable, member property or global variable, then treat it as self.(identifier without `_`) (ex. self.name) + +[MasterSwift](https://forums.swift.org/u/MasterSwift) shared a [comparison](https://forums.swift.org/t/swift-benchmarks/32113) between Swift and Java. + +> I once a while check Swift benchmarks against other languages to see how the language is speeding. +> +> Why is Swift so awful in Regex and Binary Trees? + +[Wildchild9](https://forums.swift.org/u/wildchild9) described an [idea](https://forums.swift.org/t/adding-a-linkedlist-type-to-the-standard-library/32339) to add a `LinkedList` type to the Standard Library. + +> Swift is missing a great many data types (see [Adding more data structures to the standard library](https://forums.swift.org/t/adding-more-data-structures-to-the-standard-library/23651)). I thought I may be able to get this going with suggesting the introduction of a `LinkedList` type to Swift. + +Alejandro Alonso pitched [a proposal](https://forums.swift.org/t/tuples-conform-to-equatable/32559) and [implementation](https://github.com/apple/swift/pull/28833) introducing `Equatable` conformance for all tuples whose elements are themselves `Equatable`. + +> Tuples in Swift currently lack the ability to conform to protocols. This has led many users to stop using tuples altogether in favor of structures that they can them conform protocols to. The shift from tuples to structures have made tuples almost feel like a second class type in the language because of them not being able to do simple operations that should just work. + +### Finally + +Two things from [Joe Groff](https://twitter.com/jckarter): + +* [Politics and Swift](https://twitter.com/jckarter/status/1208134014961274880) +* Are Playgrounds [radical](https://twitter.com/jckarter/status/1211787829652512768)? + +[Are we remote yet](https://twitter.com/slava_pestov/status/1214632943953551361)? From d25fdd964c5a7ef0b6329ece830bf84fe4bd35ea Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 15 Jan 2020 22:36:47 +0100 Subject: [PATCH 248/589] Remove examples for proposal updates; prefer using the script I created `proposal.rb` to simplify this! --- CONTRIBUTING.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ef0c77fb..860f6b23 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -120,12 +120,6 @@ We encourage all writes to use their own voice and express their own personality * For the *"Commits and pull requests"* section use the format: `PERSON did ACTION`. * **Example:** *"Chris Lattner opened a pull request for a prototype of async/await."* -* For "Proposals in review" use the format: `SE-NNNN: TITLE by AUTHOR is under review`. - * **Example:** [SE-0185](https://github.com/apple/swift-evolution/blob/master/proposals/0185-synthesize-equatable-hashable.md): *Synthesizing Equatable and Hashable conformance* by Tony Allevato is [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2017-August/000397.html). - -* For "Accepted proposals", "Rejected Proposals", etc. use the format: `SE-NNNN: TITLE was STATUS`. - * **Example:** [SE-0150](https://github.com/apple/swift-evolution/blob/master/proposals/0150-package-manager-branch-support.md): Package Manager Support for branches was [accepted](https://lists.swift.org/pipermail/swift-evolution-announce/2017-February/000315.html). - ## 🕵️‍♀️ Evaluating [Swift Forum](https://swift.org/community/#forums) content Not all forum discussions are important and valuable enough to be listed in the newsletter. There can be a lot of noise and bikeshedding that simply is not relevant to readers — or ideas are not solid enough. Try to avoid these and focus on "big picture" ideas and discussions pertinent to current or future proposals. From a404c400457a818fd3c01c8ef70932143fd5676f Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 15 Jan 2020 22:37:29 +0100 Subject: [PATCH 249/589] We are, in fact, sending emails again --- CONTRIBUTING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 860f6b23..54a3a41e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -142,11 +142,9 @@ New issues should be pushed to `master` **before noon** Pacific Time, preferably 3. Make sure everything looks good. :ok_hand: 4. Submit a [pull request][prLink] or push to `master`. :tada: -### ~~Emails~~ +### Emails -~~Emails are automatically sent via Mailchimp's [RSS-to-Email](https://mailchimp.com/features/rss-to-email/) feature. **Publishing too late (*at or after* noon PST) will prevent emails from being sent.** If emails fail to send on Thursday at noon PST, Mailchimp will retry on Friday at noon PST.~~ - -> ⚠️ **Warning:** we currently are not sending emails. This section is here for historical reasons. +Emails are automatically sent via Mailchimp's [RSS-to-Email](https://mailchimp.com/features/rss-to-email/) feature. **Publishing too late (*at or after* noon PST) will prevent emails from being sent.** If emails fail to send on Thursday at noon PST, Mailchimp will retry on Friday at noon PST. ### Tweets From 7355409d01951a83be0f2eab12589842f05d4a7e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 16 Jan 2020 18:03:30 +0100 Subject: [PATCH 250/589] Publish issue 151 (#492) * Publish issue 151 * Update gems * Check if prose exists * Comment out for now * Check if there are files to lint? * Disable back checking prose Co-authored-by: Kristaps Grinbergs --- Dangerfile | 2 +- Gemfile.lock | 6 ++++-- {_drafts => _posts}/2020-01-16-issue-151.md | 0 3 files changed, 5 insertions(+), 3 deletions(-) rename {_drafts => _posts}/2020-01-16-issue-151.md (100%) diff --git a/Dangerfile b/Dangerfile index 38867bfd..8816eba3 100644 --- a/Dangerfile +++ b/Dangerfile @@ -36,4 +36,4 @@ prose.ignored_words = [ "libdispatch", "XCTest", "SourceKit", "CMake", "SIL", "ABI", "llbuild", "CoreFoundation", "Swift.org", "WWDC", "@objc" ] -prose.lint_files +# prose.lint_files diff --git a/Gemfile.lock b/Gemfile.lock index 5723c554..040cb4a5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,11 +1,12 @@ GEM remote: https://rubygems.org/ specs: - activesupport (5.2.4.1) + activesupport (6.0.2.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) + zeitwerk (~> 2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) claide (1.0.3) @@ -263,7 +264,8 @@ GEM ethon (>= 0.9.0) tzinfo (1.2.6) thread_safe (~> 0.1) - unicode-display_width (1.6.0) + unicode-display_width (1.6.1) + zeitwerk (2.2.2) PLATFORMS ruby diff --git a/_drafts/2020-01-16-issue-151.md b/_posts/2020-01-16-issue-151.md similarity index 100% rename from _drafts/2020-01-16-issue-151.md rename to _posts/2020-01-16-issue-151.md From 5cd139f931e69881ad42e5afafc482d8d0dc267a Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs Date: Thu, 16 Jan 2020 19:23:40 +0200 Subject: [PATCH 251/589] Enable back parsing prose (#493) --- Dangerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dangerfile b/Dangerfile index 8816eba3..38867bfd 100644 --- a/Dangerfile +++ b/Dangerfile @@ -36,4 +36,4 @@ prose.ignored_words = [ "libdispatch", "XCTest", "SourceKit", "CMake", "SIL", "ABI", "llbuild", "CoreFoundation", "Swift.org", "WWDC", "@objc" ] -# prose.lint_files +prose.lint_files From c96bf5216c5550b9175332c0f6d750c89e0ec48b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 25 Jan 2020 21:33:33 +0100 Subject: [PATCH 252/589] Update Gemfile.lock --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 040cb4a5..3e93b12d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,7 +57,7 @@ GEM forwardable-extended (2.6.0) gemoji (3.0.1) git (1.5.0) - github-pages (203) + github-pages (204) github-pages-health-check (= 1.16.1) jekyll (= 3.8.5) jekyll-avatar (= 0.7.0) @@ -66,7 +66,7 @@ GEM jekyll-default-layout (= 0.1.4) jekyll-feed (= 0.13.0) jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.12.1) + jekyll-github-metadata (= 2.13.0) jekyll-mentions (= 1.5.1) jekyll-optional-front-matter (= 0.3.2) jekyll-paginate (= 1.1.0) @@ -143,8 +143,8 @@ GEM jekyll (>= 3.7, < 5.0) jekyll-gist (1.5.0) octokit (~> 4.2) - jekyll-github-metadata (2.12.1) - jekyll (~> 3.4) + jekyll-github-metadata (2.13.0) + jekyll (>= 3.4, < 5.0) octokit (~> 4.0, != 4.4.0) jekyll-mentions (1.5.1) html-pipeline (~> 2.3) @@ -247,7 +247,7 @@ GEM rouge (3.13.0) ruby-enum (0.7.2) i18n - rubyzip (2.0.0) + rubyzip (2.1.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) @@ -280,4 +280,4 @@ DEPENDENCIES octokit BUNDLED WITH - 2.0.2 + 2.1.2 From 28b15a4b1076d7d35d232cc5207b14b1e267911e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sat, 25 Jan 2020 21:37:53 +0100 Subject: [PATCH 253/589] Draft update References #494 --- _drafts/2020-01-30-issue-152.md | 140 ++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 _drafts/2020-01-30-issue-152.md diff --git a/_drafts/2020-01-30-issue-152.md b/_drafts/2020-01-30-issue-152.md new file mode 100644 index 00000000..55199c23 --- /dev/null +++ b/_drafts/2020-01-30-issue-152.md @@ -0,0 +1,140 @@ +--- +layout: post +title: ! 'Issue #152' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +[Ted Kremenek](https://twitter.com/tkremenek) shared [an update](https://forums.swift.org/t/on-the-road-to-swift-6/32862) +on the road to Swift 6, with many interesting insights. If there's one thing +you're going to pick up from this issue, it should be this — it's a great read. +Some things mentioned: + +- Faster builds +- More informative and accurate diagnostics +- Reliable and fluid debugging experience +- Provide excellent solutions for major language features such as memory +ownership and concurrency +- Significantly improve the performance of incremental builds +- Improve code completion performance, reliability, and experience + +Like I said; you're going to want to give this a read. + +[JP Simard](https://twitter.com/simjp) created a poll [about the oldest Swift version people are actively using](https://twitter.com/simjp/status/1218613429881040897); +a quite surprisingly high amount (to me) is pretty up-to-date with the latest +Swift versions! + +[George Barnett](https://twitter.com/glbrntt) released [SwiftNIO 2.13.0](https://github.com/apple/swift-nio/releases/tag/2.13.0). + +### Commits and pull requests + +[Pavel Yaskevich](https://twitter.com/pyaskevich) merged [a pull request](https://github.com/apple/swift/pull/28837) +that is a big step toward improving type inference for closures over time. + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +[SE-0270](https://github.com/apple/swift-evolution/blob/master/proposals/0270-rangeset-and-collection-operations.md): *Add Collection Operations on Noncontiguous Elements* is [under a third review](https://forums.swift.org/t/se-0270-review-3-add-collection-operations-on-noncontiguous-elements/32839). + +> We can use a `Range` to refer to a group of consecutive positions in a +collection, but the standard library doesn't currently provide a way to refer +to discontiguous positions in an arbitrary collection. I propose the addition +of a `RangeSet` type that can represent any number of positions, along with +collection algorithms that operate on those positions. +> +> There are varied uses for tracking multiple elements in a collection, such as +maintaining the selection in a list of items, or refining a filter or search +result set after getting more input from a user. +> +> The Foundation data type most suited for this purpose, `IndexSet`, uses +integers only, which limits its usefulness to arrays and other random-access +collection types. The standard library is missing a collection that can +efficiently store ranges of indices, and is missing the operations that you +might want to perform with such a collection. These operations themselves can +be challenging to implement correctly, and have performance traps as well — see +last year's [Embracing Algorithms](https://developer.apple.com/videos/wwdc/2018/?id=223) +WWDC talk for a demonstration. + +### Swift Forums + +[Frederick Kellison-Linn](https://twitter.com/jumhyn) pitched [a proposal](https://forums.swift.org/t/allow-chained-member-references-in-implicit-member-expressions/32829) +to allow chained member references in implicit member expressions. + +> I propose that we extend implicit member syntax (a.k.a. "leading dot syntax") +to allow for chained member references rather than just a single level. +> +> When the type of an expression is implied by the context, Swift allows +developers to use what is formally referred to as an "implicit member +expression", sometimes referred to as "leading dot syntax": + +```swift +class C { + static let zero = C(0) + var x: Int + + init(_ x: Int) { + self.x = x + } +} + +func f(_ c: C) { + print(c.x) +} + +f(.zero) // prints '0' +``` + +> However, attempting to use this with a chain of member references fails: + +```swift +extension C { + var incremented: C { + return C(self.x + 1) + } +} + +f(.zero.incremented) // Error: Type of expression is ambiguous without more context +``` + +> On master, the new diagnostic system has improved the produced error: + +```swift +f(.zero.incremented) // Error: Cannot infer contextual base in reference to member 'zero' +``` + +> but the same problem persists. + +### Finally + +[#nofilter](https://twitter.com/jckarter/status/1217861938136276993). From 40a76192badbdea8237bcaa9a27b87f9338299db Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 30 Jan 2020 14:30:57 +0100 Subject: [PATCH 254/589] Update Gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3e93b12d..7ecd4029 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -280,4 +280,4 @@ DEPENDENCIES octokit BUNDLED WITH - 2.1.2 + 2.1.4 From 78b3e1a6c6bbe1b56ef4944a7ef210d8957e44cd Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 30 Jan 2020 14:31:05 +0100 Subject: [PATCH 255/589] Add a missing link --- _posts/2019-09-12-issue-143.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2019-09-12-issue-143.md b/_posts/2019-09-12-issue-143.md index d19db909..9b4e87a9 100644 --- a/_posts/2019-09-12-issue-143.md +++ b/_posts/2019-09-12-issue-143.md @@ -108,7 +108,7 @@ against the oft-proposed "prefix operator" syntax. You can find the full proposal [here](https://github.com/gwynne/swift-evolution/blob/splat-proposal/proposals/NNNN-forward-array-to-variadic-args.md). -[Owen Voorhees]() pitched [a proposal](https://forums.swift.org/t/pitch-extended-error-messages/28754) +[Owen Voorhees](https://twitter.com/owenvoorhees) pitched [a proposal](https://forums.swift.org/t/pitch-extended-error-messages/28754) to extend the capabilities of error messages. > As a follow up from [Future of Diagnostics UX](https://forums.swift.org/t/future-of-diagnostics-ux/28178) From 91be494bcf5f789dc0693242f691c49d25d37d70 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 30 Jan 2020 14:31:10 +0100 Subject: [PATCH 256/589] Finish 152 --- _drafts/2020-01-30-issue-152.md | 184 +++++++++++++++++++++++++++++--- 1 file changed, 168 insertions(+), 16 deletions(-) diff --git a/_drafts/2020-01-30-issue-152.md b/_drafts/2020-01-30-issue-152.md index 55199c23..aa3a4751 100644 --- a/_drafts/2020-01-30-issue-152.md +++ b/_drafts/2020-01-30-issue-152.md @@ -2,14 +2,14 @@ layout: post title: ! 'Issue #152' author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO --- -> TODO: intro comments +I think I don't have to mention much more than that a lot of fantastic +information on the distant future of Swift has been shared in the last two +weeks: the road to Swift 6, progress on the Function Builders proposal, and +more. 🎉🎉🎉 + +This is a big issue with lots of interesting topics being discussed! @@ -17,11 +17,10 @@ sponsor: ### Starter tasks -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +- [SR-12085](https://bugs.swift.org/browse/SR-12085) [Compiler] Clean up +`TypeCheckType` so it never returns `Type()` +- [TF-1107](https://bugs.swift.org/browse/TF-1107) [Autodiff] Add JVPs to +standard library ### News and community @@ -44,6 +43,11 @@ Like I said; you're going to want to give this a read. a quite surprisingly high amount (to me) is pretty up-to-date with the latest Swift versions! +[Mattt](https://twitter.com/mattt) announced [`swift-doc`](https://twitter.com/mattt/status/1221863163915694085), +an (experimental) command-line utility for generating documentation for Swift +projects. One of the distinguishing features of `swift-doc` is that it operates +on Swift code at a syntactic level, without first compiling it. + [George Barnett](https://twitter.com/glbrntt) released [SwiftNIO 2.13.0](https://github.com/apple/swift-nio/releases/tag/2.13.0). ### Commits and pull requests @@ -51,20 +55,77 @@ Swift versions! [Pavel Yaskevich](https://twitter.com/pyaskevich) merged [a pull request](https://github.com/apple/swift/pull/28837) that is a big step toward improving type inference for closures over time. -### Accepted proposals +[Doug Gregor](https://twitter.com/dgregor79) merged a bunch of pull requests: + +- [#29331](https://github.com/apple/swift/pull/29331) is a large refactor he's +been doing on-and-off for a while. By itself it has no user-visible effect, +but it's the building block to make function builders more powerful and +expressive. +- [#29409](https://github.com/apple/swift/pull/29409) makes supporting multiple +conditions for `if` statements within function builder closures a +straightforward generalization of the refactored code. This would have required +some gross hackery with the old implementation of function builders. +- [#29419](https://github.com/apple/swift/pull/29419) adds support for +`if #available` within function builders. -> TODO +All this is part of a much larger effort to improve function builders, and +[this post](https://forums.swift.org/t/function-builders-implementation-progress/32981) +explains this effort further. -### Returned proposals +### Accepted proposals -> TODO +[SE-0276](https://github.com/apple/swift-evolution/blob/master/proposals/0276-multi-pattern-catch-clauses.md): *Multi-Pattern Catch Clauses* was [accepted](https://forums.swift.org/t/accepted-se-0276-multi-pattern-catch-clauses/33220). + +> Feedback was almost universally positive, and the proposal has been accepted! +Thank you to everyone who participated in the review process. ### Rejected proposals -> TODO +[SE-0275](https://github.com/apple/swift-evolution/blob/master/proposals/0275-allow-more-characters-like-whitespaces-and-punctuations-for-escaped-identifiers.md): *Allow more characters (like whitespaces and punctuations) for escaped identifiers* was [rejected](https://forums.swift.org/t/se-0275-allow-more-characters-like-whitespaces-and-punctuations-for-escaped-identifiers/32538/46). + +> The core team has decided to reject this proposal. Community reaction was +mixed, and many of the people both supporting and rejecting the idea had +concerns about the breadth of the set of characters this allows. Allowing more +characters in identifiers would also add complexity to tooling, including +syntax highlighting, IDEs, and runtime reflection libraries, which would need +to be able to recognize quoted identifiers, know when identifiers would need +to be quoted for presentation purposes, and potentially need to implement more +elaborate parsing and escaping rules to handle these generalized identifiers. +In the core team's judgment, this added demand on tooling is not justified by +the amount of utility provided by the proposal. ### Proposals in review +[SE-0274](https://github.com/apple/swift-evolution/blob/master/proposals/0274-magic-file.md): *Concise magic file names* is [under a second review](https://forums.swift.org/t/re-review-se-0274-concise-magic-file-names/33171). + +> The original review thread concluded with the core team accepting the +proposal in principal: `#file` will be updated to include only the file and +module names, with `#filePath` introduced for use cases that require the full +path to the file. +> +> However, during the review it was proposed that the exact format of `#file` +be specified, in order to allow for future tooling to rely on that format to +determine the file and module name from the string. +> +> The proposal has been amended to explicitly include this format, and this +re-review is focused on that aspect of the proposal. + +> **Changes since the first review** +> +> - We now specify that the `#file` string will have the format +`/` (with a second form for future expansion) and +discuss how to parse it. The previous revision left this format as a compiler +implementation detail that tools should always treat as opaque. +> - We now discuss the behavior of `#sourceLocation`'s `file` parameter and +provide for a warning when it creates conflicts. The previous revision did not +discuss these topics. +> - We now mention the need for tooling to map `#file` strings back to paths. +> - We now provide for a warning when a wrapper around a `#filePath`-defaulting +function passes it `#file` instead, or vice versa. The previous revision did +not discuss this. +> - We have added several suggestions from the first review to the +"alternatives considered" section to explain why we aren't proposing them. + [SE-0270](https://github.com/apple/swift-evolution/blob/master/proposals/0270-rangeset-and-collection-operations.md): *Add Collection Operations on Noncontiguous Elements* is [under a third review](https://forums.swift.org/t/se-0270-review-3-add-collection-operations-on-noncontiguous-elements/32839). > We can use a `Range` to refer to a group of consecutive positions in a @@ -135,6 +196,97 @@ f(.zero.incremented) // Error: Cannot infer contextual base in reference to memb > but the same problem persists. +[Yuta Koshizawa](https://twitter.com/koher) pitched [a proposal](https://forums.swift.org/t/three-steps-to-variadic-generics/33154): +Three Steps to Variadic Generics. + +> Variadic generics was referred to in "[On the road to Swift 6](https://forums.swift.org/t/on-the-road-to-swift-6/32862)". +I think it may be a good idea to break down it into the following three steps +compared to tackle variadic generics directly. +> +> 1. Operations for tuples +> 2. Variadic tuples +> 3. Variadic generics + +[Fabian Fett](https://twitter.com/fabianfett) announced [official platform support for other Linux +Distributions](https://forums.swift.org/t/official-platform-support-for-other-linux-distributions-and-a-case-for-amazon-linux-2/33167) +(besides Ubuntu). + +> The SSWG announced that they are looking for other Linux Distributions +besides Ubuntu to support official prebuilt toolchains for in [their yearly +update](https://swift.org/blog/sswg-update/). +> +> After some research the only documented way I found to engage in widening the +platform support is by [administering a Jenkins slave](https://github.com/apple/swift-community-hosted-continuous-integration) +that builds Swift on a given platform as part of the Community-CI effort.
    +Sadly administering such a slave comes with at least a monetary burden (besides +time and security). +> +> For this reason I want to ask: What will the process be to become an +officially supported platform? If there is no process planned so far maybe we +can start a discussion here. + +[Rahul Malik](https://twitter.com/rmalik) pitched [a proposal](https://forums.swift.org/t/swiftpm-support-for-swift-scripts/33126) +to add SwiftPM support for Swift scripts. + +> Swift is a general-purpose language that aims expand it's availability and +impact on various domains and platforms. We believe great scripting support and +experience is an important part of improving the impact of Swift as a language. +Swift already includes basic support for scripting via the Swift command-line +tool. This is a proposal for greatly improving the script support by providing +a deeper integration with the Swift Package Manager. + +[Steve Canon](https://twitter.com/stephentyrone) pitched [a proposal](https://forums.swift.org/t/add-float16/33019) +to add `Float16`. + +> Introduce the `Float16` type conforming to the `BinaryFloatingPoint` and +`SIMDScalar` protocols, binding the IEEE 754 *binary16* format (aka *float16*, +*half-precision*, or *half*), and bridged by the compiler to the C `_Float16` +type. + +[David Hart](https://twitter.com/dhartbit) pitched [a proposal](https://forums.swift.org/t/package-manager-localized-resources/32963) +to add Localized Resources to the Swift Package Manager. + +> This proposal builds on top of the [Package Manager Resources](https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md) +proposal to allow defining localized versions of resources in the SwiftPM +manifest and have them automatically accessible at runtime using the same APIs. + +[Nikhil Pandey](https://forums.swift.org/u/nikhilpandey4) pitched [a proposal](https://forums.swift.org/t/more-push-towards-distribution-and-promotion-of-the-server-side-swift-framework/32931) +for a push towards distribution and promotion of the Server Side Swift +Framework. + +> Lots of efforts are being made for creation of new frameworks and creating +new libraries since last few years for making Swift on Server Side a real +success, which is commendable. Let's also accept the fact that Server Side +Swift is also something which requires cooperation and support of wider +developer community outside Apple ecosystem too, especially on Linux side and, +so cooperation with external developers is also a requirement. +> +> A time has come for putting efforts also towards promotion and distribution +of Server Side Swift too. + +[Owen Voorhees](https://twitter.com/owenvoorhees) shared [an update](https://forums.swift.org/t/swift-driver-and-help-documentation-lookup/32881) +on `swift-driver` and `–help` / documentation lookup. + +> In short, I think we should consider adding writing a `swift-help` in Swift +as part of the `swift-driver` project, and use it to entirely replace help +handling in the compiler sooner rather than later. The benefits are: +> +> - We'd gain experience integrating a Swift package product in compiler +toolchains with minimal impact on day-to-day development. Anything we learned +could then be applied to `swift-driver` later on. No bootstrapping would be +needed since the help text isn't needed to build the compiler. +> - `swift help` becomes a supported subcommand +> - It solves my immediate problem (admittedly not a strong justification) +> - We could delete a little bit of C++ from the frontend :) + +[Nevin](https://forums.swift.org/u/nevin) pitched [a proposal](https://forums.swift.org/t/set-only-subscripts/32858) +to add support for set-only subscripts. + +> Currently, subscripts can be read-only or they can be read-write, but there +is no way to declare a subscript as write-only. Write-only subscripts have a +number of important uses, and this proposal aims to bring them into the +language. + ### Finally [#nofilter](https://twitter.com/jckarter/status/1217861938136276993). From 20e8c6cee5e06da30ba48c2777eb696c30bb0d3e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 30 Jan 2020 18:03:48 +0100 Subject: [PATCH 257/589] Publish 152 (#495) --- {_drafts => _posts}/2020-01-30-issue-152.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-01-30-issue-152.md (100%) diff --git a/_drafts/2020-01-30-issue-152.md b/_posts/2020-01-30-issue-152.md similarity index 100% rename from _drafts/2020-01-30-issue-152.md rename to _posts/2020-01-30-issue-152.md From deca94615019304f3c3de247ca8fa4cc3c697de0 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2020 09:04:03 -0800 Subject: [PATCH 258/589] Bump octokit from 4.15.0 to 4.16.0 (#498) Bumps [octokit](https://github.com/octokit/octokit.rb) from 4.15.0 to 4.16.0. - [Release notes](https://github.com/octokit/octokit.rb/releases) - [Changelog](https://github.com/octokit/octokit.rb/blob/4-stable/RELEASE.md) - [Commits](https://github.com/octokit/octokit.rb/compare/v4.15.0...v4.16.0) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7ecd4029..5f202f9b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -234,7 +234,7 @@ GEM no_proxy_fix (0.1.2) nokogiri (1.10.7) mini_portile2 (~> 2.4.0) - octokit (4.15.0) + octokit (4.16.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) From d5bc37ad72fa181b0dcbc3b985f4056c1e7116a4 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Thu, 6 Feb 2020 09:05:07 -0800 Subject: [PATCH 259/589] Use default community health files (#497) * Delete CODE_OF_CONDUCT.md * Delete CONTRIBUTING.md * Update README.md --- CODE_OF_CONDUCT.md | 46 ------------ CONTRIBUTING.md | 170 --------------------------------------------- README.md | 4 +- 3 files changed, 2 insertions(+), 218 deletions(-) delete mode 100644 CODE_OF_CONDUCT.md delete mode 100644 CONTRIBUTING.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index de206d7a..00000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# *Swift Weekly Brief* Contributor Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team leads [Bas](https://twitter.com/BasThomas) or [Jesse](https://www.jessesquires.com/contact/). The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]. - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 54a3a41e..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,170 +0,0 @@ -# Contributing to *Swift Weekly Brief* - -*Contributions are welcome and encouraged!* - -Please review and abide by [our code of conduct](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/CODE_OF_CONDUCT.md). - -You should have a good understanding of how [Jekyll](http://jekyllrb.com) and [GitHub-Pages](https://pages.github.com) work — or be willing to learn. :smile: We are happy to help you with any questions, just ask. - -**Suggestions:** Have something you want to share in the newsletter? Please find [the current issue notes](https://github.com/SwiftWeekly/swiftweekly.github.io/issues?q=is%3Aissue+is%3Aopen+label%3A%22current+issue%22) and add a comment. Or you can [open an issue][issueLink] or [submit a pull request][prLink] to the [current draft](https://github.com/SwiftWeekly/swiftweekly.github.io/tree/master/_drafts) with a link and description. - -**Fixes:** Spelling, grammar, or code. Please [open an issue][issueLink] or [submit a pull request][prLink]! - -## ⚙️ Setup and process - -1. Add yourself to [`_data/authors.yml`](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/_data/authors.yml), if you haven't already. Please provide: - - A username to reference for the site - - Your name - - GitHub username - - Twitter username -1. Run the [`new_draft.sh`](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/new_draft.sh) script to generate an issue template in `_drafts/`. See the example below. -1. Open an issue on GitHub. Set the title to the newsletter issue number and date. -**Example:** `[100] Issue #100 - Jan 04, 2018` -1. Assign it to yourself. -1. Add the [`current issue` and `full issue notes`](https://github.com/SwiftWeekly/swiftweekly.github.io/issues?utf8=✓&q=is%3Aissue+label%3A%22current+issue%22+label%3A%22full+issue+notes%22+) labels. -1. We use this throughout the week to collect notes and make it easy for external contributors to contribute content. We also use this issue to collaborate with the other [Swift Weekly writers](https://swiftweekly.github.io/authors/) and troubleshoot any problems that come up. -1. Write the issue in `_drafts/` throughout the week. We recommend writing a little each day to make it easier. -1. For style and content, see the guide below. Also, follow the example set by previous issues. -1. **For code snippets, use jekyll highlight blocks:** -```jekyll -{% highlight swift %} - -// swift code here - -{% endhighlight %} -``` - -> 💡 **Note:** See the handy tips below! - -### Generating a draft - -Example: - -```bash -# usage: ./new_draft.sh - -$ ./new_draft.sh 2016-04-21 19 jsq - -# creates _drafts/2016-04-21-issue-19.md -``` - -### Generating a GitHub issue - -To generate a GitHub access token, see the [GitHub docs](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/). - -Example: - -```bash -# usage: export SWIFTWEEKLY_TOKEN= - -$ export SWIFTWEEKLY_TOKEN=access_token - -# usage: ruby ./github_issue_generator.rb --number= --date= - -$ ruby ./github_issue_generator.rb --number=1 --date='December 6, 2015' - -# more options and help: - -$ ruby ./github_issue_generator.rb --help -``` - -### Boilerplate for proposal updates - -You can generate the boilerplate (eg. `SE-NNNN is under review`) with the -`proposal.rb` script. - -Example: - -```bash -# usage: ruby ./proposal.rb url-to-proposal url-to-forums status -# in which status is one of 'accepted', 'returned', 'rejected' or 'review'. - -$ ruby ./proposal.rb https://github.com/apple/swift-evolution/blob/master/proposals/0231-optional-iteration.md https://forums.swift.org/t/rejected-se-0231-optional-iteration/17805 rejected - -# generates the following: - -# [SE-0231](https://github.com/apple/swift-evolution/blob/master/proposals/0231-optional-iteration.md) was [rejected](https://forums.swift.org/t/rejected-se-0231-optional-iteration/17805). -``` - -### Preview the site locally, with drafts - -```bash -$ bundle exec jekyll build --future --drafts - -# -- or -- - -$ bundle exec jekyll serve --future --drafts --watch -``` - -## 📝 Writing style guide - -We encourage all writes to use their own voice and express their own personality in their writing. This is what makes a great issue. - -*Some guidelines on writing style:* - -* All content must align with [Our Standards](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/CODE_OF_CONDUCT.md#our-standards), outlined in the Code of Conduct. Language must be welcoming, inclusive, respectful, etc. - -* Maintain an overall positive tone. We want to avoid being overly negative. However, this *does not* mean we should not be critical. Constructive criticism is valid and should be presented in non-aggressive way. - -* Use simple past tense. This is simpler and easier to read, flows better, and is particularly easier for ESL readers. **Example:** - * Do this: *"Chris Lattner wrote a manifesto."* ✅ - * Not this: *"A manifesto was written by Chris Lattner."* ❌ - -* Avoid jargon and abbreviations when possible. - * **Example:** use *pull request* rather than *PR* - * **Example:** write *for example* rather than *e.g.* - -* Avoid contractions if possible. Again, this is easier to read, especially for ESL readers. - * **Example:** use *do not* rather than *don't*. - -* For the *"Commits and pull requests"* section use the format: `PERSON did ACTION`. - * **Example:** *"Chris Lattner opened a pull request for a prototype of async/await."* - -## 🕵️‍♀️ Evaluating [Swift Forum](https://swift.org/community/#forums) content - -Not all forum discussions are important and valuable enough to be listed in the newsletter. There can be a lot of noise and bikeshedding that simply is not relevant to readers — or ideas are not solid enough. Try to avoid these and focus on "big picture" ideas and discussions pertinent to current or future proposals. - -Some good indications on whether or not a discussion is worth including: -* There is a lot of activity and replies. -* The Core Team or broader Swift team has responded positively. -* The Core Team or broader Swift team is highly engaged in the discussion. - -> 💡 **Note:** This does not mean that discussions without these characteristics are not worth mentioning. These are simply a few guidelines. - -# 📰 Publishing an issue - -> 💡 **Note:** We publish *every other Thursday*. - -New issues should be pushed to `master` **before noon** Pacific Time, preferably around 10 or 11 a.m. if possible. Pushing early allows us to catch and fix any last minute errors. If there are any problems, contact [Bas](https://twitter.com/BasThomas) or [Jesse](https://www.jessesquires.com/contact/). - -1. When ready to publish, move the `.md` file from `_drafts/` to the `_posts/` directory. -2. Run `jekyll build` on your local copy to preview. -3. Make sure everything looks good. :ok_hand: -4. Submit a [pull request][prLink] or push to `master`. :tada: - -### Emails - -Emails are automatically sent via Mailchimp's [RSS-to-Email](https://mailchimp.com/features/rss-to-email/) feature. **Publishing too late (*at or after* noon PST) will prevent emails from being sent.** If emails fail to send on Thursday at noon PST, Mailchimp will retry on Friday at noon PST. - -### Tweets - -Tweets from [@swiftlybrief](https://twitter.com/swiftlybrief) are automated via [IFTTT](https://ifttt.com). - -## 🎢 Continuous integration - -We use [travis-ci](https://travis-ci.org/SwiftWeekly/swiftweekly.github.io), [danger](http://danger.systems), and [proselint](http://proselint.com) (via [danger-prose](https://github.com/dbgrandi/danger-prose)). This ensures: - -- We're always pushing valid markdown and `jekyll` can build the site. -- We write elegant prose — no grammar/spelling mistakes, and no offensive or unwelcoming language. See the [`Dangerfile`](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/Dangerfile) for more details. - -## 💡Tips - -- Watch all of the main [Apple repositories](https://github.com/apple). -- Follow the prominent [contributors](https://github.com/orgs/apple/people) on GitHub and Twitter. -- Monitor and follow discussions on the [Swift Forums](https://forums.swift.org), and configure your notification settings. -- Starter tasks: check [this filter](https://bugs.swift.org/issues/?filter=10451). -- When in doubt, refer to previous issues for examples. -- Keep a draft running throughout the week, add a little bit of content each day. - -[issueLink]:https://github.com/SwiftWeekly/swiftweekly.github.io/issues/new -[prLink]:https://github.com/SwiftWeekly/swiftweekly.github.io/compare diff --git a/README.md b/README.md index 696f1563..cd4cdc62 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,11 @@ $ bundle exec jekyll serve --future --drafts --watch ## Contributing -To contribute, please read our [Contributing Guide](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/CONTRIBUTING.md). +To contribute, please review our [Contributing Guide](https://github.com/SwiftWeekly/.github/blob/master/CONTRIBUTING.md). ## Conduct -Please read our [Code of Conduct](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/CODE_OF_CONDUCT.md). Violations will not be tolerated and will result in immediate removal or blocking from the organization. +Please read our [Code of Conduct](https://github.com/SwiftWeekly/.github/blob/master/CODE_OF_CONDUCT.md). Violations will not be tolerated and will result in immediate removal or blocking from the organization. ## License From 6034d916e7aa0ab56374a508892aeaec4bb6d39d Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs Date: Thu, 13 Feb 2020 17:49:40 +0200 Subject: [PATCH 260/589] Issue 153 (#499) * Enable back parsing prose * Issue 153 first draft * New stuff from Github issue * Intro comments and new stuff from issue * Added Swift Community podcast * Rename file correctly and style changes * Corrections from Jesse * Added couple of new things from issue * Added starter tasks and new PR. Removed empty sections. * Remove sponsor * Update 2020-02-13-issue-153.md * Update 2020-02-13-issue-153.md * Update 2020-02-13-issue-153.md * Fixed link * Move to posts Co-authored-by: Bas Broek --- _posts/2020-02-13-issue-153.md | 115 +++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 _posts/2020-02-13-issue-153.md diff --git a/_posts/2020-02-13-issue-153.md b/_posts/2020-02-13-issue-153.md new file mode 100644 index 00000000..eedc2903 --- /dev/null +++ b/_posts/2020-02-13-issue-153.md @@ -0,0 +1,115 @@ +--- +layout: post +title: ! 'Issue #153' +author: fassko +--- + +The last two weeks were rather busy at Apple. A new [Xcode 11.4 beta](https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_beta_release_notes), [Swift Crypto](https://github.com/apple/swift-crypto) library releases and making [Swift Playgrounds](https://developer.apple.com/news/?id=02122020a) available for Mac. + +On top of that, the Swift repository now has more than [100,000 commits](https://twitter.com/slava_pestov/status/1227438709416628224)! + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-12129](https://bugs.swift.org/browse/SR-12129) `swift-driver` fails to diagnose a lack of input files +- [TF-1134](https://bugs.swift.org/browse/TF-1134) [Autodiff] [Stlib] Define derivatives for `Float` and `Double` maximum and minimum methods + +### Podcasts + +In [episode 84 of Swift Unwrapped](https://spec.fm/podcasts/swift-unwrapped/316012), [Jesse](https://twitter.com/jesse_squires) and [JP](https://twitter.com/simjp) discuss Swift in 2020. + +In [episode 7 of the Swift Community Podcast](https://www.swiftcommunitypodcast.org/episodes/7), [Tim Condon](https://twitter.com/0xTim) talks with [Kaitlin Mahar](https://twitter.com/k__mahar), [Siemen Sikkema](https://twitter.com/siemensikkema), [Tanner Nelson](https://twitter.com/tanner0101) and [Ian Partridge](https://twitter.com/alfa) about the current state of Swift on the server, and what the future might have in store. + +### News and community + +Xcode 11.4 beta is out with Swift 5.2, which has a ton of compiler performance and quality of life improvements, including the new diagnostic engine, [tweeted](https://twitter.com/jckarter/status/1225148705814106112) [Joe Groff](https://twitter.com/jckarter). + +[Cory Benfield](https://twitter.com/Lukasaoz) released [Swift Crypto](https://github.com/apple/swift-crypto) at [dotSwift](https://www.dotswift.io/) conference [stage](https://twitter.com/NicoonGuitar/status/1224376366092767233). He wrote an [article](https://swift.org/blog/crypto/) on the Swift.org website. As well some folks started a [discussion](https://forums.swift.org/t/native-implementations-and-boringssl-backed-apple-platform-deployments/33404). + +> Swift Crypto is a new Swift package that brings the fantastic APIs of [Apple CryptoKit](https://developer.apple.com/documentation/cryptokit) to the wider Swift community. This will allow Swift developers, regardless of the platform on which they deploy their applications, to access these APIs for a common set of cryptographic operations. + +Apple released [Swift Playgrounds for Mac](https://developer.apple.com/news/?id=02122020a) - making it fun to learn and experiment with code. Previously it was available only for iPad. + +The release of Swift 5.1.4 for Linux was [announced](https://forums.swift.org/t/announcing-swift-5-1-4-for-linux/33443). New downloads are available on [swift.org](https://swift.org/download/#swift-514). Official Docker images are also available. +Later [Johannes Weiss](https://twitter.com/johannesweiss) [informed](https://forums.swift.org/t/development-open-for-swift-5-1-5-for-linux/33744) that development is now open for Swift 5.1.5 for Linux. + +[Ole Begemann](https://twitter.com/olebegemann) wrote two great articles. One about [automatic test discovery in Swift on Linux](https://oleb.net/2020/swift-test-discovery/) and another on [how to test Swift packages on Linux using Docker](https://oleb.net/2020/swift-docker-linux/). + +[John Sundell](https://twitter.com/johnsundell) wrote an [article](https://www.swiftbysundell.com/articles/slicing-swift-collections/) explaining slicing Swift Collections. + +[Antoine van der Lee](https://twitter.com/twannl) explained in his [blog post](https://www.avanderlee.com/swift/creating-swift-package-manager-framework/) how to create the Swift Package framework in Xcode. + +[The Point-Free](https://twitter.com/pointfreeco) folks [announced](https://twitter.com/pointfreeco/status/1224742851537514497) a library called [CasePaths](https://github.com/pointfreeco/swift-case-paths) that brings the power and ergonomics of key paths to enums. + +[Alejandro tweeted](https://twitter.com/aalonso128/status/1224694162055999493) that Swift nightly builds are now available on [swift.godbolt.org](https://swift.godbolt.org/). Godbolt is a compiler explorer tool. + +[Paul Hudson](https://twitter.com/twostraws) [tweeted](https://twitter.com/twostraws/status/1225207234185121793) that [whatsnewinswift.com](https://www.whatsnewinswift.com/?from=5.1&to=5.2) now covers Swift 5.2 and other changes between the versions. +Along with that, he released a tool called [Sitrep](https://github.com/twostraws/Sitrep) that is a source code analyzer for Swift projects, giving you a high-level overview of your code. + +[Mattt](https://twitter.com/mattt) wrote two awesome articles about [Language Server Protocol](https://nshipster.com/language-server-protocol/) and [Swift Development with Visual Studio Code](https://nshipster.com/vscode/). + +[Johannes Weiss](https://twitter.com/johannesweiss) [tweeted](https://twitter.com/johannesweiss/status/1227646148237824001) that [AsyncHTTPClient version 1.1.0](https://github.com/swift-server/async-http-client/releases/tag/1.1.0) has been released. + +### Commits and pull requests + +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/29579) that fixes `computeSelfParam()` to respect `__consuming` on class methods. + +He also [tweeted](https://twitter.com/slava_pestov/status/1223394327340019717): + +> Dodged an ABI bullet here. Underscored keyword was broken... but thankfully the broken case wasn’t exercised in the standard library + +[Tim](https://github.com/tbkka) opened [a pull request] that overhauls `swift_dynamicCast`. [David Smith](https://twitter.com/Catfish_Man) [tweeted](https://twitter.com/Catfish_Man/status/1225136680039899136): + +> Swift's runtime casting infrastructure has been… "scary and organic" I guess? For quite a while. This rewrites it to be properly structured, and cleans up a ton of edge case behavior in the process. + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/29786) which adds function builders support for declaring local variables within a function builder closure. + +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/26975) where he and [CodaFi](https://twitter.com/CodaFi_) were able to fix the remaining cases where name lookup in imported types would force loading _all_ the members of a type or extension in order to find a _single_ member. + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/29728) that makes it easy to extend Swift function builders to support local `let`'s. + +> Sink the constraint generation and solution application of initialization patterns, including all +of the logic for property wrappers, from the high-level entry point +`typeCheckBinding` down into the lower-level handling for +solution application targets. + +### Accepted proposals + +[SE-0270](https://github.com/apple/swift-evolution/blob/master/proposals/0270-rangeset-and-collection-operations.md): *Add Collection Operations on Noncontiguous Elements* was [accepted](https://forums.swift.org/t/accepted-se-0270-add-collection-operations-on-noncontiguous-elements/33270). See the discussions [here](https://forums.swift.org/t/evolution-process-discussion/33272). + +> We can use a `Range` to refer to a group of consecutive positions in a collection, but the standard library doesn't currently provide a way to refer to discontiguous positions in an arbitrary collection. I propose the addition of a `RangeSet` type that can represent any number of positions, along with collection algorithms that operate on those positions. + +### Proposals in review + +[SE-0277](https://github.com/apple/swift-evolution/blob/master/proposals/0277-float16.md): *Float16* is [under review](https://forums.swift.org/t/se-0277-float16/33546). + +>Introduce the `Float16` type conforming to the `BinaryFloatingPoint` and `SIMDScalar` protocols, binding the IEEE 754 *binary16* format (*aka float16, half-precision, or half*), and bridged by the compiler to the C `_Float16` type. +> +> Old pitch thread: [Add `Float16`](https://forums.swift.org/t/add-float16/19370). + +[SE-0274](https://github.com/apple/swift-evolution/blob/master/proposals/0274-magic-file.md): *Concise magic file names* is [under a second review](https://forums.swift.org/t/re-review-se-0274-concise-magic-file-names/33171). + +### Swift Forums + +[Tino Heth](https://forums.swift.org/u/Tino) started an interesting [discussion](https://forums.swift.org/t/jargon-acronyms-vs-accessible-language/33358) about Jargon & acronyms vs. accessible language. + +> When it comes to naming, I think it's best to keep the majority in mind, and not trying to please a very small group by preferring their jargon. An expert may prefer his wording, but would certainly also understand common language easily. + +[Jeffrey Macko](https://twitter.com/jeffreymacko) informed in a [forum thread](https://forums.swift.org/t/support-for-semantic-highlighting-is-moving-on-microsoft-part/33489) that support for semantic highlighting is moving on Microsoft's end. + +[Matt Rips](https://forums.swift.org/u/mattrips) started a [discussion](https://forums.swift.org/t/special-case-protocol-conformance-long-term-tradeoffs-for-near-term-conformance/33544) about special case protocol conformance by explaining long-term tradeoffs for near-term conformance. + +> In short, the original pitch was to create a special-case, compiler-level mechanism to generate Equatable conformance for all tuples whose elements themselves conform to Equatable. The conformance would be automatic, without any means to opt-in or opt-out. +> +> There exists a fairly wide-spread and long-standing desire to enable protocol conformance for tuples and perhaps other structural types, and especially so with respect to ubiquitous protocols, like Equatable, Comparable, Hashable and Codable. Presently, we are not in a position to facilitate custom protocol conformance as a general feature for tuples or other structural types. It is anticipated that that sort of feature will be created, eventually. + +[Taneer Nelson](https://twitter.com/tanner0101) [shared](https://forums.swift.org/t/january-23rd-2020/33715) Swift on Server WorkGroup January 23rd, 2020 meeting notes. And [Tom Doron](https://twitter.com/TomerDoron) February 6th, 2020 meeting [recap](https://forums.swift.org/t/february-6th-2020/33748). + +### Finally + +Should a Swift library [include](https://twitter.com/jesse_squires/status/1224456344792530949) a lot of Swift code? 🤔 + +A small [change](https://github.com/apple/swift/commit/77da6bd3a7c3c2ec02bb0f13e7341cf867cab0d3), but big [impact](https://twitter.com/dgregor79/status/1224537246998487040). 🙃 From f7d420919661a3ea642b70e7b5c49ebf9ad7a42e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 20 Feb 2020 19:20:14 +0100 Subject: [PATCH 261/589] Push 154 draft --- _drafts/2020-02-27-issue-154.md | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 _drafts/2020-02-27-issue-154.md diff --git a/_drafts/2020-02-27-issue-154.md b/_drafts/2020-02-27-issue-154.md new file mode 100644 index 00000000..231556c8 --- /dev/null +++ b/_drafts/2020-02-27-issue-154.md @@ -0,0 +1,61 @@ +--- +layout: post +title: ! 'Issue #154' +author: btb +sponsor: + link: https://nativeconnect.app + heading: NativeConnect is a beautiful desktop client for App Store Connect + body: 'Hey 👋 We are building a Mac app which is 💯 Swift and AppKit
    + 1. View downloads and sales on the same page
    + 2. Edit metadata for multiple languages in batches
    + 3. Manage customer reviews and developer responses
    + 4. All fetched data is stored locally and never leaves your Mac
    + 5. Customers love it ❤️' + displaylink: nativeconnect.app +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From aafd8176843da7abbd4c96e57d24b6fc706be4c8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2020 21:15:26 -0800 Subject: [PATCH 262/589] [Security] Bump nokogiri from 1.10.7 to 1.10.8 (#501) Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.7 to 1.10.8. **This update includes a security fix.** - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.7...v1.10.8) Signed-off-by: dependabot-preview[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5f202f9b..be23ed5d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -232,7 +232,7 @@ GEM multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.10.7) + nokogiri (1.10.8) mini_portile2 (~> 2.4.0) octokit (4.16.0) faraday (>= 0.9) From 88445053f954c2f9e3a98aa277466826d32e6007 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Feb 2020 20:35:57 +0100 Subject: [PATCH 263/589] Run bundle install --- Gemfile.lock | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index be23ed5d..c11592c5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -23,7 +23,7 @@ GEM colorize (0.8.1) commonmarker (0.17.13) ruby-enum (~> 0.5) - concurrent-ruby (1.1.5) + concurrent-ruby (1.1.6) cork (0.3.0) colored2 (~> 3.1) danger (5.16.1) @@ -53,10 +53,11 @@ GEM multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) - ffi (1.12.1) + ffi (1.12.2) forwardable-extended (2.6.0) gemoji (3.0.1) - git (1.5.0) + git (1.6.0) + rchardet (~> 1.8) github-pages (204) github-pages-health-check (= 1.16.1) jekyll (= 3.8.5) @@ -244,10 +245,11 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.10.1) ffi (~> 1.0) + rchardet (1.8.0) rouge (3.13.0) ruby-enum (0.7.2) i18n - rubyzip (2.1.0) + rubyzip (2.2.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) From e5526ec03ec30c2a085fe61c7bbb20d81588fc29 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Feb 2020 21:53:43 +0100 Subject: [PATCH 264/589] Publish 154 Closes #500 --- _drafts/2020-02-27-issue-154.md | 61 --------- _posts/2020-02-27-issue-154.md | 231 ++++++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+), 61 deletions(-) delete mode 100644 _drafts/2020-02-27-issue-154.md create mode 100644 _posts/2020-02-27-issue-154.md diff --git a/_drafts/2020-02-27-issue-154.md b/_drafts/2020-02-27-issue-154.md deleted file mode 100644 index 231556c8..00000000 --- a/_drafts/2020-02-27-issue-154.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -layout: post -title: ! 'Issue #154' -author: btb -sponsor: - link: https://nativeconnect.app - heading: NativeConnect is a beautiful desktop client for App Store Connect - body: 'Hey 👋 We are building a Mac app which is 💯 Swift and AppKit
    - 1. View downloads and sales on the same page
    - 2. Edit metadata for multiple languages in batches
    - 3. Manage customer reviews and developer responses
    - 4. All fetched data is stored locally and never leaves your Mac
    - 5. Customers love it ❤️' - displaylink: nativeconnect.app ---- - -> TODO: intro comments - - - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2020-02-27-issue-154.md b/_posts/2020-02-27-issue-154.md new file mode 100644 index 00000000..46589d79 --- /dev/null +++ b/_posts/2020-02-27-issue-154.md @@ -0,0 +1,231 @@ +--- +layout: post +title: ! 'Issue #154' +author: btb +sponsor: + link: https://nativeconnect.app + heading: NativeConnect is a beautiful desktop client for App Store Connect + body: 'Hey 👋 We are building a Mac app which is 💯 Swift and AppKit
    + 1. View downloads and sales on the same page
    + 2. Edit metadata for multiple languages in batches
    + 3. Manage customer reviews and developer responses
    + 4. All fetched data is stored locally and never leaves your Mac
    + 5. Customers love it ❤️' + displaylink: nativeconnect.app +--- + +I've been keeping myself busy the last two weeks with exciting things going on +at work, and visiting other offices. We've also been hard at work on +preparations for the SwiftAveiro conference, which I'm co-organizing this year. + +All in all, cool stuff going on! + +That said, here's what kept some other people busy these past two weeks... + + + +{% include sponsor.html %} + +### Starter tasks + +- [SR-12247](https://bugs.swift.org/browse/SR-12247) [Compiler] Replace the +type alias `ModuleDecl::ImportedModule` with a dedicated struct +- [SR-12248](https://bugs.swift.org/browse/SR-12248) [TypeChecker] `` +diagnostic location regarding `Codable` derived conformances + +### News and community + +[Dmitri Gribenko](https://github.com/gribozavr) shared [the Swift and C++ interoperability manifesto](https://github.com/apple/swift/blob/master/docs/CppInteroperabilityManifesto.md), summarized +possible design options of this goal. + +[Nate Cook](https://twitter.com/nnnnnnnn) wrote [a blog post](https://swift.org/blog/preview-package/) +on the Swift.org blog, on the newly released Standard Library Preview Package. + +[Slava Pestov](https://twitter.com/slava_pestov) wrote [a blog post](https://swift.org/blog/library-evolution/) +on the Swift.org blog, on Swift's library evolution capabilities. + +[Will Lisac](https://twitter.com/wlisac) open sourced [a project](https://github.com/wlisac/swift-log-slack) +on top of `swift-log` that allows you to send logging messages to Slack. + +### Commits and pull requests + +[Max Desiatov](https://github.com/MaxDesiatov) merged [a pull request](https://github.com/apple/swift/pull/29530), +upstreaming almost a quarter of the huge patch from the [SwiftWasm](https://github.com/swiftwasm) +team, which brings us closer to enabling WebAssembly/[WASI](https://wasi.dev/) +target in the compiler and running Swift code in browsers. + +[David Smith](https://twitter.com/Catfish_Man) merged [a pull request](https://github.com/apple/swift/pull/24303) +that adds the new uninitialized buffer String initializer privately, improving +its performance. + +[Pavel Yaskevich](https://github.com/xedin) merged [a pull request](https://github.com/apple/swift/pull/29906) +mostly finishing the diagnostics engine rewrite, and the people working on the +expression checker are now ready to rip out the old implementation completely! + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/30045) +to add support for patterns in "if" statements for function builders, so one +can use `if-let`, `if-case`, etcetera. + +### Accepted proposals + +[SE-0277](https://github.com/apple/swift-evolution/blob/master/proposals/0277-float16.md): *Float16* was [accepted](https://forums.swift.org/t/accepted-se-0277-float16/34121). + +> The review has concluded and the proposal is accepted. + +[SE-0274](https://github.com/apple/swift-evolution/blob/master/proposals/0274-magic-file.md): *Concise magic file names* was [accepted](https://forums.swift.org/t/accepted-se-0274-concise-magic-file-names/34115). + +> The second review has concluded and the proposal has been accepted. +> +> - `#file` will be altered to only report the module and filename +> - `#filePath` will be introduced to replicate the previous full file+path for +use cases that relied on the path previously. +- While the team acknowledges that this does require some existing workflows to +adapt to the new scheme, the binary size and privacy concerns over implicitly +embedding the full path were significant enough to warrant this change. +> +> During the second review, the format of the new `#file` value was discussed +and will be locked down in a way that users can rely on. The core team expects +future tooling to be created that will allow for easy processing of this value. + +### Proposals in review + +[SE-0278](https://github.com/apple/swift-evolution/blob/master/proposals/0278-package-manager-localized-resources.md): *Package Manager Localized Resources* is [under review](https://forums.swift.org/t/se-0278-package-manager-localized-resources/33950). + +> This proposal builds on top of the [Package Manager Resources](0271-package-manager-resources.md) proposal to allow defining localized versions of resources in the SwiftPM manifest and have them automatically accessible at runtime using the same APIs. + +## Motivation + +> The recently accepted [Package Manager Resources](https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md) +proposal allows SwiftPM users to define resources (images, data file, etc...) +in their manifests and have them packaged inside a bundle to be accessible at +runtime using the Foundation `Bundle` APIs. Bundles support storing different +versions of resources for different localizations and can retrieve the version +which makes most sense depending on the runtime environment, but SwiftPM +currently offers no way to define those localized variants. +> +> While it is technically possible to benefit from localization today by +setting up a resource directory structure that the `Bundle` API expects and +specifying it with a `.copy` rule in the manifest (to have SwiftPM retain the +structure), this comes at a cost: it bypasses any platform-custom processing +that comes with `.process`, and doesn't allow SwiftPM to provide diagnostics +when localized resources are mis-configured. +> +> Without a way to define localized resources, package authors are missing out +on powerful Foundation APIs to have their applications, libraries and tools +adapt to different regions and languages. + +### Swift Forums + +[Saleem Abdulrasool](https://twitter.com/compnerd) shared [that Foundation's full test suite passes on Windows](https://forums.swift.org/t/swift-soars-ever-higher/34036)! + +> I am extremely excited to announce that as of today we have the full test +suite for Foundation passing on Windows as well! Although there are a few tests +which are testing Unix specific behaviors which do not port, this is largely on +parity with the Linux test suite. There are a total of 1706 tests on Windows +that are running with Linux currently having 1714. + +[Yuta Saito](https://twitter.com/kateinoigakukun) shared [an update](https://forums.swift.org/t/wasm-support/16087/14) +on the progress of the WebAssembly compiler target. + +> Now that the swiftwasm project succeeds to pass quite a few tests in its test +suite, we are planning to send some patches to upstream. +> +> Before sending them, I want to confirm and clarify the direction of +supporting WebAssembly. + +[Sergej Jaskiewicz](https://twitter.com/broadway_lamb) shared [an idea](https://forums.swift.org/t/support-building-rust-targets-in-spm/33898) +to add support for Rust targets to the Swift Package Manager. + +> I've just come up with this crazy idea: what if we allow SPM to build Rust +targets? +> +>For now I have the following in mind: +> +> - Obviously, for building Rust targets the rust toolchain has to be installed. +> - We don't use Cargo for building Rust targets, but rather invoke `rustc` +directly. We could allow Swift packages to depend on Cargo packages in the +future, but that seems nontrivial. +> - Rust targets can only depend on other Rust targets. Swift or Clang targets +cannot depend on Rust targets. Why? Because it would require a lot of work. +Later we could allow Rust targets to have the "include" directory just like +Clang targets, which would contain C headers for that target so that the Rust +target could be used from Swift using those headers (just like C++ targets +today can be used from Swift via C headers). + +[Gwynne Raskind](https://twitter.com/_AngeloidBeta) pitched [a proposal](https://forums.swift.org/t/property-wrapper-requirements-in-protocols/33953) +to add property wrapper requirements in protocols. + +> It is sometimes desirable for a protocol to require that a conforming type +use a property wrapper in the declaration of a required property. This allows +consumers of the protocol to access the wrapper's projected value and +properties, not just the wrapped value. +> +> We propose allowing a subset of property wrapper syntax to appear in protocol +declarations. + +[Joe Groff](https://twitter.com/jckarter) shared [an update](https://forums.swift.org/t/update-on-se-0110-and-se-0155/33948) +on SE-0110 and SE-0155. + +> In the Swift 3 era, several source-breaking proposals had been accepted with +the goal of cleaning up and regularizing parts of the language. However, many +of them have been stuck in the "Accepted" but not "Implemented" stage for +quite a while now, because we never quite got , and the barrier for breaking +source compatibility is much higher now than it was in the heady early days of +Swift evolution. As such, the Core Team has started going through some of these +proposals to record their current implementation status and subset out +remaining unimplemented source-breaking changes. To start off, I recently +reviewed the implementation status of two proposals: +> +> - [SE-0110](https://github.com/apple/swift-evolution/blob/master/proposals/0110-distingish-single-tuple-arg.md), Distinguish between single-tuple and multiple-argument function types +> - [SE-0155](https://github.com/apple/swift-evolution/blob/master/proposals/0155-normalize-enum-case-representation.md), Normalize Enum Case Representation +> +> **SE-0110** +> +> This proposal changed the behavior of functions with multiple arguments from +being considered to have one formal argument of tuple type to instead be +treated as formally having multiple arguments. This change has been fully +implemented as of Swift 5.2; however, the [original proposal as reviewed](https://github.com/apple/swift-evolution/blob/9e44932452e1daead98f2bc2e58711eb489e9751/proposals/0110-distingish-single-tuple-arg.md) +did not include the special-case conversion from `(T, U, ...) -> V` to +`((T, U, ...)) -> V` for function arguments. In response to community feedback, +this conversion was added as part of the Core Team's acceptance of the proposal. +> If and when that happens, it will be done as a fresh pitch and proposal. +> +> **SE-0155** +> +> Although unfortunate, the Core Team does not consider it worth breaking +source compatibility to change this behavior. Therefore, the pattern matching +part of the proposal has been downscoped to allow for disambiguation when +multiple cases share a base name, without changing the behavior for existing +enums supported today. + +[Reda Lemeden](https://twitter.com/kaishin) asked [a question](https://forums.swift.org/t/swift-package-naming-conventions/33931) +about Swift Package naming conventions. + +> - Some packages use dash-case (aka kebab-case). Notable examples: +`swift-driver`, `swift-numerics`, `swift-log`, `swift-crypto`, and `swift-nio`. +Other that fall into this group are SSWG packages and the new standard library +preview packages. +> - Some packages use CamelCase. Notable examples: `SwiftPM` itself, +`SourceKitLSP`, and `SwiftSyntax`. Almost all iOS/macOS packages follow this +convention. +> +> I understand if this detail is considered trivial or irrelevant, especially +since package names play a much lesser role compared to other package managers +such as npm. It is also worth noting that this situation is not unique to SPM +and can be found in other ecosystems, such as Rust, where `snake_cased` and +`dash-cased` crate names are both widely used (although the latter is gaining +more momentum). +> +> At the same time, I think that with the eventual introduction of a package +registry (GitHub's or otherwise), these naming inconsistencies are going to +surface to the end user much more than they do today. +> +> Is the absence of SPM package naming guidelines by design? If so, can someone +shed some light on this? +> If it is not, would it make sense to pursue converging towards one +convention? Could it happen organically or should it be enforced on the +manifest level? + +### Finally + +[~~`// FIXME`~~, oops I mean `// FORGIVE ME`](https://twitter.com/danielpunkass/status/1232650866949316608) From 78c11bc2121789a06010b7ec1e07e58a5a203507 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Feb 2020 23:15:26 +0100 Subject: [PATCH 265/589] Update 2020-02-27-issue-154.md --- _posts/2020-02-27-issue-154.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/_posts/2020-02-27-issue-154.md b/_posts/2020-02-27-issue-154.md index 46589d79..8db10a79 100644 --- a/_posts/2020-02-27-issue-154.md +++ b/_posts/2020-02-27-issue-154.md @@ -92,9 +92,6 @@ future tooling to be created that will allow for easy processing of this value. [SE-0278](https://github.com/apple/swift-evolution/blob/master/proposals/0278-package-manager-localized-resources.md): *Package Manager Localized Resources* is [under review](https://forums.swift.org/t/se-0278-package-manager-localized-resources/33950). > This proposal builds on top of the [Package Manager Resources](0271-package-manager-resources.md) proposal to allow defining localized versions of resources in the SwiftPM manifest and have them automatically accessible at runtime using the same APIs. - -## Motivation - > The recently accepted [Package Manager Resources](https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md) proposal allows SwiftPM users to define resources (images, data file, etc...) in their manifests and have them packaged inside a bundle to be accessible at From 29c479d5675b0d3fb7d277abd3c3f064ec4cb324 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Feb 2020 23:16:18 +0100 Subject: [PATCH 266/589] Update 2020-02-27-issue-154.md --- _posts/2020-02-27-issue-154.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_posts/2020-02-27-issue-154.md b/_posts/2020-02-27-issue-154.md index 8db10a79..c2662ce4 100644 --- a/_posts/2020-02-27-issue-154.md +++ b/_posts/2020-02-27-issue-154.md @@ -92,6 +92,7 @@ future tooling to be created that will allow for easy processing of this value. [SE-0278](https://github.com/apple/swift-evolution/blob/master/proposals/0278-package-manager-localized-resources.md): *Package Manager Localized Resources* is [under review](https://forums.swift.org/t/se-0278-package-manager-localized-resources/33950). > This proposal builds on top of the [Package Manager Resources](0271-package-manager-resources.md) proposal to allow defining localized versions of resources in the SwiftPM manifest and have them automatically accessible at runtime using the same APIs. +> > The recently accepted [Package Manager Resources](https://github.com/apple/swift-evolution/blob/master/proposals/0271-package-manager-resources.md) proposal allows SwiftPM users to define resources (images, data file, etc...) in their manifests and have them packaged inside a bundle to be accessible at From cda03302eacd4960b0214bc8b734279aa177b7d4 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Feb 2020 23:16:44 +0100 Subject: [PATCH 267/589] Update 2020-02-27-issue-154.md --- _posts/2020-02-27-issue-154.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-02-27-issue-154.md b/_posts/2020-02-27-issue-154.md index c2662ce4..a9dbc165 100644 --- a/_posts/2020-02-27-issue-154.md +++ b/_posts/2020-02-27-issue-154.md @@ -79,7 +79,7 @@ can use `if-let`, `if-case`, etcetera. > - `#file` will be altered to only report the module and filename > - `#filePath` will be introduced to replicate the previous full file+path for use cases that relied on the path previously. -- While the team acknowledges that this does require some existing workflows to +> - While the team acknowledges that this does require some existing workflows to adapt to the new scheme, the binary size and privacy concerns over implicitly embedding the full path were significant enough to warrant this change. > From 8e14880f71279f82d3d4f683d63be07c066e5934 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Feb 2020 23:22:49 +0100 Subject: [PATCH 268/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index f62cc55e..3ce18fe4 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,800 subscribers and over 8,600 followers on Twitter. +There are over 3,900 subscribers and over 8,600 followers on Twitter.

    Sponsored Links

    From d1429657b8d1079a1c892448e0cfcb339308b734 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Feb 2020 23:23:07 +0100 Subject: [PATCH 269/589] Update sponsorship.md --- sponsorship.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 3ce18fe4..55711a5f 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,10 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
    |   Issue |   Status | |:-|:-| -| January 16 | Open | -| January 30 | Open | -| February 13 | Open | -| February 27 | **Booked** | | March 12 | Open | | March 26 | Open | | April 9 | Open | From 1dfafdbb6f4b6c7e444f7f54dbbdcb44dba6812e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 27 Feb 2020 23:29:35 +0100 Subject: [PATCH 270/589] Update github_issue_generator.rb --- github_issue_generator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github_issue_generator.rb b/github_issue_generator.rb index 45d8d8fd..e9da0e55 100644 --- a/github_issue_generator.rb +++ b/github_issue_generator.rb @@ -10,7 +10,7 @@ class GitHubIssueGenerator < CLAide::Command def self.options [ ['--number=1', 'The issue number to generate the GitHub issue for.'], - ['--date=MMMM d, YYYY', "The date of the issue's publication, for example `December 6, 2015`."], + ['--date=MMMM d, yyyy', "The date of the issue's publication, for example `December 6, 2015`."], ['--future-issue', 'Adds a `future issue` label and omits the `current issue` label.'], ['--no-writer', "Skips adding the runner of this script as the issue's assignee. If `--needs-writer` is set, this option will be ignored."], ['--needs-writer', 'Adds a `needs writer` label and does not assign the runner of this script.'] @@ -36,7 +36,7 @@ def validate! help! 'The --date flag is required.' unless @date help! 'The --number flag must be a valid number.' if @number.to_i.zero? - help! 'The --date flag is not valid. It should follow the MMMM d, YYYY date format, for example `December 6, 2015`.' unless valid_date?(@date) + help! 'The --date flag is not valid. It should follow the MMMM d, yyyy date format, for example `December 6, 2015`.' unless valid_date?(@date) end def run From de5791b7ba03dcb05aa9c34328a7224cda79e367 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Sun, 8 Mar 2020 12:18:49 +0100 Subject: [PATCH 271/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 55711a5f..078d6754 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,900 subscribers and over 8,600 followers on Twitter. +There are over 3,900 subscribers and over 8,700 followers on Twitter.

    Sponsored Links

    From 816fadc7ef4b89f1af1f9823ca6ea474475cecc1 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 11 Mar 2020 12:17:38 +0100 Subject: [PATCH 272/589] Run bundle update --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c11592c5..6ca05c1a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -233,9 +233,9 @@ GEM multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.10.8) + nokogiri (1.10.9) mini_portile2 (~> 2.4.0) - octokit (4.16.0) + octokit (4.17.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) @@ -267,7 +267,7 @@ GEM tzinfo (1.2.6) thread_safe (~> 0.1) unicode-display_width (1.6.1) - zeitwerk (2.2.2) + zeitwerk (2.3.0) PLATFORMS ruby From a130cf6648cfa7416ccd8807a7b80f9e5165efbe Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 12 Mar 2020 10:25:13 +0100 Subject: [PATCH 273/589] Push draft References #502 --- _drafts/2020-03-12-issue-155.md | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 _drafts/2020-03-12-issue-155.md diff --git a/_drafts/2020-03-12-issue-155.md b/_drafts/2020-03-12-issue-155.md new file mode 100644 index 00000000..fe30d482 --- /dev/null +++ b/_drafts/2020-03-12-issue-155.md @@ -0,0 +1,47 @@ +--- +layout: post +title: ! 'Issue #155' +author: btb +--- + +Another fortnight passed by, another Swift Weekly Brief. Enjoy! + + + +{% include sponsor.html %} + +### Podcasts + +In episode 85 of Swift Unwrapped, Jesse and JP talk [about Swift on Windows and other news](https://spec.fm/podcasts/swift-unwrapped/317221). + +### News and community + +[Nate Cook](https://twitter.com/nnnnnnnn/) wrote [a blog post](https://swift.org/blog/argument-parser/) on Swift.org, +announcing ArgumentParser, an open-source library that makes it straightforward +— even enjoyable! — to parse command-line arguments in Swift. + +### Commits and pull requests + +https://github.com/apple/swift/pull/30174 + +https://github.com/apple/swift/commit/ea8d143f6425e4db7ba78df82776cc075add1e22 + +https://github.com/apple/swift/pull/30329 + +https://github.com/apple/swift/pull/30112 + +### Proposals in review + +[SE-0280](https://github.com/apple/swift-evolution/blob/master/proposals/0280-enum-cases-as-protocol-witnesses.md): *Enum cases as protocol witnesses* is [under review](https://forums.swift.org/t/se-0280-enum-cases-as-protocol-witnesses/34257). + +[SE-0279](https://github.com/apple/swift-evolution/blob/master/proposals/0279-multiple-trailing-closures.md): *Multiple Trailing Closures* is [under review](https://forums.swift.org/t/se-0279-multiple-trailing-closures/34255). + +### Swift Forums + +https://forums.swift.org/t/tuples-conform-to-equatable-comparable-and-hashable/34156 + +https://forums.swift.org/t/shorthand-for-guard-else-empty-return-statement/34404 + +### Finally + +[1, 2, 3, 4, 5, 6, 7, 8, 9, X](https://twitter.com/jckarter/status/1234598045511106561) From 8f3b144e2864bde238db2a7c64588a24930949aa Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 12 Mar 2020 11:41:19 +0100 Subject: [PATCH 274/589] More draft work References #502 --- _drafts/2020-03-12-issue-155.md | 45 ++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/_drafts/2020-03-12-issue-155.md b/_drafts/2020-03-12-issue-155.md index fe30d482..d7f99865 100644 --- a/_drafts/2020-03-12-issue-155.md +++ b/_drafts/2020-03-12-issue-155.md @@ -20,22 +20,59 @@ In episode 85 of Swift Unwrapped, Jesse and JP talk [about Swift on Windows and announcing ArgumentParser, an open-source library that makes it straightforward — even enjoyable! — to parse command-line arguments in Swift. +Swift 5.1.5 [has been released](https://swift.org/download/). + ### Commits and pull requests -https://github.com/apple/swift/pull/30174 +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/30174) +that adds `switch` statement support to function builders! + +In that pull request, Doug pushed [a commit](https://github.com/apple/swift/commit/ea8d143f6425e4db7ba78df82776cc075add1e22) +after a code review from [John McCall](https://twitter.com/pathofshrines) who +noted a subtle omission in constraint generation that affected the semantics of +switch statements in function builders. + +Yay for code review. @pathofshrines noted a subtle omission in constraint generation that affected the semantics of switch statements in function builders. The fix was trivial but the implications are really interesting + +[David Smith](https://twitter.com/Catfish_Man) and [Tim K](https://github.com/tbkka) merged [a pull request](https://github.com/apple/swift/pull/30329) that provides a speedup for bridging +ObjC collections containing NSStrings. -https://github.com/apple/swift/commit/ea8d143f6425e4db7ba78df82776cc075add1e22 +[Kuba (Brecka) Mracek](https://twitter.com/kubamracek) merged [a pull request](https://github.com/apple/swift/pull/30112), +upstreaming arm64e support for Swift. -https://github.com/apple/swift/pull/30329 +Also: -https://github.com/apple/swift/pull/30112 +> this means we finally won’t have a billion arm64e merge conflicts every +single week + +Pretty neat! ### Proposals in review [SE-0280](https://github.com/apple/swift-evolution/blob/master/proposals/0280-enum-cases-as-protocol-witnesses.md): *Enum cases as protocol witnesses* is [under review](https://forums.swift.org/t/se-0280-enum-cases-as-protocol-witnesses/34257). +> The aim of this proposal is to lift an existing restriction, which is that +enum cases cannot participate in protocol witness matching. +> +> Currently, Swift has a very restrictive protocol witness matching model where +a protocol witness has to match _exactly_ with the requirement, with some +exceptions (see [Protocol Witness Matching Manifesto](https://forums.swift.org/t/protocol-witness-matching-mini-manifesto/32752)). + [SE-0279](https://github.com/apple/swift-evolution/blob/master/proposals/0279-multiple-trailing-closures.md): *Multiple Trailing Closures* is [under review](https://forums.swift.org/t/se-0279-multiple-trailing-closures/34255). +> Since its inception, Swift has supported _trailing closure_ syntax, which is +a bit of syntactic sugar that makes passing closures more ergonomic. Trailing +closures have always had two restrictions that limited their applicability. +First, that any call is limited to a single trailing closure, making the +feature awkward or even unusable when an API has more than one callback. This +limitation was noticed [very early on in Swift's +lifetime](https://www.natashatherobot.com/swift-trailing-closure-syntax/) as +"the" problem with trailing closure syntax. Second, that a trailing closure +argument does not provide an argument label, which can lead to call sites that +are less clear. This proposal removes both restrictions by providing an +unambiguous syntax for providing multiple, labeled trailing closures in a call, +leading to clearer and more consistent code. + ### Swift Forums https://forums.swift.org/t/tuples-conform-to-equatable-comparable-and-hashable/34156 From 586b762ee4fd10167ce629715e06e2887bcc9a39 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 12 Mar 2020 11:51:26 +0100 Subject: [PATCH 275/589] oops --- _drafts/2020-03-12-issue-155.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/_drafts/2020-03-12-issue-155.md b/_drafts/2020-03-12-issue-155.md index d7f99865..f589ba28 100644 --- a/_drafts/2020-03-12-issue-155.md +++ b/_drafts/2020-03-12-issue-155.md @@ -32,8 +32,6 @@ after a code review from [John McCall](https://twitter.com/pathofshrines) who noted a subtle omission in constraint generation that affected the semantics of switch statements in function builders. -Yay for code review. @pathofshrines noted a subtle omission in constraint generation that affected the semantics of switch statements in function builders. The fix was trivial but the implications are really interesting - [David Smith](https://twitter.com/Catfish_Man) and [Tim K](https://github.com/tbkka) merged [a pull request](https://github.com/apple/swift/pull/30329) that provides a speedup for bridging ObjC collections containing NSStrings. From f14c725bcfbe5587b94233d4ba3babedf7245da1 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 12 Mar 2020 12:04:18 +0100 Subject: [PATCH 276/589] More things --- _drafts/2020-03-12-issue-155.md | 51 +++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/_drafts/2020-03-12-issue-155.md b/_drafts/2020-03-12-issue-155.md index f589ba28..8a6ca810 100644 --- a/_drafts/2020-03-12-issue-155.md +++ b/_drafts/2020-03-12-issue-155.md @@ -73,9 +73,54 @@ leading to clearer and more consistent code. ### Swift Forums -https://forums.swift.org/t/tuples-conform-to-equatable-comparable-and-hashable/34156 - -https://forums.swift.org/t/shorthand-for-guard-else-empty-return-statement/34404 +[Joe Groff](https://twittter.com/jckarter) provided [an update](https://forums.swift.org/t/update-on-se-0057/34246) +on [SE-0057](https://github.com/apple/swift-evolution/blob/master/proposals/0057-importing-objc-generics.md). + +> The core team is continuing to review the status of older proposals in order +to bring their status into line with reality. SE-0057 introduced the ability +for Swift to import Objective-C lightweight generics as compile-time generic +types in Swift, with some limitations due to the type-erased nature of generics +in Objective-C. Although this proposal was accepted, and claimed to be in the +"Implemented" state, one aspect of the proposal was not implemented. The +originally accepted proposal described an informal protocol by with Objective-C +classes could optionally provide generic argument information back to Swift. +> +> However, that informal protocol was never implemented. The Core Team has +decided to withdraw this aspect of the proposal. + +[Alejandro Alonso](https://github.com/Azoy) pitched [a proposal](https://forums.swift.org/t/tuples-conform-to-equatable-comparable-and-hashable/34156) +to have tuples conform to `Equatable`, `Comparable`, and `Hashable`. + +> Tuples in Swift currently lack the ability to conform to protocols. This has +led many users to stop using tuples altogether in favor of structures that they +can them conform protocols to. The shift from tuples to structures have made +tuples almost feel like a second class type in the language because of them not +being able to do simple operations that should _just_ work. + +[Varun Gandhi](https://forums.swift.org/u/varun_gandhi/summary) raised [a question](https://forums.swift.org/t/abi-compatibility-hazards-and-new-language-proposals/34347) +about ABI compatibility and language proposals. + +> One implication of [SE-0280](https://forums.swift.org/t/se-0280-enum-cases-as-protocol-witnesses) +is that it introduces a way into the language in which one can break binary +compatibility without breaking source compatibility. More specifically, one can +make a property witness and replace that with an enum case (which also acts as +a witness) but this would break binary compatibility (the other way round +breaks source compatibility, as a client may be pattern-matching on the enum +case you're getting rid of). There are already other ways in which this happens +today (such as with [SE-0267](https://github.com/apple/swift-evolution/blob/master/proposals/0267-where-on-contextually-generic.md)), +but this proposal adds one more way this can happen. +> +> Compared to most other languages, Swift has a much better story around binary +compatibility. Part of the reason why I really like the design is that (in the +majority of cases) changes that "should" not break binary compatibility do not +break binary compatibility. To reappropriate the phrase, fast and loose +reasoning is morally correct with regard to binary compatibility -- (in the +majority of cases) source-equivalent code is ABI-equivalent. +> +> If we add more cases like this, that adds an extra wrinkle that users need to +be wary about. I suspect that a large fraction of users of this feature will +probably not be affected by this change. A small percentage of people might be +affected: should we have a backup plan for them? ### Finally From 76a8a894f0f05107b3c190be109a78bd36ba96e7 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 12 Mar 2020 19:27:51 +0100 Subject: [PATCH 277/589] Post 155 Closes #502 --- {_drafts => _posts}/2020-03-12-issue-155.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-03-12-issue-155.md (100%) diff --git a/_drafts/2020-03-12-issue-155.md b/_posts/2020-03-12-issue-155.md similarity index 100% rename from _drafts/2020-03-12-issue-155.md rename to _posts/2020-03-12-issue-155.md From cfed783dd553bebef654448c5831b4d46b99863e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 24 Mar 2020 22:56:04 +0100 Subject: [PATCH 278/589] Run bundle update --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6ca05c1a..3b32e5c8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.2.1) + activesupport (6.0.2.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -249,7 +249,7 @@ GEM rouge (3.13.0) ruby-enum (0.7.2) i18n - rubyzip (2.2.0) + rubyzip (2.3.0) safe_yaml (1.0.5) sass (3.7.4) sass-listen (~> 4.0.0) @@ -266,7 +266,7 @@ GEM ethon (>= 0.9.0) tzinfo (1.2.6) thread_safe (~> 0.1) - unicode-display_width (1.6.1) + unicode-display_width (1.7.0) zeitwerk (2.3.0) PLATFORMS From 509c521cc56a5652c15fa80e783ac25059023360 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 24 Mar 2020 22:56:46 +0100 Subject: [PATCH 279/589] Add support for Indie Support Weeks cc @johnsundell --- _includes/indie_support_weeks.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 _includes/indie_support_weeks.html diff --git a/_includes/indie_support_weeks.html b/_includes/indie_support_weeks.html new file mode 100644 index 00000000..0ed94801 --- /dev/null +++ b/_includes/indie_support_weeks.html @@ -0,0 +1,13 @@ +{% assign issue_num = page.title | remove: 'Issue #' %} +{% if include.custom-utm %} + {% assign utm_params = include.indie_sponsor.custom-utm %} +{% else %} + {% assign utm_params = "?utm_campaign=Swift_Weekly_Brief&utm_medium=email_web&utm_source=Swift_Weekly_Brief_" | append: issue_num %} +{% endif %} + + From a524b084c012aebcbcba1d5943134ed525b54816 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2020 17:46:30 +0100 Subject: [PATCH 280/589] Bump octokit from 4.17.0 to 4.18.0 (#506) Bumps [octokit](https://github.com/octokit/octokit.rb) from 4.17.0 to 4.18.0. - [Release notes](https://github.com/octokit/octokit.rb/releases) - [Changelog](https://github.com/octokit/octokit.rb/blob/4-stable/RELEASE.md) - [Commits](https://github.com/octokit/octokit.rb/compare/v4.17.0...v4.18.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3b32e5c8..fb62b2af 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -235,7 +235,7 @@ GEM no_proxy_fix (0.1.2) nokogiri (1.10.9) mini_portile2 (~> 2.4.0) - octokit (4.17.0) + octokit (4.18.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) From d91206ad8aa9c1343ad07b02cb1774f71b3cf36c Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 26 Mar 2020 18:12:13 +0100 Subject: [PATCH 281/589] Issue 156 (#505) * Enable back parsing prose * First draft * Rename to use correct date format * Add prelimary indie support weeks links * Update Sundial * Update for Secrets * Update for Timeless * Added new stuff + intro comment, I hope not so pessimistic. * Stylistic improvements * Style improvement by Jesse * Swift 5.3 release process blog post * Remove bad tone * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Update _drafts/2020-03-26-issue-156.md Co-Authored-By: Jesse Squires * Added Vapor release * Remove TODO sections * Moving to posts * Publish 156 Closes #503 Co-authored-by: Kristaps Grinbergs Co-authored-by: Jesse Squires --- _includes/indie_support_weeks.html | 2 +- _includes/indie_support_weeks_note.html | 10 +++ _posts/2020-03-26-issue-156.md | 102 ++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 _includes/indie_support_weeks_note.html create mode 100644 _posts/2020-03-26-issue-156.md diff --git a/_includes/indie_support_weeks.html b/_includes/indie_support_weeks.html index 0ed94801..1b16c1ff 100644 --- a/_includes/indie_support_weeks.html +++ b/_includes/indie_support_weeks.html @@ -6,7 +6,7 @@ {% endif %} diff --git a/_posts/2020-03-26-issue-156.md b/_posts/2020-03-26-issue-156.md index db789a4b..822df647 100644 --- a/_posts/2020-03-26-issue-156.md +++ b/_posts/2020-03-26-issue-156.md @@ -16,7 +16,7 @@ Meanwhile, Swift 5.2 has been officially released with Xcode 11.4. So take a bre In [episode 69](https://www.swiftbysundell.com/podcast/69/) of the Swift by Sundell podcast, [Holly Borla](https://twitter.com/hollyborla) and [Grace Kendall](https://twitter.com/gracekendall26), both software engineers at Apple, join [John Sundell](https://twitter.com/johnsundell) to take a deep dive into the Swift Playgrounds app and Swift 5.2's new diagnostics engine. -{% include indie_support_weeks.html link="https://outercorner.com/secrets/" heading="Secrets — Your Friendly Password Manager" body="Just this year over 60M accounts have been exposed due to service breaches. Reusing passwords greatly increases your risk of getting hacked. Take some time during this lockdown to make sure you're using strong and unique password on all the services you use, and securely store them in a password manager such as Secrets. Stay safe IRL and online!" displaylink="outercorner.com/secrets" %} +{% include indie_support_weeks.html link="https://outercorner.com/secrets/" heading="Secrets — Your Friendly Password Manager" body="Just this year over 60M accounts have been exposed due to service breaches. Reusing passwords greatly increases your risk of getting hacked. Take some time during this lockdown to make sure you're using strong and unique password on all the services you use, and securely store them in a password manager such as Secrets. Stay safe IRL and online!" displaylink="outercorner.com/secrets" app-store="https://itunes.apple.com/app/secrets/id973049011" %} ### News and community @@ -47,7 +47,7 @@ The Ray Wenderlich folks wrote a great [tutorial](https://www.raywenderlich.com/ [Luciano Almeida](https://github.com/LucianoPAlmeida) merged [a pull request](https://github.com/apple/swift/pull/30440) that fixes [SR-11540](https://bugs.swift.org/browse/SR-11540) by just disfavoring overloads to closures with anonymous var that are function types with more than one argument that matches arguments of function types without arguments. -{% include indie_support_weeks.html link="https://usetimeless.app" heading="Stay focused with Timeless" body="Timeless is a subtle clock replacement. It helps you feel less anxious about the time and more focused on how you should be spending it. Try Timeless today." displaylink="usetimeless.app" %} +{% include indie_support_weeks.html link="https://usetimeless.app" heading="Stay focused with Timeless" body="Timeless is a subtle clock replacement. It helps you feel less anxious about the time and more focused on how you should be spending it. Try Timeless today." displaylink="usetimeless.app" app-store="https://apps.apple.com/us/app/timeless/id1502382249" %} ### Swift Forums @@ -95,7 +95,7 @@ Such abstractions cannot effectively be build on Array because of O(n) first ele [Tanner Nelson](https://twitter.com/tanner0101) [informed](https://forums.swift.org/t/vapor-4-official-release-begins/34802) about Vapor 4 official release. -{% include indie_support_weeks.html link="https://sundialapp.com" heading="Sundial - Solar & Lunar Times and Alerts" body="Sundial provides essential sun and moon data in a compact, beautiful display. Create alerts for 24 solar/lunar events. Want to be notified 30 minutes before sunset to take the dog out for a walk? Piece of cake. Need an alert the day before full/new moon to take rest for Ashtanga yoga? No problem. For iPhone, iPad, and Apple Watch." displaylink="sundialapp.com" %} +{% include indie_support_weeks.html link="https://sundialapp.com" heading="Sundial - Solar & Lunar Times and Alerts" body="Sundial provides essential sun and moon data in a compact, beautiful display. Create alerts for 24 solar/lunar events. Want to be notified 30 minutes before sunset to take the dog out for a walk? Piece of cake. Need an alert the day before full/new moon to take rest for Ashtanga yoga? No problem. For iPhone, iPad, and Apple Watch." displaylink="sundialapp.com" app-store="https://apps.apple.com/us/app/sundial-sun-moon-times-alerts/id976460540" %} ### Finally From 6f54f7ceca3e267d2b6f3f89429a867709695739 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 26 Mar 2020 19:36:51 +0100 Subject: [PATCH 284/589] Update 2020-03-26-issue-156.md --- _posts/2020-03-26-issue-156.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2020-03-26-issue-156.md b/_posts/2020-03-26-issue-156.md index 822df647..be7a771f 100644 --- a/_posts/2020-03-26-issue-156.md +++ b/_posts/2020-03-26-issue-156.md @@ -69,7 +69,7 @@ Such abstractions cannot effectively be build on Array because of O(n) first ele > > There are many alternatives available for counting occurrences of substring but I think it would be more intuitive if we add support of counting occurrences of a substring in a string. -[Nate Cook](https://twitter.com/nnnnnnnn) pitched [an idea]](https://forums.swift.org/t/main-type-based-program-execution/34624) to add a new attribute that you can use to designate a type that provides the entry point for a Swift program. +[Nate Cook](https://twitter.com/nnnnnnnn) pitched [an idea](https://forums.swift.org/t/main-type-based-program-execution/34624) to add a new attribute that you can use to designate a type that provides the entry point for a Swift program. > This is a generalization of the `@UIApplicationMain` and `@NSApplicationMain` attributes that have been in Swift from the beginning, making that specialized behavior available to any library or framework. > @@ -77,7 +77,7 @@ Such abstractions cannot effectively be build on Array because of O(n) first ele [Tom Doron](https://forums.swift.org/u/tomerd) shared [meeting notes](https://forums.swift.org/t/march-4th-2020/34617) for the Swift on the Server Workgroup March 4th, 2020 meeting. -[Karoy Lorentey](https://twitter.com/lorentey) pitched [an idea]](https://forums.swift.org/t/low-level-atomic-operations/34683) about Low-Level Atomic Operations. +[Karoy Lorentey](https://twitter.com/lorentey) pitched [an idea](https://forums.swift.org/t/low-level-atomic-operations/34683) about Low-Level Atomic Operations. >Here is a pitch for adding a limited set of low-level atomic operations to the Standard Library, including native spellings for C++-style acquire-release memory orderings. Our goal is to enable intrepid library authors to start building synchronization constructs directly in Swift. > From c46ba335c5412a4ec999528d35f12927d8ffb879 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 26 Mar 2020 19:50:06 +0100 Subject: [PATCH 285/589] Update 2020-03-26-issue-156.md --- _posts/2020-03-26-issue-156.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-03-26-issue-156.md b/_posts/2020-03-26-issue-156.md index be7a771f..5fa802a3 100644 --- a/_posts/2020-03-26-issue-156.md +++ b/_posts/2020-03-26-issue-156.md @@ -93,7 +93,7 @@ Such abstractions cannot effectively be build on Array because of O(n) first ele [Hassan ElDesouky](https://forums.swift.org/u/HassanElDesouky) started [a discussion](https://forums.swift.org/t/contribution-starter-guide/34747) about creating a Swift contribution starter guide. Previously, he [gathered](https://forums.swift.org/t/important-talks-and-articles-for-first-time-swift-contributors/34537) materials of important talks and articles for first time contributors. -[Tanner Nelson](https://twitter.com/tanner0101) [informed](https://forums.swift.org/t/vapor-4-official-release-begins/34802) about Vapor 4 official release. +[Tanner Nelson](https://twitter.com/tanner0101) shared the news [of the official release of Vapor 4](https://forums.swift.org/t/vapor-4-official-release-begins/34802). {% include indie_support_weeks.html link="https://sundialapp.com" heading="Sundial - Solar & Lunar Times and Alerts" body="Sundial provides essential sun and moon data in a compact, beautiful display. Create alerts for 24 solar/lunar events. Want to be notified 30 minutes before sunset to take the dog out for a walk? Piece of cake. Need an alert the day before full/new moon to take rest for Ashtanga yoga? No problem. For iPhone, iPad, and Apple Watch." displaylink="sundialapp.com" app-store="https://apps.apple.com/us/app/sundial-sun-moon-times-alerts/id976460540" %} From 17c066f64cde9587d598a2a1f4a538f17a1d946d Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 26 Mar 2020 20:31:55 +0100 Subject: [PATCH 286/589] Update indie_support_weeks_note.html --- _includes/indie_support_weeks_note.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/indie_support_weeks_note.html b/_includes/indie_support_weeks_note.html index c7656e5c..dba7525d 100644 --- a/_includes/indie_support_weeks_note.html +++ b/_includes/indie_support_weeks_note.html @@ -6,5 +6,5 @@

    A note from Bas on the #IndieS

    It's an effort aimed at helping indie developers within the Apple Developer Community who have been financially impacted by the current global COVID-19 pandemic.

    Curating this newsletter, it was an obvious decision to take part in this effort, and to highlight some indie apps in this issue. Do check them out, as well as all other awesome apps on the list.

    If you decide to check out any of the apps — or to buy them — please also share it with the world using the #IndieSupportWeeks hashtag!

    -

    On behalf of all indie developers, thank you for checking out their apps and the support!

    +

    On behalf of all indie developers, thank you for the support!

    From 08b975872802463dceda0332c0a290ab13d1d923 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 27 Mar 2020 18:08:00 +0100 Subject: [PATCH 287/589] Add SE0280 and PLDI sponsor References #507 --- _drafts/2020-04-09-issue-157.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/_drafts/2020-04-09-issue-157.md b/_drafts/2020-04-09-issue-157.md index a0e2686b..ae4a1cfa 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_drafts/2020-04-09-issue-157.md @@ -25,7 +25,13 @@ sponsor: ### News and community -> TODO +[Ted Kremenek](https://twitter.com/tkremenek) shared that Apple [is sponsoring +PLDI this year](https://twitter.com/tkremenek/status/1243235856791429122) — the +Programming Language Design and Implementation conference. As Ted said: + +> Swift has drawn inspiration from many programming languages and those of us +working on Swift are proud to be part of the broader programming language +community. ### Commits and pull requests @@ -33,7 +39,11 @@ sponsor: ### Accepted proposals -> TODO +[SE-0280](https://github.com/apple/swift-evolution/blob/master/proposals/0280-enum-cases-as-protocol-witnesses.md): *Enum cases as protocol witnesses* was [accepted](https://forums.swift.org/t/accepted-se-0280-enum-cases-as-protocol-witnesses/34850). + +> Almost all of the feedback we received was in favor of making this change, +and the Core Team is convinced that this closes an unnecessary semantic gap +between enums and other types. ### Returned proposals From e3abaad98889240aa843a3b599ae7a0751270a3e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 31 Mar 2020 21:01:57 +0200 Subject: [PATCH 288/589] Update Gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index fb62b2af..350d610c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -247,7 +247,7 @@ GEM ffi (~> 1.0) rchardet (1.8.0) rouge (3.13.0) - ruby-enum (0.7.2) + ruby-enum (0.8.0) i18n rubyzip (2.3.0) safe_yaml (1.0.5) From c57930918befa1fc0252edf78664f451483560de Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 31 Mar 2020 21:04:44 +0200 Subject: [PATCH 289/589] Add SE0281 in review References #507 --- _drafts/2020-04-09-issue-157.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-09-issue-157.md b/_drafts/2020-04-09-issue-157.md index ae4a1cfa..4b3c764c 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_drafts/2020-04-09-issue-157.md @@ -55,7 +55,12 @@ between enums and other types. ### Proposals in review -> TODO +[SE-0281](https://github.com/apple/swift-evolution/blob/master/proposals/0281-main-attribute.md): *`@main`: Type-Based Program Entry Points* is [under review](https://forums.swift.org/t/se-0281-main-type-based-program-entry-points/34948). + +> A Swift language feature for designating a type as the entry point for +beginning program execution. Instead of writing top-level code, users can use +the `@main` attribute on a single type. Libraries and frameworks can then +provide custom entry-point behavior through protocols or class inheritance. ### Swift Forums From 0c8e88835ad0a009e06de814ae604e38c14d093e Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 8 Apr 2020 17:19:59 +0200 Subject: [PATCH 290/589] Remove sponsor --- _drafts/2020-04-09-issue-157.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/_drafts/2020-04-09-issue-157.md b/_drafts/2020-04-09-issue-157.md index 4b3c764c..bfc34433 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_drafts/2020-04-09-issue-157.md @@ -2,11 +2,6 @@ layout: post title: ! 'Issue #157' author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO --- > TODO: intro comments From cdb8ca5bcb72b618c6bb45f4b5764656376651a6 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 8 Apr 2020 17:22:21 +0200 Subject: [PATCH 291/589] Add starter task --- _drafts/2020-04-09-issue-157.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-09-issue-157.md b/_drafts/2020-04-09-issue-157.md index bfc34433..b81a2091 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_drafts/2020-04-09-issue-157.md @@ -12,7 +12,8 @@ author: btb ### Starter tasks -> TODO +- [SR-12460](https://bugs.swift.org/browse/SR-12460) [Compiler] Declaring an +operator inside an extension without a name crashes the compiler ### Podcasts From c809ddc80cca0b63b77a56d91e49413935512c86 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 8 Apr 2020 17:28:38 +0200 Subject: [PATCH 292/589] Add podcasts --- _drafts/2020-04-09-issue-157.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-09-issue-157.md b/_drafts/2020-04-09-issue-157.md index b81a2091..0b612480 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_drafts/2020-04-09-issue-157.md @@ -17,7 +17,20 @@ operator inside an extension without a name crashes the compiler ### Podcasts -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +In [episode 371 of the Accidental Tech Podcast](https://atp.fm/episodes/371) +(ATP), [Marco Arment](http://www.marco.org/), +[Casey Liss](http://www.caseyliss.com/), +[John Siracusa](http://hypercritical.co/), and +[Chris Lattner](http://www.nondot.org/sabre/) discuss TensorFlow, Multi-Level +Intermediate Representation, Swift's future and more. + +In [episode 8 of the Swift Community Podcast](https://www.swiftcommunitypodcast.org/episodes/8), +[Kate Castellano](https://twitter.com/KateCastellano), +[Paul Hudson](https://twitter.com/twostraws), +[Chris Lattner](https://twitter.com/clattner_llvm), and +[Bas Broek](https://twitter.com/basthomas) discuss +[Swift for Good](https://www.swiftforgood.com/), a book on Swift with 100% of +all revenue going to charity. ### News and community From 2eb317002525d320c0fce863039e80258049ba46 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 8 Apr 2020 17:30:02 +0200 Subject: [PATCH 293/589] Add finally --- _drafts/2020-04-09-issue-157.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-09-issue-157.md b/_drafts/2020-04-09-issue-157.md index 0b612480..1d5a83e5 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_drafts/2020-04-09-issue-157.md @@ -77,4 +77,5 @@ provide custom entry-point behavior through protocols or class inheritance. ### Finally -> TODO: something funny/fun. tweet, link, etc. +[Late at work](https://twitter.com/dgregor79/status/1245935942973583366), +cleaning [the cat's litter box](https://twitter.com/dgregor79/status/1245936440371867648). From b0ebf9dab799f3585f52d343941a6b29684186d8 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 8 Apr 2020 17:30:50 +0200 Subject: [PATCH 294/589] Remove unused proposal sections --- _drafts/2020-04-09-issue-157.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/_drafts/2020-04-09-issue-157.md b/_drafts/2020-04-09-issue-157.md index 1d5a83e5..8c90e048 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_drafts/2020-04-09-issue-157.md @@ -54,14 +54,6 @@ community. and the Core Team is convinced that this closes an unnecessary semantic gap between enums and other types. -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - ### Proposals in review [SE-0281](https://github.com/apple/swift-evolution/blob/master/proposals/0281-main-attribute.md): *`@main`: Type-Based Program Entry Points* is [under review](https://forums.swift.org/t/se-0281-main-type-based-program-entry-points/34948). From 354a98128bc3bbd8a71a63b2582c3045296812f1 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 8 Apr 2020 17:37:38 +0200 Subject: [PATCH 295/589] Add commits + pull requests --- _drafts/2020-04-09-issue-157.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-09-issue-157.md b/_drafts/2020-04-09-issue-157.md index 8c90e048..5f5ad1cd 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_drafts/2020-04-09-issue-157.md @@ -44,7 +44,12 @@ community. ### Commits and pull requests -> TODO +[Owen Voorhees](https://twitter.com/owenvoorhees) merged [a pull request](https://github.com/apple/swift/pull/27776) +which implements [SE-0276](https://github.com/apple/swift-evolution/blob/master/proposals/0276-multi-pattern-catch-clauses.md): *Multi-Pattern Catch Clauses*. Awesome! + +[Robert Widmann](https://twitter.com/CodaFi_) merged [a pull request](https://github.com/apple/swift/pull/30723) +with a new approach for recording incremental build dependencies using the +request evaluator, paving the way for faster builds in the future. 🏎 ### Accepted proposals From b5d8caae570c15f0e6ba241cc6db3e38f4a1c681 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 8 Apr 2020 18:11:37 +0200 Subject: [PATCH 296/589] Add News and Community section --- _drafts/2020-04-09-issue-157.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-09-issue-157.md b/_drafts/2020-04-09-issue-157.md index 5f5ad1cd..6088191c 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_drafts/2020-04-09-issue-157.md @@ -40,7 +40,18 @@ Programming Language Design and Implementation conference. As Ted said: > Swift has drawn inspiration from many programming languages and those of us working on Swift are proud to be part of the broader programming language -community. +community. + +[Mattt](https://twitter.com/mattt) wrote [an article](https://nshipster.com/swift-log/) +on `swift-log`, a community-driven, open-source standard for logging in Swift, +backed by Apple. + +Furthermore, Mattt [announced](https://github.com/SwiftDocOrg/swift-doc) +`swift-doc`, generating documentation for Swift projects. + +[Jasdev Singh](https://twitter.com/jasdev) wrote [an article](https://jasdev.me/fusion-primer) +talking about the "fusion" term he struggled to build intuition around until he +read through Combine’s documentation. ### Commits and pull requests From d3e99e984e3d31bdf793c254e0d5db1f99619cbf Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 8 Apr 2020 18:24:20 +0200 Subject: [PATCH 297/589] Add Forum things --- _drafts/2020-04-09-issue-157.md | 77 ++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-09-issue-157.md b/_drafts/2020-04-09-issue-157.md index 6088191c..b22815d0 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_drafts/2020-04-09-issue-157.md @@ -53,6 +53,9 @@ Furthermore, Mattt [announced](https://github.com/SwiftDocOrg/swift-doc) talking about the "fusion" term he struggled to build intuition around until he read through Combine’s documentation. +[Saleem Abdulrasool](https://twitter.com/compnerd) announced [SwiftNIO is now +running on Windows](https://forums.swift.org/t/windows-nio/35003)! + ### Commits and pull requests [Owen Voorhees](https://twitter.com/owenvoorhees) merged [a pull request](https://github.com/apple/swift/pull/27776) @@ -81,7 +84,79 @@ provide custom entry-point behavior through protocols or class inheritance. ### Swift Forums -> TODO +[Dave Abrahams](https://twitter.com/DaveAbrahams) pitched [a proposal](https://forums.swift.org/t/a-better-data-pretty-printer/34914) +to introduce a better data pretty-printer. + +> With this post, I hope to open a discussion of the design requirements for a +library, similar to Python's [pprint](https://docs.python.org/3.4/library/pprint.html), +that could eventually be incorporated into the standard library and inform the +design of many parts of the Swift ecosystem. +> +> There are many contexts—from educational/research tools like Playgrounds and +[Colab Notebooks](https://colab.research.google.com/notebook#create=true&language=swift) +to industrial programming activities like debugging and logging, in which it's +important to be able to easily visualize/understand Swift data structures. For +consumption by actual humans, though, Swift's facilities for formatting data +leave a _lot_ to be desired. + +[Jon Gilbert](https://forums.swift.org/u/vitamin) pitched [a proposal](https://forums.swift.org/t/property-initialization-using-a-keypath-within-an-init-method/35034) +for Property initialization using a KeyPath within an `init` method. + +> Given: + +```swift +struct Foo { + let bar: Int +} +``` + +> In an `init` method, you can do: + +```swift +init() { + self.bar = 42 +} +``` + +> However, unfortunately, you cannot do: + +```swift +init() { + self[keyPath: \.bar] = 42 +} +``` + +> This error is thrown: "`self` used before all stored properties are +initialized." +> +> This seems like a compiler bug, or at least, a counter-intuitive aspect of +keypaths. If a property setter works on `self` before its properties are +initialized, then a `keyPath` subscript should also work. + +[Shawn Baek](https://twitter.com/yoshiboarder) pitched [a proposal](https://forums.swift.org/t/table-style-print-for-2d-array-dictionary-and-tuples/35121) +for table style printing for two dimensional Arrays, Dictionaries, and tuples. + +> The standard library `print` doesn't support table-style output. So it is +hard to check the data in the 2D array. +> +> Here is my suggestion. + +```swift +print( + table: ["Good", "Very Good", "Happy", "Cool!"], + header: ["Wed", "Thu", "Fri", "Sat"] +) +``` + +> Output: + +``` ++----+---------+-----+-----+ +|Wed |Thu |Fri |Sat | ++----+---------+-----+-----+ +|Good|Very Good|Happy|Cool!| ++----+---------+-----+-----+ +``` ### Finally From bc4bc7cdb4ec0f7cfdf88b083a0c8497b3c592eb Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 9 Apr 2020 16:54:58 +0200 Subject: [PATCH 298/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 350d610c..074acc1f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -264,7 +264,7 @@ GEM thread_safe (0.3.6) typhoeus (1.3.1) ethon (>= 0.9.0) - tzinfo (1.2.6) + tzinfo (1.2.7) thread_safe (~> 0.1) unicode-display_width (1.7.0) zeitwerk (2.3.0) From 53441e1ac99f9f74c89571860d9bd5cc866e61a6 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 9 Apr 2020 16:57:05 +0200 Subject: [PATCH 299/589] Post 157 Resolves #507 --- {_drafts => _posts}/2020-04-09-issue-157.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) rename {_drafts => _posts}/2020-04-09-issue-157.md (88%) diff --git a/_drafts/2020-04-09-issue-157.md b/_posts/2020-04-09-issue-157.md similarity index 88% rename from _drafts/2020-04-09-issue-157.md rename to _posts/2020-04-09-issue-157.md index b22815d0..d563b368 100644 --- a/_drafts/2020-04-09-issue-157.md +++ b/_posts/2020-04-09-issue-157.md @@ -4,7 +4,10 @@ title: ! 'Issue #157' author: btb --- -> TODO: intro comments +This issue, I'll keep this short and sweet. I hope you're all staying healthy +and at home. + +Enjoy the issue! @@ -65,6 +68,12 @@ which implements [SE-0276](https://github.com/apple/swift-evolution/blob/master/ with a new approach for recording incremental build dependencies using the request evaluator, paving the way for faster builds in the future. 🏎 +[Suyash Srijan](https://twitter.com/suyashsrijan) merged [a pull request](https://github.com/apple/swift/pull/26632) +implementing [SE-0268](https://github.com/apple/swift-evolution/blob/master/proposals/0268-didset-semantics.md): *Refine `didSet` Semantics*, as well as [a pull request](https://github.com/apple/swift/pull/28916) implementing [SE-280](https://github.com/apple/swift-evolution/blob/master/proposals/0280-enum-cases-as-protocol-witnesses.md): *Enum cases as protocol witnesses*. + +[Stephen Canon](https://twitter.com/stephentyrone) merged [a pull request](https://github.com/apple/swift/pull/30130) +implementing [SE-0277](https://github.com/apple/swift-evolution/blob/master/proposals/0277-float16.md): *`Float16`*. + ### Accepted proposals [SE-0280](https://github.com/apple/swift-evolution/blob/master/proposals/0280-enum-cases-as-protocol-witnesses.md): *Enum cases as protocol witnesses* was [accepted](https://forums.swift.org/t/accepted-se-0280-enum-cases-as-protocol-witnesses/34850). From 03d07b135a2beae8ad501171359f65cd233a8fd5 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 9 Apr 2020 16:59:26 +0200 Subject: [PATCH 300/589] Add 158 draft References #508 --- _drafts/2020-04-23-issue-158.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2020-04-23-issue-158.md diff --git a/_drafts/2020-04-23-issue-158.md b/_drafts/2020-04-23-issue-158.md new file mode 100644 index 00000000..bbdae732 --- /dev/null +++ b/_drafts/2020-04-23-issue-158.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #158' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From e9b2c6d268626c104c570fea13d572c3d7e222ea Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Mon, 13 Apr 2020 22:19:43 +0200 Subject: [PATCH 301/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 078d6754..dba2ebfc 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship Swift Weekly Brief is distributed every other Thursday to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the Swift.org open source projects, as well as what's happening in the Swift community at large. -There are over 3,900 subscribers and over 8,700 followers on Twitter. +There are over 4,000 subscribers and over 8,800 followers on Twitter.

    Sponsored Links

    From 02968c16a6371f74b3449d8727bc96f0d9cc68df Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 22 Apr 2020 14:26:31 +0200 Subject: [PATCH 302/589] Add finally --- _drafts/2020-04-23-issue-158.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_drafts/2020-04-23-issue-158.md b/_drafts/2020-04-23-issue-158.md index bbdae732..0ec218de 100644 --- a/_drafts/2020-04-23-issue-158.md +++ b/_drafts/2020-04-23-issue-158.md @@ -53,4 +53,4 @@ sponsor: ### Finally -> TODO: something funny/fun. tweet, link, etc. +Joe Groff [never fails to a maïs](https://twitter.com/jckarter/status/1249098635813376003) 🌽 From 6a08e20d71638df17cb9a4a556438dfbbdcc231b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 22 Apr 2020 14:26:36 +0200 Subject: [PATCH 303/589] Remove sponsor --- _drafts/2020-04-23-issue-158.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/_drafts/2020-04-23-issue-158.md b/_drafts/2020-04-23-issue-158.md index 0ec218de..8ac662e6 100644 --- a/_drafts/2020-04-23-issue-158.md +++ b/_drafts/2020-04-23-issue-158.md @@ -2,11 +2,6 @@ layout: post title: ! 'Issue #158' author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO --- > TODO: intro comments From 9a8691b9285cecc8042dc467fe5652a520d1ba40 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 22 Apr 2020 14:38:26 +0200 Subject: [PATCH 304/589] Remove podcasts --- _drafts/2020-04-23-issue-158.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/_drafts/2020-04-23-issue-158.md b/_drafts/2020-04-23-issue-158.md index 8ac662e6..07a353ba 100644 --- a/_drafts/2020-04-23-issue-158.md +++ b/_drafts/2020-04-23-issue-158.md @@ -14,10 +14,6 @@ author: btb > TODO -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - ### News and community > TODO From f17dc0c809f1284028ed25734bc3427fa72fa3be Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 22 Apr 2020 14:41:44 +0200 Subject: [PATCH 305/589] Add proposals --- _drafts/2020-04-23-issue-158.md | 39 +++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/_drafts/2020-04-23-issue-158.md b/_drafts/2020-04-23-issue-158.md index 07a353ba..b23b4790 100644 --- a/_drafts/2020-04-23-issue-158.md +++ b/_drafts/2020-04-23-issue-158.md @@ -24,19 +24,40 @@ author: btb ### Accepted proposals -> TODO - -### Returned proposals - -> TODO +[SE-0281](https://github.com/apple/swift-evolution/blob/master/proposals/0281-main-attribute.md): *`@main`: Type-Based Program Entry Points* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0281-main-type-based-program-entry-points/35400). -### Rejected proposals - -> TODO +> The feedback was generally positive and the proposal has been accepted with +one minor revision: the `main()` signature will be throwing. ### Proposals in review -> TODO +[SE-0282](https://github.com/apple/swift-evolution/blob/master/proposals/0282-atomics.md): *Low-Level Atomic Operations* is [under review](https://forums.swift.org/t/se-0282-low-level-atomic-operations/35382). + +> This proposal adds a limited set of low-level atomic operations to the +Standard Library, including native spellings for C++-style memory orderings. +Our goal is to enable intrepid library authors to start building synchronization +constructs directly in Swift. +> +> In Swift today, application developers use dispatch queues and Foundation's +`NSLocking` protocol to synchronize access to mutable state across concurrent +threads of execution. +> +> However, for Swift to be successful as a systems programming language, it +needs to also provide low-level primitives that can be used to implement such +synchronization constructs (and many more!) directly within Swift. + +[SE-0279](https://github.com/apple/swift-evolution/blob/master/proposals/0279-multiple-trailing-closures.md): *Multiple Trailing Closures* is [under a second review](https://forums.swift.org/t/se-0279-multiple-trailing-closures-amended/35435). + +> This is the second review, with a modified proposal. The core team has +considered the feedback from the first review and believes that: +> +> - the underlying motivation for the proposal _does_ merit a change to the +language to better accommodate multiple trailing closures; +> - the concerns around the original proposed syntax warranted a rethink of the +proposed solution. +> +> The proposal authors have a revised proposal that aims to address some of +those concerns. ### Swift Forums From 6881384b1a34e03ee0bbb7dca469c4db70420360 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 22 Apr 2020 14:53:15 +0200 Subject: [PATCH 306/589] Add intro --- _drafts/2020-04-23-issue-158.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-23-issue-158.md b/_drafts/2020-04-23-issue-158.md index b23b4790..9e1648bd 100644 --- a/_drafts/2020-04-23-issue-158.md +++ b/_drafts/2020-04-23-issue-158.md @@ -4,7 +4,18 @@ title: ! 'Issue #158' author: btb --- -> TODO: intro comments +It still feels strange to me that every time I start writing this introduction, +I think about the two weeks that have just flown by. It makes me appreciate +how valuable time can be, and makes it feel worth it to provide all of you with +an overview of what's been happening in the "world of Swift". + +I also want to give another massive _thank you_ to [Kristaps](https://twitter.com/fassko), +whose contributions are what make it possible for me to continue writing these +issues. + +I'd like to encourage you to stand still and reach out to or thank someone that +has been helping you — speaking from my experience, it really makes a +difference. From c16131267872469f8a480c810be69d93d03872ba Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 22 Apr 2020 14:59:06 +0200 Subject: [PATCH 307/589] Add starter tasks --- _drafts/2020-04-23-issue-158.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-23-issue-158.md b/_drafts/2020-04-23-issue-158.md index 9e1648bd..38587974 100644 --- a/_drafts/2020-04-23-issue-158.md +++ b/_drafts/2020-04-23-issue-158.md @@ -23,7 +23,12 @@ difference. ### Starter tasks -> TODO +- [SR-12648](https://bugs.swift.org/browse/SR-12648) [Standard Library] +`RangeReplaceableCollection`'s `filter` uses an intermediate array +- [SR-12605](https://bugs.swift.org/browse/SR-12605) [Compiler] +`#sourceLocation` doesn't allow underscores in line numbers +- [SR-12585](https://bugs.swift.org/browse/SR-12585) [Project Infrastructure] +Teach update-checkout to `fetch` before `checkout` ### News and community From f29076723ade3260d51fce7a652b89eae8b9f7b2 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 22 Apr 2020 15:08:52 +0200 Subject: [PATCH 308/589] Add news and community --- _drafts/2020-04-23-issue-158.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-23-issue-158.md b/_drafts/2020-04-23-issue-158.md index 38587974..47342c1f 100644 --- a/_drafts/2020-04-23-issue-158.md +++ b/_drafts/2020-04-23-issue-158.md @@ -32,7 +32,14 @@ Teach update-checkout to `fetch` before `checkout` ### News and community -> TODO +[Mattt](https://twitter.com/mattt) announced [DocTest](https://github.com/SwiftDocOrg/DocTest), +an experimental tool for testing Swift example code in documentation. During +my brief foray in the land of Python, this is something I loved a lot about the +language. Mattt indicates Python's `doctest` indeed inspired this work, too. + +Xcode 11.4.1 [was released](https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_1_release_notes), +including a fix for a compiler crash and removed an incorrectly emitted error +for Swift packages. ### Commits and pull requests From 05bf7738910406f3a92cd7637f7a2be5bb107ae5 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 22 Apr 2020 15:09:05 +0200 Subject: [PATCH 309/589] Remove commits+pull requests --- _drafts/2020-04-23-issue-158.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/_drafts/2020-04-23-issue-158.md b/_drafts/2020-04-23-issue-158.md index 47342c1f..c35c81e3 100644 --- a/_drafts/2020-04-23-issue-158.md +++ b/_drafts/2020-04-23-issue-158.md @@ -41,10 +41,6 @@ Xcode 11.4.1 [was released](https://developer.apple.com/documentation/xcode_rele including a fix for a compiler crash and removed an incorrectly emitted error for Swift packages. -### Commits and pull requests - -> TODO - ### Accepted proposals [SE-0281](https://github.com/apple/swift-evolution/blob/master/proposals/0281-main-attribute.md): *`@main`: Type-Based Program Entry Points* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0281-main-type-based-program-entry-points/35400). From a4b4f001e836d1de2efacebcaf6989f474a93fac Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Wed, 22 Apr 2020 15:49:49 +0200 Subject: [PATCH 310/589] Add forum links --- _drafts/2020-04-23-issue-158.md | 103 +++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/_drafts/2020-04-23-issue-158.md b/_drafts/2020-04-23-issue-158.md index c35c81e3..60b066c3 100644 --- a/_drafts/2020-04-23-issue-158.md +++ b/_drafts/2020-04-23-issue-158.md @@ -80,7 +80,108 @@ those concerns. ### Swift Forums -> TODO +[Daniel Dunbar](https://twitter.com/daniel_dunbar) shared his [SwiftPM wishlist](https://forums.swift.org/t/my-swiftpm-wishlist-aka-proposal-proposals/35292): + +> [..] one thing that occurred to me is that it might not be very clear to the +community what are concrete examples of things kinds of enhancement proposals +that are good candidates. +> +> Also, while I barely contribute to SwiftPM anymore, we make very heavy use of +SwiftPM in the work our team currently does, so I have a lot of opinions from +managing large & complex graphs of SwiftPM projects. +> +> With that in mind, here is my own personal "wishlist" of SwiftPM enhancements +that are also _unblocked_ from my perspective, in the sense that if someone +wanted to show up with a proposal and an implementation, the project would be +eager to work towards accepting them. + +See [the full post](https://forums.swift.org/t/my-swiftpm-wishlist-aka-proposal-proposals/35292) +for a list of "proposal proposals". + +[Alexander Ronald Altman](https://twitter.com/pthariensflame) pitched [a proposal](https://forums.swift.org/t/declaration-like-argument-blocks/35336) +to add declaration-like argument blocks. + +> There have been a fair number of proposals for making multiple closure +arguments to a function look nicer and be more readable—most recently [SE-279](https://forums.swift.org/t/se-0279-multiple-trailing-closures/34255). +These have all come up against ergonomic issues and lack of community consensus +because they assume something close to the trailing closure syntax is what's +needed. I’d like to propose a very different approach, inspired directly by [a +hitherto unique feature of the language Ceylon](https://ceylon-lang.org/documentation/1.3/reference/expression/named-argument-list/), +and which counterintuitively makes a complicated call site easier to read by +increasing its length and verbosity (but also its expressiveness and +formattability). I call these **Declaration-Like Argument Blocks**, and the +intuitive idea is to make a complicated call site look a lot like a class or +struct declaration. + +[Dave Abrahams](https://twitter.com/DaveAbrahams) shared [an update](https://forums.swift.org/t/solving-the-mutating-slice-cow-problem/35297) +on solving the mutating slice Copy on Write problem. + +> [SR-12524](https://bugs.swift.org/browse/SR-12524) describes a problem we've +had since the earliest days of Swift. For years there has been talk of solving +it with language features, and in fact we got one of the necessary features in +coroutine accessors. I think I can now demonstrate it's the only feature we +needed, and I'll propose we incorporate this capability into the standard +library. + +[Jordan Rose](https://twitter.com/UINT_MIN) shared [some thoughts](https://forums.swift.org/t/sketching-out-more-efficient-variadics/35346) +and sketched out more efficient variadics. + +> 1. Variadics and array literals both default to allocating Arrays, which +usually means a heap allocation. +> 2. The compiler can already stack-promote Arrays _if_ it can prove that there +are no outstanding references to the Array instance. +> 3. But it's hard to do that through a non-inlinable function call. +> 4. We can sidestep that problem today by using `UnsafeBufferPointer`. +> 5. When move-only types come along, we're _close_ to being able to make a +safe `BorrowedBuffer` type. (Which we'll very likely want anyway, for other +purposes.) +> 6. If we then come up with a syntax to allow types other than `Array` to be +used for variadic parameters, we get safe stack-allocated variadics out of it. +(I don't much care what the syntax is at the moment.) + +[Ben Cohen](https://twitter.com/AirspeedSwift) pitched [a proposal](https://forums.swift.org/t/renaming-trailing-closure-functions-in-the-standard-library/35454) +to rename trailing closure functions in the standard library. + +> A review of the standard library should be undertaken on all high-order +functions to determine whether their argument label is important, and if so, +recommend adding a second method with the argument label hoisted into the +basename. This would be source breaking, but justified under the "active harm" +exception, since the readability of methods such as `drop(while:)` is currently +severely impaired by dropping the argument label. The original method should be +deprecated over time (probably when we next introduce a new language variant). +> +> Note, not all argument labels are necessary for readability, and would have +been better left out altogether. These should be left alone rather than changed +for consistency, since the bar for source breakage is high. + +[Paul Cantrell](https://twitter.com/inthehands) pitched [a proposal](https://forums.swift.org/t/allow-key-paths-to-reference-unapplied-instance-methods/35582) +to allow key paths to reference unapplied instance methods. + +> The [original key path proposal](https://github.com/apple/swift-evolution/blob/master/proposals/0161-key-paths.md) +expressly limited key paths to be able to reference only properties and +subscripts: + +```swift +\Person.name // KeyPath +\Person.pets[0] // KeyPath +``` + +> This proposal adds the ability for key paths to reference instance methods, +optionally specifying argument names: + +```swift +\Person.sing // KeyPath Sound> +\Person.sing(melody:lyrics:) // KeyPath Sound> +``` + +> Note that these key paths do not provide argument values; they reference +_unapplied_ methods, and the value they give is a function, not the the value +that results from calling the method. +> +> Adding this capability not only removes an inconsistency in Swift, but also +solves practical problems involving `map`/`filter` operations, proxying with +key path member lookup, and passing weak method references that do not retain +their receiver. ### Finally From 1c86b8b2f0f0b2192e92880fea4efc936282dd44 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 23 Apr 2020 19:07:19 +0200 Subject: [PATCH 311/589] Post 158 Closes #508 --- {_drafts => _posts}/2020-04-23-issue-158.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-04-23-issue-158.md (100%) diff --git a/_drafts/2020-04-23-issue-158.md b/_posts/2020-04-23-issue-158.md similarity index 100% rename from _drafts/2020-04-23-issue-158.md rename to _posts/2020-04-23-issue-158.md From 2390c02a425b0e579c24f7414a7ea13b3efa4700 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs Date: Thu, 7 May 2020 17:30:35 +0300 Subject: [PATCH 312/589] Issue 159 (#514) * Enable back parsing prose * First draft of new issue * New forum post about Result and Void * Correct SwiftWasm attribution in issue 159 (#511) * Add missing link to SwiftWasm forum post to issue 159 (#512) Only link to the demo and Yuta's profile were previously present. * Add new stuff * Added intro and info about linux distros * Removed blank sections and added new stuff * Remove sponsor * Make some changes * Move to posts Co-authored-by: Max Desiatov Co-authored-by: Bas Broek --- _posts/2020-05-07-issue-159.md | 122 +++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 _posts/2020-05-07-issue-159.md diff --git a/_posts/2020-05-07-issue-159.md b/_posts/2020-05-07-issue-159.md new file mode 100644 index 00000000..a7de4cb4 --- /dev/null +++ b/_posts/2020-05-07-issue-159.md @@ -0,0 +1,122 @@ +--- +layout: post +title: ! 'Issue #159' +author: fassko +--- + +The last two weeks started quite slow, but now it seems that things are starting to heat up. Apple has released more information about [WWDC 2020](https://developer.apple.com/wwdc20/), announcing it will take off on June 22. + +Also, Google Summer of Code 2020 students have been [announced](https://forums.swift.org/t/announcing-our-google-summer-of-code-2020-students/36147). They will be working on important and exciting projects for Swift over the summer, being mentored by the people at Apple! + + + +{% include sponsor.html %} + +### Podcasts + +In [episode 71](https://swiftbysundell.com/podcast/71/) of the Swift by Sundell podcast, [Dave Abrahams](https://twitter.com/DaveAbrahams) joins [John Sundell](https://twitter.com/johnsundell) to talk about Protocol-Oriented Programming and how to make the most out of the Swift Standard Library. Also, discussions on Swift’s overall design, why it puts such a strong emphasis on value types and protocols, and how it’s been influenced by other languages. + +### News and community + +An [announcement](https://swift.org/blog/additional-linux-distros/) has been made about even more Linux platforms officially supporting Swift. + +Development is open for [Swift 5.2.4 for Linux](https://forums.swift.org/t/development-open-for-swift-5-2-4-for-linux/36231), with a planned release at the end of May 2020. + +[Kenta Kubo](https://twitter.com/c10um0) tweeted [how to use a SwiftPM package on Swift Playgrounds on iPad](https://twitter.com/c10um0/status/1255537044853362688) by using Working Copy and Textastic. + +[Dario Rexin](https://forums.swift.org/u/drexin/summary) announced [Swift 5.2.3 for Linux](https://forums.swift.org/t/swift-5-2-3-for-linux/35991). + +[Paul Hudson](https://twitter.com/twostraws) shared tweeted [some of the features](https://twitter.com/twostraws/status/1255875829541875714) coming in Swift 5.3. + +### Commits and pull requests + +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/31393) that ripped out the old dependency graph implementation. + +[Ted Kremenek](https://twitter.com/tkremenek) merged [a pull request](https://github.com/apple/swift/pull/30994) that fixes `_modify` for wrapped properties with observers. It got some [community](https://twitter.com/steipete/status/1255751675853377537) members very [excited](https://twitter.com/twostraws/status/1255602271720742912). :) + +[Johannes Weiss](https://twitter.com/johannesweiss) created [a pull request](https://github.com/apple/swift-nio/pull/1499) that allows completely single-threaded NIO programs. + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/31543) that extends function builders with support for `for..in` loops. + +[Slava Pestov](https://twitter.com/slava_pestov) opened [a pull request](https://github.com/apple/swift/pull/31187) that removes the integrated REPL. Read more on the forum [discussion](forums.swift.org/t/rfc-removing-the-integrated-repl/35441). + +> The integrated REPL has been deprecated in favor of the LLDB REPL for a while, and the implementation had accumulated some amount of technical debt throughout the code base. Since most people don't use it and are not even aware that it exists, we can remove it. + +### Accepted proposals + +[SE-0279](https://github.com/apple/swift-evolution/blob/master/proposals/0279-multiple-trailing-closures.md): *Multiple Trailing Closures* was [accepted in its second review](https://forums.swift.org/t/se-0279-multiple-trailing-closures-amended/35435/197). + +>The amended proposal was received more positively. Several reviewers who had opposed the original proposal were now unreservedly in favor. Others supported the new proposal overall but expressed a preference for also allowing an argument label on the first closure. +> +>However, many reviewers continued to oppose the amended proposal. Some reviewers expressed their dislike of trailing closures overall, or disputed the need to allow multiple trailing closures. The core team continues to believe, as we stated at the start of the second review, that the underlying motivation for the proposal is sound and changes here are merited. Other reviewers disliked the specifics of the change or felt that it was not tenable without allowing an argument label on the first closure or without substantial changes to the model for type-checking calls with trailing closures. + +### Returned proposals + +[SE-0282](https://github.com/apple/swift-evolution/blob/master/proposals/0282-atomics.md) has been [returned for revision](https://forums.swift.org/t/se-0282-low-level-atomic-operations/35382/69). + +> During the review, support was nearly unanimous for the memory model the proposal establishes, bringing Swift in line with the model standardized by C. The core team concurs with the review discussion on this subject, and would like to see a revised proposal that focuses on specifying the memory model. Guaranteeing a C-compatible memory model allows developers that currently wrap atomic primitives written in C and import them into Swift to rely on this continuing to work. This would also provide stable ground for building atomics packages outside of the standard library for experimentation and use by early adopters. The Swift project itself plans to develop one of these packages + +### Proposals in review + +[SE-0283](https://github.com/apple/swift-evolution/blob/master/proposals/0283-tuples-are-equatable-comparable-hashable.md): *Tuples Conform to `Equatable`, `Comparable`, and `Hashable`* is [under review](https://forums.swift.org/t/se-0283-tuples-conform-to-equatable-comparable-and-hashable/36140). + +> Introduce `Equatable`, `Comparable`, and `Hashable` conformance for all tuples whose elements are themselves `Equatable`, `Comparable`, and `Hashable`. +> +> Tuples in Swift currently lack the ability to conform to protocols. This has led many users to stop using tuples altogether in favor of structures that they can them conform protocols to. The shift from tuples to structures have made tuples almost feel like a second class type in the language because of them not being able to do simple operations that should just work. + +### Swift Forums + +[Miguel de Icaza](https://twitter.com/migueldeicaza) pitched [a proposal](https://forums.swift.org/t/swift-package-installation/35728) on Swift package installation. + +> It would be desirable to simplify the use of executables that have been compiled with swift build and installing the binary, payloads and other requirements into either a global location usable by all users on the system, or make it available only to the current user. +> +> This would simplify the distribution and usage of Swift-authored tools, as instructions for installing the software would be as simple as directing the user to type swift tool install. + +[Jon Shier](https://twitter.com/jshier) started [a discussion](https://forums.swift.org/t/newtype-for-swift/35859) about `newtype`. + +> `newtype` has [come up again](https://forums.swift.org/t/newtype-without-automatic-protocol-forwarding/16110/31) and since I don't have a specific pitch I thought I'd start some discussion outside of the older thread. Before diving into specific syntax or implementation details I think it would be good to gather ideas about what people want out of such a feature and what they feel is most important. + +[Cory Benfield](https://twitter.com/lukasaoz) pitched [a proposal](https://forums.swift.org/t/extensible-enumerations-for-non-resilient-libraries/35900) to enable non-resilient Swift libraries to provide "extensible" enums. + +> This proposal adds an attribute to allow Swift enumerations to opt-in to an extensible behaviour. This reconciles a feature mismatch between resilient and non-resilient dialects of Swift, and makes Swift enumerations vastly more useful in the public API of non-resilient Swift libraries. + +[Adrian Meister](https://forums.swift.org/u/DevAndArtist) ask about [what kind of breaking changes](https://forums.swift.org/t/breaking-changes-in-swift-6/35928) are considered/allowed in Swift 6. + +>> There could also be an opportunity for us to eliminate the language dialect here in Swift 6, and make it so that the next breaking change of the language always defaults enums to non-frozen behavior in all modules. +> +>I read these kind of things very frequent in the last couple weeks. That makes me wonder, what kind of breaking changes are considered/allowed in Swift 6? There are a couple other things that come to my mind that would require a breaking change to be really fixed / work. + +[David Goldman](https://forums.swift.org/u/DavidGoldman) pitched [a proposal](https://forums.swift.org/t/sourcekit-lsp-file-status-ux/35947) to add some indication of file status to SourceKit-LSP. + +> 1. Give the user an idea of what they should expect - is the build system initializing? Does the +build system recognize the file? Is (pre)building still required before full functionality can +occur? +> * This will increased perceived reliability as long as these statuses are accurate and clear +> * SourceKit-LSP can also change behavior based on these states, e.g. potentially hold back +diagnostics if the build system still needs to prebuild. +> 2. Make the clangd/sourcekitd loading state clear. This helps isolate build system vs. compiler +issues and lets the user know the compiler is working (even if we can't provide progress estimates) + +[Kaitlin Mahar](https://twitter.com/k__mahar) pitched [a proposal](https://forums.swift.org/t/feedback-mongodb-swift-driver/35989) to create a MongoDB Swift driver. + +> `mongo-swift-driver` is a client library for using MongoDB from Swift. Its module `MongoSwift` provides a SwiftNIO-based asynchronous API for interacting with the database. The core type, `MongoClient`, maintains a pool of connections to servers in a MongoDB deployment and provides an interface for querying, inserting, and updating data in the deployment. In addition, the client handles authentication, TLS, topology monitoring, and automatically retrying failed commands. The driver also contains a [BSON](https://docs.mongodb.com/manual/reference/bson-types/) implementation allowing users to create and manipulate MongoDB documents and to convert between documents and native Swift types. + +[Owen Voorhees](https://twitter.com/owenvoorhees) pitched [a proposal](https://forums.swift.org/t/pitch-make-never-the-bottom-type/36013) making `Never` a true bottom type in Swift. + +> [SE-0102](https://github.com/apple/swift-evolution/blob/master/proposals/0102-noreturn-bottom-type.md) introduced the `Never` type, an enum with no cases, as a way of conveying to both the compiler and user that a function cannot return by normal means. Instead, a `Never`-returning function might throw an error, trap, or simply never terminate. Over time, the type's uses have expanded to model other "impossible" situations. For example, thanks to [SE-0215](https://github.com/apple/swift-evolution/blob/master/proposals/0215-conform-never-to-hashable-and-equatable.md), which conformed Never to Error, one can construct a `Result` which is guaranteed to represent a success state + +[Nate Cook](https://twitter.com/nnnnnnnn) pitched [a proposal](https://forums.swift.org/t/fix-inconsistency-for-sequence-max/36063) that modifies the behavior of the `Sequence.max` algorithms to match the free `max(...)` functions in cases where there is more than one "maximum" element. + +> [SR-12113](https://bugs.swift.org/browse/SR-12113) asks that we codify the behavior of the `min` and `max` methods on sequences into a guarantee in the documentation. Unfortunately, the current behavior of the max methods is inconsistent with other places in the standard library that identify the maximum of two or more inputs, when there is more than one "maximum" value. +> +> Specifically, the sequence method returns the first of several maximum elements in the sequence, while the other APIs (the max free functions and the `FloatingPoint.maximum` static methods) return the last of the maximum values. In general, this difference behavior isn't noticeable, but for class instances it's observable through instance identity, and when using the predicate-based method can be observed through whatever properties aren't included. + +[tcldr](https://forums.swift.org/u/tcldr) pitched [a proposal](https://forums.swift.org/t/convenience-member-on-result-when-when-success-is-void/36134) about a tiny refinement to the Standard Library to provide a convenience member on `Result` when `Success` is `Void`. + +> Result types with a success type of Void are commonly used when no further information about the result of the operation are required – other than to know it was successful. In these cases, it is necessary to return a Result via `Result.success(())`. + +### Finally + +* A cool project by [Krzysztof Siejkowski] - [a collection of poems](https://swiftpoetry.com/) written in Swift. + +* Swift on a [shot glass](https://twitter.com/tkremenek/status/1256039832754634753)... that must have a story behind it? From 5e831523cf46c6305537a5b702fb5d0b83abbcb2 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 7 May 2020 16:34:26 +0200 Subject: [PATCH 313/589] Add 160 draft References #515 --- _drafts/2020-05-21-issue-160.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2020-05-21-issue-160.md diff --git a/_drafts/2020-05-21-issue-160.md b/_drafts/2020-05-21-issue-160.md new file mode 100644 index 00000000..b468ceaf --- /dev/null +++ b/_drafts/2020-05-21-issue-160.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #160' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From f990d1a80ed23d4b9ba412636b175b3d35319406 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Tue, 19 May 2020 20:04:40 +0200 Subject: [PATCH 314/589] Run bundle update --- Gemfile.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 074acc1f..66ca11f8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,12 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.2.2) + activesupport (6.0.3.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - zeitwerk (~> 2.2) + zeitwerk (~> 2.2, >= 2.2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) claide (1.0.3) @@ -56,7 +56,7 @@ GEM ffi (1.12.2) forwardable-extended (2.6.0) gemoji (3.0.1) - git (1.6.0) + git (1.7.0) rchardet (~> 1.8) github-pages (204) github-pages-health-check (= 1.16.1) @@ -229,7 +229,7 @@ GEM jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.14.0) + minitest (5.14.1) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) @@ -242,7 +242,7 @@ GEM pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (3.1.1) - rb-fsevent (0.10.3) + rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) rchardet (1.8.0) @@ -262,7 +262,7 @@ GEM terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) - typhoeus (1.3.1) + typhoeus (1.4.0) ethon (>= 0.9.0) tzinfo (1.2.7) thread_safe (~> 0.1) From c671fa19881dde640de31cb92fe3453d9e1141f6 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 May 2020 15:19:34 +0200 Subject: [PATCH 315/589] Update sponsorship.md --- sponsorship.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index dba2ebfc..58ee9eff 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,12 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso
    |   Issue |   Status | |:-|:-| -| March 12 | Open | -| March 26 | Open | -| April 9 | Open | -| April 23 | Open | -| May 7 | Open | -| May 21 | Open | | June 4 | Open | | June 18 | Open | | July 2 | Open | From 58f6094e1ce99f115538c738ce1cd60335722614 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 May 2020 17:59:42 +0200 Subject: [PATCH 316/589] Mostly done --- _drafts/2020-05-21-issue-160.md | 144 ++++++++++++++++++++++++++------ 1 file changed, 117 insertions(+), 27 deletions(-) diff --git a/_drafts/2020-05-21-issue-160.md b/_drafts/2020-05-21-issue-160.md index b468ceaf..a32e052f 100644 --- a/_drafts/2020-05-21-issue-160.md +++ b/_drafts/2020-05-21-issue-160.md @@ -2,55 +2,145 @@ layout: post title: ! 'Issue #160' author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO --- -> TODO: intro comments +And so, another two weeks have passed. For me, time seems to pass so quickly and +yet at the same time, slowly. - - -{% include sponsor.html %} +We're now about a month away from WWDC20 "taking off" — what that means exactly +is still a surprise, but I'm very much looking forward to it. -### Starter tasks +Also, today's issue coincides with Global Accessibility Awareness Day (GAAD). +It's a topic very dear to me. There are some [tasks on this website's +repository](https://github.com/SwiftWeekly/swiftweekly.github.io/issues?q=is%3Aissue+is%3Aopen+label%3Aaccessibility) +that aim to make the site more accessible. Any help on those would mean the +world to me. -> TODO +After all, I took over the curation of this newsletter from Jesse because I +wanted to keep sharing what's happening in Swift open source with all those +others benefiting from it. -### Podcasts +There are also still [sponsorship opportunities](https://swiftweekly.github.io/sponsorship/) +for the newsletter, and I would greatly appreciate it if you could share that +with those who might be interested in helping with the newsletter in that way. +It allows us to keep delivering it to your inbox every other Thursday! -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +Anyway... there's also news! -### News and community + -> TODO +{% include sponsor.html %} -### Commits and pull requests +### News and community -> TODO +Swift 5.3 [was released](https://forums.swift.org/t/whats-new-in-swift-5-3/36508), +and Larry provided a great overview of what's included. -### Accepted proposals +[Tim Condon](https://twitter.com/0xTim) wrote [an article](https://www.timc.dev/posts/future-of-server-side-swift) +discussing the future of server-side Swift. -> TODO +[Vinicius Vendramini](https://twitter.com/vvendra) announced [Gryphon](https://vinivendra.github.io/Gryphon/), +a Swift to Kotlin translator — a project he's been working on for the past three +(!) years. -### Returned proposals +### Commits and pull requests -> TODO +[Mike Ash](https://twitter.com/mikeash) opened [a pull request](https://github.com/apple/swift/pull/31468) +that adds a utility that can attach to a running Swift process and inspect/debug +the runtime's behavior. -### Rejected proposals +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift-package-manager/pull/2736) +allowing the Swift Package Manager to optionally use the new swift-driver, +making it much easier to try it out for your own projects. -> TODO +### Accepted proposals -### Proposals in review +[SE-0283](https://github.com/apple/swift-evolution/blob/master/proposals/0283-tuples-are-equatable-comparable-hashable.md): *Tuples Conform to `Equatable`, `Comparable`, and `Hashable`* was [accepted](https://forums.swift.org/t/accepted-se-0283-tuples-conform-to-equatable-comparable-and-hashable/36658). -> TODO +> Almost all the feedback we received was positive, and the Core Team is +convinced that this is a great incremental step forward. Some excellent points +on possible concern over future tech debt in the compiler and runtime were +brought up, but the Core Team believes that it is manageable and that this +proposal helps push Swift forward in a positive direction. ### Swift Forums -> TODO +[Dan Loman]() pitched [a proposal](https://forums.swift.org/t/adding-firstas-to-sequence/36665) +to add `firstAs()` to `Sequence`. + +> I often find it necessary (and I imagine this is somewhat common) to find and +cast the first matching element of a sequence. There are of course a few +techniques that could be used to do this. For example: + +```swift +sequence.filter { $0 is MyType }.first as? MyType +sequence.compactMap { $0 as? MyType }.first +sequence.first { $0 is MyLongTypeName } as? MyLongTypeName +if let element = sequence.first(where: { $0 is MyLongTypeName }) as? MyLongTypeName { + // do something +} +``` + +> The last option should leave us with the fewest iterations and is the option +I've chosen to implement as a simple helper in a number of my projects. +> +> This can allow for very compact, straightforward, and efficient calls to find +the first element you're looking for: + +```swift +// explicit type +if let element = sequence.firstAs(MyType.self) { + // do something +} +// inferred type +if let element: MyLongTypeName = sequence.firstAs() { + // do something +} +// inferred type +let label: UILabel? + +switch searchArea { +case .subviews: + label = subviews.firstAs() +case .arrangedSubviews: + label = stackView.arrangedSubviews.firstAs() +} +``` + +kumarc pitched [a proposal](https://forums.swift.org/t/use-instead-of-curly-braces-for-single-expression-bodied-property-getters-subscripted-getters-and-functions/36676) +to use `->` instead of curly braces for single expression bodied property +getters, subscripted getters and functions. + +> As of [SE-0255](https://github.com/apple/swift-evolution/blob/master/proposals/0255-omit-return.md) +developers can omit the return keyword for single-expression bodied getters for +properties, subscripts and single expression bodies functions. This is a nice +improvement to the language. Here's an even more improved version of the same +proposal. +> +> **Existing Syntax for Properties** + +```swift +var location: Location { .init(latitude: lat, longitude: long) } +``` + +> **Proposed Change** + +```swift +var location: Location -> .init(latitude: lat, longitude: long) +``` + +https://forums.swift.org/t/pitch-2-cross-import-overlays/36710 + +https://forums.swift.org/t/pitch-enable-test-discovery-by-default/36619 + +https://forums.swift.org/t/rfc-policies-for-swift-platform-development/36257 + +https://forums.swift.org/t/about-the-swift-composable-architecture-category/36406 / https://forums.swift.org/t/subscriptions/36417 + +https://forums.swift.org/t/se-0279-and-variadic-parameters/36410 + +https://forums.swift.org/t/metrics-extras/36616 ### Finally -> TODO: something funny/fun. tweet, link, etc. +Finding [closure](https://twitter.com/jnadeau/status/1258881304268963845). `{ _ in }` From 187ee08a46a3696a6b359a8882337d74c224d682 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 May 2020 18:53:31 +0200 Subject: [PATCH 317/589] Finish draft --- _drafts/2020-05-21-issue-160.md | 65 ++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/_drafts/2020-05-21-issue-160.md b/_drafts/2020-05-21-issue-160.md index a32e052f..0af8f0de 100644 --- a/_drafts/2020-05-21-issue-160.md +++ b/_drafts/2020-05-21-issue-160.md @@ -65,7 +65,7 @@ proposal helps push Swift forward in a positive direction. ### Swift Forums -[Dan Loman]() pitched [a proposal](https://forums.swift.org/t/adding-firstas-to-sequence/36665) +[Dan Loman](https://forums.swift.org/u/namolnad/summary) pitched [a proposal](https://forums.swift.org/t/adding-firstas-to-sequence/36665) to add `firstAs()` to `Sequence`. > I often find it necessary (and I imagine this is somewhat common) to find and @@ -107,7 +107,7 @@ case .arrangedSubviews: } ``` -kumarc pitched [a proposal](https://forums.swift.org/t/use-instead-of-curly-braces-for-single-expression-bodied-property-getters-subscripted-getters-and-functions/36676) +[Kumar C](https://forums.swift.org/u/kumarc/summary) pitched [a proposal](https://forums.swift.org/t/use-instead-of-curly-braces-for-single-expression-bodied-property-getters-subscripted-getters-and-functions/36676) to use `->` instead of curly braces for single expression bodied property getters, subscripted getters and functions. @@ -129,17 +129,62 @@ var location: Location { .init(latitude: lat, longitude: long) } var location: Location -> .init(latitude: lat, longitude: long) ``` -https://forums.swift.org/t/pitch-2-cross-import-overlays/36710 +[Brent Royal-Gordon](https://twitter.com/brentdax) pitched [a follow-up proposal](https://forums.swift.org/t/pitch-2-cross-import-overlays/36710) +to cross-importing overlays. -https://forums.swift.org/t/pitch-enable-test-discovery-by-default/36619 - -https://forums.swift.org/t/rfc-policies-for-swift-platform-development/36257 - -https://forums.swift.org/t/about-the-swift-composable-architecture-category/36406 / https://forums.swift.org/t/subscriptions/36417 +>> Cross-import overlays allow Swift to automatically import additional +"overlay" modules based on the combination of imports in a particular source +file. They allow one library or framework to seamlessly offer tailored APIs for +interoperating with another, without imposing additional dependencies or code +on clients who don’t need it. +> +> This feature has now been implemented and is in master and 5.3 nightly +compilers, hidden behind the `-Xfrontend -enable-cross-import-overlays` flag. +The proposal has been rewritten and reflects the implementation in the +nightlies. + +[Tim Condon](https://twitter.com/0xTim) pitched [a proposal](https://forums.swift.org/t/pitch-enable-test-discovery-by-default/36619) +to enable test discovery on Linux by default. + +> Swift 5.1 [introduced](https://forums.swift.org/t/test-discovery-on-linux/26203) +Test Discovery on Linux adding an `--enable-test-discovery` flag you could pass +to `swift test` so it would automatically pick up tests on Linux to run, without +having to manually specifying them, which is prone to problems. +> +> Since this has been in use for several months now without major issues, I +propose we enable the flag by default. This simplifies testing on Linux, stops +[build errors](https://forums.swift.org/t/make-test-discovery-on-by-default/30321) +when building on Linux without a `LinuxMain.swift` present and no flag, and +generally makes life a bit easier, especially for newcomers. + +[Saleem Abdulrasool](https://twitter.com/compnerd) pitched [a proposal](https://forums.swift.org/t/rfc-policies-for-swift-platform-development/36257) +to add policies for Swift platform development. + +> In order to create a stable ecosystem for Swift, it is important that we +maintain a single coherent ecosystem across platforms. Whenever technical +feasible, the project should aim to provide the same interfaces, behaviours, +and capabilities on every platform. For example, the compiler and build system +should support both static and dynamic linking of libraries on all platforms. + +[Owen Voorhees](https://twitter.com/owenvoorhees) brought up [required changes](https://forums.swift.org/t/se-0279-and-variadic-parameters/36410) +to his proposal on multiple variadic parameters in functions. + +> I'm currently looking into whether my proposal for [multiple variadic +parameters in functions](https://github.com/apple/swift-evolution/pull/1125) +will need any updates now that [SE-0279](https://github.com/apple/swift-evolution/blob/master/proposals/0279-multiple-trailing-closures.md) +is accepted. While experimenting with the implementation on `master`, I noticed +the following is not allowed: -https://forums.swift.org/t/se-0279-and-variadic-parameters/36410 +```swift +func foo(bar: () -> (), baz: () -> ()..., qux: () -> ()) {} +foo {} baz: {} _: {} _: {} qux: {} // error: extra arguments at positions #4, #3, #3, #4 in call +``` -https://forums.swift.org/t/metrics-extras/36616 +> I assume this is mostly a consequence of the backwards scan argument matching +rule, but is it the intended behavior (the error message indicates it may just +be a bug)? The proposal text doesn't mention varargs. I think choosing to allow +it or disallow it would both be reasonable, but it would be nice to specify the +intended behavior a little more clearly. ### Finally From c09ec38e84bd19405a70acaa389951f9ef52ed46 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 May 2020 18:53:50 +0200 Subject: [PATCH 318/589] Post 160 Closes #515 --- {_drafts => _posts}/2020-05-21-issue-160.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-05-21-issue-160.md (100%) diff --git a/_drafts/2020-05-21-issue-160.md b/_posts/2020-05-21-issue-160.md similarity index 100% rename from _drafts/2020-05-21-issue-160.md rename to _posts/2020-05-21-issue-160.md From f268906b4937280e846465f8087d2780bfd657c6 Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Thu, 21 May 2020 18:55:42 +0200 Subject: [PATCH 319/589] Push 161 draft References #518 --- _drafts/2020-06-04-issue-161.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2020-06-04-issue-161.md diff --git a/_drafts/2020-06-04-issue-161.md b/_drafts/2020-06-04-issue-161.md new file mode 100644 index 00000000..2f2aecfe --- /dev/null +++ b/_drafts/2020-06-04-issue-161.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #161' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + + + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 974fd3abc2b0325e19d9c71f9d03e85b42387dec Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Thu, 21 May 2020 19:24:09 +0100 Subject: [PATCH 320/589] Correct issue #160 stating that Swift 5.3 was released (#519) Swift 5.3 is not released yet. --- _posts/2020-05-21-issue-160.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-05-21-issue-160.md b/_posts/2020-05-21-issue-160.md index 0af8f0de..015e175b 100644 --- a/_posts/2020-05-21-issue-160.md +++ b/_posts/2020-05-21-issue-160.md @@ -33,7 +33,7 @@ Anyway... there's also news! ### News and community -Swift 5.3 [was released](https://forums.swift.org/t/whats-new-in-swift-5-3/36508), +Swift 5.3 [is going to be released soon](https://forums.swift.org/t/whats-new-in-swift-5-3/36508), and Larry provided a great overview of what's included. [Tim Condon](https://twitter.com/0xTim) wrote [an article](https://www.timc.dev/posts/future-of-server-side-swift) From e7d4d6af92cc1f07d1a188c55b881559dd849867 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Thu, 21 May 2020 17:12:52 -0700 Subject: [PATCH 321/589] [CI] switch to github actions. (#521) closes #513 --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 12 ----------- Gemfile | 2 ++ README.md | 6 +++--- 4 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..f8b3884b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + name: Build Site + runs-on: macOS-latest + steps: + - name: git checkout + uses: actions/checkout@v1 + + - name: versions + run: | + ruby --version + gem --version + bundler --version + + - name: cache + uses: actions/cache@v1 + with: + path: vendor/bundle + key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gem- + + - name: bundle install + run: | + bundle config path vendor/bundle + bundle install --without=documentation --jobs 4 --retry 3 + echo "::add-path::/Users/runner/Library/Python/2.7/bin" + + - name: jekyll build + run: bundle exec jekyll build + + - name: danger + env: + DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} + run: bundle exec danger diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e446e624..00000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: ruby -sudo: false -cache: bundler -rvm: 2.5.1 - -before_install: - - gem update --system - - gem install bundler - -script: - - bundle exec jekyll build --future --drafts - - bundle exec danger diff --git a/Gemfile b/Gemfile index cdf88092..b6b86fb4 100644 --- a/Gemfile +++ b/Gemfile @@ -2,8 +2,10 @@ source 'https://rubygems.org' gem 'github-pages', group: :jekyll_plugins gem 'jekyll-sitemap' + gem 'danger' gem 'danger-prose' + gem 'claide' gem 'octokit' gem 'colorize' diff --git a/README.md b/README.md index cd4cdc62..9b8b67f4 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# [swiftweekly.github.io](https://swiftweekly.github.io) [![Build Status](https://travis-ci.org/SwiftWeekly/swiftweekly.github.io.svg?branch=master)](https://travis-ci.org/SwiftWeekly/swiftweekly.github.io) +# [swiftweekly.github.io](https://swiftweekly.github.io) ![CI](https://github.com/swiftweekly/swiftweekly.github.io/workflows/CI/badge.svg) *A community-driven weekly newsletter about [Swift.org](https://swift.org)* -> Started by [@jesse_squires](https://twitter.com/jesse_squires) and curated by [@BasThomas](https://twitter.com/BasThomas). +> Started by [@jesse_squires](https://twitter.com/jesse_squires) and curated by [@BasThomas](https://twitter.com/BasThomas). @@ -37,7 +37,7 @@ $ bundle exec jekyll build ### Previewing the site locally ```bash -$ bundle exec jekyll serve +$ bundle exec jekyll serve # Now browse to http://localhost:4000 ``` From 952fb6d8485de9c92c4a7fee489b6ea707379f4b Mon Sep 17 00:00:00 2001 From: Bas Broek Date: Fri, 22 May 2020 07:04:58 +0200 Subject: [PATCH 322/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 58ee9eff..3fd8ebc8 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -61,7 +61,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso |   Issue |   Status | |:-|:-| | June 4 | Open | -| June 18 | Open | +| June 18 | **Booked** | | July 2 | Open | | July 16 | Open | | July 30 | Open | From 4bc0004f8fc4f34afd3f6e078ff6b89c6174ee23 Mon Sep 17 00:00:00 2001 From: Ferran Poveda Date: Sun, 24 May 2020 18:26:47 -0700 Subject: [PATCH 323/589] Minor updates for accessibility (#523) * remove scaling limitation * add aria-titles for social share links --- _includes/head.html | 2 +- _includes/social_share.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index 42e5c371..2c2c60dd 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,7 +1,7 @@ - + diff --git a/_includes/social_share.html b/_includes/social_share.html index a4752dcf..f98563f3 100644 --- a/_includes/social_share.html +++ b/_includes/social_share.html @@ -20,10 +20,10 @@ </li> {% endif %} <li> - <a href="https://twitter.com/intent/tweet?text=Issue%20{{ issue_number }}%20@{{ site.twitter.username }}%20{{ site.url }}{{ page.url }}%20written%20by%20@{{ author.twitter }}" title="Share on Twitter" target="_blank"> <i class="fa fa-lg fa-twitter"></i> </a> + <a href="https://twitter.com/intent/tweet?text=Issue%20{{ issue_number }}%20@{{ site.twitter.username }}%20{{ site.url }}{{ page.url }}%20written%20by%20@{{ author.twitter }}" title="Share on Twitter" aria-label="Share on Twitter" target="_blank"> <i class="fa fa-lg fa-twitter"></i> </a> </li> <li> - <a href="https://www.facebook.com/sharer.php?u={{ site.url }}{{ page.url }}" title="Share on Facebook" target="_blank"> <i class="fa fa-lg fa-facebook"></i> </a> + <a href="https://www.facebook.com/sharer.php?u={{ site.url }}{{ page.url }}" title="Share on Facebook" aria-label="Share on Facebook" target="_blank"> <i class="fa fa-lg fa-facebook"></i> </a> </li> {% if page.next.url %} <li> From a12f909c79bda4791b22fde3f91bcbc2d9510cab Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Wed, 3 Jun 2020 19:03:32 +0200 Subject: [PATCH 324/589] Run bundle update --- Gemfile.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 66ca11f8..c46efbce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,14 +53,14 @@ GEM multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) - ffi (1.12.2) + ffi (1.13.0) forwardable-extended (2.6.0) gemoji (3.0.1) git (1.7.0) rchardet (~> 1.8) - github-pages (204) + github-pages (206) github-pages-health-check (= 1.16.1) - jekyll (= 3.8.5) + jekyll (= 3.8.7) jekyll-avatar (= 0.7.0) jekyll-coffeescript (= 1.1.1) jekyll-commonmark-ghpages (= 0.1.6) @@ -99,7 +99,7 @@ GEM mercenary (~> 0.3) minima (= 2.5.1) nokogiri (>= 1.10.4, < 2.0) - rouge (= 3.13.0) + rouge (= 3.19.0) terminal-table (~> 1.4) github-pages-health-check (1.16.1) addressable (~> 2.3) @@ -107,13 +107,13 @@ GEM octokit (~> 4.0) public_suffix (~> 3.0) typhoeus (~> 1.3) - html-pipeline (2.12.3) + html-pipeline (2.13.0) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) i18n (0.9.5) concurrent-ruby (~> 1.0) - jekyll (3.8.5) + jekyll (3.8.7) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) @@ -246,7 +246,7 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rchardet (1.8.0) - rouge (3.13.0) + rouge (3.19.0) ruby-enum (0.8.0) i18n rubyzip (2.3.0) From 8696468c3b7a74c909b6f681785a170b3c745d71 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 11 Jun 2020 15:16:22 +0200 Subject: [PATCH 325/589] Update Gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c46efbce..f87c0029 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GEM multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) - ffi (1.13.0) + ffi (1.13.1) forwardable-extended (2.6.0) gemoji (3.0.1) git (1.7.0) From 95fe17949c4da0318ae878897b16c20b34e72661 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 11 Jun 2020 15:18:33 +0200 Subject: [PATCH 326/589] Update date --- _drafts/{2020-06-04-issue-161.md => 2020-06-11-issue-161.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename _drafts/{2020-06-04-issue-161.md => 2020-06-11-issue-161.md} (100%) diff --git a/_drafts/2020-06-04-issue-161.md b/_drafts/2020-06-11-issue-161.md similarity index 100% rename from _drafts/2020-06-04-issue-161.md rename to _drafts/2020-06-11-issue-161.md From 7c02cebb9e773e42ff2409147508ff3de99358ec Mon Sep 17 00:00:00 2001 From: Ferran Poveda <fbeeper@gmail.com> Date: Thu, 11 Jun 2020 06:23:46 -0700 Subject: [PATCH 327/589] New accessible light & dark syntax highlighting themes (#522) * new accessible light & dark syntax highlighting themes * reorganize color palette + define colors with accessible contrasts * fix highlight background to match site bg color in dark mode Co-authored-by: Bas Broek <BasThomas@users.noreply.github.com> --- _includes/footer.html | 2 +- _includes/social_share.html | 2 +- _includes/sponsor.html | 2 +- css/style.css | 97 ++++++++-------- css/syntax.css | 220 ++++++++++++++++++++++++------------ 5 files changed, 198 insertions(+), 125 deletions(-) diff --git a/_includes/footer.html b/_includes/footer.html index 472fbd0b..e84e58d2 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -12,7 +12,7 @@ <footer class="container container-fluid"> <hr> - <p class="text-muted text-center"> + <p class="text-center"> <small> <strong>Questions? Feedback? Corrections?</strong><br/> Open an <a href="{{ open_issue_url }}" target="_blank">issue</a> or diff --git a/_includes/social_share.html b/_includes/social_share.html index f98563f3..ab3bcad9 100644 --- a/_includes/social_share.html +++ b/_includes/social_share.html @@ -8,7 +8,7 @@ {% assign edit_url = base_edit_url | append: file_name %} <div class="row center sharing"> - <small class="text-muted text-center"> + <small class="text-center"> <i class="fa fa-pencil" aria-hidden="true"></i> <a href="{{ edit_url }}" target="_blank"><strong>Edit</strong></a> this issue on GitHub. </small> diff --git a/_includes/sponsor.html b/_includes/sponsor.html index 8398f6c8..dc3f93e2 100644 --- a/_includes/sponsor.html +++ b/_includes/sponsor.html @@ -13,5 +13,5 @@ <h4><a href="{{ page.sponsor.link }}{{ utm_params }}" target="_blank">{{ page.sp <p><small><a href="{{ page.sponsor.link }}{{ utm_params }}" target="_blank">{{ page.sponsor.displaylink }}</a></small></p> </div> {% else %} -<p class="text-muted text-center"><b>Interested in sponsoring Swift Weekly Brief? <a href="{{ site.url }}/sponsorship/">Learn more here</a>.</b></p> +<p class="text-center"><b>Interested in sponsoring Swift Weekly Brief? <a href="{{ site.url }}/sponsorship/">Learn more here</a>.</b></p> {% endif %} diff --git a/css/style.css b/css/style.css index 3479242b..37724d75 100644 --- a/css/style.css +++ b/css/style.css @@ -5,27 +5,23 @@ --background: #ffffff; --body-text: #606060; + --secondary-text: #666666; - --special-text: #444444; - --attribute-social-visited: #444444; - --attribute-subscribe-hover: #444444; + --code-fg: #c7254e; + --code-bg: #f9f2f4; - --date: #666666; - --tagline: #666666; - --attribute-social-hover: #666666; - --attribute-subscribe-visited: #666666; - --attribute-sharing: #666666; + --button-fg: #666666; + --button-bg: #fff; + --button-bg-hover: #eee; - --attribute: #f05138; - --attribute-visited: #f05138; - --attribute-sharing-hover: #f05138; + --social-fg: #444444; + --social-fg-hover: #666666; + + --link-fg: #DC3A1D; + --link-fg-visited: #DC3A1D; + --link-fg-hover: #fbaf40; - --attribute-hover: #fbaf40; - --hr-border: #d7d7d7; - - --code: #c7254e; - --code-background: #f9f2f4; - --codeblock-background: #f5f5f5; + --hr-border: #666; --post-title-font-weight: lighter; } @@ -33,19 +29,26 @@ /* DARK MODE */ @media (prefers-color-scheme: dark) { :root { + --background: #1c1c1c; --body-text: #b2b2b2; + --secondary-text: #878787; + + --code-fg: #000000; + --code-bg: #959595; - --special-text: #7c7c7c; + --button-fg: #878787; + --button-bg: #1c1c1c; + --button-bg-hover: #2f2f2f; - --tagline: #b2b2b2; + --social-fg: #979797; + --social-fg-hover: #878787; - --attribute: #f7492e; - --attribute-hover: #f7ad2e; + --link-fg: #f7492e; + --link-fg-visited: #f7492e; + --link-fg-hover: #f7ad2e; - --code: #000000; - --code-background: #959595; - --codeblock-background: #939393; + --hr-border: #999; --post-title-font-weight: 300; /* 400 is normal */ } @@ -78,26 +81,22 @@ hr { } code { - color: var(--code); - background-color: var(--code-background); -} - -pre { - background-color: var(--codeblock-background) !important; + color: var(--code-fg); + background-color: var(--code-bg); } /* LINKS */ a { - color: var(--attribute); + color: var(--link-fg); } a:link { - border-bottom: 1px dotted var(--attribute); + border-bottom: 1px dotted var(--link-fg); } a:visited { - color: var(--attribute-visited); + color: var(--link-fg-visited); border-width: 0px; text-decoration: none; } @@ -105,8 +104,8 @@ a:visited { a:hover, .tagline a:hover, .lead a:hover { - color: var(--attribute-hover); - border-color: var(--attribute-hover); + color: var(--link-fg-hover); + border-color: var(--link-fg-hover); text-decoration: none; } @@ -139,12 +138,12 @@ header h2 { .tagline a, .lead a, .author-name a { - color: var(--special-text); - border-bottom: 1px dotted var(--special-text); + color: var(--secondary-text); + border-bottom: 1px dotted var(--secondary-text); } .tagline, .lead { - color: var(--tagline); + color: var(--secondary-text); } /* SPONSOR */ @@ -178,7 +177,7 @@ header h2 { .post-date { font-weight: normal; - color: var(--date); + color: var(--secondary-text); display: inline-block; } @@ -192,11 +191,13 @@ header h2 { .sharing a, .sharing a:visited, .sharing a:link { - color: var(--attribute-sharing); + background-color: var(--button-bg); + color: var(--button-fg); } .sharing ul li a:hover { - color: var(--attribute-sharing-hover); + background-color: var(--button-bg-hover); + color: var(--button-fg); text-decoration: none; } @@ -208,13 +209,15 @@ blockquote { /* SUBSCRIBE */ -.subscribe a, -.subscribe a:visited { - color: var(--attribute-subscribe-visited); +.subscribe ul li>a, +.subscribe ul li>a:visited { + background-color: var(--button-bg); + color: var(--button-fg); } .subscribe ul li a:hover { - color: var(--attribute-subscribe-hover); + background-color: var(--button-bg-hover); + color: var(--button-fg); text-decoration: none; } @@ -250,7 +253,7 @@ blockquote { footer a, footer a:visited, .social a, .social a:visited { - color: var(--attribute-social-visited); + color: var(--social-fg); } .social ul li a { @@ -258,7 +261,7 @@ footer a, footer a:visited, } .social ul li a:hover { - color: var(--attribute-social-hover); + color: var(--social-fg-hover); text-decoration: none; } diff --git a/css/syntax.css b/css/syntax.css index 971742bf..eb942a66 100644 --- a/css/syntax.css +++ b/css/syntax.css @@ -1,84 +1,154 @@ -/* - * GitHub style for Pygments syntax highlighter, for use with Jekyll - * Courtesy of GitHub.com +/* + Themes by https://github.com/mpchadwick/pygments-high-contrast-stylesheets + under The Unlicense license, but still worth attributting. */ -:root { - color-scheme: light dark; - - --comment: #999988; -} +/* Light Mode: Solarized Light (with the site's light bg) */ +.highlight { background-color: #fff; color: #586e75; } +.highlight .c { color: #627272; } +.highlight .err { color: #586e75; } +.highlight .g { color: #586e75; } +.highlight .k { color: #677600; } +.highlight .l { color: #586e75; } +.highlight .n { color: #586e75; } +.highlight .o { color: #677600; } +.highlight .x { color: #c14715; } +.highlight .p { color: #586e75; } +.highlight .cm { color: #627272; } +.highlight .cp { color: #677600; } +.highlight .c1 { color: #627272; } +.highlight .cs { color: #677600; } +.highlight .gd { color: #217d74; } +.highlight .ge { color: #586e75; font-style: italic; } +.highlight .gr { color: #d72825; } +.highlight .gh { color: #c14715; } +.highlight .gi { color: #677600; } +.highlight .go { color: #586e75; } +.highlight .gp { color: #586e75; } +.highlight .gs { color: #586e75; font-weight: bold; } +.highlight .gu { color: #c14715; } +.highlight .gt { color: #586e75; } +.highlight .kc { color: #c14715; } +.highlight .kd { color: #1f76b6; } +.highlight .kn { color: #677600; } +.highlight .kp { color: #677600; } +.highlight .kr { color: #1f76b6; } +.highlight .kt { color: #d72825; } +.highlight .ld { color: #586e75; } +.highlight .m { color: #217d74; } +.highlight .s { color: #217d74; } +.highlight .na { color: #586e75; } +.highlight .nb { color: #8d6900; } +.highlight .nc { color: #1f76b6; } +.highlight .no { color: #c14715; } +.highlight .nd { color: #1f76b6; } +.highlight .ni { color: #c14715; } +.highlight .ne { color: #c14715; } +.highlight .nf { color: #1f76b6; } +.highlight .nl { color: #586e75; } +.highlight .nn { color: #586e75; } +.highlight .nx { color: #586e75; } +.highlight .py { color: #586e75; } +.highlight .nt { color: #1f76b6; } +.highlight .nv { color: #1f76b6; } +.highlight .ow { color: #677600; } +.highlight .w { color: #586e75; } +.highlight .mf { color: #217d74; } +.highlight .mh { color: #217d74; } +.highlight .mi { color: #217d74; } +.highlight .mo { color: #217d74; } +.highlight .sb { color: #627272; } +.highlight .sc { color: #217d74; } +.highlight .sd { color: #586e75; } +.highlight .s2 { color: #217d74; } +.highlight .se { color: #c14715; } +.highlight .sh { color: #586e75; } +.highlight .si { color: #217d74; } +.highlight .sx { color: #217d74; } +.highlight .sr { color: #d72825; } +.highlight .s1 { color: #217d74; } +.highlight .ss { color: #217d74; } +.highlight .bp { color: #1f76b6; } +.highlight .vc { color: #1f76b6; } +.highlight .vg { color: #1f76b6; } +.highlight .vi { color: #1f76b6; } +.highlight .il { color: #217d74; } +/* Dark Mode: Monokai Dark (with the site's dark bg) */ @media (prefers-color-scheme: dark) { - :root { - --comment: #ffffff; - } + + .highlight .hll { background-color: #1c1c1c; } + .highlight { background: #1c1c1c; color: #f8f8f2; } + .highlight .c { color: #949076; } + .highlight .err { background-color: #1e0010; color: #eb0083; } + .highlight .k { color: #66d9ef; } + .highlight .l { color: #ae81ff; } + .highlight .n { color: #f8f8f2; } + .highlight .o { color: #f94e8a; } + .highlight .p { color: #f8f8f2; } + .highlight .ch { color: #949076; } + .highlight .cm { color: #949076; } + .highlight .cp { color: #949076; } + .highlight .cpf { color: #949076; } + .highlight .c1 { color: #949076; } + .highlight .cs { color: #949076; } + .highlight .gd { color: #f94e8a; } + .highlight .ge { font-style: italic; } + .highlight .gi { color: #a6e22e; } + .highlight .gs { font-weight: bold; } + .highlight .gu { color: #949076; } + .highlight .kc { color: #66d9ef; } + .highlight .kd { color: #66d9ef; } + .highlight .kn { color: #f94e8a; } + .highlight .kp { color: #66d9ef; } + .highlight .kr { color: #66d9ef; } + .highlight .kt { color: #66d9ef; } + .highlight .ld { color: #e6db74; } + .highlight .m { color: #ae81ff; } + .highlight .s { color: #e6db74; } + .highlight .na { color: #a6e22e; } + .highlight .nb { color: #f8f8f2; } + .highlight .nc { color: #a6e22e; } + .highlight .no { color: #66d9ef; } + .highlight .nd { color: #a6e22e; } + .highlight .ni { color: #f8f8f2; } + .highlight .ne { color: #a6e22e; } + .highlight .nf { color: #a6e22e; } + .highlight .nl { color: #f8f8f2; } + .highlight .nn { color: #f8f8f2; } + .highlight .nx { color: #a6e22e; } + .highlight .py { color: #f8f8f2; } + .highlight .nt { color: #f94e8a; } + .highlight .nv { color: #f8f8f2; } + .highlight .ow { color: #f94e8a; } + .highlight .w { color: #f8f8f2; } + .highlight .mb { color: #ae81ff; } + .highlight .mf { color: #ae81ff; } + .highlight .mh { color: #ae81ff; } + .highlight .mi { color: #ae81ff; } + .highlight .mo { color: #ae81ff; } + .highlight .sa { color: #e6db74; } + .highlight .sb { color: #e6db74; } + .highlight .sc { color: #e6db74; } + .highlight .dl { color: #e6db74; } + .highlight .sd { color: #e6db74; } + .highlight .s2 { color: #e6db74; } + .highlight .se { color: #ae81ff; } + .highlight .sh { color: #e6db74; } + .highlight .si { color: #e6db74; } + .highlight .sx { color: #e6db74; } + .highlight .sr { color: #e6db74; } + .highlight .s1 { color: #e6db74; } + .highlight .ss { color: #e6db74; } + .highlight .bp { color: #f8f8f2; } + .highlight .fm { color: #a6e22e; } + .highlight .vc { color: #f8f8f2; } + .highlight .vg { color: #f8f8f2; } + .highlight .vi { color: #f8f8f2; } + .highlight .vm { color: #f8f8f2; } + .highlight .il { color: #ae81ff; } } -.highlight pre, pre, .highlight .hll { background-color: #f8f8f8; border: 1px solid #ccc; padding: 6px 10px; border-radius: 3px; } -.highlight .c { color: #999988; font-style: italic; } -.highlight .err { color: #a61717; background-color: #e3d2d2; } -.highlight .k { font-weight: bold; } -.highlight .o { font-weight: bold; } -.highlight .cm { color: #999988; font-style: italic; } -.highlight .cp { color: #999999; font-weight: bold; } -.highlight .c1 { color: var(--comment); font-style: italic; } -.highlight .cs { color: #999999; font-weight: bold; font-style: italic; } -.highlight .gd { color: #000000; background-color: #ffdddd; } -.highlight .gd .x { color: #000000; background-color: #ffaaaa; } -.highlight .ge { font-style: italic; } -.highlight .gr { color: #aa0000; } -.highlight .gh { color: #999999; } -.highlight .gi { color: #000000; background-color: #ddffdd; } -.highlight .gi .x { color: #000000; background-color: #aaffaa; } -.highlight .go { color: #888888; } -.highlight .gp { color: #555555; } -.highlight .gs { font-weight: bold; } -.highlight .gu { color: #800080; font-weight: bold; } -.highlight .gt { color: #aa0000; } -.highlight .kc { font-weight: bold; } -.highlight .kd { font-weight: bold; } -.highlight .kn { font-weight: bold; } -.highlight .kp { font-weight: bold; } -.highlight .kr { font-weight: bold; } -.highlight .kt { color: #445588; font-weight: bold; } -.highlight .m { color: #009999; } -.highlight .s { color: #dd1144; } -.highlight .n { color: #333333; } -.highlight .na { color: teal; } -.highlight .nb { color: #0086b3; } -.highlight .nc { color: #445588; font-weight: bold; } -.highlight .no { color: teal; } -.highlight .ni { color: purple; } -.highlight .ne { color: #990000; font-weight: bold; } -.highlight .nf { color: #990000; font-weight: bold; } -.highlight .nn { color: #555555; } -.highlight .nt { color: navy; } -.highlight .nv { color: teal; } -.highlight .ow { font-weight: bold; } -.highlight .w { color: #bbbbbb; } -.highlight .mf { color: #009999; } -.highlight .mh { color: #009999; } -.highlight .mi { color: #009999; } -.highlight .mo { color: #009999; } -.highlight .sb { color: #dd1144; } -.highlight .sc { color: #dd1144; } -.highlight .sd { color: #dd1144; } -.highlight .s2 { color: #dd1144; } -.highlight .se { color: #dd1144; } -.highlight .sh { color: #dd1144; } -.highlight .si { color: #dd1144; } -.highlight .sx { color: #dd1144; } -.highlight .sr { color: #009926; } -.highlight .s1 { color: #dd1144; } -.highlight .ss { color: #990073; } -.highlight .bp { color: #999999; } -.highlight .vc { color: teal; } -.highlight .vg { color: teal; } -.highlight .vi { color: teal; } -.highlight .il { color: #009999; } -.highlight .gc { color: #999; background-color: #EAF2F5; } - /* Custom */ .highlight pre code { display: block; white-space: pre; overflow-x: auto; word-wrap: normal; } From b75217eb9c137c2a4b968e177571635618a03aae Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 11 Jun 2020 15:24:02 +0200 Subject: [PATCH 328/589] Remove sponsor --- _drafts/2020-06-11-issue-161.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/_drafts/2020-06-11-issue-161.md b/_drafts/2020-06-11-issue-161.md index 2f2aecfe..65daa55a 100644 --- a/_drafts/2020-06-11-issue-161.md +++ b/_drafts/2020-06-11-issue-161.md @@ -2,11 +2,6 @@ layout: post title: ! 'Issue #161' author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO --- > TODO: intro comments From 3ca3319a693a5ecbf2882fd636346ab8e9b8b0be Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 11 Jun 2020 15:29:24 +0200 Subject: [PATCH 329/589] Remove starter tasks --- _drafts/2020-06-11-issue-161.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/_drafts/2020-06-11-issue-161.md b/_drafts/2020-06-11-issue-161.md index 65daa55a..14a995fe 100644 --- a/_drafts/2020-06-11-issue-161.md +++ b/_drafts/2020-06-11-issue-161.md @@ -10,10 +10,6 @@ author: btb {% include sponsor.html %} -### Starter tasks - -> TODO - ### Podcasts > TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast From 8fc4ceb4cb7730e0d7004817f1366de6e35f49d3 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 11 Jun 2020 15:33:43 +0200 Subject: [PATCH 330/589] Further work on draft --- _drafts/2020-06-11-issue-161.md | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/_drafts/2020-06-11-issue-161.md b/_drafts/2020-06-11-issue-161.md index 14a995fe..ecb6929f 100644 --- a/_drafts/2020-06-11-issue-161.md +++ b/_drafts/2020-06-11-issue-161.md @@ -10,33 +10,19 @@ author: btb {% include sponsor.html %} -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - ### News and community -> TODO - -### Commits and pull requests - -> TODO +https://swift.org/blog/aws-lambda-runtime/ -### Accepted proposals +https://github.com/apple/swift-llbuild2 -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals +### Commits and pull requests -> TODO +https://github.com/apple/swift/pull/32223 ### Proposals in review -> TODO +https://forums.swift.org/t/se-0282-review-2-interoperability-with-the-c-atomic-operations-library/37360 ### Swift Forums From b57a4efc885430551a8e8205d5cd8b4da2f603a8 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 11 Jun 2020 18:00:45 +0200 Subject: [PATCH 331/589] Add links --- _drafts/2020-06-11-issue-161.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/_drafts/2020-06-11-issue-161.md b/_drafts/2020-06-11-issue-161.md index ecb6929f..5612d3f1 100644 --- a/_drafts/2020-06-11-issue-161.md +++ b/_drafts/2020-06-11-issue-161.md @@ -14,8 +14,16 @@ author: btb https://swift.org/blog/aws-lambda-runtime/ +https://fabianfett.de/getting-started-with-swift-aws-lambda-runtime + +https://idk.dev/continuous-delivery-with-server-side-swift-on-amazon-linux-2/ + https://github.com/apple/swift-llbuild2 +https://twitter.com/AirspeedSwift/status/1264664397504372736 + +https://www.youtube.com/watch?v=35rgnqsXtag + ### Commits and pull requests https://github.com/apple/swift/pull/32223 @@ -26,8 +34,18 @@ https://forums.swift.org/t/se-0282-review-2-interoperability-with-the-c-atomic-o ### Swift Forums -> TODO +https://forums.swift.org/t/swift-package-registry-service/37219 + +https://forums.swift.org/t/loops-with-futures/37216 + +https://forums.swift.org/t/replace-the-reference-types-weak-and-unowned-with-nonstrong/36740 + +https://forums.swift.org/t/pitch-non-public-conformances-implementing-public-api/37159 + +https://forums.swift.org/t/automatic-requirement-satisfaction-in-plain-swift/37158 + +https://forums.swift.org/t/an-implementation-model-for-rational-protocol-conformance-behavior/37171 ### Finally -> TODO: something funny/fun. tweet, link, etc. +No link this week. You are awesome. Stay safe out there. From 224f48808ecd951b1bb5acf85808bc847318be62 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 11 Jun 2020 19:25:42 +0200 Subject: [PATCH 332/589] Publish issue 161 Closes #518 --- _drafts/2020-06-11-issue-161.md | 51 ------------ _posts/2020-06-11-issue-161.md | 138 ++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+), 51 deletions(-) delete mode 100644 _drafts/2020-06-11-issue-161.md create mode 100644 _posts/2020-06-11-issue-161.md diff --git a/_drafts/2020-06-11-issue-161.md b/_drafts/2020-06-11-issue-161.md deleted file mode 100644 index 5612d3f1..00000000 --- a/_drafts/2020-06-11-issue-161.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -layout: post -title: ! 'Issue #161' -author: btb ---- - -> TODO: intro comments - -<!--excerpt--> - -{% include sponsor.html %} - -### News and community - -https://swift.org/blog/aws-lambda-runtime/ - -https://fabianfett.de/getting-started-with-swift-aws-lambda-runtime - -https://idk.dev/continuous-delivery-with-server-side-swift-on-amazon-linux-2/ - -https://github.com/apple/swift-llbuild2 - -https://twitter.com/AirspeedSwift/status/1264664397504372736 - -https://www.youtube.com/watch?v=35rgnqsXtag - -### Commits and pull requests - -https://github.com/apple/swift/pull/32223 - -### Proposals in review - -https://forums.swift.org/t/se-0282-review-2-interoperability-with-the-c-atomic-operations-library/37360 - -### Swift Forums - -https://forums.swift.org/t/swift-package-registry-service/37219 - -https://forums.swift.org/t/loops-with-futures/37216 - -https://forums.swift.org/t/replace-the-reference-types-weak-and-unowned-with-nonstrong/36740 - -https://forums.swift.org/t/pitch-non-public-conformances-implementing-public-api/37159 - -https://forums.swift.org/t/automatic-requirement-satisfaction-in-plain-swift/37158 - -https://forums.swift.org/t/an-implementation-model-for-rational-protocol-conformance-behavior/37171 - -### Finally - -No link this week. You are awesome. Stay safe out there. diff --git a/_posts/2020-06-11-issue-161.md b/_posts/2020-06-11-issue-161.md new file mode 100644 index 00000000..5cf695ab --- /dev/null +++ b/_posts/2020-06-11-issue-161.md @@ -0,0 +1,138 @@ +--- +layout: post +title: ! 'Issue #161' +author: btb +--- + +The [previous issue](/issue-160) a more extensive introduction, so for this one +I'll keep it short. WWDC is coming up really soon — I'm very much looking +forward to it and seeing/meeting people online. Come say hi if possible :-) + +<!--excerpt--> + +{% include sponsor.html %} + +### News and community + +[Tom Doron](https://twitter.com/TomerDoron) wrote [a blog post and announced](https://swift.org/blog/aws-lambda-runtime/) +Swift AWS Lambda Runtime, designed to help Swift developers build serverless +functions for the Amazon Web Services Lambda platform. + +[Fabian Fett](https://twitter.com/fabianfett) wrote [a blog post](https://fabianfett.de/getting-started-with-swift-aws-lambda-runtime) +on getting started with Swift on AWS Lambda. + +[Daniel Dunbar](https://twitter.com/daniel_dunbar) announced [llbuild2](https://forums.swift.org/t/llbuild2/36896), +an experimental, Swift native, fully async, NIO futures-based low level build +system. Started as the `cevobuild` experiment in `llbuild`, it aims to continue +that exploration. + +[Ben Cohen](https://twitter.com/AirspeedSwift/status/1264664397504372736) played +around [with `Collection`](https://twitter.com/AirspeedSwift/status/1264664397504372736), +implementing an `EitherCollection` that is a whopping 774x faster than +`AnyCollection`. + +[Jasdev Singh](https://twitter.com/jasdev) posted [a video](https://www.youtube.com/watch?v=35rgnqsXtag) +on "Deriving `Publisher` from Swift's `Sequence` protocol". + +[Johannes Weiss](https://twitter.com/johannesweiss/status/1193220999535382528) wrote [about "Looping" over Futures](https://forums.swift.org/t/loops-with-futures/37216): + +> We've got a "rule of three" so when we get asked the same question three +times, we need to do something to document it and today was at least the third +time I personally got asked the "looping over futures" question. + +I love this rule. + +### Commits and pull requests + +[Doug Gregor](https://twitter.com/dgregor79) opened [a pull request](https://github.com/apple/swift/pull/32223) +for multi-statement closure type inference. The supported statements are +currently limited, but will improve over time. 🏎 + +### Proposals in review + +[SE-0282](https://github.com/apple/swift-evolution/blob/master/proposals/0282-atomics.md): *Interoperability with the C Atomic Operations Library ⚛︎* is [under a second review](https://forums.swift.org/t/se-0282-review-2-interoperability-with-the-c-atomic-operations-library/37360). + +> This proposal adopts a C/C++-style weak concurrency memory model in Swift, +describing how Swift code interoperates with concurrency primitives imported +from C. +> +> This enables intrepid library authors to start building concurrency constructs +in (mostly) pure Swift. + +This proposal includes [a proof-of-concept package](https://github.com/apple/swift-se-0282-experimental) +demonstrating the use of atomics from C to provide a low-level atomic API to +Swift. + +### Swift Forums + +[Mattt](https://twitter.com/mattt) pitched [a proposal](https://forums.swift.org/t/swift-package-registry-service/37219) +for a Swift package registry service. + +> Swift Package Manager downloads dependencies using Git. Our proposal defines +a standard web service interface that it can use to also download dependencies +from package registries. +> +> Today, a package dependency is specified by a URL for a Git repository. When +a project is built for the first time, Swift Package Manager clones the +repository for each dependency and attempts to resolve the version requirements +with the available tags. + +[Patrick Weigel](https://forums.swift.org/u/patricktheprogrammer/summary) pitched [a proposal](https://forums.swift.org/t/replace-the-reference-types-weak-and-unowned-with-nonstrong/36740) +to replace the reference types `weak` and `unowned` with `nonstrong`. + +> In Swift it is possible to create strong reference cycles between class +instances. Strong reference cycles are bad as they create potentially crashing +memory leaks (unused memory that is not made available to the app). Swift +provides two ways to resolve strong reference cycles: weak references and +unowned references. Swift requires the coder to determine which type (`weak` or +`unowned`) to use, when in many instances the coder simply wants the type to be +not strong. + +[Dave Abrahams](https://twitter.com/DaveAbrahams/status/1215792568039927808) pitched [a proposal](https://forums.swift.org/t/pitch-non-public-conformances-implementing-public-api/37159) +to allow non-public conformances to implement public API. + +> In Swift, protocol extensions provide a beautiful way to share API +implementations across value types. For example, an extension on the +`Equatable` protocol provides a public implementation of the `!=` operator to +all public conforming types. The power of this feature is limited, however, +because the conformance can never be less visible than APIs provided by +extensions depending on that conformance. + +[Denys Shabalin](https://forums.swift.org/u/shabalin/summary) pitched [a proposal](https://forums.swift.org/t/automatic-requirement-satisfaction-in-plain-swift/37158) +for Automatic Requirement Satisfaction in plain Swift. + +> Swift can automatically generate code to satisfy the requirements of special +protocols such as `Equatable`, `Hashable` and `Codable`. For example, any +`struct` whose stored properties conform to Equatable can itself conform simply +by declaring it so, without explicitly implementing `Equatable`'s requirement +for a `static func ==(Self, Self) -> Bool`: + +```swift +struct Point: Equatable { + var x: Float + var y: Float +} +``` + +> The implementation of `==` for `Point` is synthesized by the compiler behind +the scenes. +> +> This functionality is extremely convenient, but it is currently limited to +the few protocols for which the compiler defines automatic requirement +satisfaction. We would like to lift this restriction and allow for arbitrary +libraries to vend protocols and automatic conformances. + +[Dave Abrahams](https://twitter.com/DaveAbrahams/status/1215792568039927808) pitched [a proposal](https://forums.swift.org/t/an-implementation-model-for-rational-protocol-conformance-behavior/37171) +for an Implementation Model for Rational Protocol Conformance Behavior. + +> When Swift implementers are faced with questions about the intended +programming model for generics, they commonly respond with a focus on how +generics are implemented, which, as the latter discussion shows, is not always +compatible with the intended semantics. Furthermore, it makes a poor foundation +for user (and especially my) understanding. + +[Tom Doron](https://twitter.com/TomerDoron) shared [the Swift on the Server, May 13th work group updates](https://forums.swift.org/t/may-13th-2020/36929). + +### Finally + +No link in this issue. You are awesome. Stay safe out there. ❤️ From a6c7258a75763539b9503a9070dc97d1273c18c4 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 11 Jun 2020 19:27:07 +0200 Subject: [PATCH 333/589] Push 162 draft References #526 --- _drafts/2020-06-18-issue-162.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2020-06-18-issue-162.md diff --git a/_drafts/2020-06-18-issue-162.md b/_drafts/2020-06-18-issue-162.md new file mode 100644 index 00000000..7a7da8c1 --- /dev/null +++ b/_drafts/2020-06-18-issue-162.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #162' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 25bcab9cbf38394a26a32b818e3b6c4f7fd6da37 Mon Sep 17 00:00:00 2001 From: Max Desiatov <max@desiatov.com> Date: Fri, 12 Jun 2020 17:22:10 +0100 Subject: [PATCH 334/589] Fix typo in issue #161 (#527) --- _posts/2020-06-11-issue-161.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-06-11-issue-161.md b/_posts/2020-06-11-issue-161.md index 5cf695ab..1a1230a1 100644 --- a/_posts/2020-06-11-issue-161.md +++ b/_posts/2020-06-11-issue-161.md @@ -4,7 +4,7 @@ title: ! 'Issue #161' author: btb --- -The [previous issue](/issue-160) a more extensive introduction, so for this one +The [previous issue](/issue-160) has a more extensive introduction, so for this one I'll keep it short. WWDC is coming up really soon — I'm very much looking forward to it and seeing/meeting people online. Come say hi if possible :-) From 947e30feb8a17642c3bb3b8daf055f2099ac096d Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Mon, 15 Jun 2020 23:54:03 +0200 Subject: [PATCH 335/589] =?UTF-8?q?Paul=20=E2=9D=A4=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit References #526 --- _drafts/2020-06-18-issue-162.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_drafts/2020-06-18-issue-162.md b/_drafts/2020-06-18-issue-162.md index 7a7da8c1..3301b998 100644 --- a/_drafts/2020-06-18-issue-162.md +++ b/_drafts/2020-06-18-issue-162.md @@ -3,10 +3,10 @@ layout: post title: ! 'Issue #162' author: btb sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO + link: https://hackingwithswift.com + heading: Support the things you love + body: Hello! My name is Paul and I run Hacking with Swift. I'm not going to use this spot to tell you to check out my books, but instead I'm sponsoring this issue because I appreciate the work that Bas and Kristaps do and I want to support them. Support the things you love, folks, otherwise they might just go away ❤️ + displaylink: hackingwithswift.com --- > TODO: intro comments From 4a5be9271c6d088f525544c5bf43d43098321db0 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 18 Jun 2020 14:11:28 +0200 Subject: [PATCH 336/589] Run bundle update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f87c0029..09986f7f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.3.1) + activesupport (6.0.3.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) From ee3019b7481ed297781a8c731d83ceb0d562f3ab Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 18 Jun 2020 15:19:00 +0200 Subject: [PATCH 337/589] Push 162 Closes #526 --- _drafts/2020-06-18-issue-162.md | 56 ---------- _posts/2020-06-18-issue-162.md | 184 ++++++++++++++++++++++++++++++++ 2 files changed, 184 insertions(+), 56 deletions(-) delete mode 100644 _drafts/2020-06-18-issue-162.md create mode 100644 _posts/2020-06-18-issue-162.md diff --git a/_drafts/2020-06-18-issue-162.md b/_drafts/2020-06-18-issue-162.md deleted file mode 100644 index 3301b998..00000000 --- a/_drafts/2020-06-18-issue-162.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: post -title: ! 'Issue #162' -author: btb -sponsor: - link: https://hackingwithswift.com - heading: Support the things you love - body: Hello! My name is Paul and I run Hacking with Swift. I'm not going to use this spot to tell you to check out my books, but instead I'm sponsoring this issue because I appreciate the work that Bas and Kristaps do and I want to support them. Support the things you love, folks, otherwise they might just go away ❤️ - displaylink: hackingwithswift.com ---- - -> TODO: intro comments - -<!--excerpt--> - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2020-06-18-issue-162.md b/_posts/2020-06-18-issue-162.md new file mode 100644 index 00000000..5f40c82d --- /dev/null +++ b/_posts/2020-06-18-issue-162.md @@ -0,0 +1,184 @@ +--- +layout: post +title: ! 'Issue #162' +author: btb +sponsor: + link: https://hackingwithswift.com + heading: Support the things you love + body: Hello! My name is Paul and I run Hacking with Swift. I'm not going to use this spot to tell you to check out my books, but instead I'm sponsoring this issue because I appreciate the work that Bas and Kristaps do and I want to support them. Support the things you love, folks, otherwise they might just go away ❤️ + displaylink: hackingwithswift.com +--- + +WWDC is now very, very near. Only a little bit more than a weekend before things +kick off. Very exciting! + +Also — a note regarding this issue's sponsor. This was so unexpected — but so, +so very kind. His point is spot on. Putting together Swift Weekly Brief time +and time again is something [I'm very happy to do](https://basthomas.github.io/curating-swift-weekly), +and it is a real pleasure to be able to support the Swift community this way. + +But it isn't always glamorous, so don't [take things for granted](https://www.youtube.com/watch?v=ePuOrCbIW-o). + +Thank you, Paul! ❤️ + +Enjoy WWDC everyone, and looking forward to a hopefully jam-packed issue in two +weeks! + +<!--excerpt--> + +{% include sponsor.html %} + +### News and community + +[Dave Verwer](https://twitter.com/daveverwer) and [Sven A. Schmidt](https://twitter.com/_sa_s) announced +[the Swift Package Index](https://swiftpackageindex.com/), "the place to find +Swift packages". + +[Paul Hudson](https://twitter.com/twostraws) put together [a repository](https://github.com/twostraws/wwdc) +with an overview of everything that is being organized around WWDC in our +community. + +[Kaitlin Mahar](https://twitter.com/k__mahar) announced the release of [the MongoDB Swift driver v1.0](https://www.mongodb.com/blog/post/announcing-release-official-swift-driver)! 🥳 + +### Commits and pull requests + +Slava Pestov [wrote](https://twitter.com/slava_pestov/status/1271259363693527041) +a thread about [Robert Widmann](https://twitter.com/CodaFi_)'s work on +improving incremental builds. + +### Proposals in review + +[SE-0013](https://github.com/swift-server/sswg/blob/master/proposals/0013-swift-aws-lambda-runtime.md): *Swift AWS Lambda Runtime* is [under review](https://forums.swift.org/t/sswg-0013-swift-aws-lambda-runtime/37466). + +> Many modern systems have client components like iOS, macOS or watchOS +applications as well as server components that those clients interact with. +Serverless functions are often the easiest and most efficient way for client +application developers to extend their applications into the cloud. +> +> Serverless functions are increasingly becoming a popular choice for running +event-driven or otherwise ad-hoc compute tasks in the cloud. They power mission +critical microservices and data intensive workloads. In many cases, serverless +functions allow developers to more easily scale and control compute costs given +their on-demand nature. +> +> When using serverless functions, attention must be given to resource +utilization as it directly impacts the costs of the system. This is where Swift +shines! With its low memory footprint, deterministic performance, and quick +start time, Swift is a fantastic match for the serverless functions +architecture. +> +> Combine this with Swift's developer friendliness, expressiveness, and +emphasis on safety, and we have a solution that is great for developers at all +skill levels, scalable, and cost effective. + +[SE-0014](https://github.com/swift-server/sswg/blob/master/proposals/0014-swift-backtrace.md): *Swift Backtrace* is [under review](https://forums.swift.org/t/sswg-0014-swift-backtrace/37602). + +> Printing backtraces when applications crash is a critical component in +diagnostics of real-world production issues on the Server. +> +> When applications crash on the Server, it is desired for the crash +information to be captured and printed along side the application logs so that +log aggregation tools (e.g. Splunk) could include the crash information and +used for alerting and further analysis offline. +> +> At this point of time, Swift does not print crash backtraces when compiled +in release mode on Linux. This means that Swift server applications can crash +silently making the operation of such applications difficult. + +### Swift Forums + +[Guy Brooker](https://forums.swift.org/u/guyb/summary) pitched [a proposal](https://forums.swift.org/t/static-thread-safety/37542) +for static thread safety. + +> One of the [principal goals of Swift](https://swift.org/about/) is "to make +writing and maintaining correct programs easier for the developer". Swift has +gone a long way to eliminate many common errors found in other programming +languages through static type checking, ensuring safe memory access. The free +for all in C where anything and everything was possible by casting pointers to +different data types is thankfully over. +> +> Most modern non-trivial Swift applications require some form of concurrency, +asynchronously retrieving information over a network, firing timers , updating +UI or handling notifications, however Swift does not provide concurrency +primitives today. Accessing variables concurrently in Swift is inherently +dangerous, and is a very easy mistake to make. The Swift language provides no +safety for a developer of concurrent code, leaving them in a similar position +as the C programmer of yesteryear, permitting frequent programming errors to +go un-flagged. +> +> This proposal sets out some small language changes which would allow the +compiler to spot basic concurrent programming errors. To be clear, the title +of this proposal "Static thread safety" is intended to mean compile time thread +safety checks. It does not add concurrency primitives, nor provide any +automatic concurrency or thread safety. It simply allows developers to write +safer code. + +[Johannes Weiss](https://twitter.com/johannesweiss) shared [some thoughts](https://forums.swift.org/t/running-many-operations-concurrently-but-in-batches/37518) +on running many operations concurrently, but in batches. + +> So here's some more example code for a question that I've been asked +repeatedly: How can I run a large number of operations whilst limiting this to +`N` running at the same time. You may want to do that if you have to do many +HTTP requests to a website but you don't want to overload the website and say +do only 10 at the same time. + +[Quincey Morris](https://forums.swift.org/u/quinceymorris/summary) pitched [another proposal](https://forums.swift.org/t/await-async-part-deux/37491/30) +for `async` / `await`. + +> As far as I’m concerned, the goal here is to add Swift language features to +provide a path-of-execution serialization operator, along with a genuine notion +of an asynchronous function. +> +> Beyond that: there is a further discussion which we haven’t even started +having yet. There are other asynchronous patterns we might like to provide for. +How about, for example, an await operator that operates on "groups" of +asynchronous functions (aka concurrency or dispatch groups)? How about an +algebra of futures or promises that can be used within the implementations of +asynchronous functions to provide more sophisticated usage patterns? + +[Dave Abrahams](https://twitter.com/DaveAbrahams) pitched [a proposal](https://forums.swift.org/t/a-way-to-check-for-unique-storage-in-standard-library-collections/37595) +for a way to check for unique storage in standard library collections. + +> Consider: + +```swift +struct Vector<T> { + var scalars: [T] + static func +=(lhs: inout Vector, rhs: Vector) { + for i in lhs.scalars.indices { lhs.scalars[i] += rhs.scalars[i] } + } +} +``` + +> This implementation is suboptimal in the case where lhs.scalars shares its +storage with another array, because it first copies the scalars in lhs into new +storage and then writes over them, accumulating elements from rhs into it. What +we really want to be able to do is: + +```swift +struct Vector<T> { + var scalars: [T] + static func +=(lhs: inout Vector, rhs: Vector) { + if hasUniquelyReferencedStorage(&lhs.scalars) { + for i in lhs.scalars.indices { lhs.scalars[i] += rhs.scalars[i] } + } + else { + lhs = lhs + rhs // build new storage once and replace old storage with it + } + } +} +``` + +> Currently the only known way to do the check for unique storage is a horrible +hack that probably violates the memory model. +> +> Ideally, we would have a way to ask generically whether all the references in +any given type were uniquely-referenced, but as a start, it would be extremely +useful just to be able to ask that question about arrays, sets, and +dictionaries. My pitch to you is that we expose +`unsafeHasUniquelyReferencedStorage` in the standard library. + +### Finally + +Remember [Mac OS X](https://twitter.com/gregheo/status/1273471050664177664)? +Those were the days. 🦁 From 7a8d563f150dc1509bb8d8b7a7d93d83b7f91a1b Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 18 Jun 2020 15:33:08 +0200 Subject: [PATCH 338/589] Add 163 draft --- _drafts/2020-07-02-issue-163.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2020-07-02-issue-163.md diff --git a/_drafts/2020-07-02-issue-163.md b/_drafts/2020-07-02-issue-163.md new file mode 100644 index 00000000..96558828 --- /dev/null +++ b/_drafts/2020-07-02-issue-163.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #163' +author: fassko +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 09533951c7d1e28d1d2932fa1f93908eb923536e Mon Sep 17 00:00:00 2001 From: Bas Broek <BasThomas@users.noreply.github.com> Date: Fri, 19 Jun 2020 09:07:27 +0200 Subject: [PATCH 339/589] Rename SE to SSWG Resolves #529 --- _posts/2020-06-18-issue-162.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2020-06-18-issue-162.md b/_posts/2020-06-18-issue-162.md index 5f40c82d..8f938e97 100644 --- a/_posts/2020-06-18-issue-162.md +++ b/_posts/2020-06-18-issue-162.md @@ -48,7 +48,7 @@ improving incremental builds. ### Proposals in review -[SE-0013](https://github.com/swift-server/sswg/blob/master/proposals/0013-swift-aws-lambda-runtime.md): *Swift AWS Lambda Runtime* is [under review](https://forums.swift.org/t/sswg-0013-swift-aws-lambda-runtime/37466). +[SSWG-0013](https://github.com/swift-server/sswg/blob/master/proposals/0013-swift-aws-lambda-runtime.md): *Swift AWS Lambda Runtime* is [under review](https://forums.swift.org/t/sswg-0013-swift-aws-lambda-runtime/37466). > Many modern systems have client components like iOS, macOS or watchOS applications as well as server components that those clients interact with. @@ -71,7 +71,7 @@ architecture. emphasis on safety, and we have a solution that is great for developers at all skill levels, scalable, and cost effective. -[SE-0014](https://github.com/swift-server/sswg/blob/master/proposals/0014-swift-backtrace.md): *Swift Backtrace* is [under review](https://forums.swift.org/t/sswg-0014-swift-backtrace/37602). +[SSWG-0014](https://github.com/swift-server/sswg/blob/master/proposals/0014-swift-backtrace.md): *Swift Backtrace* is [under review](https://forums.swift.org/t/sswg-0014-swift-backtrace/37602). > Printing backtraces when applications crash is a critical component in diagnostics of real-world production issues on the Server. From ef212f7eb9dec3ad7ff262eeead40a944bba4935 Mon Sep 17 00:00:00 2001 From: Bas Broek <BasThomas@users.noreply.github.com> Date: Tue, 30 Jun 2020 09:25:30 +0200 Subject: [PATCH 340/589] Update sponsorship.md --- sponsorship.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 3fd8ebc8..85aff67f 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,11 +60,20 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| June 4 | Open | -| June 18 | **Booked** | <!-- Paul --> -| July 2 | Open | -| July 16 | Open | +| July 2 | **Booked** <!-- Line --> | +| July 16 | **Booked** <!-- Line --> | | July 30 | Open | +| August 13 | Open | +| August 27 | Open | +| September 10 | Open | +| September 24 | Open | +| October 8 | Open | +| October 22 | Open | +| November 5 | Open | +| November 19 | Open | +| December 3 | Open | +| December 17 | Open | +| December 31 | **No issue** | {: class="table table-bordered"} </div> From 7801b52d89434ed79253927173843e4d9793ddae Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Wed, 1 Jul 2020 17:49:05 +0200 Subject: [PATCH 341/589] Add 164 draft --- _drafts/2020-07-16-issue-164.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2020-07-16-issue-164.md diff --git a/_drafts/2020-07-16-issue-164.md b/_drafts/2020-07-16-issue-164.md new file mode 100644 index 00000000..9e519ec0 --- /dev/null +++ b/_drafts/2020-07-16-issue-164.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #164' +author: btb +sponsor: + link: https://engineering.linecorp.com/en/ + heading: LINE loves Swift! + body: LINE is the leading mobile messaging platform in Japan and boasts one of the largest Swift codebases in Asia. In addition to supporting Swift versions from day 1, we strongly value semantics, protocols, and strongly typed systems. Many of our members are also active in the OSS community and support both local and global meetups and peer labs. Come join us and see what Swift can do in the real world. + displaylink: engineering.linecorp.com +--- + +> TODO: intro comments + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From 3266a01ca6a5f3cf75a89baeedb5d8c2278bd413 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 2 Jul 2020 19:34:26 +0300 Subject: [PATCH 342/589] Issue 163 (#531) Co-authored-by: Bas Broek <bas@basbroek.nl> --- _drafts/2020-07-02-issue-163.md | 56 -------- _posts/2020-07-02-issue-163.md | 242 ++++++++++++++++++++++++++++++++ 2 files changed, 242 insertions(+), 56 deletions(-) delete mode 100644 _drafts/2020-07-02-issue-163.md create mode 100644 _posts/2020-07-02-issue-163.md diff --git a/_drafts/2020-07-02-issue-163.md b/_drafts/2020-07-02-issue-163.md deleted file mode 100644 index 96558828..00000000 --- a/_drafts/2020-07-02-issue-163.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: post -title: ! 'Issue #163' -author: fassko -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO ---- - -> TODO: intro comments - -<!--excerpt--> - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2020-07-02-issue-163.md b/_posts/2020-07-02-issue-163.md new file mode 100644 index 00000000..c1e491a9 --- /dev/null +++ b/_posts/2020-07-02-issue-163.md @@ -0,0 +1,242 @@ +--- +layout: post +title: ! 'Issue #163' +author: fassko +sponsor: + link: https://engineering.linecorp.com/en/ + heading: LINE loves Swift! + body: LINE is the leading mobile messaging platform in Japan and boasts one of the largest Swift codebases in Asia. In addition to supporting Swift versions from day 1, we strongly value semantics, protocols, and strongly typed systems. Many of our members are also active in the OSS community and support both local and global meetups and peer labs. Come join us and see what Swift can do in the real world. + displaylink: engineering.linecorp.com +--- + +This year's WWDC was a blast. Despite what is currently happening in the world +I think Apple created a small "development holiday" for all of us. I think a +new online conference reached far more folks around the world than ever before. +We got completely revamped [developer forums](https://developer.apple.com/forums/), +as well as many community-organized side events that were not tied to any +physical location, which is great. + +This year we got great new things, especially in SwiftUI, that are driven by +new cool additions to the Swift language. And much more. +Now we have a full summer to explore new stuff and get ready for new Apple +releases and slowly for Apple's own built silicon. + +<!--excerpt--> + +{% include sponsor.html %} + +### Podcasts + +In the latest episode of Swift Unwrapped, [Jesse](https://twitter.com/jesse_squires) +and [JP](https://twitter.com/simjp) talk [about](https://spec.fm/podcasts/swift-unwrapped/fxMk4ipF) +tuples. + +In [episode 75](https://www.swiftbysundell.com/podcast/75/) of the Swift by +Sundell podcast, [Dave Verwer](https://twitter.com/daveverwer) and +[Sven A. Schmidt](https://twitter.com/_sa_s) join [John](https://twitter.com/johnsundell) +to talk about their newly launched [Swift Package Index](https://swiftpackageindex.com/), +and what the overall state of Swift's package ecosystem is. Also dependency +management, composing libraries, deploying server-side Swift in production, +and much more are discussed. + +### News and community + +In this year's WWDC 2020 Apple had two main sections of videos about the Swift +language and relevant topics: + +* [Swift in Xcode 12](https://developer.apple.com/news/?id=4nh602ih) +* [Swift deep dive](https://developer.apple.com/news/?id=tjv7v7k1) + +In addition to that, [Tom Doron](https://twitter.com/tomerdoron) presented [how +to use Swift on AWS Lambda with Xcode](https://developer.apple.com/videos/play/wwdc2020/10644/). + +[Amy Tsai](https://twitter.com/mousiechika) shared awesome [sketch session notes](https://twitter.com/mousiechika/status/1275547535206166531) +for the [Whats New In Swift](https://developer.apple.com/videos/play/wwdc2020/10170/) +session. + +A great project by [Federico Zanatello](https://twitter.com/zntfdr): [WWDC Notes](https://www.wwdcnotes.com/) +- The TL;DW for Apple's WWDC videos. You can read session notes written by the +community. + +Apple released Xcode 12 and here are the [release notes](https://developer.apple.com/documentation/xcode-release-notes/xcode-12-beta-release-notes#Swift) +of what has changed in Swift. + +[Cory Benfield](https://twitter.com/Lukasaoz) shared that the Swift Crypto 1.1.0 +RC1 is [available](https://github.com/apple/swift-crypto/releases/tag/1.1.0-rc.1). +It brings the new CryptoKit APIs from Apple’s WWDC20 platforms to all other +Swift platforms. + +The first release candidate of Swift for [TensorFlow v.0.10.0 is out](https://github.com/tensorflow/swift/blob/master/Installation.md#release-candidates). + +[Bruno Rocha](https://twitter.com/rockthebruno) wrote [a blog post](https://swiftrocks.com/benefits-of-throwing-functions-try-swift-underrated-feature) +about the benefits of using throwing functions. + +[Moritz Lang](https://twitter.com/slashmodev) created [a repository](https://github.com/slashmo/awesome-swift-nio) +listing all things SwiftNIO. + +[Ole Begemann](https://twitter.com/olebegemann) wrote [a blog post](https://oleb.net/2020/as/) +explaining `as`, `as?`, and `as!`. + +### Commits and pull requests + +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/32488) +that fixes a bug in generic signature minimization. It [turned out](https://twitter.com/slava_pestov/status/1274914547728515072) +that the fix didn't require a big redesign of the `GenericSignatureBuilder` +after all. It's just a five line addition of a new `'if'` statement. + +[Michael Gottesman](https://github.com/gottesmm) merged [a pull request](https://github.com/apple/swift/pull/32627) +that adds an option that causes the generic specializer to validate newly +specialized functions earlier when there is more information that can be put +into a pretty stack trace. + +Stephen Celis](https://twitter.com/stephencelis/) merged [a pull request](https://github.com/apple/swift/pull/32451) +that improves performance of `Collection.removeFirst(_:) where Self == SubSequence`. +You can read more about it [here](https://twitter.com/stephencelis/status/1278347623359971328). + +[Luciano Almeida](https://github.com/LucianoPAlmeida) merged [a pull request](https://github.com/apple/swift/pull/32376) +that resolves [SR-5688](https://bugs.swift.org/browse/SR-5688): *Unhelpful +diagnostic when missing a ? in a KeyPath expression*. + +[Mishal Shah](https://github.com/shahmishal) merged [a pull request](https://github.com/apple/swift/pull/32502) to update master branch for Xcode 12 beta. + +### Accepted proposals + +[SE-0282](https://forums.swift.org/t/se-0282-review-2-interoperability-with-the-c-atomic-operations-library/37360/12): *Interoperability with the C Atomic Operations Library* was [accepted](https://forums.swift.org/t/accepted-se-0282-interoperability-with-the-c-atomic-operations-library/38050). + +> This proposal does not specify whether/how dependency chains arising from the +C/C++ `memory_order_consume` memory ordering work in Swift. The consume ordering +as specified in the C/C++ standards is not implemented in any C/C++ compiler, +and we join the current version of the C++ standard in encouraging Swift +programmers not to use it. We expect to tackle the problem of efficient +traversal of concurrent data structures in future proposals. Meanwhile, Swift +programmers can start building useful concurrency constructs using relaxed, +acquire/release, and sequentially consistent memory orderings imported from C. + +### Swift Forums + +[Erica Sadun](https://twitter.com/ericasadun) pitched [a proposal](https://forums.swift.org/t/returning-to-an-old-hobbyhorse-migrating-higher-order-function-names-to-comply-with-api-guidelines/37728) +to migrate higher order function names to comply with API guidelines. + +> Swift's higher order functions mostly predate the API guidelines and are +based on terms of art. The community debated about this in the past and the +"Term of Art" hammer won at that time. Perhaps we can reconsider now that Swift +is entering its comfortable middle age reflective period as a missed +opportunity. +> +> It would be simple to alias `map`, `filter`, etc with API compliant names +(`apped`, `mapping`, `filtered`, `filtering`), slow-walk-deprecate the former +with the gentlest touch, and move towards a more consistent dev-facing +vocabulary by replacing the terms in the SPL docs and devdoc tutorials (with +footnotes or sidebars) to establish a new standard long before removing the old. +> +> Breaking changes have a high bar so it would take such a slow and cautious +approach to migrate the community towards these changes. Backwards +compatibility would need to be maintained for a longer period of time than +usual. I'm curious as to what people think. + +[Erica Sadun](https://twitter.com/ericasadun) pitched [a proposal](https://forums.swift.org/t/extend-swiftpm-packagedescription-to-introduce-metadata/37722) +to extend SwiftPM `PackageDescription` to introduce metadata. + +> A Swift Package defines the sources and dependencies for successful +compilation. The [`PackageDescription`](https://docs.swift.org/package-manager/) +specifies items like the supported Swift version, linker settings, and so forth. +> +> What it does not do is offer metadata. You won’t find email for the active +project manager, a list of major authors, descriptive tags, an abstract or +discussion of the package, a link to documentation, deprecation information or +links to superceding packages upon deprecation. + +[Doug Gregor](https://twitter.com/dgregor79) starthed [a conversation](https://forums.swift.org/t/revisiting-the-source-compatibility-impact-of-se-0274-concise-magic-file-names/37720) +about revisiting the source compatibility impact of [SE-0274](https://github.com/apple/swift-evolution/blob/master/proposals/0274-magic-file.md): +Concise magic file names. + +> In light of the discussion of [principles for (trailing closure) evolution +proposals](https://forums.swift.org/t/principles-for-trailing-closure-evolution-proposals/37265) +and based on feedback we've received from the [Swift 5.3 development snapshots](https://swift.org/download/#snapshots), +I'd like to revisit [SE-0274: Concise magic file names](https://github.com/apple/swift-evolution/blob/master/proposals/0274-magic-file.md). +In particular, I feel like SE-0247 has violated the "Source Compatibility" +principle more than is necessary, and that we should consider revising the +proposal. +> +> SE-0247 includes an additive change (`#filePath` literal to provide the full +path to the file), but then introduces three changes that affect existing +sources: +> +> 1. `#file` literals have a different form that does not include the full path +name. Therefore, the spelling `#file` has changed meaning. +> 2. The compiler provides a warning when a wrapper around a +`#filePath`-defaulting function passes it `#file` instead, or vice versa. +> 3. Standard library functions like `precondition` currently use `#file`, and +therefore have had their behavior changed to no longer produce the full path +name by default. + +[Tom Doron](https://forums.swift.org/u/tomerd) shared [meeting notes](https://forums.swift.org/t/june-10th-2020/37863) +for the Swift on the Server Workgroup June 10th, 2020 meeting. + +[Frederick Kellison-Linn](https://twitter.com/jumhyn) shared [a proposal](https://forums.swift.org/t/compound-variable-names/37963) +that introduces a syntax for defining function-typed variables which have +compound names. + +> This proposal introduces a syntax for defining funciton-typed variables which +have compound names (i.e., names with argument labels). This allows the call +sites of such variables to achieve the same clarity that is achieveable with +`func` declarations. + +[Shai Mishali](https://twitter.com/freak4pc) pitched [a proposal](https://forums.swift.org/t/introduce-anonymouskeypath/38080) +to introduce `AnonymousKeyPath`. + +> In many challenges of API Designs, you want your consumer to provide a way to +get/set a specific concrete type. +> +> Today, a consumer can express this idea by a Key Path, a wonderful concept in +Swift. My consumer can tell me: +> +> * This is how you can get a String from MyObject (KeyPath) +> * This is how you can mutate a String on MyObject (WritableKeyPath) +> +> Commonly, though, you want to ask a consumer a different set of questions: +> +> * Give me a way to retrieve a String on an arbitrary object +> * Give me a way to mutate a String on an arbitrary object +> +> While not caring what is the Root of that String, as long as you fulfil the +concrete requirement. +> +> Unfortunately, as of today there's no way to express a Key Path which isn't +bound to a specific concrete Root. + +[Mattt](https://twitter.com/mattt) gave [an update](https://forums.swift.org/t/swift-package-registry-service-security/38088) +on [a pitch](https://forums.swift.org/t/swift-package-registry-service/37219) +for a Swift package registry service. + +> A primary goal of the proposed registry service is to provide strong +guarantees that the package you downloaded is authentic. One approach is built +on trust: If you assume that a registry always sends you exactly what you ask +for, you only need to verify the sender (though it wouldn’t hurt to verify the +contents anyway). +> +> Modern information security relies on [public-key cryptography](https://en.wikipedia.org/wiki/Public-key_cryptography) +to verify claims of identity. Broadly speaking, there are two approaches to +certificate trust: +> +* A centralized, *hierarchical* [public-key infrastructure (PKI)](https://en.wikipedia.org/wiki/Public_key_infrastructure) +scheme, in which [certificate authorities (CAs)](https://en.wikipedia.org/wiki/Certificate_authority) +issue [certificates](https://en.wikipedia.org/wiki/Public_key_certificate) +that prove the ownership of public keys. This is the approach taken by TLS, +which is used by HTTPS. +> * A decentralized, distributed [“web of trust”](https://en.wikipedia.org/wiki/Web_of_trust) +whereby individuals vouch for the identity of one another by signing each +others' keys directly. This is the approach taken by PGP. +> +> The original proposal relies on both TLS and PGP for security; TLS to verify +the identity of the registry’s domain (e.g. github.com) and PGP to verify the +registry as the creator of the package archive. My thinking was that this "belt +and suspenders" approach would offer more security than relying on one alone. +Instead, this turned out to be more of a "weak link in the chain". + +### Finally + +Finally, we [have](https://twitter.com/Valzevul/status/1275164878056103936) +Nyan Cat in Swift. 🏳️‍🌈 + +[Acronyms, acronyms everywhere...](https://twitter.com/jckarter/status/1275423569552400384) From 524a27fb49270fe9890d09282c9d3be6baf0b1f0 Mon Sep 17 00:00:00 2001 From: Max Desiatov <max@desiatov.com> Date: Thu, 2 Jul 2020 18:41:13 +0100 Subject: [PATCH 343/589] Fix link in issue 163 (#532) --- _posts/2020-07-02-issue-163.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-07-02-issue-163.md b/_posts/2020-07-02-issue-163.md index c1e491a9..924cbbe8 100644 --- a/_posts/2020-07-02-issue-163.md +++ b/_posts/2020-07-02-issue-163.md @@ -89,7 +89,7 @@ that adds an option that causes the generic specializer to validate newly specialized functions earlier when there is more information that can be put into a pretty stack trace. -Stephen Celis](https://twitter.com/stephencelis/) merged [a pull request](https://github.com/apple/swift/pull/32451) +[Stephen Celis](https://twitter.com/stephencelis/) merged [a pull request](https://github.com/apple/swift/pull/32451) that improves performance of `Collection.removeFirst(_:) where Self == SubSequence`. You can read more about it [here](https://twitter.com/stephencelis/status/1278347623359971328). From fbb55ffda18441842938cd0e265d3863bc6e2c2a Mon Sep 17 00:00:00 2001 From: Max Desiatov <max@desiatov.com> Date: Fri, 3 Jul 2020 21:41:30 +0100 Subject: [PATCH 344/589] Avoid running Danger for PRs coming from forks (#533) * Avoid running Danger for PRs coming from forks Danger step always fails as `DANGER_GITHUB_API_TOKEN` is not available for such PRs. * Add GHA fork limitation comment to ci.yml --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8b3884b..cc977aac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,10 @@ jobs: run: bundle exec jekyll build - name: danger + # The API token required for Danger to post comments is not available in fork PRs, + # thus disabling Danger for such PRs. See this post for more details: + # https://github.community/t/make-secrets-available-to-builds-of-forks/16166 + if: github.event.pull_request.head.repo.full_name == github.repository env: DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} run: bundle exec danger From 9f052fd697bf47cf7e2688fc096468cbf448fd2f Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 16 Jul 2020 14:50:30 +0200 Subject: [PATCH 345/589] Update Gemfile.lock --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 09986f7f..bdc61344 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -233,7 +233,7 @@ GEM multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.10.9) + nokogiri (1.10.10) mini_portile2 (~> 2.4.0) octokit (4.18.0) faraday (>= 0.9) @@ -267,7 +267,7 @@ GEM tzinfo (1.2.7) thread_safe (~> 0.1) unicode-display_width (1.7.0) - zeitwerk (2.3.0) + zeitwerk (2.4.0) PLATFORMS ruby From a30e03169e6fad326f97d25e3b4f76aee712414d Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 16 Jul 2020 15:30:08 +0200 Subject: [PATCH 346/589] Post 164 Closes #534 --- _drafts/2020-07-16-issue-164.md | 56 ----------- _posts/2020-07-16-issue-164.md | 173 ++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+), 56 deletions(-) delete mode 100644 _drafts/2020-07-16-issue-164.md create mode 100644 _posts/2020-07-16-issue-164.md diff --git a/_drafts/2020-07-16-issue-164.md b/_drafts/2020-07-16-issue-164.md deleted file mode 100644 index 9e519ec0..00000000 --- a/_drafts/2020-07-16-issue-164.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: post -title: ! 'Issue #164' -author: btb -sponsor: - link: https://engineering.linecorp.com/en/ - heading: LINE loves Swift! - body: LINE is the leading mobile messaging platform in Japan and boasts one of the largest Swift codebases in Asia. In addition to supporting Swift versions from day 1, we strongly value semantics, protocols, and strongly typed systems. Many of our members are also active in the OSS community and support both local and global meetups and peer labs. Come join us and see what Swift can do in the real world. - displaylink: engineering.linecorp.com ---- - -> TODO: intro comments - -<!--excerpt--> - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -> TODO - -### Commits and pull requests - -> TODO - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -> TODO - -### Swift Forums - -> TODO - -### Finally - -> TODO: something funny/fun. tweet, link, etc. diff --git a/_posts/2020-07-16-issue-164.md b/_posts/2020-07-16-issue-164.md new file mode 100644 index 00000000..ea897f29 --- /dev/null +++ b/_posts/2020-07-16-issue-164.md @@ -0,0 +1,173 @@ +--- +layout: post +title: ! 'Issue #164' +author: btb +sponsor: + link: https://engineering.linecorp.com/en/ + heading: LINE loves Swift! + body: LINE is the leading mobile messaging platform in Japan and boasts one of the largest Swift codebases in Asia. In addition to supporting Swift versions from day 1, we strongly value semantics, protocols, and strongly typed systems. Many of our members are also active in the OSS community and support both local and global meetups and peer labs. Come join us and see what Swift can do in the real world. + displaylink: engineering.linecorp.com +--- + +Another two weeks have passed, so here's another "Weekly" Brief. There's lots +of energy within the community at the moment, it seems — as there's a lot going +on. + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-13119](https://bugs.swift.org/browse/SR-13119) [Compiler] Confusing +diagnostic when checking conformance for IUO of generic parameter +- [SR-13092](https://bugs.swift.org/browse/SR-13092) [Parser] `operator $` +produces two contradictory error messages + + +### Podcasts + +[John Sundell](https://twitter.com/johnsundell) discusses [what's been going on +with SwiftUI](https://www.swiftbysundell.com/podcast/76/) with [Josh Shaffer](https://twitter.com/joshshaffer) +and [Eliza Block](https://twitter.com/elizablock) from Apple. + +### News and community + +[Tom Doron](https://twitter.com/tomerdoron/) announced [Swift Service Lifecycle](https://swift.org/blog/swift-service-lifecycle/), +a new open source project for the Swift server ecosystem. It is a Swift package +designed to help server applications, also known as services, manage their +startup and shutdown sequences. + +### Commits and pull requests + +[Mishal Shah](https://twitter.com/mishaldshah) merged [a pull request](https://github.com/apple/swift/pull/32705) +that adds Apple Silicon support to the Swift continuous integration. + +### Proposals in review + +[SE-0284](https://github.com/apple/swift-evolution/blob/master/proposals/0284-multiple-variadic-parameters.md): *Allow Multiple Variadic Parameters in Functions, Subscripts, and Initializers* is [under review](https://forums.swift.org/t/se-0284-allow-multiple-variadic-parameters-in-functions-subscripts-and-initializers/38225). + +> Currently, variadic parameters in Swift are subject to two main restrictions: +> +> - Only one variadic parameter is allowed per parameter list +> - If present, the parameter which follows a variadic parameter must be labeled +> +> This proposal seeks to remove the first restriction while leaving the second +in place, allowing a function, subscript, or initializer to have multiple +variadic parameters so long as every parameter which follows a variadic one +has a label. + +[SE-0285](https://github.com/apple/swift-evolution/blob/master/proposals/0285-ease-pound-file-transition.md): *Ease the transition to concise magic file strings* is [under review](https://forums.swift.org/t/se-0285-ease-the-transition-to-concise-magic-file-strings/38234). + +> In [SE-0274](https://github.com/apple/swift-evolution/blob/master/proposals/0274-magic-file.md), +the core team accepted a proposal to change the behavior of `#file`. This +proposal modifies that plan to transition into new behavior more gradually, +treating it as a source break requiring a new language version mode to fully +adopt. + +### Swift Forums + +[Steve Cannon](https://twitter.com/stephentyrone) shared the [release notes](https://forums.swift.org/t/0-0-6-release-notes/38146) +for Swift Numerics 0.0.6. + +[Nicholas Maccharoli](https://twitter.com/theloniousMonad) pitched [a proposal](https://forums.swift.org/t/revisiting-se-0177-adding-clamped-to/38332) +to revist [SE-0177](https://github.com/apple/swift-evolution/blob/master/proposals/0177-add-clamped-to-method.md): `clamped(to:)`. + +> It has been a while since SE-0177 was sent back for revision (three years?) +and it might be worth it to start a new thread here about what to do with +SE-0177. +> +> At the moment I have one pull request for the Swift Evolution repository and +another pull request adding `clamped` as an extension on `Comparable` to the +standard library. +> +> I would love to start this discussion with everyone about what to do next +until +SE-0177 is complete. + +[Doug Gregor](https://twitter.com/dgregor79/status/1279292206017200128) pitched +[a proposal](https://forums.swift.org/t/pitch-2-forward-scan-matching-for-trailing-closures/38491) +for forward scan matching for trailing closures. + +> [SE-0279 "Multiple Trailing Closures"](https://github.com/apple/swift-evolution/blob/master/proposals/0279-multiple-trailing-closures.md) +threaded the needle between getting the syntax we wanted for multiple trailing +closures without breaking source compatibility. One aspect of that compromise +was to extend (rather than replace) the existing rule for matching a trailing +closure to a parameter by scanning backward from the end of the parameter list. +> +> I propose that we replace the backward scan used by the trailing closure +matching rules with a forward scan, which is simpler and works better for APIs +that support trailing closures (whether single or multiple) as well as default +arguments. This is a source-breaking change that affects a small amount of +code: I propose that we take the first (smallest) part of this source break +immediately, to be finished by a slightly larger source break in Swift 6. + +> To get a feel for the new behavior, it really helps to write some code against +it. I [implemented this proposal](https://github.com/apple/swift/pull/32891) +in the Swift compiler, and have built both a [Linux](https://ci.swift.org/job/swift-PR-toolchain-Linux/389//artifact/branch-master/swift-PR-32891-389-ubuntu16.04.tar.gz) +and a [macOS](https://ci.swift.org/job/swift-PR-toolchain-osx/558//artifact/branch-master/swift-PR-32891-558-osx.tar.gz) +toolchain that support it. [Using this toolchain](https://swift.org/download/#using-downloads), +you can experiment with the new behavior. Please try it out! + +[Suyash Srijan](https://twitter.com/suyashsrijan) pitched [a proposal](https://forums.swift.org/t/missing-super-call-warning/38177) +to add a missing `super` call warning. + +> Introduce a new attribute to warn when an overridden function does not call +the `super` method in its body. +> +> It is quite common to override a method in order to add additional +functionality to it, rather than to completely replace it. +> +> At present, there is no way to communicate this need other than adding it to +the documentation and even experienced developers sometimes overlook this +small detail and later run into various issues at runtime. +> +> In Objective-C, one can annotate a superclass method with the [`objc_requires_super`](http://clang.llvm.org/docs/AttributeReference.html#objc-requires-super) +attribute and the compiler emits a warning when an overridden method is missing +a call to the `super` method in its body. +> +> However, there is no such attribute in Swift. + +[Erica Sadun](https://twitter.com/ericasadun) pitched [a proposal](https://forums.swift.org/t/proposing-to-expand-available-to-introduce-discouraged/38197) +to expand `available` to introduce `discouraged`. + +> Swift's `available` attribute documents characteristics of a declaration's +lifecycle. The attribute specifies when a declaration became available on a +given platform, and if it's been deprecated, obsoleted, or renamed. We feel +there's room to further nuance `available`. This proposal expands `available` +to introduce `discouraged`, making declarations harder to accidentally use. + +[chrisbia](https://forums.swift.org/u/chrisbia/summary) pitched [a proposal](https://forums.swift.org/t/enabling-safe-non-optional-circular-referencing-with-shared-reference-counts/38200) +to enable safe, non-optional, circular referencing with shared reference counts. + +> I don't often come across a data modeling problem where circular referencing +appears to be a good solution. In general I find that arguments that attempt to +justify circular references appear contrived (`Apartment <-> Person`), and +because of that lacking any true real world applicability. That said, circular +referencing isn't always an attempt at a data modeling solution, more often +than not I find it's an attempt at an encapsulation solution. +> +> Often when defining complex models code files can become large and in an +effort to make the repository more digestible functionality and properties are +encapsulated into smaller bite-sized classes. The problem arises when some of +those bite-sized classes require access to data within the original scope. + +[Andrew Arnopoulos](https://forums.swift.org/u/andrew_arnopoulos/summary) pitched [a proposal](https://forums.swift.org/t/proposal-allow-property-wrappers-with-multiple-arguments-to-defer-initialization-when-wrappedvalue-is-not-specified/38319) +to allow property wrappers with multiple arguments to defer initialization when +a `wrappedValue` is not specified. + +> Swift's Property Wrappers allow for wrappers without arguments to defer +specifying the wrappedValue until the initialization of the containing type. +This proposal adds this feature to Property Wrappers that have multiple +arguments by extending the current initializer synthesization. + +[Danny Sung](https://forums.swift.org/u/dannys42/summary) pitched [a proposal(https://forums.swift.org/t/invert-guard-let-scoping/38401) +to invert `guard let` scoping. + +> I'm proposing the introduction of an inverted scope for the `guard let` +pattern. The problem occurs most commonly when propagating errors to completion +handlers. + +### Finally + +[~~Kids~~ scholars these days...](https://twitter.com/kyleve/status/1280001602984660992) From 6f852fa0bdefc59d530176a6842c5ad5e8793064 Mon Sep 17 00:00:00 2001 From: Bas Broek <BasThomas@users.noreply.github.com> Date: Thu, 16 Jul 2020 15:31:32 +0200 Subject: [PATCH 347/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 85aff67f..817f52a1 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship <i>Swift Weekly Brief</i> is distributed <b>every other Thursday</b> to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the <a href="https://swift.org">Swift.org</a> open source projects, as well as what's happening in the Swift community at large. -There are over 4,000 subscribers and over <a href="{{ site.links.twitter }}">8,800 followers</a> on Twitter. +There are over 4,000 subscribers and over <a href="{{ site.links.twitter }}">9,000 followers</a> on Twitter. </p> <h3>Sponsored Links</h3> From 046a9e64696a690b5e17d8e90e298a7575fe5f3a Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 16 Jul 2020 15:35:57 +0200 Subject: [PATCH 348/589] Create 165 draft References #535 --- _drafts/2020-07-30-issue-165.md | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 _drafts/2020-07-30-issue-165.md diff --git a/_drafts/2020-07-30-issue-165.md b/_drafts/2020-07-30-issue-165.md new file mode 100644 index 00000000..cced6e88 --- /dev/null +++ b/_drafts/2020-07-30-issue-165.md @@ -0,0 +1,56 @@ +--- +layout: post +title: ! 'Issue #165' +author: btb +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +> TODO: intro comments + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +> TODO + +### Commits and pull requests + +> TODO + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +> TODO + +### Swift Forums + +> TODO + +### Finally + +> TODO: something funny/fun. tweet, link, etc. From e4d2b160903793cd0b3dbac7dd1be6e769505e24 Mon Sep 17 00:00:00 2001 From: Bas Broek <BasThomas@users.noreply.github.com> Date: Thu, 16 Jul 2020 17:04:22 +0200 Subject: [PATCH 349/589] Thanks Antoine --- _posts/2020-07-16-issue-164.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-07-16-issue-164.md b/_posts/2020-07-16-issue-164.md index ea897f29..5f3cf9b9 100644 --- a/_posts/2020-07-16-issue-164.md +++ b/_posts/2020-07-16-issue-164.md @@ -161,7 +161,7 @@ specifying the wrappedValue until the initialization of the containing type. This proposal adds this feature to Property Wrappers that have multiple arguments by extending the current initializer synthesization. -[Danny Sung](https://forums.swift.org/u/dannys42/summary) pitched [a proposal(https://forums.swift.org/t/invert-guard-let-scoping/38401) +[Danny Sung](https://forums.swift.org/u/dannys42/summary) pitched [a proposal](https://forums.swift.org/t/invert-guard-let-scoping/38401) to invert `guard let` scoping. > I'm proposing the introduction of an inverted scope for the `guard let` From 5d0130d97946f4d9c084c55112cddec6ee044d39 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 30 Jul 2020 13:44:48 +0200 Subject: [PATCH 350/589] Move to main --- .github/workflows/ci.yml | 4 ++-- Dangerfile | 4 ++-- _includes/social_share.html | 2 +- authors.html | 2 +- github_issue_generator.rb | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc977aac..9743325e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,10 +3,10 @@ name: CI on: push: branches: - - master + - main pull_request: branches: - - master + - main jobs: build: diff --git a/Dangerfile b/Dangerfile index 38867bfd..33c79a0a 100644 --- a/Dangerfile +++ b/Dangerfile @@ -5,7 +5,7 @@ is_editing_draft = !(git.modified_files.grep(/_drafts/).empty?) if is_editing_draft || is_adding_draft editing_message = <<-EOS Looks like you're editing a draft! 🤓 -**Don't forget** to review [our style guide](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/CONTRIBUTING.md#-writing-style-guide) and [publish the issue](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/CONTRIBUTING.md#-publishing-an-issue) when you're finished. +**Don't forget** to review [our style guide](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/main/CONTRIBUTING.md#-writing-style-guide) and [publish the issue](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/main/CONTRIBUTING.md#-publishing-an-issue) when you're finished. EOS warn(editing_message) end @@ -16,7 +16,7 @@ if is_publishing_issue publish_message = <<-EOS Looks like you're publishing a new issue! 🎉 **Don't forget to:** -1. Review [our style guide](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/CONTRIBUTING.md#-writing-style-guide) before merging +1. Review [our style guide](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/main/CONTRIBUTING.md#-writing-style-guide) before merging 2. After you merge, close the GitHub issue notes for this newsletter issue 3. Open the next GitHub issue, add the correct labels, assign it to the next writer 4. Run the `new_draft.sh` script and push the next draft diff --git a/_includes/social_share.html b/_includes/social_share.html index ab3bcad9..417b6959 100644 --- a/_includes/social_share.html +++ b/_includes/social_share.html @@ -1,5 +1,5 @@ -{% assign base_edit_url = 'https://github.com/SwiftWeekly/' | append: site.repo_name | append: '/edit/master/_posts/' %} +{% assign base_edit_url = 'https://github.com/SwiftWeekly/' | append: site.repo_name | append: '/edit/main/_posts/' %} {% assign issue_date = page.date | date: "%Y-%m-%d" %} {% assign issue_number = page.title | remove: 'Issue #' %} diff --git a/authors.html b/authors.html index ba74e1e9..d16e3203 100644 --- a/authors.html +++ b/authors.html @@ -4,7 +4,7 @@ --- <h1 class="text-center">{{ page.title }}</h1> -<p class="lead text-center">Interested in contributing? <a href="https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/CONTRIBUTING.md">Learn how</a>.</p> +<p class="lead text-center">Interested in contributing? <a href="https://github.com/SwiftWeekly/swiftweekly.github.io/blob/main/CONTRIBUTING.md">Learn how</a>.</p> <br /> <div class="row"> <div class="col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1"> diff --git a/github_issue_generator.rb b/github_issue_generator.rb index e9da0e55..21150300 100644 --- a/github_issue_generator.rb +++ b/github_issue_generator.rb @@ -43,9 +43,9 @@ def run repo = 'SwiftWeekly/swiftweekly.github.io' title = "[#{@number}] Issue \##{@number} - #{@date}" body = <<-MD -To contribute to this issue, simply leave a comment here. Please also review [our contributing guidelines](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/master/CONTRIBUTING.md). +To contribute to this issue, simply leave a comment here. Please also review [our contributing guidelines](https://github.com/SwiftWeekly/swiftweekly.github.io/blob/main/CONTRIBUTING.md). -The current draft for this issue in [`_drafts/`](https://github.com/SwiftWeekly/swiftweekly.github.io/tree/master/_drafts). If you want to contribute directly, feel free to [open a pull request](https://github.com/SwiftWeekly/swiftweekly.github.io/compare?expand=1). +The current draft for this issue in [`_drafts/`](https://github.com/SwiftWeekly/swiftweekly.github.io/tree/main/_drafts). If you want to contribute directly, feel free to [open a pull request](https://github.com/SwiftWeekly/swiftweekly.github.io/compare?expand=1). MD labels = ['full issue notes'] From 4493019e56d6f23a8a292b2d5fdb1d9174b781dc Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 30 Jul 2020 14:00:39 +0200 Subject: [PATCH 351/589] Update draft References #535 --- _drafts/2020-07-30-issue-165.md | 39 +++++++++++++++------------------ 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/_drafts/2020-07-30-issue-165.md b/_drafts/2020-07-30-issue-165.md index cced6e88..007b5f2f 100644 --- a/_drafts/2020-07-30-issue-165.md +++ b/_drafts/2020-07-30-issue-165.md @@ -2,14 +2,11 @@ layout: post title: ! 'Issue #165' author: btb -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO --- -> TODO: intro comments +If you haven't heard about it yet, we've been seeing a start to `async`/`await` +in Swift these past two weeks. While this will take a _lot_ more time before +we can expect to see this land in Swift, it is an exciting thing to see. 🏎 <!--excerpt--> @@ -17,11 +14,13 @@ sponsor: ### Starter tasks -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast +- [SR-13237](https://bugs.swift.org/browse/SR-13237) [Compiler] Remove +`ModuleDecl::isClangModule()` +- [SR-13245](https://bugs.swift.org/browse/SR-13245) [Compiler] Refactor +construction of `ModuleDecl::ImportFilter`s to use new initializer list +constructor +- [SR-13246](https://bugs.swift.org/browse/SR-13246) [Compiler] Refactor manual +size calculations to use `totalSizeToAlloc` ### News and community @@ -29,23 +28,21 @@ sponsor: ### Commits and pull requests -> TODO +https://github.com/apple/swift/pull/33147 +https://github.com/apple/swift/pull/33196 +https://github.com/apple/sourcekit-lsp/pull/298 / https://twitter.com/benlangmuir/status/1288589926934577152 ### Accepted proposals -> TODO - -### Returned proposals +https://forums.swift.org/t/accepted-with-modifications-se-0286-forward-scan-for-trailing-closures/38836 (w/ mods) -> TODO +https://forums.swift.org/t/accepted-se-0285/38516 -### Rejected proposals - -> TODO +https://forums.swift.org/t/accepted-se-0284-allow-multiple-variadic-parameters-in-functions-subscripts-and-initializers/38567 ### Proposals in review -> TODO +https://forums.swift.org/t/se-0286-forward-scan-for-trailing-closures/38529 ### Swift Forums @@ -53,4 +50,4 @@ sponsor: ### Finally -> TODO: something funny/fun. tweet, link, etc. +Swift [is more than 10 years old, now](https://twitter.com/clattner_llvm/status/1284156940747042817)! From b08cfbe0198abc1fcd3e1391b191cfc30f292fa0 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 30 Jul 2020 14:17:09 +0200 Subject: [PATCH 352/589] Add commits, proposals --- _drafts/2020-07-30-issue-165.md | 52 ++++++++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/_drafts/2020-07-30-issue-165.md b/_drafts/2020-07-30-issue-165.md index 007b5f2f..2cfc2227 100644 --- a/_drafts/2020-07-30-issue-165.md +++ b/_drafts/2020-07-30-issue-165.md @@ -28,21 +28,59 @@ size calculations to use `totalSizeToAlloc` ### Commits and pull requests -https://github.com/apple/swift/pull/33147 -https://github.com/apple/swift/pull/33196 -https://github.com/apple/sourcekit-lsp/pull/298 / https://twitter.com/benlangmuir/status/1288589926934577152 +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/33147) +that adds `async` to the Swift type system. +[Doug Gregor](https://twitter.com/dgregor79) opened [a pull request](https://github.com/apple/swift/pull/33196) +stubbing out an experimental concurrency support library. +[Ben Langmuir](https://twitter.com/benlangmuir) merged [a pull request]https://github.com/apple/sourcekit-lsp/pull/298) +that contains a big speedup for code-completion in SourceKit-LSP. ### Accepted proposals -https://forums.swift.org/t/accepted-with-modifications-se-0286-forward-scan-for-trailing-closures/38836 (w/ mods) +[SE-0286](https://github.com/apple/swift-evolution/blob/master/proposals/0286-forward-scan-trailing-closures.md): *Forward-scan matching for trailing closures* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0286-forward-scan-for-trailing-closures/38836). -https://forums.swift.org/t/accepted-se-0285/38516 +> Initial feedback on the review was generally positive on the concept, but +several reviewers were troubled by the potential for source incompatibilities. +The proposal author investigated options for maintaining compatibility better, +and when they seemed to work out, the core team elected to amend the proposal +during review. The community then expressed strong support for the revised +proposal, and the feeling among reviewers was that there was no need for a +second review. The core team discussed this and agreed. Accordingly, the +revised proposal is accepted with modifications. -https://forums.swift.org/t/accepted-se-0284-allow-multiple-variadic-parameters-in-functions-subscripts-and-initializers/38567 +[SE-0285](https://github.com/apple/swift-evolution/blob/master/proposals/0285-ease-pound-file-transition.md): *Ease the transition to concise magic file strings* was [accepted](https://forums.swift.org/t/accepted-se-0285-ease-the-transition-to-concise-magic-file-strings/38516). + +> The feedback was generally positive, and to address the concern around which +variants of `#file` library authors should use the proposal was modified to +include [Swift API Design Guidelines amendment](https://github.com/apple/swift-evolution/blob/master/proposals/0285-ease-pound-file-transition.md#swift-api-design-guidelines-amendment) +encouraging library authors to prefer `#fileID` over alternatives. + +[SE-0284](https://github.com/apple/swift-evolution/blob/master/proposals/0284-multiple-variadic-parameters.md): *Allow Multiple Variadic Parameters in Functions, Subscripts, and Initializers* was [accepted](https://forums.swift.org/t/accepted-se-0284-allow-multiple-variadic-parameters-in-functions-subscripts-and-initializers/38567). + +> Some reviewers indicated that they would prefer to format code in certain +ways to aid with legibility, but the functionality itself was well received. +The core team noted that this was an oversight in the original implementation +and should have been permitted in the original implementation. ### Proposals in review -https://forums.swift.org/t/se-0286-forward-scan-for-trailing-closures/38529 +[SE-0286](https://github.com/apple/swift-evolution/blob/master/proposals/0286-forward-scan-trailing-closures.md): *Forward-scan matching for trailing closures* is [under review](https://forums.swift.org/t/se-0286-forward-scan-for-trailing-closures/38529). + +> [SE-0279 "Multiple Trailing Closures"](https://github.com/apple/swift-evolution/blob/master/proposals/0279-multiple-trailing-closures.md) +threaded the needle between getting the syntax we wanted for multiple trailing +closures without breaking source compatibility. One aspect of that compromise +was to extend (rather than replace) the existing rule for matching a trailing +closure to a parameter by scanning *backward* from the end of the parameter +list. +> +> However, the backward-scan matching rule makes it hard to write good API that +uses trailing closures, especially multiple trailing closures. This proposal +replaces the backward scan with a forward scan wherever possible, which is +simpler, more in line with normal argument matching in a call, and works better +for APIs that support trailing closures (whether single or multiple) and +default arguments. This change introduces a *minor source break* for code +involving multiple, defaulted closure parameters, but that source break is +staged over multiple Swift versions. ### Swift Forums From aee9c14e13dfe1ba843ecccdeed63fe5c53c5c14 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 30 Jul 2020 15:15:31 +0200 Subject: [PATCH 353/589] Add remaining parts --- _drafts/2020-07-30-issue-165.md | 87 +++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 5 deletions(-) diff --git a/_drafts/2020-07-30-issue-165.md b/_drafts/2020-07-30-issue-165.md index 2cfc2227..cc16de1f 100644 --- a/_drafts/2020-07-30-issue-165.md +++ b/_drafts/2020-07-30-issue-165.md @@ -4,14 +4,20 @@ title: ! 'Issue #165' author: btb --- -If you haven't heard about it yet, we've been seeing a start to `async`/`await` -in Swift these past two weeks. While this will take a _lot_ more time before -we can expect to see this land in Swift, it is an exciting thing to see. 🏎 +If you haven't heard about it yet, we've been seeing a start to `async` / +`await` in Swift these past two weeks. While this will take a _lot_ more time +before we can expect to see this land in Swift, it is an exciting thing to see. +🏎 <!--excerpt--> {% include sponsor.html %} +### Podcasts + +[John Sundell](https://twitter.com/johnsundell) discusses [what’s new in Swift +5.3](https://www.swiftbysundell.com/podcast/78) with [JP Simard](https://twitter.com/simjp). + ### Starter tasks - [SR-13237](https://bugs.swift.org/browse/SR-13237) [Compiler] Remove @@ -24,17 +30,23 @@ size calculations to use `totalSizeToAlloc` ### News and community -> TODO +[Kaitlin Mahar](https://twitter.com/k__mahar), [Simon Pilkington](https://github.com/tachyonics), +and Todd Varland join the [Swift Server Workgroup](https://forums.swift.org/t/july-29th-2020-special-update/38869). ### Commits and pull requests [Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/33147) that adds `async` to the Swift type system. + [Doug Gregor](https://twitter.com/dgregor79) opened [a pull request](https://github.com/apple/swift/pull/33196) stubbing out an experimental concurrency support library. + [Ben Langmuir](https://twitter.com/benlangmuir) merged [a pull request]https://github.com/apple/sourcekit-lsp/pull/298) that contains a big speedup for code-completion in SourceKit-LSP. +[Nate Cook](https://twitter.com/nnnnnnnn) merged [a pull request](https://github.com/apple/swift-argument-parser/pull/123), +allowing for autocompletion in the Swift argument parser. + ### Accepted proposals [SE-0286](https://github.com/apple/swift-evolution/blob/master/proposals/0286-forward-scan-trailing-closures.md): *Forward-scan matching for trailing closures* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0286-forward-scan-for-trailing-closures/38836). @@ -84,7 +96,72 @@ staged over multiple Swift versions. ### Swift Forums -> TODO +Karl pitched [a proposal](https://forums.swift.org/t/shared-substrings/38547) +for Shared Substrings. + +> Shared Substrings give us a way to interpret buffers of bytes as unicode +text, without allocating new storage exclusively owned by a `String` object. +It would, for example, allow developers to receive data from a file or network +connection as an `Array<UInt8>` or Foundation `Data` object, and parse that +data as text without copying it. Additionally, it gives developers of +structured text objects (like URLs) greater control over how they organise +their storage. + +[Mattt](https://twitter.com/mattt) pitched [a proposal](https://forums.swift.org/t/package-manager-source-archive-dependencies/38626) +to support non-binary source dependencies in the Swift Package Manager. + +> Swift Package Manager added support for binary dependencies with [SE-0272](https://github.com/apple/swift-evolution/blob/master/proposals/0272-swiftpm-binary-dependencies.md). +This proposal extends that functionality to support non-binary source +dependencies as well. +> +> Swift Package Manager requires a source dependency to be hosted in a Git +repository with a package manifest located in its root. This can cause +problems for projects with a different directory structure or that use a +version control system other than Git. + +[Harshil Shah](https://twitter.com/_HarshilShah) pitched [a proposal](https://forums.swift.org/t/lazy-filter-subscripts/38743) +for Lazy Filter Subscripts. + +> In playing around with the standard library’s `Sequence` types, I noticed an +unexpected behaviour. +> +> The current implementation of `LazyFilterCollection` uses the indices of the +base collection as its own, and also forwards any subscripts directly to the +base collection. +> +> This means that it is possible to retrieve values via subscripting that +shouldn’t exist in the filtered collection: + +```swift +let evenDigits = Array(0 ..< 10).lazy.filter { $0.isMultiple(of: 2) } +print(evenDigits[3]) // prints 3 +``` + +> And it also means that indices which don’t exist in the filtered collection +can be subscripted: + +```swift +let evenDigits = Array(0 ..< 10).lazy.filter { $0.isMultiple(of: 2) } +print(evenDigits[5]) // prints 5 +print(Array(eventDigits[5...])) // prints [6, 8] +``` + +> This behaviour isn’t currently documented. + +[Justin Reusch](https://twitter.com/reuschj) pitched [a proposal](https://forums.swift.org/t/memoization-of-swift-properties/38783) +to allow Memoization of Swift properties. + +> Swift has a focus on being fast and efficient. To this goal, the memoization +of computed properties would help to speed up some Swift programs relying on +computed values (especially expensive ones) by only re-calculating the results +when one of the properties they depend on has changed. +> +> Anyone familiar with React and React hooks will know one of the most useful +hooks is [React's `useMemo`](https://reactjs.org/docs/hooks-reference.html#usememo), +which provides this exact functionality for rendering UIs. While memoization +would be broadly applicable to any Swift program, it may be especially helpful +for use in SwiftUI, where preventing unnecessary re-renders can help optimize +app performance. ### Finally From b37f69993b78c96993260baa94535388740cc085 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 30 Jul 2020 15:16:04 +0200 Subject: [PATCH 354/589] Move 165 to posts Closes #535 --- {_drafts => _posts}/2020-07-30-issue-165.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-07-30-issue-165.md (100%) diff --git a/_drafts/2020-07-30-issue-165.md b/_posts/2020-07-30-issue-165.md similarity index 100% rename from _drafts/2020-07-30-issue-165.md rename to _posts/2020-07-30-issue-165.md From d5277b2af57e95a410245346c7a1cea9ac117556 Mon Sep 17 00:00:00 2001 From: Marcus Rossel <marcusrossel@icloud.com> Date: Thu, 30 Jul 2020 20:20:55 +0200 Subject: [PATCH 355/589] Fix broken link syntax. (#537) --- _posts/2020-07-30-issue-165.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-07-30-issue-165.md b/_posts/2020-07-30-issue-165.md index cc16de1f..3918de82 100644 --- a/_posts/2020-07-30-issue-165.md +++ b/_posts/2020-07-30-issue-165.md @@ -41,7 +41,7 @@ that adds `async` to the Swift type system. [Doug Gregor](https://twitter.com/dgregor79) opened [a pull request](https://github.com/apple/swift/pull/33196) stubbing out an experimental concurrency support library. -[Ben Langmuir](https://twitter.com/benlangmuir) merged [a pull request]https://github.com/apple/sourcekit-lsp/pull/298) +[Ben Langmuir](https://twitter.com/benlangmuir) merged [a pull request](https://github.com/apple/sourcekit-lsp/pull/298) that contains a big speedup for code-completion in SourceKit-LSP. [Nate Cook](https://twitter.com/nnnnnnnn) merged [a pull request](https://github.com/apple/swift-argument-parser/pull/123), From ff161012170da7f8e759950a317be0c2fda63b2d Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 13 Aug 2020 17:13:10 +0100 Subject: [PATCH 356/589] Update Gemfile.lock --- Gemfile.lock | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index bdc61344..9d0f36d4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -23,25 +23,26 @@ GEM colorize (0.8.1) commonmarker (0.17.13) ruby-enum (~> 0.5) - concurrent-ruby (1.1.6) + concurrent-ruby (1.1.7) cork (0.3.0) colored2 (~> 3.1) - danger (5.16.1) + danger (8.0.4) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) cork (~> 0.1) - faraday (~> 0.9) - faraday-http-cache (~> 1.0) - git (~> 1.5) - kramdown (~> 1.5) + faraday (>= 0.9.0, < 2.0) + faraday-http-cache (~> 2.0) + git (~> 1.7) + kramdown (~> 2.0) + kramdown-parser-gfm (~> 1.0) no_proxy_fix octokit (~> 4.7) terminal-table (~> 1) danger-prose (2.0.7) danger - dnsruby (1.61.3) - addressable (~> 2.5) + dnsruby (1.61.4) + simpleidn (~> 0.1) em-websocket (0.5.1) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) @@ -49,18 +50,18 @@ GEM ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) - faraday (0.17.3) + faraday (1.0.1) multipart-post (>= 1.2, < 3) - faraday-http-cache (1.3.1) - faraday (~> 0.8) + faraday-http-cache (2.2.0) + faraday (>= 0.8) ffi (1.13.1) forwardable-extended (2.6.0) gemoji (3.0.1) git (1.7.0) rchardet (~> 1.8) - github-pages (206) + github-pages (207) github-pages-health-check (= 1.16.1) - jekyll (= 3.8.7) + jekyll (= 3.9.0) jekyll-avatar (= 0.7.0) jekyll-coffeescript (= 1.1.1) jekyll-commonmark-ghpages (= 0.1.6) @@ -94,7 +95,8 @@ GEM jekyll-theme-time-machine (= 0.1.1) jekyll-titles-from-headings (= 0.5.3) jemoji (= 0.11.1) - kramdown (= 1.17.0) + kramdown (= 2.3.0) + kramdown-parser-gfm (= 1.1.0) liquid (= 4.0.3) mercenary (~> 0.3) minima (= 2.5.1) @@ -107,20 +109,20 @@ GEM octokit (~> 4.0) public_suffix (~> 3.0) typhoeus (~> 1.3) - html-pipeline (2.13.0) + html-pipeline (2.14.0) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) i18n (0.9.5) concurrent-ruby (~> 1.0) - jekyll (3.8.7) + jekyll (3.9.0) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) i18n (~> 0.7) jekyll-sass-converter (~> 1.0) jekyll-watch (~> 2.0) - kramdown (~> 1.14) + kramdown (>= 1.17, < 3) liquid (~> 4.0) mercenary (~> 0.3.3) pathutil (~> 0.9) @@ -218,7 +220,10 @@ GEM gemoji (~> 3.0) html-pipeline (~> 2.2) jekyll (>= 3.0, < 5.0) - kramdown (1.17.0) + kramdown (2.3.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) liquid (4.0.3) listen (3.2.1) rb-fsevent (~> 0.10, >= 0.10.3) @@ -246,6 +251,7 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rchardet (1.8.0) + rexml (3.2.4) rouge (3.19.0) ruby-enum (0.8.0) i18n @@ -259,6 +265,8 @@ GEM sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) + simpleidn (0.1.1) + unf (~> 0.1.4) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) @@ -266,6 +274,9 @@ GEM ethon (>= 0.9.0) tzinfo (1.2.7) thread_safe (~> 0.1) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.7) unicode-display_width (1.7.0) zeitwerk (2.4.0) From 105a11f8e1803ed0c916c52ad1bf90faab2dd611 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 13 Aug 2020 19:43:04 +0300 Subject: [PATCH 357/589] WIP Issue 165 (#540) * Enable back parsing prose * First draft of #165 * Chris Lattner interview * Intro comments and new stuff * Add new lines for intro comment * Remove empty blocks * Update 2020-08-13-issue-165.md Co-authored-by: Bas Broek <BasThomas@users.noreply.github.com> --- _drafts/2020-08-13-issue-165.md | 105 ++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 _drafts/2020-08-13-issue-165.md diff --git a/_drafts/2020-08-13-issue-165.md b/_drafts/2020-08-13-issue-165.md new file mode 100644 index 00000000..ebc5e7c7 --- /dev/null +++ b/_drafts/2020-08-13-issue-165.md @@ -0,0 +1,105 @@ +--- +layout: post +title: ! 'Issue #165' +author: fassko +--- + +Summer is already in its second half and seems that the Swift community has gained some steam before the official Xcode releases. + +Additionally, the people working on Swift on the server have great news about AWS Lambda and Kitura is now a community project! + +I think this is a calm before the (autumn) storm. We will have more awesome news in the coming weeks. + +<!--excerpt--> + +{% include sponsor.html %} + +### Podcasts + +In the latest episode of Swift Unwrapped, [Jesse](https://twitter.com/jesse_squires) +and [JP](https://twitter.com/simjp) talk [about +package registries and indexes](https://spec.fm/podcasts/swift-unwrapped/aC5JVWoo). + +### News and community + +[Dario Rexin](https://forums.swift.org/u/drexin) shared that Swift 5.2.5 for Linux [has been released](https://forums.swift.org/t/swift-5-2-5-for-linux/39188) and downloads are available on [swift.org](https://swift.org/download/#swift-525). + +An [interview](https://www.youtube.com/watch?v=QeG9bdkc3Lk) with [Chris Lattner](https://twitter.com/clattner_llvm) on the Possibility of Machine Learning-Enabled Compilers. + +[Fabian Fett](https://twitter.com/fabianfett) wrote [a blog post](https://fabianfett.de/swift-on-aws-lambda-creating-your-first-http-endpoint) explaining how to create your first HTTP endpoint with Swift on AWS Lambda. + +[Mattt](https://twitter.com/mattt) shared that [swift-doc 1.0.0-beta.4](https://github.com/SwiftDocOrg/swift-doc/releases/tag/1.0.0-beta.4) is now available, with several visual and functional bug fixes. + +> The next release promises to be the biggest yet, with plans to support DocSet output, along with raw data formats like JSON, RDF, and SQLite. I'm excited to get that out to you all to try out in the next week or two. + +[Tibor Bödecs](https://twitter.com/tiborbodecs) shared [a blog post](https://theswiftdev.com/getting-started-with-feather-cms/) on Feather CMS. A modern Swift-based Content Management System powered by Vapor 4. + +[Ole Begemann](https://twitter.com/olebegemann) tweeted about [how to get up and running with Swift WebAssembly](https://twitter.com/olebegemann/status/1290673766046011393), from writing a simple program to running it in the browser. + +[Harshil Shah](https://twitter.com/_HarshilShah) wrote [a blog post](https://harshil.net/blog/swift-sequence-collection-array) explaining Swift's collection types. + +[John Sundell](https://twitter.com/johnsundell) wrote [an article](https://swiftbysundell.com/articles/deep-dive-into-swift-function-builders/) explaining Swift's function builders. + +[Danny Sung](https://forums.swift.org/u/dannys42) announced [Kitura is now a community project](https://forums.swift.org/t/kitura-is-now-a-community-project/39199). + +### Commits and pull requests + +[Knock YOCKOW](https://twitter.com/YOCKOW_jp) merged [a pull request](https://github.com/apple/swift/pull/28639) that fixes SR-10689: *Fix bugs of `DataProtocol`'s `firstRange(of:in:)`/`lastRange(of:in:)`*. + +[Erik Eckstein](https://github.com/eeckstein) merged [a pull request](https://github.com/apple/swift/pull/33232) that handles static let variables for String constant folding. + +[Andrew Trick](https://github.com/atrick) merged [a pull request](https://github.com/apple/swift/pull/33017) that adds `AccessedStorage::Tail` access kind and removes more exclusivity checks. + +[Stephen Canon](https://github.com/stephentyrone) opened [a pull request](https://github.com/apple/swift/pull/33378) that adds checks that the endpoints of partial ranges are not-`NaN`. + +### Proposals in review + +[SSWG-0015](https://github.com/swift-server/sswg/blob/master/proposals/0015-swift-service-lifecycle.md): *Swift Service Lifecycle* is [under review](https://forums.swift.org/t/sswg-0015-swift-service-lifecycle/39157). + +> Most services have startup and shutdown workflow-logic which is often sensitive to failure and hard to get right. Startup sequences include actions like initializing thread pools, running data migrations, warming up caches, and other forms of state initialization before taking traffic or accepting events. Shutdown sequences include freeing up resources that hold on to file descriptors or other system resources that may leak if not cleared correctly. +> +> Today, server applications and frameworks must find ways to address the need on their own, which could be error prone. To make things safer and easier, Service Lifecycle codifies this common need in a safe, reusable and framework-agnostic way. It is designed to be integrated with any server framework or directly in a server application’s main. + +### Swift Forums + +[Matthew Cheok](https://twitter.com/matthewcheok) pitched [a proposal](https://forums.swift.org/t/organizing-stored-properties-in-extensions/38902) on stored properties in extensions. + +> A very common pattern for organizing methods is using extensions within the module a type is declared in, in order to group methods semantically or for some other reason. These methods behave as if they are declared within the initial declaration itself and UIKit also uses this system of organization in its (generated) Swift interfaces. However, we can't do this today with properties because all stored properties need to be declared within the initial declaration. + +[Richard Clements](https://forums.swift.org/u/richard-clements) pitched [a proposal](https://forums.swift.org/t/deferred-property-wrappers/38931) about deferred property wrappers. + +> I wanted to make a pitch for a deferred style of property wrapper, that will work with lazy properties only. The purpose is that you would be able to use another (non lazy) property as a dependency for the property wrapper. + +[Elvis Shi](https://forums.swift.org/u/lovee) pitched [a proposal](https://forums.swift.org/t/sort-by-min-by-max-by-with-keypaths/38976) to add `sort(by:)` , `min(by:)` and `max(by:)` with keyPaths. + +> [..] now we've got the new KeyPath feature, but we still don't have a convenient method to sort a sequence, or get the max / min element by its elements' properties + +[Todd Varland](https://forums.swift.org/u/varland) shared the Swift Server Work Group [July 8th, 2020](https://forums.swift.org/t/july-8th-2020/39092) meeting notes, and [Peter Adams](https://forums.swift.org/u/peteradams-a) shared the [July 29th, 2020](https://forums.swift.org/t/july-29th-2020/39107) meeting notes. + +[Karoy Lorentey](https://twitter.com/lorentey) pitched [a proposal](https://forums.swift.org/t/ironing-out-managedbuffer-api-wrinkles/39072) on how to iron out the `ManagedBuffer` API wrinkles. + +> As uncovered in [PR #31686](https://github.com/apple/swift/pull/31686), the API of `ManagedBuffer` (and it's less-liked sibling `ManagedBufferPointer`) implicitly assume that it's possible to easily retrieve the size of a dynamically allocated chunk of memory. Platforms often allow this through functions like `malloc_size`, `malloc_usable_size` or `_msize` — but it turns out not all of them do. In particular, OpenBSD evidently doesn't support this. +> +> This makes these stdlib APIs suboptimal — on OpenBSD, the implementation would need to bend over backwards store the allocated capacity within the class instance, even though it is practically always duplicated in `Header`. The extra storage would waste memory and complicate element access in every `ManagedBuffer` instance, even in the (hopefully) vast majority of cases where `ManagedBuffer.capacity` is never called outside of the closure passed to the `create` method. +> +> I believe the stdlib's APIs shouldn't be needlessly difficult to implement on particular platforms. `ManagedBuffer`'s implicit requirement for a working `malloc_size` seems unreasonable. +> +> This seems like as good an excuse as any to start discussing a revision of these APIs. + +[Michael Verges](https://github.com/maustinstar) pitched [a proposal](https://forums.swift.org/t/package-manager-executable-only-dependencies/39070) that executable-only dependencies would allow packages to be imported only for use in the package's development environment. + +> CLI tools distributed through Swift Packages, such as linters or documentation generators, are currently imported as dependencies. Although these dependencies may only exist to use as an executable during development, the dependencies are shipped with the package. End-users of a package do not need to inherit development tools from the package. +> +> This can encourage package developers to use more developer tools without frustrating end-users with unused dependencies. + +[Tanner Nelson](https://twitter.com/tanner0101) pitched [a proposal](https://forums.swift.org/t/generic-connection-pool/39161) to implement a Generic Connection Pool. + +> Connection pooling is a critical component for many server-side applications. I would attempt to summarize connection pooling here, but honestly [Wikipedia's page](https://en.wikipedia.org/wiki/Connection_pool) does a better job: +> +>> In software engineering, a connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required. Connection pools are used to enhance the performance of executing commands on a database. + +### Finally + +[Taylor Swift as classic programming textbooks](https://twitter.com/jeanqasaur/status/1290883041418649600). + +Sometimes debugging can be quite ["fun"](https://twitter.com/aalonso128/status/1293418352023613440). From 99c0446ced2b0609d90b36a785302b4b5f34becb Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 13 Aug 2020 22:04:58 +0300 Subject: [PATCH 358/589] Move draft --- {_drafts => _posts}/2020-08-13-issue-165.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-08-13-issue-165.md (100%) diff --git a/_drafts/2020-08-13-issue-165.md b/_posts/2020-08-13-issue-165.md similarity index 100% rename from _drafts/2020-08-13-issue-165.md rename to _posts/2020-08-13-issue-165.md From bf91a6608de7891b3303285f70aea83ab7ff1e58 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Fri, 14 Aug 2020 00:19:43 +0300 Subject: [PATCH 359/589] Move draft (#541) --- {_drafts => _posts}/2020-08-13-issue-165.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-08-13-issue-165.md (100%) diff --git a/_drafts/2020-08-13-issue-165.md b/_posts/2020-08-13-issue-165.md similarity index 100% rename from _drafts/2020-08-13-issue-165.md rename to _posts/2020-08-13-issue-165.md From 63cfe5c8b88a169c21c84efc4564a85b5203d85f Mon Sep 17 00:00:00 2001 From: Bas Broek <BasThomas@users.noreply.github.com> Date: Fri, 14 Aug 2020 20:48:00 +0100 Subject: [PATCH 360/589] Update and rename 2020-08-13-issue-165.md to 2020-08-13-issue-166.md --- _posts/{2020-08-13-issue-165.md => 2020-08-13-issue-166.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename _posts/{2020-08-13-issue-165.md => 2020-08-13-issue-166.md} (99%) diff --git a/_posts/2020-08-13-issue-165.md b/_posts/2020-08-13-issue-166.md similarity index 99% rename from _posts/2020-08-13-issue-165.md rename to _posts/2020-08-13-issue-166.md index ebc5e7c7..747823e7 100644 --- a/_posts/2020-08-13-issue-165.md +++ b/_posts/2020-08-13-issue-166.md @@ -1,6 +1,6 @@ --- layout: post -title: ! 'Issue #165' +title: ! 'Issue #166' author: fassko --- From daed3d933429dec41b55417b8e7217e5dabdd7b4 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 27 Aug 2020 10:26:46 +0200 Subject: [PATCH 361/589] Write 167 draft References #542 --- _drafts/2020-08-27-issue-167.md | 142 ++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 _drafts/2020-08-27-issue-167.md diff --git a/_drafts/2020-08-27-issue-167.md b/_drafts/2020-08-27-issue-167.md new file mode 100644 index 00000000..a433ad89 --- /dev/null +++ b/_drafts/2020-08-27-issue-167.md @@ -0,0 +1,142 @@ +--- +layout: post +title: ! 'Issue #167' +author: btb +--- + +Here's a fresh update on everything going on in Swift in open source. Like +every other week, really! It continues to be a pleasure being able to write and +share this newsletter with you, keeping a digestable overview of changes. + +Enjoy the brief! + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-13255](https://bugs.swift.org/browse/SR-13255) [swift-driver] +Darwin-specific argument validation +- [SR-13385](https://bugs.swift.org/browse/SR-13385) [Compiler] Improved +diagnostics when using instance methods before initialization +- [SR-13388](https://bugs.swift.org/browse/SR-13388) [Compiler] Add Fix-Its to +"override" mismatch +- [SR-13445](https://bugs.swift.org/browse/SR-13445) [Compiler] Replace uses of +the word "accessor" in diagnostics with user-facing terminology + +### News and community + +[Steve Canon](https://twitter.com/stephentyrone/status/952682853309009921) +shared [update notes](https://forums.swift.org/t/0-0-7-release-notes/39680) for +Swift Numerics 0.0.7. + +[Ben Cohen](https://twitter.com/AirspeedSwift) wrote [some thoughts](https://twitter.com/AirspeedSwift/status/1294292068412473347) +on deprecating `AnyCollection`, allowing for performance optimizations going +forward. + +### Commits and pull requests + +[Mike Ash](https://twitter.com/mikeash) merged [a pull request](https://github.com/apple/swift/pull/33487) +reimplementing protocol conformance caching, improving its performance. + +> [..] checks should be 10-100x faster once cached + +🏎! + +### Accepted proposals + +[SE-0287](https://github.com/apple/swift-evolution/blob/master/proposals/0287-implicit-member-chains.md): *Extend implicit member syntax to cover chains of member references* was [accepted](https://forums.swift.org/t/accepted-se-0287-extend-implicit-member-syntax-to-cover-chains-of-member-references/39714). + +> The feedback was overwhelmingly positive. Accordingly, SE-0287 is accepted. + +### Proposals in review + +[SE-0288](https://github.com/apple/swift-evolution/blob/master/proposals/0288-binaryinteger-ispower.md): *Adding `isPower(of:)` to `BinaryInteger`* is [under review](https://forums.swift.org/t/se-0288-adding-ispower-of-to-binaryinteger/39736). + +> Checking some mathematical properties of integers (e.g. parity, divisibility, etc.) is widely used in scientific and engineering applications. Swift brings a lot of convenience when performing such checks, thanks to the relevant methods (e.g. `isMultiple(of:)`) provided by the standard library. However there are still some other cases not yet supported. One of those useful checks that are currently missing is to tell if an integer is power of another, of which the implementation is non-trivial. Apart from inconvenience, user-implemented code can bring inefficiency, poor readability, and even incorrectness. To address this problem, this proposal would like to add a public API `isPower(of:)`, as an extension method, to the `BinaryInteger` protocol. + +### Swift Forums + +[Doug Gregor](https://twitter.com/dgregor79) wrote [a second proposal pitch](https://forums.swift.org/t/pitch-2-function-builders/39410) for function +builders. + +> It has been a long time since the [first function builders pitch](https://forums.swift.org/t/function-builders/25167) last year. Since then, we've completely [transformed the implementation](https://forums.swift.org/t/function-builders-implementation-progress/32981) to get the support for language constructs like local `let` bindings, `if let`, `switch`, and `if #available` that we wanted, as well as implementing a new semantic model that makes efficient type checking possible. +> +> Last year's pitch thread involved a lot of potential expansions to the idea of function builders---things like virtualizing execution, or programmatically inspecting the AST---to broaden their applicability into other domains. None of those have made any visible progress. On the other hand, people have built a number of cool DSLs on top of the experimental function builders implementation, so we feel pretty good that we have a well-rounded feature that makes Swift more expressive. The ad hoc nature of the interaction between the language and function builder types allows us to treat the system we have as the basis, which can be further extended when those ideas come to fruition. +> +> To that end, here is a [revised proposal](https://github.com/DougGregor/swift-evolution/blob/function-builders/proposals/XXXX-function-builders.md) for function builders. + +[Daryle Walker](https://twitter.com/CTMacUser) brought up [a question](https://forums.swift.org/t/bump-on-anysequence-anycollection-conversion/39366) +surrounding `AnySequence` / `AnyCollection` conversion. + +> I'm working on something involving `AnySequence`. I saw `AnyCollection` and its bi-directional and random-access counterparts while reading Apple's docs. I noticed that the collection versions can all cross convert (unconditionally when going towards a base, fail-able when going away from a base), but the conversion set doesn't include `AnySequence`. Any reason why? In the past few years since the older post, has any new Swift features changed the landscape? Does ABI stability mess anything up? + +[Peter Adams](https://forums.swift.org/u/peteradams-a) shared [meeting notes](https://forums.swift.org/t/august-5th-2020/39546) for the Swift on the Server +workgroup August 5 meeting. + +[James Campbell](https://github.com/jcampbell05) brought up [a compiler improvement](https://forums.swift.org/t/switch-and-avaliable/39528) for enum +cases with `@available` markers. + +> Given the following enum: + +```swift +enum Labels: String { + + case foo + case bar + case baz + + @available(iOS 14, *) + case notAvailableYet + +} +``` + +> With the following code: + +```swift +@avaliable(iOS14, *) +func foo() { +} + +switch label { +case .notAvailableYet: + foo() +} +``` + +> The compiler will force you to wrap the call-site for foo() with a availability check even that case is already for an enum which is marked as only being available for the same iOS version. +> +> It would be great if the compile could automatically synthesise this availability check as part of the case statement so it won't execute that case (If `rawValue` was used to dynamically select that enum then perhaps there could be a runtimes error) + +Karl pitched [a proposal](https://forums.swift.org/t/swift-dynamic-loading-api/39495) for a Swift dynamic loading API. + +> I've been wondering if there's any appetite for a Swift [dynamic loading](https://en.wikipedia.org/wiki/Dynamic_loading) API. Basically a Swiftier version of `dlopen` and `dlsym`, maybe making use of reflection metadata to support more kinds of queries on loaded modules. There is precedent for it: Java has its own [`ClassLoader`](https://docs.oracle.com/javase/10/docs/api/java/lang/ClassLoader.html) API and Go also supports [plugins](https://golang.org/pkg/plugin/). +> +> This could allow for richer interfaces than are currently practical using C interop and `dlsym`. + +[Jorge Revuelta](https://twitter.com/minuscorp) pitched [a proposal](https://forums.swift.org/t/typed-throws/39660) +for "typed throws". + +> `throws` in Swift is missing the possibility to use it with specific error types. On the contrary [`Result`](https://developer.apple.com/documentation/swift/result) and [`Future`](https://developer.apple.com/documentation/combine/future) support specific error types. This is inconsistent without reason. The proposal is about introducing the possibility to support specific error types with `throws`. + +[Ariel Bogdziewicz](https://forums.swift.org/u/absoftware) pitched [a proposal](https://forums.swift.org/t/make-protocols-conforming-to-protocols-as-only-struct-enum-class-types-can-conform-to-protocols-now/39696) to allow protocols to conform to other protocols. + +> My custom container implemented as + +```swift +let listeners = Listeners<MyListener>() +``` + +> raises an issue: + +``` +Value of protocol type 'MyListener' cannot conform to 'ListenerProtocol'; only struct/enum/class types can conform to protocols +``` + +> It would be nice to make it working for protocols. + +### Finally + +[The ~~Corgi~~ Core Team](https://twitter.com/dgregor79/status/1296132733899399169). 🐶 From 6d8778b4422fd3e2865b98e30f3d914cea5c084f Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 27 Aug 2020 14:48:10 +0200 Subject: [PATCH 362/589] Post 167 Closes #542 --- {_drafts => _posts}/2020-08-27-issue-167.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-08-27-issue-167.md (100%) diff --git a/_drafts/2020-08-27-issue-167.md b/_posts/2020-08-27-issue-167.md similarity index 100% rename from _drafts/2020-08-27-issue-167.md rename to _posts/2020-08-27-issue-167.md From 6f5a97f693955ae06a01ad81585a3c4645419e45 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 5 Sep 2020 21:45:28 +0200 Subject: [PATCH 363/589] Bump danger from 8.0.4 to 8.0.5 (#544) Bumps [danger](https://github.com/danger/danger) from 8.0.4 to 8.0.5. - [Release notes](https://github.com/danger/danger/releases) - [Changelog](https://github.com/danger/danger/blob/master/CHANGELOG.md) - [Commits](https://github.com/danger/danger/compare/v8.0.4...8.0.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9d0f36d4..2802a1b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,7 +26,7 @@ GEM concurrent-ruby (1.1.7) cork (0.3.0) colored2 (~> 3.1) - danger (8.0.4) + danger (8.0.5) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -34,7 +34,7 @@ GEM faraday (>= 0.9.0, < 2.0) faraday-http-cache (~> 2.0) git (~> 1.7) - kramdown (~> 2.0) + kramdown (~> 2.3) kramdown-parser-gfm (~> 1.0) no_proxy_fix octokit (~> 4.7) From 1334effae633f1587fc11743997e43b14a574cbd Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 10 Sep 2020 17:36:33 +0300 Subject: [PATCH 364/589] Issue 168 (#545) Co-authored-by: Bas Broek <BasThomas@users.noreply.github.com> --- _drafts/2020-09-10-issue-168.md | 75 +++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 _drafts/2020-09-10-issue-168.md diff --git a/_drafts/2020-09-10-issue-168.md b/_drafts/2020-09-10-issue-168.md new file mode 100644 index 00000000..73019c6b --- /dev/null +++ b/_drafts/2020-09-10-issue-168.md @@ -0,0 +1,75 @@ +--- +layout: post +title: ! 'Issue #168' +author: fassko +--- + +The last two weeks were pretty quiet, but I think it is about to change. I assume we will see a lot going on before the official Apple platform releases. Stay tuned! + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-13490](https://bugs.swift.org/browse/SR-13490) [Compiler] `compareImports()` in `ModuleInterfacePrinting.cpp` looks buggy + +### News and community + +[Ted Kremenek](https://twitter.com/tkremenek) announced the [Swift Cluster Membership](https://swift.org/blog/swift-cluster-membership/) - a library that aims to help Swift grow in a new space of server applications: clustered multi-node distributed systems. + +Google published [SwiftLogFireCloud Firebase Extension](https://github.com/google/swiftlogfirecloud) - a library that can be used as an implementation of Apple's SwiftLog interface that captures console logs from iOS and, in the future, macOS apps and pushes them to Firebase Cloud Storage as flat files for later review. + +[Peter Steinberger](https://twitter.com/steipete) wrote [an article](https://steipete.com/posts/logging-in-swift/) explaining logging in Swift. + +Apple posted [an article](https://developer.apple.com/news/?id=3bwfq45y) about what's new in CryptoKit. Great to see that they mention [a talk](https://www.dotconferences.com/2020/02/cory-benfield-cryptography-in-swift) from the community organized conference [dotSwift](https://www.dotswift.io/). + +### Commits and pull requests + +[Varun Gandhi](https://github.com/varungandhi-apple) merged [a pull request](https://github.com/apple/swift/pull/33786) that adds first a pull request guide and getting started guide. + +[Saleem Abdulrasool](https://github.com/compnerd) merged [a pull request](https://github.com/apple/swift/pull/33770) that fixes [SR-13449](https://bugs.swift.org/browse/SR-13449): *Wrong method call when binary is built with optimizations*. + +[Owen Voorhees](https://github.com/owenv) merged [a pull request](https://github.com/apple/swift/pull/29735) that implements [SE-0284](https://github.com/apple/swift-evolution/blob/master/proposals/0284-multiple-variadic-parameters.md): *Allow Multiple Variadic Parameters in Functions, Subscripts, and Initializers*. + +[Meghana Gupta](https://github.com/meg-gupta) merged [a pull request](https://github.com/apple/swift/pull/33722) that fixes `KnownSafety` optimization bugs in `ARCSequenceOpts`. + +### Proposals in review + +[SE-0289](https://github.com/apple/swift-evolution/blob/master/proposals/0289-function-builders.md): *Function builders* is [under review](https://forums.swift.org/t/se-0289-function-builders/39889). + +> This proposal describes function builders, a new feature which allows certain functions (specially-annotated, often via context) to implicitly build up a value from a sequence of components. + +### Swift Forums + +[Hassan ElDesouky](https://twitter.com/hassanedesouky) posted [a recap](https://forums.swift.org/t/localization-of-compiler-diagnostic-messages/36412/41) of the Google Summer of Code (GSoC). + +[ArtemC](https://forums.swift.org/u/artemc) gave an update on [progress on Explicit Module Builds](https://forums.swift.org/t/explicit-module-builds-the-new-swift-driver-and-swiftpm/36990/17) he, [Xi_Ge](https://forums.swift.org/u/xi_ge), and [Douglas_Gregor](https://twitter.com/dgregor79) have been making. + +> SwiftPM can now self-host using Explicit Module Builds. The package manager itself is a reasonably complex Swift package, and building it exercises most of the new machinery across the involved components. This was an important milestone for getting the basics of the new compilation flow functional. + +[Bruno Rocha](https://twitter.com/rockbruno_) pitched [a proposal](https://forums.swift.org/t/support-negative-availability-literals/39946) about negative version checks. + +> Negative availability checks are important when an API is completely different across versions. In the case of iOS apps that support Scenes, you need a negative availability check in your AppDelegate to account for the fact that UIWindows should be loaded elsewhere in iOS 13+. + +[Ray Fix](https://forums.swift.org/u/ray_fix) started [a discussion](https://forums.swift.org/t/throw-on-nil/39970) about throwing on `nil`. + +> I find myself wanting to define an operation that converts failable initializers to throwing ones. When I have a throwing initializer contains multiple failing initializers, I think it improves the clarity and readability. + +[Ashley Garland](https://forums.swift.org/u/bitjammer) asked for [feedback](https://forums.swift.org/t/diagnostic-for-undocumented-public-declarations/39980) on emitting a diagnostic when a public declaration does not have a documentation comment. + +[Greg Titus](https://forums.swift.org/u/gregtitus) pitched [a proposal](https://forums.swift.org/t/standard-library-behavior-change-for-lazymapcollection-prefix-to-act-as-a-sequence/39954) that would make `LazyMapCollections` use the `Sequence` behavior for prefix calls, rather than the `Collection` behavior. + +[John McCall](https://forums.swift.org/u/john_mccall) started [a discussion](https://forums.swift.org/t/sil-representations-for-async-functions/40021) on how to represent `async/await` in SIL. + +[Alessio Buratti](https://forums.swift.org/u/alessioburatti) asked [a question](https://forums.swift.org/t/question-about-usable-from-inline-in-swiftnio/40095) of why `@usableFromInline` is preferred to `private`. + +> This is a great question! To answer it thoroughly we need to take a digression into the Swift optimiser and optimisation boundaries, but the TL;DR is that `@usableFromInline` is required to make substantial chunks of NIO perform better. + +[Danny Sung](https://forums.swift.org/u/dannys42) posted [news](https://forums.swift.org/t/community-1st-steps-github-org-transition/40114) about the Kitura migration to a GitHub organization. + +[Jordan Rose](https://twitter.com/UINT_MIN) asked [a question](https://forums.swift.org/t/guarantee-in-memory-tuple-layout-or-dont/40122): Are non-homogeneous tuples guaranteed to use the in-order, rounding-up layout that frozen structs on Apple platforms use? + +### Finally + +[Swifty Good vibes](https://twitter.com/AirspeedSwift/status/1302296452798885888). From 7421a857dab532a5f8838db93ab462e3f5c65f22 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 10 Sep 2020 17:38:09 +0300 Subject: [PATCH 365/589] Release Issue 168 --- {_drafts => _posts}/2020-09-10-issue-168.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-09-10-issue-168.md (100%) diff --git a/_drafts/2020-09-10-issue-168.md b/_posts/2020-09-10-issue-168.md similarity index 100% rename from _drafts/2020-09-10-issue-168.md rename to _posts/2020-09-10-issue-168.md From 846de79e5a17ca3a33446820929ba0652e6782ad Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 24 Sep 2020 11:47:57 +0100 Subject: [PATCH 366/589] Update Gemfile.lock --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2802a1b6..34557da7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.3.2) + activesupport (6.0.3.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -43,7 +43,7 @@ GEM danger dnsruby (1.61.4) simpleidn (~> 0.1) - em-websocket (0.5.1) + em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) ethon (0.12.0) @@ -234,7 +234,7 @@ GEM jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.14.1) + minitest (5.14.2) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) From cf5a6c187db64f193c31adbeba918feefd71e25c Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 24 Sep 2020 18:14:13 +0300 Subject: [PATCH 367/589] Draft for Issue 169 (#547) Co-authored-by: Bas Broek <BasThomas@users.noreply.github.com> --- _drafts/2020-09-24-issue-169.md | 106 ++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 _drafts/2020-09-24-issue-169.md diff --git a/_drafts/2020-09-24-issue-169.md b/_drafts/2020-09-24-issue-169.md new file mode 100644 index 00000000..94271c42 --- /dev/null +++ b/_drafts/2020-09-24-issue-169.md @@ -0,0 +1,106 @@ +--- +layout: post +title: ! 'Issue #169' +author: fassko +--- + +### An update on the Swift Weekly Brief from Bas: + +After Jesse moved on to different project after issue #100, I've decided to move on to different projects now, too. +I'll stick around for issue 170, but that'll be my last. You can read [my blog post](https://basthomas.github.io/goodbye-swift-weekly) for more details. It's been an absolute pleasure contributing to and helping out with this project, working with Jesse and Kristaps, as well as all other [contributors](https://github.com/SwiftWeekly/swiftweekly.github.io/graphs/contributors) and [authors](../authors). + +I took over the newsletter from Jesse as I wanted to keep this valuable research afloat — helping more than 10.000 subscribers and followers to stay up-to-date with what's happening in the Swift.org and other Apple open source projects. + +As Jesse said in issue 100, this still stands and I hope this project will continue through contributions from the community: + +> Luckily, the project is extremely healthy and could easily be taken over by an eager and motivated member of the community. If you are interested, please get in touch! + +All the best, +Bas + +--- + +In other news... + +The last two weeks were full of surprises and new stuff. Xcode 12 was officially [released](https://developer.apple.com/documentation/xcode-release-notes/xcode-12-release-notes) along with [Swift 5.3](https://swift.org/blog/swift-5-3-released/) as well as Swift [docker images](https://hub.docker.com/_/swift). The Swift repository [moved](https://forums.swift.org/t/updating-branch-names/40412) to having a `main` branch as its default. + +It did not stop there and as a surprise [Swift on the Windows](https://swift.org/blog/swift-on-windows/) landed. + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-13573](https://bugs.swift.org/browse/SR-13573) [SwiftSyntax] Fix Spelling of `CustomReflecatbleTests.swift` +- [SR-13572](https://bugs.swift.org/browse/SR-13572) [Standard Library] investigate removal of `visualc` module +- [SR-13571](https://bugs.swift.org/browse/SR-13571) [Standard Library] build release and debug variants of `swiftrt.obj`, `swiftCore` + +### Podcasts + +In the latest episode of Swift Unwrapped, [Jesse](https://twitter.com/jesse_squires) +and [JP](https://twitter.com/simjp) talk [about +Swift 5.3](https://spec.fm/podcasts/swift-unwrapped/DasaMAiV). + +### News and community + +[Jordan Rose](https://twitter.com/UINT_MIN) started [a blog series](https://belkadan.com/blog/2020/08/Swift-Runtime-Heap-Objects/) about the Swift runtime. You can give your feedback in this [forum thread](https://forums.swift.org/t/blog-series-the-swift-runtime/40296). + +[Max Desiatov](https://twitter.com/maxdesiatov) wrote [a blog post](https://desiatov.com/swift-webassembly-2020/) about the state of Swift for WebAssembly in 2020 (and earlier). + +[Tryolabs](https://tryolabs.com/) shared [a video](https://www.youtube.com/watch?v=WxFPrypPBpU) - deep dive into Swift for Tensorflow. + +[Saleem Abdulrasool](https://twitter.com/compnerd/) wrote [a blog post](https://swift.org/blog/swift-on-windows/) introducing Swift on Windows. + +### Commits and pull requests + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/33998) that introduces the `@actorIndependent` attribute. + +[Karoy Lorentey](https://twitter.com/lorentey) opened [a pull request](https://github.com/apple/swift-se-0282-experimental/pull/1) that implements atomic strong references, which were a fun way to prove the versatility of the atomics API. Incidentally, they may also become a convenient default solution for memory reclamation in concurrent Swift data structures. + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/33972) that extends diagnostics and code completion to help guide developers toward implementing function builders. + +### Accepted proposals + +[SE-0288](https://github.com/apple/swift-evolution/blob/master/proposals/0288-binaryinteger-ispower.md): *Adding isPower(of:) to BinaryInteger* was [accepted](https://forums.swift.org/t/accepted-se-0288-adding-ispower-of-to-binaryinteger/40325). + +> Checking some mathematical properties of integers (e.g. parity, divisibility, etc.) is widely used in scientific and engineering applications. Swift brings a lot of convenience when performing such checks, thanks to the relevant methods (e.g. `isMultiple(of:)`) provided by the standard library. However there are still some other cases not yet supported. One of those useful checks that are currently missing is to tell if an integer is power of another, of which the implementation is non-trivial. Apart from inconvenience, user-implemented code can bring inefficiency, poor readability, and even incorrectness. To address this problem, this proposal would like to add a public API `isPower(of:)`, as an extension method, to the `BinaryInteger` protocol. + +### Swift Forums + +[Slava Pestov](https://twitter.com/slava_pestov) discussed [how to clarify](https://forums.swift.org/t/clarify-behavior-of-se-0268-with-a-mutating-getter/40324) the behavior of [SE-0268](https://github.com/apple/swift-evolution/blob/master/proposals/0268-didset-semantics.md) with a mutating getter. + +> Namely, if a property wrapper has a mutating getter but a non-mutating setter, and the `didSet` body refers to `oldValue`, the synthesized setter has to be mutating as well, since it calls the getter to load `oldValue`. However in the current implementation, if the `didSet` body does not refer to `oldValue`, the setter is made non-mutating. + +[Ben Cohen](https://twitter.com/airspeedswift) addressed [an issue](https://forums.swift.org/t/addressing-unimplemented-evolution-proposals/40322] with unimplemented evolution proposals. + +> The core team has recently been discussing of a number of proposals that have been accepted but not implemented. You can see a list of these proposals on the [evolution dashboard](https://apple.github.io/swift-evolution/#?search=Accepted). +> +> The core team feels that it's important to avoid a situation where evolution proposals remain accepted but unimplemented for long periods of time. The main cause of this was eliminated through the requirement that proposals come with an implementation prior to review. Some unimplemented proposals pre-date this rule. Another cause can be proposals that are implemented, but the implementation is not quite ready for production use. Finally, several proposals are mostly implemented, except for some small portion that proved problematic or was missed. + +[Jonathan G](https://forums.swift.org/u/1oo7) started [a thread](https://forums.swift.org/t/update-swift-org-api-guidelines-regarding-get-in-function-names/40294/3) about updating Swift.org API guidelines regarding **get** in function names. + +> I think this current situation is a direct consequence of the fact that our Swift API guidelines do not explicitly say not to use **get** for functions that return a value. + +> So my pitch is that we should update the Swift.org API design guidelines with the same basic guidelines about the use of **get** in method names as was found in the Cocoa guidelines + +[Lily Ballard](https://forums.swift.org/u/lily_ballard) wrote [a post](https://forums.swift.org/t/se-0268-refine-didset-semantics-and-unexpected-interaction-with-exclusive-memory-access/40364) explaining an issue with Xcode 12 having unexpected consequences of [SE-0268](https://github.com/apple/swift-evolution/blob/master/proposals/0268-didset-semantics.md): new *simple* `_modify` semantics. In short, code that previously ran just fine will now fails at runtime with a simultaneous access error. + +> The issue lies in interactions with optional chaining and an assignment expression that references the property. In particular, with the non-simple version, the synthesized `_modify` coroutine yields a reference to a stack-allocated copy of the value, and therefore does not hold memory access on the property during the yield. But in the new version, it holds `[modify] [dynamic]` access during the yield. Without optional chaining this is generally fine, as the right-hand side of the assignment is evaluated before the _modify is invoked, but with optional chaining it has to defer evaluating the right-hand side until it's verified that the property's value is nonnull. + +The [Swift Server Work Group](https://swift.org/server/) held two meetings and shared notes: + +* [August 19th, 2020](https://forums.swift.org/t/august-19th-2020/40347) +* [Sept 2nd, 2020](https://forums.swift.org/t/sept-2nd-2020/40382) + +[Saleem Abdulrasool](https://twitter.com/compnerd/) started [a thread](https://forums.swift.org/t/enabling-static-linking-on-windows/40509) discussing about enabling static linking on Windows. + +> Windows has definitely come a far way from when it started. However, one feature that still is not available on Windows is static linking. Everything currently requires dynamic linking, which is a bit unfortunate. Although, technically, the Microsoft linker can resolve the imported symbol, it comes at a cost (binary size and runtime overheads, and unnecessary warnings). It would be wonderful to get this issue resolved. Even then, it results in over-exposure of the interfaces, which is another source of issues. However, going the other way has even bigger problems, and given that dynamic linkage is generally preferable, it is what I focused on initially. + +[Slava Pestov](https://twitter.com/slava_pestov) started [a discussion] about clarifying scoping behavior with local functions. + +### Finally + +[Boolshit](https://twitter.com/EmilyKager/status/1306653151332720640) + +[Singing while working](https://twitter.com/dgregor79/status/1306834844609966080) From c63f1cd48127856c680a69ac218657a9e46db8c0 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 24 Sep 2020 18:14:52 +0300 Subject: [PATCH 368/589] Move draft to posts. --- {_drafts => _posts}/2020-09-24-issue-169.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-09-24-issue-169.md (100%) diff --git a/_drafts/2020-09-24-issue-169.md b/_posts/2020-09-24-issue-169.md similarity index 100% rename from _drafts/2020-09-24-issue-169.md rename to _posts/2020-09-24-issue-169.md From 415ab9438d1a7033945d57133b8b5f59994d23cf Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 24 Sep 2020 19:23:35 +0300 Subject: [PATCH 369/589] Adding info about the longevity --- _posts/2020-09-24-issue-169.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-09-24-issue-169.md b/_posts/2020-09-24-issue-169.md index 94271c42..0f67132c 100644 --- a/_posts/2020-09-24-issue-169.md +++ b/_posts/2020-09-24-issue-169.md @@ -13,7 +13,7 @@ I took over the newsletter from Jesse as I wanted to keep this valuable research As Jesse said in issue 100, this still stands and I hope this project will continue through contributions from the community: -> Luckily, the project is extremely healthy and could easily be taken over by an eager and motivated member of the community. If you are interested, please get in touch! +> Gladly Kristaps will be taking over and will remain as the main contributor for Swift Weekly Brief. More contributors however are welcome. If you are interested, please get in touch! All the best, Bas From eb175c9d6451045bfe3cc37b09446b9fd4371467 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 24 Sep 2020 19:58:02 +0300 Subject: [PATCH 370/589] Improved readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9b8b67f4..7944d210 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ *A community-driven weekly newsletter about [Swift.org](https://swift.org)* -> Started by [@jesse_squires](https://twitter.com/jesse_squires) and curated by [@BasThomas](https://twitter.com/BasThomas). +> Started by [@jesse_squires](https://twitter.com/jesse_squires) and curated by [@BasThomas](https://twitter.com/BasThomas) and [@fassko](https://twitter.com/fassko). -<img src="https://raw.githubusercontent.com/SwiftWeekly/swiftweekly.github.io/master/img/logo.png" width="250"/> +<img src="https://raw.githubusercontent.com/SwiftWeekly/swiftweekly.github.io/main/img/logo.png" width="250"/> ## About From e78b0d2fc0c465f15e22fa961788b1834330075d Mon Sep 17 00:00:00 2001 From: Federico Zanetello <zntfdr@gmail.com> Date: Fri, 25 Sep 2020 03:23:29 +0700 Subject: [PATCH 371/589] fix url (#549) --- _posts/2020-09-24-issue-169.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-09-24-issue-169.md b/_posts/2020-09-24-issue-169.md index 0f67132c..46593f6a 100644 --- a/_posts/2020-09-24-issue-169.md +++ b/_posts/2020-09-24-issue-169.md @@ -72,7 +72,7 @@ Swift 5.3](https://spec.fm/podcasts/swift-unwrapped/DasaMAiV). > Namely, if a property wrapper has a mutating getter but a non-mutating setter, and the `didSet` body refers to `oldValue`, the synthesized setter has to be mutating as well, since it calls the getter to load `oldValue`. However in the current implementation, if the `didSet` body does not refer to `oldValue`, the setter is made non-mutating. -[Ben Cohen](https://twitter.com/airspeedswift) addressed [an issue](https://forums.swift.org/t/addressing-unimplemented-evolution-proposals/40322] with unimplemented evolution proposals. +[Ben Cohen](https://twitter.com/airspeedswift) addressed [an issue](https://forums.swift.org/t/addressing-unimplemented-evolution-proposals/40322) with unimplemented evolution proposals. > The core team has recently been discussing of a number of proposals that have been accepted but not implemented. You can see a list of these proposals on the [evolution dashboard](https://apple.github.io/swift-evolution/#?search=Accepted). > From 28ad92b1893790589387be8abf71aeb44bdebdf6 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 29 Sep 2020 20:13:43 +0100 Subject: [PATCH 372/589] Bump github-pages from 207 to 208 (#550) Bumps [github-pages](https://github.com/github/pages-gem) from 207 to 208. - [Release notes](https://github.com/github/pages-gem/releases) - [Commits](https://github.com/github/pages-gem/compare/v207...v208) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- Gemfile.lock | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 34557da7..366529ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -59,23 +59,23 @@ GEM gemoji (3.0.1) git (1.7.0) rchardet (~> 1.8) - github-pages (207) + github-pages (208) github-pages-health-check (= 1.16.1) jekyll (= 3.9.0) jekyll-avatar (= 0.7.0) jekyll-coffeescript (= 1.1.1) jekyll-commonmark-ghpages (= 0.1.6) jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.13.0) + jekyll-feed (= 0.15.0) jekyll-gist (= 1.5.0) jekyll-github-metadata (= 2.13.0) - jekyll-mentions (= 1.5.1) + jekyll-mentions (= 1.6.0) jekyll-optional-front-matter (= 0.3.2) jekyll-paginate (= 1.1.0) jekyll-readme-index (= 0.3.0) - jekyll-redirect-from (= 0.15.0) + jekyll-redirect-from (= 0.16.0) jekyll-relative-links (= 0.6.1) - jekyll-remote-theme (= 0.4.1) + jekyll-remote-theme (= 0.4.2) jekyll-sass-converter (= 1.5.2) jekyll-seo-tag (= 2.6.1) jekyll-sitemap (= 1.4.0) @@ -83,7 +83,7 @@ GEM jekyll-theme-architect (= 0.1.1) jekyll-theme-cayman (= 0.1.1) jekyll-theme-dinky (= 0.1.1) - jekyll-theme-hacker (= 0.1.1) + jekyll-theme-hacker (= 0.1.2) jekyll-theme-leap-day (= 0.1.1) jekyll-theme-merlot (= 0.1.1) jekyll-theme-midnight (= 0.1.1) @@ -94,14 +94,14 @@ GEM jekyll-theme-tactile (= 0.1.1) jekyll-theme-time-machine (= 0.1.1) jekyll-titles-from-headings (= 0.5.3) - jemoji (= 0.11.1) + jemoji (= 0.12.0) kramdown (= 2.3.0) kramdown-parser-gfm (= 1.1.0) liquid (= 4.0.3) mercenary (~> 0.3) minima (= 2.5.1) nokogiri (>= 1.10.4, < 2.0) - rouge (= 3.19.0) + rouge (= 3.23.0) terminal-table (~> 1.4) github-pages-health-check (1.16.1) addressable (~> 2.3) @@ -142,14 +142,14 @@ GEM rouge (>= 2.0, < 4.0) jekyll-default-layout (0.1.4) jekyll (~> 3.0) - jekyll-feed (0.13.0) + jekyll-feed (0.15.0) jekyll (>= 3.7, < 5.0) jekyll-gist (1.5.0) octokit (~> 4.2) jekyll-github-metadata (2.13.0) jekyll (>= 3.4, < 5.0) octokit (~> 4.0, != 4.4.0) - jekyll-mentions (1.5.1) + jekyll-mentions (1.6.0) html-pipeline (~> 2.3) jekyll (>= 3.7, < 5.0) jekyll-optional-front-matter (0.3.2) @@ -157,14 +157,15 @@ GEM jekyll-paginate (1.1.0) jekyll-readme-index (0.3.0) jekyll (>= 3.0, < 5.0) - jekyll-redirect-from (0.15.0) + jekyll-redirect-from (0.16.0) jekyll (>= 3.3, < 5.0) jekyll-relative-links (0.6.1) jekyll (>= 3.3, < 5.0) - jekyll-remote-theme (0.4.1) + jekyll-remote-theme (0.4.2) addressable (~> 2.0) jekyll (>= 3.5, < 5.0) - rubyzip (>= 1.3.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) jekyll-sass-converter (1.5.2) sass (~> 3.4) jekyll-seo-tag (2.6.1) @@ -181,8 +182,8 @@ GEM jekyll-theme-dinky (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.1.1) - jekyll (~> 3.5) + jekyll-theme-hacker (0.1.2) + jekyll (> 3.5, < 5.0) jekyll-seo-tag (~> 2.0) jekyll-theme-leap-day (0.1.1) jekyll (~> 3.5) @@ -216,7 +217,7 @@ GEM jekyll (>= 3.3, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - jemoji (0.11.1) + jemoji (0.12.0) gemoji (~> 3.0) html-pipeline (~> 2.2) jekyll (>= 3.0, < 5.0) @@ -252,7 +253,7 @@ GEM ffi (~> 1.0) rchardet (1.8.0) rexml (3.2.4) - rouge (3.19.0) + rouge (3.23.0) ruby-enum (0.8.0) i18n rubyzip (2.3.0) From e0fcc10b641924288d0b78d12dafbe7266e69c19 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Thu, 1 Oct 2020 16:22:26 +0100 Subject: [PATCH 373/589] 170 draft #548 --- _drafts/2020-10-08-issue-170.md | 68 +++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 _drafts/2020-10-08-issue-170.md diff --git a/_drafts/2020-10-08-issue-170.md b/_drafts/2020-10-08-issue-170.md new file mode 100644 index 00000000..c0bc0298 --- /dev/null +++ b/_drafts/2020-10-08-issue-170.md @@ -0,0 +1,68 @@ +--- +layout: post +title: ! 'Issue #170' +author: btb +--- + +[My last issue](https://basthomas.github.io/goodbye-swift-weekly). I have had +such a great time writing this newsletter with the help of some great friends, +and I can't thank all of you enough. + +I'm very excited for the future of the newsletter now that Kristaps is taking +it over, with me watching from the sidelines. + +All the best, +Bas + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +> TODO + +### Podcasts + +> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast + +### News and community + +https://swift.org/blog/swift-system/ +Swift System, providing idiomatic interfaces to system calls and low-level currency types, is now open source! + +### Commits and pull requests + +https://github.com/apple/swift/pull/34097 / https://twitter.com/twostraws/status/1310240629151207426 + +https://github.com/apple/swift/pull/34109 + +### Accepted proposals + +> TODO + +### Returned proposals + +> TODO + +### Rejected proposals + +> TODO + +### Proposals in review + +https://forums.swift.org/t/se-0289-review-2-result-builders/40585 + +### Swift Forums + +https://forums.swift.org/t/proposal-sanity-check-assigning-a-case-statement-to-a-boolean/40584 + +https://forums.swift.org/t/unlock-existential-types-for-all-protocols/40665 + +https://forums.swift.org/t/a-few-take-aways-from-the-rust-ecosystem/40771/2 + +https://forums.swift.org/t/sum-with-block/40785 + +### Finally + +If the emotional support dog is around, you better [not make any typos](https://twitter.com/jckarter/status/1309626612954968065). From 3798e6bdb1f9605ca22b6ca696e54a5ba07b620c Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Tue, 6 Oct 2020 22:59:46 +0100 Subject: [PATCH 374/589] Update Gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 366529ac..02a37b90 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,7 +26,7 @@ GEM concurrent-ruby (1.1.7) cork (0.3.0) colored2 (~> 3.1) - danger (8.0.5) + danger (8.0.6) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) From a7024c9d93990fe202373bd2202e0c6ad93fb0a7 Mon Sep 17 00:00:00 2001 From: Bas Broek <BasThomas@users.noreply.github.com> Date: Wed, 7 Oct 2020 16:33:42 +0100 Subject: [PATCH 375/589] Change owner to Kristaps (#552) * Update sponsorship.md * Update subscribe.html --- sponsorship.md | 11 ++--------- subscribe.html | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 817f52a1..086ddbbd 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship <i>Swift Weekly Brief</i> is distributed <b>every other Thursday</b> to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the <a href="https://swift.org">Swift.org</a> open source projects, as well as what's happening in the Swift community at large. -There are over 4,000 subscribers and over <a href="{{ site.links.twitter }}">9,000 followers</a> on Twitter. +There are over 4,200 subscribers and over <a href="{{ site.links.twitter }}">9,100 followers</a> on Twitter. </p> <h3>Sponsored Links</h3> @@ -52,7 +52,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <b>When contacting us, please provide your sponsorship materials!</b> </p> -<a class="btn btn-warning btn-lg center" href="mailto:bas@basbroek.nl?subject=Swift Weekly Brief Sponsorship">Get in touch</a> +<a class="btn btn-warning btn-lg center" href="mailto:fassko@gmail.com?subject=Swift Weekly Brief Sponsorship">Get in touch</a> <hr/> @@ -60,13 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| July 2 | **Booked** <!-- Line --> | -| July 16 | **Booked** <!-- Line --> | -| July 30 | Open | -| August 13 | Open | -| August 27 | Open | -| September 10 | Open | -| September 24 | Open | | October 8 | Open | | October 22 | Open | | November 5 | Open | diff --git a/subscribe.html b/subscribe.html index d5c00a37..3c6b9e79 100644 --- a/subscribe.html +++ b/subscribe.html @@ -12,7 +12,7 @@ <h2 class="text-center">{{ page.title }}</h2> <!-- Begin MailChimp Signup Form --> <div id="mc_embed_signup"> - <form action="//github.us19.list-manage.com/subscribe/post?u=2951f6b6f2d9b152b48176dab&id=a881f89716" + <form action="https://github.us19.list-manage.com/subscribe/post?u=2951f6b6f2d9b152b48176dab&id=a881f89716" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" From e13b11e81820f0003b3f81f857ae491e3ddf586f Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Thu, 8 Oct 2020 11:19:01 +0100 Subject: [PATCH 376/589] Update Gemfile.lock --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 02a37b90..a41f1b0d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.3.3) + activesupport (6.0.3.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -59,14 +59,14 @@ GEM gemoji (3.0.1) git (1.7.0) rchardet (~> 1.8) - github-pages (208) + github-pages (209) github-pages-health-check (= 1.16.1) jekyll (= 3.9.0) jekyll-avatar (= 0.7.0) jekyll-coffeescript (= 1.1.1) jekyll-commonmark-ghpages (= 0.1.6) jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.15.0) + jekyll-feed (= 0.15.1) jekyll-gist (= 1.5.0) jekyll-github-metadata (= 2.13.0) jekyll-mentions (= 1.6.0) @@ -142,7 +142,7 @@ GEM rouge (>= 2.0, < 4.0) jekyll-default-layout (0.1.4) jekyll (~> 3.0) - jekyll-feed (0.15.0) + jekyll-feed (0.15.1) jekyll (>= 3.7, < 5.0) jekyll-gist (1.5.0) octokit (~> 4.2) From c708816575d9b61b7daeb8ea0b36e67f5b67eabe Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Thu, 8 Oct 2020 13:38:11 +0100 Subject: [PATCH 377/589] Post 170 Closes #548 --- _drafts/2020-10-08-issue-170.md | 68 ------------------ _posts/2020-10-08-issue-170.md | 122 ++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+), 68 deletions(-) delete mode 100644 _drafts/2020-10-08-issue-170.md create mode 100644 _posts/2020-10-08-issue-170.md diff --git a/_drafts/2020-10-08-issue-170.md b/_drafts/2020-10-08-issue-170.md deleted file mode 100644 index c0bc0298..00000000 --- a/_drafts/2020-10-08-issue-170.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -layout: post -title: ! 'Issue #170' -author: btb ---- - -[My last issue](https://basthomas.github.io/goodbye-swift-weekly). I have had -such a great time writing this newsletter with the help of some great friends, -and I can't thank all of you enough. - -I'm very excited for the future of the newsletter now that Kristaps is taking -it over, with me watching from the sidelines. - -All the best, -Bas - -<!--excerpt--> - -{% include sponsor.html %} - -### Starter tasks - -> TODO - -### Podcasts - -> TODO: Latest episode(s) of Swift Unwrapped & the Swift Community Podcast - -### News and community - -https://swift.org/blog/swift-system/ -Swift System, providing idiomatic interfaces to system calls and low-level currency types, is now open source! - -### Commits and pull requests - -https://github.com/apple/swift/pull/34097 / https://twitter.com/twostraws/status/1310240629151207426 - -https://github.com/apple/swift/pull/34109 - -### Accepted proposals - -> TODO - -### Returned proposals - -> TODO - -### Rejected proposals - -> TODO - -### Proposals in review - -https://forums.swift.org/t/se-0289-review-2-result-builders/40585 - -### Swift Forums - -https://forums.swift.org/t/proposal-sanity-check-assigning-a-case-statement-to-a-boolean/40584 - -https://forums.swift.org/t/unlock-existential-types-for-all-protocols/40665 - -https://forums.swift.org/t/a-few-take-aways-from-the-rust-ecosystem/40771/2 - -https://forums.swift.org/t/sum-with-block/40785 - -### Finally - -If the emotional support dog is around, you better [not make any typos](https://twitter.com/jckarter/status/1309626612954968065). diff --git a/_posts/2020-10-08-issue-170.md b/_posts/2020-10-08-issue-170.md new file mode 100644 index 00000000..be1d4dc3 --- /dev/null +++ b/_posts/2020-10-08-issue-170.md @@ -0,0 +1,122 @@ +--- +layout: post +title: ! 'Issue #170' +author: btb +--- + +[My last issue](https://basthomas.github.io/goodbye-swift-weekly). I have had +such a great time writing this newsletter with the help of some great friends, +and I can't thank all of you enough. + +I'm very excited for the future of the newsletter now that Kristaps is taking +it over, with me watching from the sidelines. + +All the best, +Bas + +<!--excerpt--> + +{% include sponsor.html %} + +### News and community + +[Michael Ilseman](https://twitter.com/ilseman/) shared that [Swift System](https://swift.org/blog/swift-system/), which provides idiomatic interfaces to system calls and low-level currency types, is now open source! + +[Karoy Lorentey](https://twitter.com/lorentey/) introduced [Swift Atomics](https://swift.org/blog/swift-atomics/), a new open source package that enables direct use of low-level atomic operations in Swift code. + +[Kishikawa Katsumi](https://twitter.com/k_katsumi/status/1313593242533806081) shared the Swift Abstract Syntax Tree (AST) explorer now [runs on Swift 5.3](https://swift-ast-explorer.com). + +[Nate Cook](https://twitter.com/nnnnnnnn/) announced [Swift Algorithms](https://swift.org/blog/swift-algorithms/), a new open-source package of sequence and collection algorithms, along with their related types. + +### Commits and pull requests + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/34097) adding support for function builders on stored struct properties. + +[Holly Borla](https://twitter.com/hollyborla) merged [a pull request](https://github.com/apple/swift/pull/34109) adding support for local property wrappers. + +[Konrad Malawski](https://twitter.com/ktosopl) merged [a pull request](https://github.com/apple/swift-cluster-membership/pull/70), introducing metrics to the Scalable Weakly-consistent Infection-style Process Group Membership Protocol (SWIM) implementation. + +[Robert Widmann](https://twitter.com/CodaFi_) merged [a pull request](https://github.com/apple/swift/pull/34196) turning on Cross-Module Incremental builds. + +### Proposals in review + +[SE-0289](https://github.com/apple/swift-evolution/blob/main/proposals/0289-result-builders.md): *Result builders* is [under a second review](https://forums.swift.org/t/se-0289-review-2-result-builders/40585). + +> There were a few concerns that were brought up, with one that clearly stood out: naming. Given this feedback, the core team decided to re-run the review to rename the attribute based on the suggestions that garnered traction during the review. Additional concerns that were brought up were around the documentation of the feature as well as concerns around tooling with things such as diagnostics. There has been work to address this feedback as well with improvements to the [documentation](https://github.com/apple/swift-evolution/pull/1182) in the proposal and additional [diagnostics](https://github.com/apple/swift/pull/33972) in the compiler. +> +> There was some feedback over additional features such as enabling stateful builders and handling for the `Never` and `Void` types. These are interesting avenues to explore for future extension; however, the core team believes that they can be reasonably considered by later proposals. +> +> This review is limited to: +> +> - the name of the feature and its attribute and +> - arguments that one or more of the suggested extensions will be problematic to explore in the future + +### Swift Forums + +[Ilias Karim](https://forums.swift.org/u/ilias_karim) pitched [a proposal](https://forums.swift.org/t/proposal-sanity-check-assigning-a-case-statement-to-a-boolean/40584) improving assigning of a `case` statement to a boolean. + +> Given that `case` can appear in an `if` statement without variable assignment, it has me scratch my head a bit why it can't be used to assign a boolean value. +> +> In other words, seeing as this code works, + +```swift +enum Enum { + case aCase + case anotherCase +} + +let value = Enum.aCase + +if case .aCase = value { + print("a case") +} else { + print("another case") +} +``` + +> then it follows that this should as well, + +```swift +let bool = (case .acase = value) +``` + +[Filip Sakel](https://github.com/filip-sakel), [Anthony Latsis](https://twitter.com/AnthonyLatsis) and [Suyash Srijan](https://twitter.com/suyashsrijan) pitched [a proposal](https://forums.swift.org/t/unlock-existential-types-for-all-protocols/40665) to unlock existentials for all protocols. + +> Swift currently offers the ability for protocols that meet certain criteria to be used as types. Trying to use an unsupported protocol as a type yields the error `[the protocol] can only be used as a generic constraint because it has 'Self' or associated type requirements`. This proposal aims to relax this artificial constraint imposed on such protocols. + +[Justin Reusch](https://twitter.com/reuschj) shared [some takeaways](https://forums.swift.org/t/a-few-take-aways-from-the-rust-ecosystem/40771) from the Rust ecosystem. + +> In short, this is a few take-aways from my experience with the Rust ecosystem that we could adopt to make Swift even better: +> +> - A toolchain manager for Swift +> - A package registry +> - More "Swifty" testing +> - Generated documentation +> - An online playground +> - Command-line benchmarking +> - Make Swift more "self-contained" from Xcode +> - Reduce the size of the Swift toolchain (if possible) +> +> Note that this isn't really a single proposal, but a number of discussion staters, each of which could be its own proposal. + +[Soroush Khanlou](https://twitter.com/khanlou) and [Tim Vermeulen](https://twitter.com/tim_vermeulen) pitched [a proposal](https://forums.swift.org/t/sum-with-block/40785) for a `sum` function accepting a closure. + +> While Swift’s Sequence models brings a lot of niceties that we didn’t have access to in Objective-C, like map and filter, there are other useful operations on sequences that the standard library doesn’t support yet. One operation that is currently missing is summing numeric values on elements in a sequence. + +[Holly Borla](https://twitter.com/hollyborla) and [Filip Sakel](https://github.com/filip-sakel) pitched [a proposal](https://forums.swift.org/t/pitch-2-extend-property-wrappers-to-function-and-closure-parameters/40959) extend Property Wrappers to Function and Closure Parameters. + +> Property Wrappers were [introduced in Swift 5.1](https://github.com/apple/swift-evolution/blob/master/proposals/0258-property-wrappers.md), and have since become a popular feature abstracting away common accessor patterns for properties. Currently, applying a property wrapper is solely permitted on properties inside of a type context. However, with increasing adoption demand for extending _where_ property wrappers can be applied has emerged. This proposal aims to extend property wrappers to function and closure parameters. + +[Maxim Ovtsin](https://github.com/maxovtsin) pitched [a proposal](https://forums.swift.org/t/proposal-opt-in-reflection-metadata/40981) allowing to opt-in to reflection metadata. + +> Reflection can be a useful thing to create convenient and concise APIs for libraries. This proposal seeks to improve the safety of such APIs and to tackle the binary size problem by introducing a mechanism to selectively enable reflection metadata only for types that need it and add a way to express a requirement of reflection metadata for APIs developers. + +[Jon Gilbert](https://forums.swift.org/u/vitamin) pitched [a proposal](https://forums.swift.org/t/implement-alvarez-monteiros-typeprivate-possibly-with-one-or-two-extra-restrictions/40994) to revisit and implement `typeprivate`. + +> The idea is to add `typeprivate` so you can put extensions into separate files to improve code readability without having to resort to `internal`. (Currently any extensions that access private stored properties must all be in the file that declares the type, and `fileprivate` must be used. However this can lead to bloated code files.) +> +> If the original `typeprivate` is seen as too "loose," here are two extra restrictions that would make `typeprivate` unable to be stealthily abused. + +### Finally + +If the emotional support dog is around, you better [not make any typos](https://twitter.com/jckarter/status/1309626612954968065). From 200fff7cae4904e0d989ddb9cb98e106e0f4452f Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Mon, 19 Oct 2020 13:54:39 +0100 Subject: [PATCH 378/589] Update Gemfile.lock --- Gemfile.lock | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index a41f1b0d..1832e82d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,7 +26,7 @@ GEM concurrent-ruby (1.1.7) cork (0.3.0) colored2 (~> 3.1) - danger (8.0.6) + danger (8.1.0) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -50,8 +50,9 @@ GEM ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) - faraday (1.0.1) + faraday (1.1.0) multipart-post (>= 1.2, < 3) + ruby2_keywords faraday-http-cache (2.2.0) faraday (>= 0.8) ffi (1.13.1) @@ -256,6 +257,7 @@ GEM rouge (3.23.0) ruby-enum (0.8.0) i18n + ruby2_keywords (0.0.2) rubyzip (2.3.0) safe_yaml (1.0.5) sass (3.7.4) From 735c74b58acc849ca39c295422115d85c93dfa04 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Wed, 21 Oct 2020 22:04:46 +0300 Subject: [PATCH 379/589] Added kristaps to curators --- _includes/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/header.html b/_includes/header.html index 9954d460..88dfad9d 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -5,7 +5,7 @@ <h1 class="text-center"><a href="/">{{ site.title }}</a></h1> <div class="tagline col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> <h2>A <a href="/authors">community-driven</a> weekly newsletter about what's happening in the Swift open source projects at <a href="https://swift.org/" target="_blank">Swift.org</a>. - Curated by <a href="https://twitter.com/BasThomas" target="_blank">Bas Broek</a>. Started by <a href="https://jessesquires.com" target="_blank">Jesse Squires</a>. Published for free every other Thursday.</h2> + Curated by <a href="https://twitter.com/BasThomas" target="_blank">Bas Broek</a> and <a href="https://twitter.com/fassko">Kristaps Grinbergs</a>. Started by <a href="https://jessesquires.com" target="_blank">Jesse Squires</a>. Published for free every other Thursday.</h2> </div> <!-- col --> </div> <!-- col --> </div> <!-- row --> From afaca6270d8a6f38d0bd99019f7686b7deb1c558 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 22 Oct 2020 09:34:50 +0300 Subject: [PATCH 380/589] Updated sponsor table --- sponsorship.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 086ddbbd..64703fcd 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,13 +60,14 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| October 8 | Open | | October 22 | Open | | November 5 | Open | | November 19 | Open | | December 3 | Open | | December 17 | Open | | December 31 | **No issue** | +| January 14 | Open | +| January 28 | Open | {: class="table table-bordered"} </div> From b4a2fbe01552b350111fe565e17632aae143f786 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 22 Oct 2020 18:08:55 +0300 Subject: [PATCH 381/589] 171 first draft (#554) Co-authored-by: Marc Aupont <mewsicmasta@gmail.com> --- _drafts/2020-10-22-issue-171.md | 70 +++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 _drafts/2020-10-22-issue-171.md diff --git a/_drafts/2020-10-22-issue-171.md b/_drafts/2020-10-22-issue-171.md new file mode 100644 index 00000000..5d723d8a --- /dev/null +++ b/_drafts/2020-10-22-issue-171.md @@ -0,0 +1,70 @@ +--- +layout: post +title: ! 'Issue #171' +author: fassko +--- + +The last two weeks were somewhat slow in the Swift open source world but then Apple published yet another open-source library - [Swift Service Discovery](https://github.com/apple/swift-service-discovery). Apart from the announcement of the new iPhones we had some weird times with Xcode 12.1 and 12.2 beta 3 🤔. + +To continue sending out this newsletter to your emails, we are looking for sponsors to cover the cost of the platform we are using. More info about that is here: https://swiftweekly.github.io/sponsorship/ Or you can reach out to me personally on Twitter [@fassko](https://twitter.com/fassko). Thanks! 🙏 + +<!--excerpt--> + +{% include sponsor.html %} + +### Podcasts + +In the latest episode of Swift Unwrapped, [Jesse](https://twitter.com/jesse_squires) +and [JP](https://twitter.com/simjp) talk [about +Implementing the Swift Runtime in Swift](https://spec.fm/podcasts/swift-unwrapped/1DMLbJg5), with [Jordan Rose](https://twitter.com/UINT_MIN). + +### News and community + +[Yim Lee](https://github.com/yim-lee/) wrote [a blog post](https://swift.org/blog/swift-service-discovery/) to announce a new open-source project for the Swift Server ecosystem, [Swift Service Discovery](https://github.com/apple/swift-service-discovery). + +The vapor team announced notable [core team changes](https://github.com/vapor/vapor/issues/2507). + +[David Smith](https://twitter.com/Catfish_Man) tweeted a refresher about [copy-on-write values in Swift](https://twitter.com/Catfish_Man/status/1318448928048623616). + +### Commits and pull requests + +[Slava Pestov](https://github.com/slavapestov) merged [a pull request](https://github.com/apple/swift/pull/34246) that removes 3 of our name lookup implementations in favor of the shiny new `ASTScope`, the 4th implementation to rule them all. Now, 1 is gone entirely and 1 is off by default. Also, this six-year old (!) feature request fell out easily. This fixes [SR-10069](https://bugs.swift.org/browse/SR-10069). + +[Zoe Carver](https://github.com/zoecarver) opened [a pull request](https://github.com/apple/swift/pull/33053) that adds rudimentary support for C++ template functions in Swift. + +[Keith Smiley](https://github.com/keith) created [a pull request](https://github.com/apple/swift/pull/34227) that adds a check validating the current Xcode version is supported for building. It also fixes [SR-13497](https://bugs.swift.org/browse/SR-13497). + +[Luciano Almeida](https://github.com/LucianoPAlmeida) merged [a pull request](https://github.com/apple/swift/pull/34330) fixes the crash on `simplifyFix` constraint for tuple mismatch and fixes [SR-13732](https://bugs.swift.org/browse/SR-13732). + +[tbkka](https://github.com/tbkka) created [a pull request](https://github.com/apple/swift/pull/15474) that replaces the current implementation of `description` and +`debugDescription` for the standard floating-point types with a new +formatting routine that provides both improved performance and +better results. It fixes multiple bugs - [SR-106](https://bugs.swift.org/browse/SR-106), [SR-454](https://bugs.swift.org/browse/SR-454), [SR-491](https://bugs.swift.org/browse/SR-491), [SR-3131](https://bugs.swift.org/browse/SR-3131). + +### Swift Forums + +[ArtemC](https://forums.swift.org/u/artemc) shared [an update] about [swift-driver](https://github.com/apple/swift-driver) project. + +> After its [announcement](https://forums.swift.org/t/new-project-announcement-swift-compiler-driver-reimplementation-in-swift/29696) almost exactly a year ago, the [swift-driver](https://github.com/apple/swift-driver) project is moving full-steam-ahead towards the goal of replacing its C++ predecessor. Recent weeks saw a large amount of activity on the swift-driver repository towards achieving that goal. + +[staticVoidMan](https://forums.swift.org/u/staticvoidman) started [a discussion](https://forums.swift.org/t/padding-arrays/41041) about proposal to pad `Arrays` till a certain minimum length. + +> This will be useful when the array is of an arbitrary length but we need at least some minimum length to work with, so padding the array with default values is a conventional way to handle such a scenario. +> +> ``` +> let arr = [10,20,30] +> let res = arr.padding(repeating: 0, inLength: 7) +> print(res) // -> [10,20,30,0,0,0,0] +> ``` + +[Morten Bek Ditlevsen](https://forums.swift.org/u/morten_bek_ditlevsen) asked [a question](https://forums.swift.org/t/requesting-help-with-stdlib-testing/41198) how to test `stdlib`. [Lot](https://forums.swift.org/t/requesting-help-with-stdlib-testing/41198/2) of [people](https://forums.swift.org/t/requesting-help-with-stdlib-testing/41198/3) [replied](https://forums.swift.org/t/requesting-help-with-stdlib-testing/41198/6) with information that can be helpful in future. + +[Frederick Kellison-Linn](https://forums.swift.org/u/jumhyn) pitched [a proposal](https://forums.swift.org/t/placeholder-types/41329) about placeholder types (formerly "partial type annotations"). + +> When Swift's type inference is unable to work out the type of a particular expression, it requires the programmer to provide the necessary type context explicitly. However, all mechanisms for doing this require the user to write out the entire type signature, even if only one portion of that type is actually needed by the compiler. +> +> Swift-evolution thread: [Partial type annotations](https://forums.swift.org/t/partial-type-annotations/41239) + +### Finally + +[Imagine](https://twitter.com/EmilyKager/status/1313303791186268160) doctors being like "side project checkkkkk 🥼😷👩‍⚕️" From 775cf0b7c3d49d79da6c20bd0d6c01ae2af78059 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 22 Oct 2020 18:09:47 +0300 Subject: [PATCH 382/589] Move to posts --- {_drafts => _posts}/2020-10-22-issue-171.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-10-22-issue-171.md (100%) diff --git a/_drafts/2020-10-22-issue-171.md b/_posts/2020-10-22-issue-171.md similarity index 100% rename from _drafts/2020-10-22-issue-171.md rename to _posts/2020-10-22-issue-171.md From d48e125503ba61127d549e0d6e2afa5ae596a100 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 22 Oct 2020 22:28:59 +0300 Subject: [PATCH 383/589] Correct link --- authors.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authors.html b/authors.html index d16e3203..0b645537 100644 --- a/authors.html +++ b/authors.html @@ -4,7 +4,7 @@ --- <h1 class="text-center">{{ page.title }}</h1> -<p class="lead text-center">Interested in contributing? <a href="https://github.com/SwiftWeekly/swiftweekly.github.io/blob/main/CONTRIBUTING.md">Learn how</a>.</p> +<p class="lead text-center">Interested in contributing? <a href="https://github.com/SwiftWeekly/.github/blob/master/CONTRIBUTING.md">Learn how</a>.</p> <br /> <div class="row"> <div class="col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1"> From e78a209a543c549e9c9eeb6bd9a2765a3aa41001 Mon Sep 17 00:00:00 2001 From: Bas Broek <BasThomas@users.noreply.github.com> Date: Thu, 22 Oct 2020 21:01:13 +0100 Subject: [PATCH 384/589] Update authors.html --- authors.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authors.html b/authors.html index 0b645537..b0511834 100644 --- a/authors.html +++ b/authors.html @@ -4,7 +4,7 @@ --- <h1 class="text-center">{{ page.title }}</h1> -<p class="lead text-center">Interested in contributing? <a href="https://github.com/SwiftWeekly/.github/blob/master/CONTRIBUTING.md">Learn how</a>.</p> +<p class="lead text-center">Interested in contributing? <a href="https://github.com/SwiftWeekly/.github/blob/main/CONTRIBUTING.md">Learn how</a>.</p> <br /> <div class="row"> <div class="col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1"> From 9b8290841c28589fc4036a874ab7e8f01598c02b Mon Sep 17 00:00:00 2001 From: Bas Broek <BasThomas@users.noreply.github.com> Date: Thu, 22 Oct 2020 21:06:10 +0100 Subject: [PATCH 385/589] Improve link to sponsorships in intro (#557) --- _posts/2020-10-22-issue-171.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-10-22-issue-171.md b/_posts/2020-10-22-issue-171.md index 5d723d8a..06b5f57b 100644 --- a/_posts/2020-10-22-issue-171.md +++ b/_posts/2020-10-22-issue-171.md @@ -6,7 +6,7 @@ author: fassko The last two weeks were somewhat slow in the Swift open source world but then Apple published yet another open-source library - [Swift Service Discovery](https://github.com/apple/swift-service-discovery). Apart from the announcement of the new iPhones we had some weird times with Xcode 12.1 and 12.2 beta 3 🤔. -To continue sending out this newsletter to your emails, we are looking for sponsors to cover the cost of the platform we are using. More info about that is here: https://swiftweekly.github.io/sponsorship/ Or you can reach out to me personally on Twitter [@fassko](https://twitter.com/fassko). Thanks! 🙏 +To continue sending out this newsletter to your emails, we are looking for sponsors to cover the cost of the platform we are using. More info about that can be found [here](https://swiftweekly.github.io/sponsorship/). Or you can reach out to me personally on Twitter [@fassko](https://twitter.com/fassko). Thanks! 🙏 <!--excerpt--> From a5323a382446e7cecbf88cc824473c3dc6af59a3 Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Mon, 2 Nov 2020 23:03:33 +0000 Subject: [PATCH 386/589] Update Gemfile.lock --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1832e82d..72ee229b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,7 +26,7 @@ GEM concurrent-ruby (1.1.7) cork (0.3.0) colored2 (~> 3.1) - danger (8.1.0) + danger (8.2.0) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -41,7 +41,7 @@ GEM terminal-table (~> 1) danger-prose (2.0.7) danger - dnsruby (1.61.4) + dnsruby (1.61.5) simpleidn (~> 0.1) em-websocket (0.5.2) eventmachine (>= 0.12.9) @@ -242,7 +242,7 @@ GEM no_proxy_fix (0.1.2) nokogiri (1.10.10) mini_portile2 (~> 2.4.0) - octokit (4.18.0) + octokit (4.19.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) @@ -281,7 +281,7 @@ GEM unf_ext unf_ext (0.0.7.7) unicode-display_width (1.7.0) - zeitwerk (2.4.0) + zeitwerk (2.4.1) PLATFORMS ruby From 07cfa1f609285e39d5993fbce41e0e5a06380843 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Wed, 4 Nov 2020 21:12:55 +0200 Subject: [PATCH 387/589] Fix JSON feed and add author data (#560) --- feed.json | 2 +- feed.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/feed.json b/feed.json index 0ffeca77..a6607121 100644 --- a/feed.json +++ b/feed.json @@ -29,7 +29,7 @@ layout: null {% endif %} "author": { "name": "{{ site.data.authors[post.author].name }}", - "url": "https://twitter.com/{{ site.data.authors[post.author].twitter }}" + "url": "https://twitter.com/{{ site.data.authors[post.author].twitter }}", "avatar": "https://github.com/{{ site.data.authors[post.author].github }}.png?size=100" }, "summary": {{ post.excerpt | jsonify }}, diff --git a/feed.xml b/feed.xml index 91a4f9c9..72808532 100644 --- a/feed.xml +++ b/feed.xml @@ -34,6 +34,8 @@ layout: null <author> <name>{{ site.data.authors[post.author].name }}</name> + <url>https://twitter.com/{{ site.data.authors[post.author].twitter }}</url> + <avatar>https://github.com/{{ site.data.authors[post.author].github }}.png?size=100</avatar> </author> <content type="html">{{ post.content | xml_escape }}</content> From dcfe5b490ce986ac83d60ef8df439f14c6c6b31b Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 5 Nov 2020 18:47:42 +0200 Subject: [PATCH 388/589] New draft for issue 172 (#559) Co-authored-by: Lota Plezere <lota.plezere@gmail.com> --- _drafts/2020-11-05-issue-172.md | 169 ++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 _drafts/2020-11-05-issue-172.md diff --git a/_drafts/2020-11-05-issue-172.md b/_drafts/2020-11-05-issue-172.md new file mode 100644 index 00000000..3e44b617 --- /dev/null +++ b/_drafts/2020-11-05-issue-172.md @@ -0,0 +1,169 @@ +--- +layout: post +title: ! 'Issue #172' +author: fassko +sponsor: + link: https://raycast.com + heading: Goodbye Spotlight. Hello Raycast. + body: Raycast brings the macOS Spotlight experience to your third-party services. Create issues in Jira, merge pull requests in GitHub, or join Zoom calls directly from your desktop. Extendable with scripts and built for macOS with 100% Swift inside. + displaylink: raycast.com +--- + +The last two weeks have been very active. Swift core team shared an article explaining [Swift concurrency roadmap](https://forums.swift.org/t/swift-concurrency-roadmap/41611) and [multiple](https://forums.swift.org/t/concurrency-actors-actor-isolation/41613) [other](https://forums.swift.org/t/concurrency-interoperability-with-objective-c/41616) [great](https://forums.swift.org/t/concurrency-structured-concurrency/41622) [resources](https://forums.swift.org/t/concurrency-asynchronous-functions/41619). I think it will be very exciting to see what is going to happen in near future. + +There are awesome news from Swift on the Windows development side. The initial port of the Swift system has [merged](https://github.com/apple/swift-system/pull/6). It's great to see Swift reaching new horizons and getting one step closer to total [world domination](https://oleb.net/blog/2017/06/chris-lattner-wwdc-swift-panel/). It is a famous quote by [Chris Lattner](https://twitter.com/clattner_llvm). + + +<!--excerpt--> + +{% include sponsor.html %} + +### Podcasts + +[John Sundell](https://twitter.com/johnsundell) and [Vincent Pradeilles](https://twitter.com/v_pradeilles) [talk about](https://www.swiftbysundell.com/podcast/84/) Key paths, functions and closures. + +In the latest episode of Swift Unwrapped, [Jesse](https://twitter.com/jesse_squires) +and [JP](https://twitter.com/simjp) talk [about +Swift Atomics](https://spec.fm/podcasts/swift-unwrapped/EDeUfIq2). + +### News and community + +[Max Desiatov](https://twitter.com/maxdesiatov/) [tweeted](https://twitter.com/maxdesiatov/status/1321103814976524288) that [http://swift.org](swift.org) website is not searchable, contains outdated information, and is not translated to any other language. He purposed that it should be open-source. You can head down to the [issue](https://bugs.swift.org/browse/SR-1317) and vote there. + +### Commits and pull requests + +[Ben Barham](https://github.com/bnbarham) merged [a pull request](https://github.com/apple/swift/pull/34455) that fixes missing declarations in the completions list due to their type being invalid. + +[Josh Learn](https://github.com/guitard0g) created [a pull request](https://github.com/apple/swift/pull/34493) that resolves [SR-13639](https://bugs.swift.org/browse/SR-13639): *Don't diagnose local type declarations as unreachable*. + +[Alejandro Alonso](https://github.com/Azoy) merged [a pull request](https://github.com/apple/swift/pull/28833) that implements `Equatable`, `Comparable`, and `Hashable` conformance for tuples. + +[Michael Ilseman](https://github.com/milseman) merged [a pull request](https://github.com/apple/swift-system/pull/6) that adds enough shims and tweaks the types sufficiently to allow building System on Windows. + +### Accepted proposals + +[SE-0289](https://github.com/apple/swift-evolution/blob/main/proposals/0289-result-builders.md): *Result builders* was [accepted](https://forums.swift.org/t/accepted-se-0289-result-builders/41377). + +> This proposal describes result builders, a new feature which allows certain functions (specially-annotated, often via context) to implicitly build up a result value from a sequence of components. +> +> In effect, this proposal allows the creation of a new class of embedded domain-specific languages in Swift by applying builder transformations to the statements of a function. The power of these builder transformations is intentionally limited so that the result preserves the dynamic semantics of the original code: the original statements of the function are still executed as normal, it's just that values which would be ignored under normal semantics are in fact collected into the result. The use of an ad hoc protocol for the builder transformation leaves room for a wide variety of future extension, whether to support new kinds of statements or to customize the details of the transformation. A similar builder pattern was used successfully for string interpolation in [SE-0228](https://github.com/apple/swift-evolution/blob/master/proposals/0228-fix-expressiblebystringinterpolation.md). +> +> Result builders have been a "hidden" feature since Swift 5.1, under the name "function builder", and the implementation (and its capabilities) have evolved since then. They are used most famously by SwiftUI to declaratively describe user interfaces, but others have also experimented with [building Swift syntax trees](https://swiftpack.co/package/akkyie/SyntaxBuilder), [testing](https://www.dotconferences.com/2020/02/kaya-thomas-swift-techniques-for-testing), [a Shortcuts DSL](https://github.com/a2/swift-shortcuts), [a CSS DSL](https://github.com/carson-katri/swift-css/blob/master/Sources/CSS/CSSBuilder.swift), and [an alternative SwiftPM manifest format](https://forums.swift.org/t/declarative-package-description-for-swiftpm-using-function-builders/28699). There's a GitHub repository dedicated to [awesome function builders](https://github.com/carson-katri/awesome-function-builders) with more applications. + +### Proposals in review + +[SSWG-0016](https://github.com/swift-server/sswg/blob/main/proposals/0016-soto.md): *Soto for AWS* is [under a review](https://forums.swift.org/t/sswg-0016-soto-for-aws/41552). + +> Amazon Web Services (AWS) is the largest provider of cloud services. Many companies rely on the systems and automation they provide. These include storage, security, identity, messaging, databases, compute, machine learning and analytics to mention a few. +> +> AWS provides SDKs to interact with their services using the languages Javascript, Go, Python, C#, PHP, C++, Java, Ruby but don't provide a first-party, fully comprehensive SDK in Swift. +> +> Soto provides a Swift NIO based interface to access all Amazon Web Services. + +### Swift Forums + +#### Swift Concurrency Roadmap + +[Ben Cohen](https://twitter.com/AirspeedSwift) [posted](https://forums.swift.org/t/swift-concurrency-roadmap/41611) the [roadmap](https://github.com/apple/swift/pull/34517) about structured concurrency in Swift. + +> The end state of these changes will: +> +> * make asynchronous programming convenient and clear at the point of use, +> * provide a standard set of language tools and techniques that Swift developers can follow, +> * improve the performance of asynchronous code through better knowledge at compile time, and +> * eliminate data races and deadlocks in the same way Swift eliminates memory unsafety. + +[Doug Gregor](https://twitter.com/dgregor79) and [John McCall](https://twitter.com/pathofshrines) [explained](https://forums.swift.org/t/concurrency-actors-actor-isolation/41613) about [Actors & actor isolation](https://github.com/DougGregor/swift-evolution/blob/actors/proposals/nnnn-actors.md). + +> The [actor model](https://en.wikipedia.org/wiki/Actor_model) involves entities called actors. Each actor can perform local computation based on its own state, send messages to other actors, and act on messages received from other actors. Actors run independently, and cannot access the state of other actors, making it a powerful abstraction for managing concurrency in language applications. The actor model has been implemented in a number of programming languages, such as Erlang and Pony, as well as various libraries like Akka (on the JVM) and Orleans (on the .NET CLR). + +[Doug Gregor](https://twitter.com/dgregor79) [explained](https://forums.swift.org/t/concurrency-interoperability-with-objective-c/41616) how existing APIs from Objective-C would look like. + +> Swift's concurrency feature involves asynchronous functions and actors. While Objective-C does not have corresponding language features, asynchronous APIs are common in Objective-C, expressed manually through the use of completion handlers. This proposal provides bridging between Swift's concurrency features (e.g., `async` functions) and the convention-based expression of asynchronous functions in Objective-C. It is intended to allow the wealth of existing asynchronous Objective-C APIs to be immediately usable with Swift's concurrency model. + +[John McCall](https://twitter.com/pathofshrines) [described](https://forums.swift.org/t/concurrency-asynchronous-functions/41619) how `async` functions which can run on lightweight tasks will look like. + +> Our approach borrows heavily from the well-received `async` / `await` features in many other languages. I've included a portion of the proposal below; the full text can be found [here](https://github.com/DougGregor/swift-evolution/blob/async-await/proposals/nnnn-async-await.md). This feature ties in closely with the proposals for [structured concurrency](https://forums.swift.org/t/concurrency-structured-concurrency/41622) and [actors](https://forums.swift.org/t/concurrency-actors-actor-isolation/41613). + +[John McCall](https://twitter.com/pathofshrines) [skeched out](https://forums.swift.org/t/concurrency-structured-concurrency/41622) how do async tasks interact with each other. It is inspired by Trio and Kotlin. + +> Any concurrency design has to provide some way of actually running code concurrently. We propose embracing the approach of structured concurrency, in which concurrent programs are organized into tasks and child tasks rather than simply a sea of formally-unrelated threads and jobs. Structured concurrency allows us to neatly address a large number of systemic problems with task management that would otherwise need a lot of ad hoc support. + +#### Other topics + +[Chris Lattner](https://twitter.com/clattner_llvm) shared [a document](https://docs.google.com/document/d/1OMHZKWq2dego5mXQtWt1fm-yMca2qeOdCl8YlBG1uwg/edit#heading=h.g6mikums3i2o) about protocol-based actor isolation. + +> I got a chance to [write up some thoughts](https://docs.google.com/document/d/1OMHZKWq2dego5mXQtWt1fm-yMca2qeOdCl8YlBG1uwg/edit#heading=h.g6mikums3i2o) on how to address one of the major challenges with the recent [actor model proposal](https://forums.swift.org/t/concurrency-actors-actor-isolation/41613/): how do we ensure that values transferred between actors do not introduce shared mutable state. + +[Dave Abrahams](https://twitter.com/DaveAbrahams) opened [a thread](https://forums.swift.org/t/valuesemantic-protocol/41686) about `ValueSemantic` protocol. + +[Max Ovtsin](https://forums.swift.org/u/omax) pitched [a proposal](https://forums.swift.org/t/pitch-2-opt-in-reflection-metadata/41696) about opt-in reflection metadata. + +> Reflection can be a useful thing to create convenient and concise APIs for libraries. This proposal seeks to improve the safety of such APIs and to tackle the binary size problem by introducing a mechanism of selectively keeping reflection metadata only for types that need it and dead strip it for all others. Developers will gain an opportunity to express a requirement to have reflection metadata in source-code. + +[Kirill Titov](https://forums.swift.org/u/kirilltitov) started [a thread](https://forums.swift.org/t/future-of-swift-nio-in-light-of-concurrency-roadmap/41633) about the future of Swift-NIO in light of Concurrency Roadmap. + +> So what does it mean for us? Rest in peace `EventLoopFutures`? I realise that it's just a roadmap and a series of pitches, and things might (will) change a lot, but it's certainly the future, and it's unlikely that Swift-NIO would want to ignore it. + +[Max Desiatov](https://twitter.com/maxdesiatov/) pitched [a proposal](https://forums.swift.org/t/pitch-support-specifying-wasm-features-in-package-manifests/41532) that would support specifying Wasm features in package manifests. + +> As a quick introduction, I need to mention that WebAssembly is a collection of multiple proposals that are at different implementation stages in WebAssembly hosts. The bare minimum is called WebAssembly MVP and is available in all major browsers. Other features such as atomics, SIMD, reference types and many more [are not as widely available](https://webassembly.org/roadmap/) (with Safari lagging behind in most of these). +> +> The SwiftWasm team would be happy to start experimenting with atomics, SIMD, and reference types when that is possible. Atomics is a big one, as it unblocks multi-threading support with big parts of core libraries that are currently unavailable in SwiftWasm. We could then make Dispatch and major parts of Foundation available in browsers. + +[tomerd](https://forums.swift.org/u/tomerd) pitched [a proposal](https://forums.swift.org/t/package-feeds/41522) that adds support for Package Feeds to SwiftPM. + +> A package feed is a curated list of packages and associated metadata which makes it easier to discover an existing package for a particular use case. SwiftPM will allow users to subscribe to these feeds, search them via the swift package command-line interface, and will make their contents accessible to any clients of libSwiftPM. This proposal is focused on the shape of the command-line interface and the format of configuration data related to package feeds. + +[Samuel Roth](https://forums.swift.org/u/roth) proposed [a pitch](https://forums.swift.org/t/swift-authentication/41489) that introduces an Authentication package, which will provide lightweight yet opinionated abstractions enabling developers to build secure authentication systems in Swift. + +> As adoption of Swift on the server continues to increase, and the server-side Swift ecosystem grows (e.g. with introduction of [Swift Service Discovery](https://swift.org/blog/swift-service-discovery/)), various approaches to building authentication and authorization mechanisms are likely to pop up. Swift Authentication seeks to address the former challenge. +> +> Swift Authentication aims to address sensitive use cases that could have profound security implications. An openly-available package with good documentation (and perhaps more importantly, recommendations) made available in the IDE (Xcode or otherwise) could make Swift an even more attractive solution for building services with authentication requirements. + +[Dario Rexin](https://forums.swift.org/u/drexin) pitched [an idea] for codable synthesis for enums with associated values. + +> Codable was introduced in [SE-0166](https://github.com/apple/swift-evolution/blob/master/proposals/0166-swift-archival-serialization.md). +with support for synthesizing Encodable and Decodable conformance for +class and struct types, that only contain values that also conform +to the respective protocols. +> +> Currently auto-synthesis does not work for enums with associated values. +There have been discussions about it in the past, but the concrete structure +of the encoded values was never agreed upon. We believe that having a solution +for this is an important quality of life improvement. + +[John Burkey](https://forums.swift.org/u/johnburkey) [proposed](https://forums.swift.org/t/proposal-for-swift-actors-and-performance-concurrency-futures/41434) Swift Actors and performance concurrency futures. + +> 1. Provide a course grained actor model first, which includes separate of concerns of actor functions, whose definitions live separately from Actors that register to receive those function calls async. +> +> 2. Provide a fine grained concurrency model allowing queue safe very high frequency lock free allocations, similar to a generational GC. +> +> 3. Provide a concurrency safe logging model. Concurrency safe logging isn't just not crashing- its safe and performantly managing high frequency logging on n concurrent threads. + +[Robert MacEachern](https://forums.swift.org/u/rob) started [a conversation](https://forums.swift.org/t/understanding-swifts-value-type-thread-safety/41406) about Swift’s value type thread safety and [John McCall](https://forums.swift.org/u/John_McCall) [told](https://forums.swift.org/t/understanding-swifts-value-type-thread-safety/41406/10) that Swift team is making data races statically impossible as much as possible. + +[Steven Van Impe](https://forums.swift.org/u/svanimpe) [shared](https://forums.swift.org/t/swift-setup-student-friendly-setup-instructions-for-platforms-editors-and-ides-that-support-swift/41381) a Swift Setup - student-friendly setup instructions for platforms, editors, and IDEs that support Swift. + +>This repository gathers student-friendly setup instructions for platforms, editors, and IDEs that support Swift. The goal of this repository is to support the adoption of Swift as a general purpose cross-platform programming language in (higher) education. +> +> To kickstart the repository, I’ve written instructions for the platforms and editors I’m using in an upcoming programming course, notably [Visual Studio Code](https://github.com/pwsacademy/swift-setup/blob/main/editors/vscode-linux/README.md) (with SourceKit-LSP and CodeLLDB) on Ubuntu. + +[Bradley Mackey](https://twitter.com/bradleymackey) pitched [a proposal](https://forums.swift.org/t/platform-aliases/41768) to add platform aliases. + +> The least disruptive and backwards compatible solution appears to be Platform Aliasing, which can reduce an annotation like this... +> +> ``` +> @available(macOS 10.16, iOS 14.0, watchOS 7.0, tvOS 14.0, *) +> ``` +> ...to something as simple as this... +> +> ``` +> @available(apple 2020, *) +> ``` + +### Finally + +[These Great British Bake Off challenges are getting tough.](https://twitter.com/AirspeedSwift/status/1319496328079044608) + +[RC or GM?](https://twitter.com/jckarter/status/1322339838691930112) From 28a5b5217e324af2827f6eef3047d47a3dd1fa41 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 5 Nov 2020 18:49:11 +0200 Subject: [PATCH 389/589] Release new issue 172 --- {_drafts => _posts}/2020-11-05-issue-172.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-11-05-issue-172.md (100%) diff --git a/_drafts/2020-11-05-issue-172.md b/_posts/2020-11-05-issue-172.md similarity index 100% rename from _drafts/2020-11-05-issue-172.md rename to _posts/2020-11-05-issue-172.md From 73a21caad985ce1c40a7cb53640f382562f944ad Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 5 Nov 2020 18:50:27 +0200 Subject: [PATCH 390/589] Update sponsorship.md --- sponsorship.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 64703fcd..a50c1223 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,9 +60,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| October 22 | Open | -| November 5 | Open | -| November 19 | Open | +| November 19 | Taken | | December 3 | Open | | December 17 | Open | | December 31 | **No issue** | From 9c812825eee34eaa379cc49c0ffecdae79181c9b Mon Sep 17 00:00:00 2001 From: Zev Eisenberg <zev@zeveisenberg.com> Date: Mon, 9 Nov 2020 15:26:25 -0500 Subject: [PATCH 391/589] Add missing URL to link (#562) --- _posts/2020-11-05-issue-172.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-11-05-issue-172.md b/_posts/2020-11-05-issue-172.md index 3e44b617..d8e5f8ac 100644 --- a/_posts/2020-11-05-issue-172.md +++ b/_posts/2020-11-05-issue-172.md @@ -121,7 +121,7 @@ Swift Atomics](https://spec.fm/podcasts/swift-unwrapped/EDeUfIq2). > > Swift Authentication aims to address sensitive use cases that could have profound security implications. An openly-available package with good documentation (and perhaps more importantly, recommendations) made available in the IDE (Xcode or otherwise) could make Swift an even more attractive solution for building services with authentication requirements. -[Dario Rexin](https://forums.swift.org/u/drexin) pitched [an idea] for codable synthesis for enums with associated values. +[Dario Rexin](https://forums.swift.org/u/drexin) pitched [an idea](https://forums.swift.org/t/codable-synthesis-for-enums-with-associated-values/41493) for codable synthesis for enums with associated values. > Codable was introduced in [SE-0166](https://github.com/apple/swift-evolution/blob/master/proposals/0166-swift-archival-serialization.md). with support for synthesizing Encodable and Decodable conformance for From b9b1bafc6e15c075c268fefcbf7cf85b41669956 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 19 Nov 2020 19:59:15 +0200 Subject: [PATCH 392/589] Issue 173 (#564) --- .github/workflows/ci.yml | 2 + Gemfile.lock | 6 +- _drafts/2020-11-19-issue-173.md | 119 ++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 _drafts/2020-11-19-issue-173.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9743325e..6a86098b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,6 @@ name: CI +env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true on: push: diff --git a/Gemfile.lock b/Gemfile.lock index 72ee229b..1fbba0e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,7 +26,7 @@ GEM concurrent-ruby (1.1.7) cork (0.3.0) colored2 (~> 3.1) - danger (8.2.0) + danger (8.2.1) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -227,7 +227,7 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.3) - listen (3.2.1) + listen (3.3.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) @@ -275,7 +275,7 @@ GEM thread_safe (0.3.6) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.7) + tzinfo (1.2.8) thread_safe (~> 0.1) unf (0.1.4) unf_ext diff --git a/_drafts/2020-11-19-issue-173.md b/_drafts/2020-11-19-issue-173.md new file mode 100644 index 00000000..786de178 --- /dev/null +++ b/_drafts/2020-11-19-issue-173.md @@ -0,0 +1,119 @@ +--- +layout: post +title: ! 'Issue #173' +author: fassko +sponsor: + link: https://raycast.com + heading: Goodbye Spotlight. Hello Raycast. + body: Raycast pairs macOS Spotlight with deep integrations to your web apps. Create issues in Jira, merge pull requests in GitHub, or join Zoom calls with a few keyboard shortcuts. Extend the app with scripts to automate every-day tasks. Built for macOS with 100% Swift inside. + displaylink: raycast.com +--- + +The last two weeks passed quickly. We now have [Swift Evolution dashboard](https://t.co/1dmN0Ppvf2?amp=1) [working](https://github.com/apple/swift-evolution/pull/1177) in dark mode. How cool is that? + +Great news for server-side folks. We have now [Swift tooling for Kubernetes](https://github.com/swiftkube). Now you can orchestrate your server containers using language you know and love. + +We're close again to the Holiday season and there is a special schedule when [merge access is locked](https://forums.swift.org/t/holiday-schedule/41945). I think it's great to take some time and unplug. I know from myself, it is hard to do it, especially if you’re passionate about a project you’re working on. + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-13848](https://bugs.swift.org/browse/SR-13848) [Compiler] Restore Note About Optionality Mismatch in Redeclared Functions Involving IUOs and Optionals. + +### Commits and pull requests + +[Holly Borla](https://github.com/hborla) merged [a pull request](https://github.com/apple/swift/pull/34399) that implements heuristics for linked operator expressions in the solver proper. + +[buttaface](https://github.com/buttaface) created [a pull request](https://github.com/apple/swift/pull/34491) improving Android support - moving to the NDK's unified sysroot. As well he merged [a pull request](https://github.com/apple/swift/pull/34661) that adds support for `x86_64` arch for Android. + +[Ben Barham](https://github.com/bnbarham) merged [a pull reques](https://github.com/apple/swift/pull/34697) that adds features file describing new available flags. + +### Returned proposals + +[SE-0291](https://github.com/apple/swift-evolution/blob/main/proposals/0291-package-collections.md) has been [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0291-package-collections/42109). + +> During the review, several community members requested to learn more about the Package Collection data format. The core team felt the proposal should be amended to explicitly call out if the data format is part of the feature specification or not, and provide reasoning for its inclusion or exclusion. +> +> For example, it makes sense for the data format to be included if it is considered a stable API that users may build tools around, and conversely it makes sense to exclude if it is considered a non-stable API that users should not be generated directly. + +### Proposals in review + +[SE-0290](https://github.com/apple/swift-evolution/blob/main/proposals/0290-negative-availability.md): *Unavailability Condition* is [under a review](https://forums.swift.org/t/se-0290-unavailability-condition/41873). + +> Swift historically supported the `#available` condition to check if a specific symbol **is** available for usage, but not the opposite. In this proposal, we'll present cases where checking for the **unavailability** of something is necessary, the ugly workaround needed to achieve it today and how a new `#unavailable` condition can fix it. +> +> Swift-evolution thread: [Discussion thread topic for that proposal](https://forums.swift.org/t/support-negative-availability-literals/39946) + +[SE-0291](https://github.com/apple/swift-evolution/blob/main/proposals/0291-package-collections.md): *Package Collections* is [under a review](https://forums.swift.org/t/se-0291-package-collections/41905). + +> This is a proposal for adding support for Package Collections to SwiftPM. A package feed is a curated list of packages and associated metadata which makes it easier to discover an existing package for a particular use case. SwiftPM will allow users to subscribe to these collections, search them via the swift package-collections command-line interface, and will make their contents accessible to any clients of libSwiftPM. This proposal is focused on the shape of the command-line interface and the format of configuration data related to package collections. + +### Swift Forums + +[Nicole Jacque](https://twitter.com/racer_girl27) described [Swift 5.4 release process](https://forums.swift.org/t/swift-5-4-release-process/41936). + +> Downloadable snapshots of the Swift 5.4 release branch will be posted regularly as part of [continuous integration](https://ci.swift.org/) testing. As support is available, snapshot downloads will be added for newly supported platforms. +> +> Once Swift 5.4 is released, the official final builds will also be posted in addition to the snapshots. +> +> On **Dec 14, 2020** the `release/5.4` branch will be cut in the swift repository and most related project repositories. This will contain the changes that will be released in Swift 5.4. After the branch is cut, changes can be landed on the branch via pull request if they meet the criteria for the release. + +[Sam Lazarus](https://forums.swift.org/u/slazarus) pitched [a proposal](https://forums.swift.org/t/proposal-static-member-lookup-on-protocol-metatypes/41946) that implements static member lookup on protocol metatypes. + +> Using static member declarations to provide semantic names for commonly used values is an important tool in API design, reducing type repetition and improving call-site legibility. Currently, when a parameter is generic, there is no effective way to take advantage of these facilities. This proposal aims to relax restrictions on accessing static members via protocol metatypes to afford the same call-site legibility to generic APIs. + +[Max Desiatov](https://twitter.com/MaxDesiatov) [informed](https://forums.swift.org/t/first-stable-release-of-swiftwasm-5-3-is-now-available/41868) that first stable release of [SwiftWasm 5.3](https://github.com/swiftwasm/swift/releases/tag/swift-wasm-5.3.0-RELEASE) is now available. + +> You may have seen some posts about WebAssembly support in Swift on these forums previously. These were mostly questions and discussions about the toolchain development. Today I'm excited to make an announcement first and foremost for end users of Swift interested in applying it on more platforms. +> +> As a culmination of hard work from many people, the first stable release of SwiftWasm 5.3 is available. It allows you to compile your Swift code to [WebAssembly 28](https://webassembly.org/), and to interact with the host WebAssembly environment through [libraries that the SwiftWasm team maintains](https://github.com/swiftwasm/JavaScriptKit). WebAssembly is supported in all recently released major browsers, which means you can build browser apps written purely in Swift (although some JavaScript glue code invisible to users is required under the hood). Non-browser Wasm hosts are also supported, such as Node.js, [Wasmer](https://wasmer.io/), or any other [WASI](https://wasi.dev/)-compatible hosts. + +Swift on the Server meeting notes: +* [Sept 16th, 2020](https://forums.swift.org/t/sept-16th-2020/41928) by [Todd Varland](https://forums.swift.org/u/varland) +* [October 14th, 2020](https://forums.swift.org/t/october-14th-2020/42079) by [Johannes Weiss](https://twitter.com/johannesweiss) +* [September 30th, 2020](https://forums.swift.org/t/september-30th-2020/42072) by [Tanner Nelson](https://twitter.com/tanner0101) + +[David Ask](https://forums.swift.org/u/David_Ask) [shared](https://forums.swift.org/t/custom-aws-cloudformation-resources-and-macros-using-swift-aws-lambda-runtime/41935) custom AWS CloudFormation resources and macros using Swift AWS Lambda Runtime. + +[Anders Bertelrud](https://forums.swift.org/u/abertelrud) pitched [an idea](https://forums.swift.org/t/pitch-ability-to-declare-executable-targets-in-swiftpm-manifests-to-support-main/41968) to add ability to declare executable targets in SwiftPM manifests. + +> The Swift Package Manager doesn’t currently provide a way for a package manifest to declare that a target is the main module of an executable. Instead, SwiftPM infers this by looking for a source file named `main.swift` (or `main.c` , `main.cpp` , etc) in the source directory of the target. +> ... +> The most straightforward approach would be allow a target to be marked as executable in the manifest. This could take the form of either a parameter to the `target` type or a new target type. There is already an established pattern of using the type itself to denote the kind of target being declared (e.g. `testTarget` as a specialization of `target` ), so the most natural approach seems to be to add a new `executableTarget` type for this purpose. +> +> Using a separate target type in the manifest would also support any future differences between the parameters for an executable target and a library target. + +[Dario Rexin](https://forums.swift.org/u/drexin) informed about static linking on Linux in Swift 5.3.1. + +> I am happy to announce that with the release of Swift 5.3.1 statically linking the Swift `stdlib` components is now fully supported on Linux. This includes linking against Dispatch and the different Foundation components. Additionally building self-contained binaries is now possible by manually adding a few linker flags. + +[Iskandar Abudiab](https://forums.swift.org/u/iabudiab) announced [Swiftkube](https://github.com/swiftkube) - Swift tooling for Kubernetes. + +> Swift as a language is among the most pleasant to use and it's seen many advancements in many areas, including the server-side. What's been lacking, IMHO, is more work put into the whole cloud native landscape, especially Kubernetes. +> +> I hope Swiftkube will contribute towards gapping this bridge. + +[Slava Pestov](https://twitter.com/slava_pestov) updated us about [availability checking for protocol conformances](https://forums.swift.org/t/availability-checking-for-protocol-conformances/42066). + +> I just finished landing a set of changes which fix a hole in Swift's availability checking model. While this was mostly intended for use by Apple, I feel that it is also worth documenting and communicating to the community since people do ship third-party frameworks that make use of OS availability. +> +> As most of you are aware, Swift's "availability" feature checks if referenced declarations are going to be available at runtime by comparing the OS version in an @available annotation with the "availability context" of the usage location, which is either the deployment target, an @available annotation on an outer declaration, or an if #available block + +[Yim Lee](https://github.com/yim-lee/) informed about [SE-0291](https://github.com/apple/swift-evolution/blob/main/proposals/0291-package-collections.md): *Package Collections* development. + +[Chris Lattner](https://twitter.com/clattner_llvm) updated about [protocol-based actor isolation pitch](https://forums.swift.org/t/pitch-2-protocol-based-actor-isolation/42123). + +> Thank you for the discussion in the [previous pitch thread](https://forums.swift.org/t/pitch-protocol-based-actor-isolation/41677/1). I've learned a lot from your feedback and made several major revisions to the proposal, notably: +> +> * Simplifying the `ActorSendable` requirement to being a marker protocol, eliminating the possibility of implicit deep copies. +> * Including a `ValueSemantic` marker protocol as part of the proposal (but I leave it to Dave and other experts to define exactly what that means). +> * Defining away the possibility of "expensive" synthesized cross-actor copies in the face of resilience boundaries and other advanced cases. + +### Finally + +Maybe it's time for a road trip to visit [Swift compilers](https://twitter.com/jckarter/status/1324453480317087744)? + +[Pop Quiz](https://twitter.com/simjp/status/1328729653440360450) by [JP](https://twitter.com/simjp). \ No newline at end of file From aabf38b601c26480727912ddbabf7953565e0fa5 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 19 Nov 2020 19:59:55 +0200 Subject: [PATCH 393/589] Move draft to posts --- {_drafts => _posts}/2020-11-19-issue-173.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-11-19-issue-173.md (100%) diff --git a/_drafts/2020-11-19-issue-173.md b/_posts/2020-11-19-issue-173.md similarity index 100% rename from _drafts/2020-11-19-issue-173.md rename to _posts/2020-11-19-issue-173.md From b2d32ebe2d58a1937f4aea3fee295a042b4c9b5b Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 19 Nov 2020 20:02:39 +0200 Subject: [PATCH 394/589] Update sponsorship.md --- sponsorship.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index a50c1223..3a19cae4 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,7 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| November 19 | Taken | | December 3 | Open | | December 17 | Open | | December 31 | **No issue** | From 2e17c083f3b082ebe20d0d710b912c16c638bed9 Mon Sep 17 00:00:00 2001 From: Max Desiatov <max@desiatov.com> Date: Thu, 19 Nov 2020 18:56:46 +0000 Subject: [PATCH 395/589] Fix WebAssembly link in issue 173 (#566) --- _posts/2020-11-19-issue-173.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2020-11-19-issue-173.md b/_posts/2020-11-19-issue-173.md index 786de178..f0f8b76e 100644 --- a/_posts/2020-11-19-issue-173.md +++ b/_posts/2020-11-19-issue-173.md @@ -69,7 +69,7 @@ We're close again to the Holiday season and there is a special schedule when [me > You may have seen some posts about WebAssembly support in Swift on these forums previously. These were mostly questions and discussions about the toolchain development. Today I'm excited to make an announcement first and foremost for end users of Swift interested in applying it on more platforms. > -> As a culmination of hard work from many people, the first stable release of SwiftWasm 5.3 is available. It allows you to compile your Swift code to [WebAssembly 28](https://webassembly.org/), and to interact with the host WebAssembly environment through [libraries that the SwiftWasm team maintains](https://github.com/swiftwasm/JavaScriptKit). WebAssembly is supported in all recently released major browsers, which means you can build browser apps written purely in Swift (although some JavaScript glue code invisible to users is required under the hood). Non-browser Wasm hosts are also supported, such as Node.js, [Wasmer](https://wasmer.io/), or any other [WASI](https://wasi.dev/)-compatible hosts. +> As a culmination of hard work from many people, the first stable release of SwiftWasm 5.3 is available. It allows you to compile your Swift code to [WebAssembly](https://webassembly.org/), and to interact with the host WebAssembly environment through [libraries that the SwiftWasm team maintains](https://github.com/swiftwasm/JavaScriptKit). WebAssembly is supported in all recently released major browsers, which means you can build browser apps written purely in Swift (although some JavaScript glue code invisible to users is required under the hood). Non-browser Wasm hosts are also supported, such as Node.js, [Wasmer](https://wasmer.io/), or any other [WASI](https://wasi.dev/)-compatible hosts. Swift on the Server meeting notes: * [Sept 16th, 2020](https://forums.swift.org/t/sept-16th-2020/41928) by [Todd Varland](https://forums.swift.org/u/varland) @@ -116,4 +116,4 @@ Swift on the Server meeting notes: Maybe it's time for a road trip to visit [Swift compilers](https://twitter.com/jckarter/status/1324453480317087744)? -[Pop Quiz](https://twitter.com/simjp/status/1328729653440360450) by [JP](https://twitter.com/simjp). \ No newline at end of file +[Pop Quiz](https://twitter.com/simjp/status/1328729653440360450) by [JP](https://twitter.com/simjp). From ad90154b5b91cddd4e22ff598c9c40bccc1f3124 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Sun, 22 Nov 2020 17:59:51 +0200 Subject: [PATCH 396/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 3a19cae4..5272cc44 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -13,7 +13,7 @@ title: Sponsorship <i>Swift Weekly Brief</i> is distributed <b>every other Thursday</b> to thousands of savvy Swift developers and enthusiasts. Each issue contains quality links and commentary on what's happening in the <a href="https://swift.org">Swift.org</a> open source projects, as well as what's happening in the Swift community at large. -There are over 4,200 subscribers and over <a href="{{ site.links.twitter }}">9,100 followers</a> on Twitter. +There are over 4,250 subscribers and over <a href="{{ site.links.twitter }}">9,200 followers</a> on Twitter. </p> <h3>Sponsored Links</h3> From 2665ad0e87b08ca79fabab05d3efc6ca23bdf97f Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Sun, 22 Nov 2020 21:53:09 +0200 Subject: [PATCH 397/589] Added paging to main list (#567) --- _config.yml | 4 ++++ css/style.css | 31 +++++++++++++++++++++++++++++++ index.html | 46 ++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 73 insertions(+), 8 deletions(-) diff --git a/_config.yml b/_config.yml index d2793e08..b1fdb3c9 100644 --- a/_config.yml +++ b/_config.yml @@ -34,3 +34,7 @@ links: issue: 'https://github.com/SwiftWeekly/swiftweekly.github.io/issues/new' pull: 'https://github.com/SwiftWeekly/swiftweekly.github.io/compare' applenews: 'https://apple.news/TIlGIYluMTGWA-CIToVtF4Q' + + +paginate: 25 +paginate_path: "/page:num/" \ No newline at end of file diff --git a/css/style.css b/css/style.css index 37724d75..b735bf4f 100644 --- a/css/style.css +++ b/css/style.css @@ -24,6 +24,8 @@ --hr-border: #666; --post-title-font-weight: lighter; + + --list-background-color: #f3f3f3; } /* DARK MODE */ @@ -51,6 +53,7 @@ --hr-border: #999; --post-title-font-weight: 300; /* 400 is normal */ + --list-background-color: #111111; } } @@ -159,6 +162,14 @@ header h2 { /* POST LIST */ +.post-list-item { + margin-top: 20px; + background-color: var(--list-background-color); + padding: 12px 30px; + border-radius: 15px; + overflow: hidden; +} + .post { padding-top: 2rem; padding-bottom: 2rem; @@ -186,6 +197,26 @@ header h2 { margin-bottom: 2rem; } +.post-readmore { + font-size: 25px; + font-weight: var(--post-title-font-weight); +} + +/* PAGINATOR */ + +.pagination { + text-align: center; + margin: auto; + width: 100%; + padding: 20px; + font-weight: normal; + font-size: 150%; +} + +.pagination a, .pagination em { + padding: 4px 6px; +} + /* PAGES */ .sharing a, diff --git a/index.html b/index.html index 31c0d590..9a6474c2 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,7 @@ title: Home --- +<!-- post-list --> <div> <div class="row"> <div class="col-xs-10 col-xs-offset-1 col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> @@ -10,12 +11,41 @@ </div> </div> - {% for post in site.posts %} - <article class="post"> - <h1 class="post-title text-center"> - <a href="{{ post.url }}">{{ post.title }}</a> - <small class="post-date">{{ post.date | date_to_string }}</small> - </h1> - </article> + {% for post in paginator.posts %} + {% assign author = site.data.authors[post.author] %} + <div class="post-list-item"> + <article class="post"> + <h1 class="post-title"> + <a href="{{ post.url }}">{{ post.title }}</a> + <small class="post-date">{{ post.date | date_to_string }}</small> + </h1> + <p class="lead"><em>Written by: <a href="https://twitter.com/{{ author.twitter }}" target="_blank">{{ author.name }}</a></em></p> + <div class="post-content"> + {{ post.excerpt }} + </div> + <p class="post-readmore"> + <a href="{{ post.url }}">Read more »</a> + </p> + </article> + </div> {% endfor %} -</div> <!-- post-list --> +</div> + +<!-- Pagination links --> +{% if paginator.total_pages > 1 %} + <div class="pagination"> + {% if paginator.previous_page %} + <a href="{{ paginator.previous_page_path }}" class="previous"> + « Previous + </a> + {% endif %} + + <span class="page_number "> + Page: {{ paginator.page }} of {{ paginator.total_pages }} + </span> + + {% if paginator.next_page %} + <a href="{{ paginator.next_page_path }}" class="next">Next »</a> + {% endif %} + </div> +{% endif %} \ No newline at end of file From a227b36c02b84b36e01857805186645908b7733f Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Sun, 22 Nov 2020 22:00:26 +0200 Subject: [PATCH 398/589] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7944d210..3fda4094 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ *A community-driven weekly newsletter about [Swift.org](https://swift.org)* -> Started by [@jesse_squires](https://twitter.com/jesse_squires) and curated by [@BasThomas](https://twitter.com/BasThomas) and [@fassko](https://twitter.com/fassko). +> Started by [@jesse_squires](https://twitter.com/jesse_squires), continued by [@BasThomas](https://twitter.com/BasThomas) and now curated by [@fassko](https://twitter.com/fassko). <img src="https://raw.githubusercontent.com/SwiftWeekly/swiftweekly.github.io/main/img/logo.png" width="250"/> ## About -This newsletter was originally started by [Jesse Squires](https://github.com/jessesquires), and hosted on his blog at [jessesquires.com](http://www.jessesquires.com). After issue #4, this site was created to provide the newsletter with a proper, dedicated home. All previous issues were [migrated](http://www.jessesquires.com/new-weekly-brief/), and it is now completely open for the community. Currently, [Bas Broek](https://github.com/BasThomas) is leading the project. Contributions are welcomed and encouraged! +This newsletter was originally started by [Jesse Squires](https://github.com/jessesquires), and hosted on his blog at [jessesquires.com](http://www.jessesquires.com). After issue #4, this site was created to provide the newsletter with a proper, dedicated home. All previous issues were [migrated](http://www.jessesquires.com/new-weekly-brief/), and it is now completely open for the community. At some point, [Bas Broek](https://twitter.com/BasThomas) took it over as the main contributor. Currently, [Kristaps Grinbergs](https://github.com/fassko) is leading the project. Contributions are welcomed and encouraged! Lovingly built with [Jekyll](https://jekyllrb.com), [Bootstrap](https://getbootstrap.com), [jQuery](https://jquery.com), and [Font Awesome](https://fortawesome.github.io/Font-Awesome/). Generously hosted by [GitHub](https://pages.github.com). From 763097adf3ab21a2a93de057047436401872ca67 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Sun, 22 Nov 2020 22:02:12 +0200 Subject: [PATCH 399/589] Update header.html --- _includes/header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/header.html b/_includes/header.html index 88dfad9d..0d651f7c 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -5,7 +5,7 @@ <h1 class="text-center"><a href="/">{{ site.title }}</a></h1> <div class="tagline col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> <h2>A <a href="/authors">community-driven</a> weekly newsletter about what's happening in the Swift open source projects at <a href="https://swift.org/" target="_blank">Swift.org</a>. - Curated by <a href="https://twitter.com/BasThomas" target="_blank">Bas Broek</a> and <a href="https://twitter.com/fassko">Kristaps Grinbergs</a>. Started by <a href="https://jessesquires.com" target="_blank">Jesse Squires</a>. Published for free every other Thursday.</h2> + Curated by <a href="https://twitter.com/fassko">Kristaps Grinbergs</a>. Started by <a href="https://jessesquires.com" target="_blank">Jesse Squires</a>, continued by <a href="https://twitter.com/BasThomas" target="_blank">Bas Broek</a>. Published for free every other Thursday.</h2> </div> <!-- col --> </div> <!-- col --> </div> <!-- row --> From e004a967f58e7c5e9883d90329bf82bcb57979d3 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Mon, 23 Nov 2020 21:56:33 +0200 Subject: [PATCH 400/589] Detach main list pagination --- css/style.css | 4 ++-- index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/css/style.css b/css/style.css index b735bf4f..6bbfa035 100644 --- a/css/style.css +++ b/css/style.css @@ -204,7 +204,7 @@ header h2 { /* PAGINATOR */ -.pagination { +.post-list-pagination { text-align: center; margin: auto; width: 100%; @@ -213,7 +213,7 @@ header h2 { font-size: 150%; } -.pagination a, .pagination em { +.post-list-pagination a, .pagination em { padding: 4px 6px; } diff --git a/index.html b/index.html index 9a6474c2..3b5a1ba0 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,7 @@ <h1 class="post-title"> <!-- Pagination links --> {% if paginator.total_pages > 1 %} - <div class="pagination"> + <div class="post-list-pagination"> {% if paginator.previous_page %} <a href="{{ paginator.previous_page_path }}" class="previous"> « Previous From f497b346a9a65aee2d369cd19e2e83bea3fe1b4a Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Tue, 24 Nov 2020 22:35:11 +0200 Subject: [PATCH 401/589] Add twitter to feed --- feed.json | 3 ++- feed.xml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/feed.json b/feed.json index a6607121..1f996b83 100644 --- a/feed.json +++ b/feed.json @@ -30,7 +30,8 @@ layout: null "author": { "name": "{{ site.data.authors[post.author].name }}", "url": "https://twitter.com/{{ site.data.authors[post.author].twitter }}", - "avatar": "https://github.com/{{ site.data.authors[post.author].github }}.png?size=100" + "avatar": "https://github.com/{{ site.data.authors[post.author].github }}.png?size=100", + "twitter": "{{ site.data.authors[post.author].twitter }}" }, "summary": {{ post.excerpt | jsonify }}, "content_html": {{ post.content | jsonify }} diff --git a/feed.xml b/feed.xml index 72808532..baead214 100644 --- a/feed.xml +++ b/feed.xml @@ -36,6 +36,7 @@ layout: null <name>{{ site.data.authors[post.author].name }}</name> <url>https://twitter.com/{{ site.data.authors[post.author].twitter }}</url> <avatar>https://github.com/{{ site.data.authors[post.author].github }}.png?size=100</avatar> + <twitter>{{ site.data.authors[post.author].twitter }}</twitter> </author> <content type="html">{{ post.content | xml_escape }}</content> From 594f81d7c187d94984e55469ba925496b90bc6ba Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Sun, 29 Nov 2020 08:14:42 +0000 Subject: [PATCH 402/589] Update Gemfile.lock --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1fbba0e5..54215ae8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -227,7 +227,7 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.3) - listen (3.3.1) + listen (3.3.2) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) @@ -281,7 +281,7 @@ GEM unf_ext unf_ext (0.0.7.7) unicode-display_width (1.7.0) - zeitwerk (2.4.1) + zeitwerk (2.4.2) PLATFORMS ruby From d10e0c6b2445cd8654a8f71330cf0b96bb0e4fc7 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 3 Dec 2020 18:54:12 +0200 Subject: [PATCH 403/589] Issue 174 draft (#569) Co-authored-by: Morgan <send.morgan@gmail.com> Co-authored-by: JP Simard <jp@jpsim.com> --- _drafts/2020-12-03-issue-174.md | 130 ++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 _drafts/2020-12-03-issue-174.md diff --git a/_drafts/2020-12-03-issue-174.md b/_drafts/2020-12-03-issue-174.md new file mode 100644 index 00000000..ad4aabd6 --- /dev/null +++ b/_drafts/2020-12-03-issue-174.md @@ -0,0 +1,130 @@ +--- +layout: post +title: ! 'Issue #174' +author: fassko +sponsor: + link: https://iosdevweekly.com/ + heading: iOS Dev Weekly + body: This week’s issue is supported by Dave Verwer, who publishes iOS Dev Weekly every Friday and co-created the Swift Package Index. He’s been a big advocate for the Weekly Brief since it started, and is supporting us because he wants to see it continue. Thanks Dave! + displaylink: https://iosdevweekly.com/ +--- + +On this day, [exactly five years ago](https://developer.apple.com/swift/blog/?id=34), Apple open-sourced the Swift programming language! Imagine how fast this language has moved, and what the next five years will bring. + +We have some excellent news for server-side Swift development. Starting with the introduction of [SwiftNIO SSH](https://swift.org/blog/swiftnio-ssh/) and an early version of Docker Desktop [running on Apple Silicon](https://twitter.com/morlhon/status/1332609373051478016), we can add [Mac instances for EC2](https://developer.apple.com/news/?id=swfemvx0) which are now available from [Amazon Web Services](https://aws.amazon.com/blogs/aws/new-use-mac-instances-to-build-test-macos-ios-ipados-tvos-and-watchos-apps/). I think this will open even more doors for Swift, and let developers build great products in even more places! + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-13899](https://bugs.swift.org/browse/SR-13899) [Compiler] Missing conditional cast fix-it +- [SR-13903](https://bugs.swift.org/browse/SR-13903) [Compiler] Make `ApplyInst` a `MultipleValueInstruction` + +### Podcasts + +In [episode 86](https://www.swiftbysundell.com/podcast/86/) of the Swift by Sundell podcast, [Daniel Steinberg](https://twitter.com/dimsumthinking) joins [John](https://twitter.com/johnsundell) to discuss how various functional programming patterns can be adopted in Swift, and how many of those patterns can be found in both the standard library and in frameworks like Combine and SwiftUI. + +### News and community + +[Introducing SwiftNIO SSH](https://swift.org/blog/swiftnio-ssh/), a collection of APIs that allow programmers to implement SSH-speaking endpoints. + +> SwiftNIO SSH is a programmatic implementation of SSH: that is, it is a collection of APIs that allow programmers to implement SSH-speaking endpoints. Critically, this means it is more like libssh2 than openssh. SwiftNIO SSH does not ship production-ready SSH clients and servers, but instead provides the building blocks for building this kind of client and server. + +[Federico Zanetello](https://www.twitter.com/zntfdr) wrote a [blog post](https://fivestars.blog/swift/disfavoredOverload.html) about `@_disfavoredOverload`. + +> Function overloading is a powerful tool that enables us to define multiple functions of the same name with different implementations: +in this article we’ve covered how Swift addresses ambiguity and how > we can (_cautiously_) use the `@_disfavoredOverload` attribute in case of multiple matches. + +[James Dempsey](https://twitter.com/jamesdempsey) announced a new project - [Swift Version](https://swiftversion.net/) - a website that shows which version of Swift shipped with which version of Xcode. + +[Mishal Shah](https://twitter.com/mishaldshah) announced [Swift Platform Support](https://swift.org/platform-support) - a central hub detailing which tools and capabilities are available on specific platforms for the development and deployment of Swift applications. + +### Videos + +In [episode 1](https://youtu.be/wbIwhv98ALg) of the Swift Community series [Antoine v.d. Lee](https://twitter.com/twannl) joins [Vincent Pradeilles](https://twitter.com/v_pradeilles) to discuss and play around with Custom Operators. + +### Commits and pull requests + +[Luciano Almeida](https://github.com/LucianoPAlmeida) created [a pull request](https://github.com/apple/swift/pull/34883) that proposes to adjust coerce to checked cast diagnostic to be broken into the diagnostic and resolves [SR-13899](https://bugs.swift.org/browse/SR-13899). + +[Robert Widmann](https://twitter.com/CodaFi_) merged [a pull request](https://github.com/apple/swift/pull/34808) that adds a new Fingerprint currency type that centralizes a bunch of hashing invariants and gives me some room to try to experiment with different hashing regimes. + +### Rejected proposals + +[SE-0291](https://github.com/apple/swift-evolution/blob/main/proposals/0291-package-collections.md): *Package Collections* has been revised and placed back into a [2nd review](https://forums.swift.org/t/se-0291-2nd-review-package-collections/). + +> Based on the feedback from the [pitch](https://forums.swift.org/t/package-feeds/) and first review, the core team feels the ideas behind Package Collections are useful and put the Swift Packages ecosystem on the right path. +> +> However, during the first review, several community members requested to learn more about the Package Collection data format. The core team felt the proposal should be amended to explicitly call out if the data format is part of the feature specification or not, and provide reasoning for its inclusion or exclusion. + +[Doug Gregor](https://twitter.com/dgregor79) posted [an image](https://gist.github.com/DougGregor/444575ac67cbd25bfc4b1d4fd241ae93) showing Swift concurrency proposal dependencies. Cool to see everything together. + +### Proposals in review + +[SE-0291](https://github.com/apple/swift-evolution/blob/main/proposals/0291-package-collections.md): *Package Collections* is [under a 2nd review](https://forums.swift.org/t/se-0291-2nd-review-package-collections/42369). + +> This is a proposal for adding support for **Package Collections** to SwiftPM. A package collection is a curated list of packages and associated metadata which makes it easier to discover an existing package for a particular use case. SwiftPM will allow users to subscribe to these collections, search them via the `swift package-collections` command-line interface, and will make their contents accessible to any clients of libSwiftPM. This proposal is focused on the shape of the command-line interface and the format of configuration data related to package collections. + +[SE-0293](https://github.com/apple/swift-evolution/blob/main/proposals/0295-codable-synthesis-for-enums-with-associated-values.md): *Package Collections* is [under review](https://forums.swift.org/t/se0293-extend-property-wrappers-to-function-and-closure-parameters/42400). + +> Property Wrappers were [introduced in Swift 5.1](https://github.com/apple/swift-evolution/blob/main/proposals/0258-property-wrappers.md), and have since become a popular mechanism for abstracting away common accessor patterns for properties. Currently, applying a property wrapper is solely permitted on local variables and type properties. However, with increasing adoption, demand for extending _where_ property wrappers can be applied has emerged. This proposal aims to extend property wrappers to function and closure parameters. + +[SE-0294](https://github.com/apple/swift-evolution/blob/main/proposals/0294-package-executable-targets.md): *Declaring executable targets in Package Manifests* is [under review](https://forums.swift.org/t/se-0294-declaring-executable-targets-in-package-manifests/42404). + +[SE-0295](https://github.com/apple/swift-evolution/blob/main/proposals/0295-codable-synthesis-for-enums-with-associated-values.md): *Codable synthesis for enums with associated values* is [under review](https://forums.swift.org/t/se-0295-codable-synthesis-for-enums-with-associated-values/42408). + +### Swift Forums + +[Richard Wei](https://twitter.com/rxwei) [pitched](https://forums.swift.org/t/differentiable-programming-for-gradient-based-machine-learning/42147) a [proposal](https://github.com/rxwei/swift-evolution/blob/autodiff/proposals/0000-differentiable-programming.md) adding differentiable programming as a first-class, language-integrated feature in Swift. + +> As a compiled programming language with a modern type system, Swift has a unique opportunity to develop its own numerical computing and ML ecosystem. Driven by the growing needs of ML libraries and algorithms, we believe one key technology, differentiable programming, will help push ML development experience and developer productivity to a whole new level. + +[Tom Doron](https://twitter.com/TomerDoron) informed that with [the pull request #3062](https://github.com/apple/swift-package-manager/pull/3062) there has been introduced a warning about the upcoming deprecation of SwiftPM's `generate-xcodeproj` command. + +> The motivation for the upcoming deprecation is the fact that starting Xcode 11, opening and building packages is directly supported by Xcode and therefore we believe that generate-xcodeproj no longer provides material value. +> +> The PR generated some interesting follow-on discussion on how folks are still using generate-xcodeproj, and this thread is an RFC to track such use cases and see how they can be best addressed. + +[Doug Gregor](https://twitter.com/dgregor79) [summarized](https://forums.swift.org/t/concurrency-evolving-the-concurrency-design-and-proposals/42184) some of that feedback and what we'll be adjusting in the revised proposals about Swift concurrency. Read carefully the thread and follow the updates. + +> We posted the first drafts of a number of proposals related to Swift concurrency a few weeks ago. At this time of this writing, the forum topics directly related to the concurrency proposals have more than 600 posts in total (!), which includes lots of great ideas for design improvements, requests for clarification, and so on. + +[Joe Newton](https://forums.swift.org/u/somerandomiosdev) pitched an idea to add inline `@convention(…)` attributes for closures. + +[Owen Voorhees](https://twitter.com/owenvoorhees) pitched a proposal to adding some `swift package` subcommands for making mechanical edits to the `Package.swift` manifest. + +> Because Swift package manifests are written in Swift using the PackageDescription API, it is difficult to automate common tasks like adding a new product, target, or dependency. This proposal introduces new `swift package` subcommands to perform some common editing tasks which can streamline users' workflows and enable new higher-level tools. + +[Wolf McNally](https://forums.swift.org/u/wolf) pitched idea about [floating point interval for Swift](https://forums.swift.org/t/floating-point-interval/42263). + +> When working on code where I'm doing a lot of calculation in geometric spaces such as layout, animation, or color, I often find myself using the concept of a floating point interval: a closed range on the floating point number line. However, the existing ClosedRange requires its bounds to be ordered, which makes it less than useful for geometric calculations where a coordinates can travel or be interpolated in either direction. + +[Daniel Alm](https://forums.swift.org/u/mrmage) shared [an idea](https://forums.swift.org/t/speeding-up-strings-utf8-parsing/42270) how to speed up `String` UTF8 parsing. + +> I recently came across [Daniel Lemire's work on fast UTF8 validation](https://lemire.me/blog/2020/10/20/ridiculously-fast-unicode-utf-8-validation/). Given that Swift needs to UTF8-validate nearly every string that is e.g. read from a SQLite database, I was wondering whether it would be possible and worthwhile to use Lemire's work for speeding up [Swift's current UTF8 validation code](https://github.com/apple/swift/blob/main/stdlib/public/core/StringUTF8Validation.swift). + +[Chris Lattner](https://twitter.com/clattner_llvm) asked "why should actors support subclassing?". + +> One hotly debated thing in the recent actor proposal is whether it should be `actor class` or `actor`. I think there is a more fundamental question, which is basically "why should actors support subclassing?" +> +> I wrote up some thoughts on this in this whitepaper: [Actors are reference types, but why classes?](https://docs.google.com/document/d/14e3p6yBt1kPrakLcEHV4C9mqNBkNibXIZsozdZ6E71c/edit#) + +[Dan Zheng](https://twitter.com/dancherp) posted a pitch for improving the type system to make Swift code safer in certain cases. One application of this could be type-safe lists, but there's certainly more we could do with it. He also asked two great [questions](https://forums.swift.org/t/basic-swift-ownership-y-questions/42340) about ownerships in Swift. + +[Chris Lattner](https://twitter.com/clattner_llvm) wrote a whitepaper exploring the issues and making a recommendation on one way to address the problem: [Actor isolation for Global State](https://docs.google.com/document/d/1DKRs1mknTxB1s04KTVgteAmzh51ubk6-hA-HRSr7mzY/edit#). + +[Doug Gregor](https://twitter.com/dgregor79) [pitched](https://forums.swift.org/t/pitch-rethrowing-protocol-conformances/42373) [an idea](https://github.com/DougGregor/swift-evolution/blob/rethrows-protocol-conformances/proposals/NNNN-rethrows-protocol-conformances.md) about rethrowing protocol conformances. + +> The proposed solution is to consider protocol conformances to be a source of throwing behavior for `rethrows`, allowing `rethrows` to reason about the throwing behavior of user operations provided via protocol conformances. + +[Tony Parker](https://forums.swift.org/u/tony_parker) [pitched](https://forums.swift.org/t/concurrency-asyncsequence/42417) [a proposal](https://github.com/parkera/swift-evolution/blob/asyncsequence/proposals/NNNN-asyncsequence.md) to build on the Swift Concurrency pitches to add the concept of an AsyncSequence to the Swift standard library. + +> Swift's proposed [async/await](https://github.com/DougGregor/swift-evolution/blob/async-await/proposals/nnnn-async-await.md) feature provides an intuitive, built-in way to write and use functions that return a single value at some future point in time. We propose building on top of this feature to create an intuitive, built-in way to write and use functions that return many values over time. + +[Doug Gregor](https://twitter.com/dgregor79) informed that you can read the second pitch of the [async/await proposal](https://github.com/DougGregor/swift-evolution/blob/async-await/proposals/nnnn-async-await.md), which has been revised based on feedback from the [first pitch thread](https://forums.swift.org/t/concurrency-asynchronous-functions/41619). + +### Finally + +[Taylor Swift Reacts to Her 2021 Grammy Nominations](https://twitter.com/taylorswift13/status/1331389046065684483). From cced4761ced660ca334afecfab930a31b6a73058 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 3 Dec 2020 18:55:08 +0200 Subject: [PATCH 404/589] Move from drafts to posts --- {_drafts => _posts}/2020-12-03-issue-174.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-12-03-issue-174.md (100%) diff --git a/_drafts/2020-12-03-issue-174.md b/_posts/2020-12-03-issue-174.md similarity index 100% rename from _drafts/2020-12-03-issue-174.md rename to _posts/2020-12-03-issue-174.md From 87c96261ff263d018d8859e15fac5714d4f02469 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 3 Dec 2020 20:32:03 +0200 Subject: [PATCH 405/589] Update sponsorship.md --- sponsorship.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 5272cc44..2aa368ee 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,8 +60,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| December 3 | Open | -| December 17 | Open | +| December 17 | Taken | | December 31 | **No issue** | | January 14 | Open | | January 28 | Open | From 15f3f3b1e030b2f018e66820629cd12da38f3fec Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Sun, 13 Dec 2020 17:02:55 +0000 Subject: [PATCH 406/589] Update Gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 54215ae8..de44ffde 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -227,7 +227,7 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.3) - listen (3.3.2) + listen (3.3.3) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) From d298448dae55dcb0c13f4d5db6368df9578463e4 Mon Sep 17 00:00:00 2001 From: Federico Zanetello <zntfdr@gmail.com> Date: Thu, 17 Dec 2020 14:14:45 +0700 Subject: [PATCH 407/589] Add missing character in #173 (#572) Co-authored-by: Kristaps Grinbergs <fassko@gmail.com> --- _posts/2020-11-19-issue-173.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-11-19-issue-173.md b/_posts/2020-11-19-issue-173.md index f0f8b76e..1ea7fefe 100644 --- a/_posts/2020-11-19-issue-173.md +++ b/_posts/2020-11-19-issue-173.md @@ -29,7 +29,7 @@ We're close again to the Holiday season and there is a special schedule when [me [buttaface](https://github.com/buttaface) created [a pull request](https://github.com/apple/swift/pull/34491) improving Android support - moving to the NDK's unified sysroot. As well he merged [a pull request](https://github.com/apple/swift/pull/34661) that adds support for `x86_64` arch for Android. -[Ben Barham](https://github.com/bnbarham) merged [a pull reques](https://github.com/apple/swift/pull/34697) that adds features file describing new available flags. +[Ben Barham](https://github.com/bnbarham) merged [a pull request](https://github.com/apple/swift/pull/34697) that adds features file describing new available flags. ### Returned proposals From a2e68aee74b2ed5d7f6e750d5cb1bb142bc70d6b Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 17 Dec 2020 18:58:17 +0200 Subject: [PATCH 408/589] Update sponsorship.md --- sponsorship.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 2aa368ee..1a2c853a 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,7 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| December 17 | Taken | | December 31 | **No issue** | | January 14 | Open | | January 28 | Open | From 7623e158e7777b30936a45b6c1cac5741e6257a7 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 17 Dec 2020 19:03:29 +0200 Subject: [PATCH 409/589] Issue 175 (#575) Co-authored-by: Morgan <send.morgan@gmail.com> --- _drafts/2020-12-17-issue-175.md | 137 ++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 _drafts/2020-12-17-issue-175.md diff --git a/_drafts/2020-12-17-issue-175.md b/_drafts/2020-12-17-issue-175.md new file mode 100644 index 00000000..72c3be51 --- /dev/null +++ b/_drafts/2020-12-17-issue-175.md @@ -0,0 +1,137 @@ +--- +layout: post +title: ! 'Issue #175' +author: fassko +sponsor: + link: https://swiftpackageindex.com/ + heading: Swift Package Index + body: This week’s issue is supported by Dave Verwer who co-created the Swift Package Index, and publishes iOS Dev Weekly every Friday. He’s been a big advocate for the Weekly Brief since it started, and is supporting us because he wants to see it continue! It’s that simple. + displaylink: https://swiftpackageindex.com/ +--- + +Before heading into the holiday period, we have some great news about `async/await`. The proposal adding this functionality is [under review](https://forums.swift.org/t/se-0296-async-await/42605). It's a good opportunity to express your opinion. + +We have some news from the Swift Server Workgroup. Three new people have [joined](https://forums.swift.org/t/december-15th-2020-special-update/42865) to help support future efforts. + +We end this year with a notable and very welcome initiative - [Diversity in Swift](https://swift.org/blog/diversity-in-swift/). The Diversity in Swift workgroup will use the [Community Showcase](https://forums.swift.org/c/community-showcase) to brainstorm ideas and topics for these community-focused blog posts. The [first post](https://swift.org/blog/accessibility-and-inclusion) curates helpful resources for accessibility and inclusion in Swift, all made by awesome developers from our community. + +This brief is the last issue of the year. We are taking a small festive break and will be back in early January. + +Evoking the spirit of philanthropy, if you'd like to sponsor the Weekly Brief when we return, please [get in touch](mailto:fassko@gmail.com). + +Wishing you the happiest of holidays and a fantastic New Year! 🍷 + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-13969](https://bugs.swift.org/browse/SR-13969) [docs] Describe how to quickly compile a minimal multi-module project + +### Podcasts + +In the latest episode of Swift Unwrapped, [Jesse](https://twitter.com/jesse_squires) and [JP](https://twitter.com/simjp) talk [about concurrency](https://spec.fm/podcasts/swift-unwrapped/spdcC97m). + +### News and community + +[Eneko Alonso](https://twitter.com/eneko) wrote [a blog post](https://www.enekoalonso.com/2020/12/06/getting-started-with-async-await-in-swift.html) explaining how to get started with `async/await` in Swift. + +[Holly Borla](https://forums.swift.org/u/hborla) wrote [a blog post](https://swift.org/blog/accessibility-and-inclusion/) that showcases resources about accessibility and inclusion created by developers across our community. + +[Ted Kremenek](https://twitter.com/tkremenek) announced a new initiative for the Swift project called [Diversity in Swift](https://swift.org/blog/diversity-in-swift/). + +### Commits and pull requests + +[Max Desiatov](https://twitter.com/maxdesiatov/) opened [a pull request](https://github.com/apple/swift/pull/34998). + +[Boris Bügling](https://github.com/neonichu) opened [a pull request](https://github.com/apple/swift-package-manager/pull/3120) to add a deprecation warning for the presence of version-specific manifests. + +[Rintaro Ishizaki](https://github.com/rintaro) merged [a pull request](https://github.com/apple/swift/pull/35070) that fixes a problem where `async` was being incorrectly consumed in `parseType`. + +### Accepted proposals + +[SE-0291](https://github.com/apple/swift-evolution/blob/main/proposals/0291-package-collections.md): *Package Collections* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0291-package-collections/42622). + +> The feedback from the [pitch](https://forums.swift.org/t/package-feeds/) and [first review](https://forums.swift.org/t/se-0291-package-collections/) helped ensure Package Collections are useful and put the Swift packages ecosystem on the right path. During the [first review](https://forums.swift.org/t/se-0291-package-collections/), several community members requested to learn more about the Package Collection data format and the proposal was amended to include this information. The feedback from the [2nd review](https://forums.swift.org/t/se-0291-2nd-review-package-collections/42369) was generally positive and the proposal has been accepted with one minor revision: The spelling for the command should be singular (`swift package-collection`) instead of plural (`swift package-collections`). + +[SE-0294](https://github.com/apple/swift-evolution/blob/main/proposals/0294-package-executable-targets.md): *Declaring executable targets in Package Manifests Evolution Announcements* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modifications-se-0294-declaring-executable-targets-in-package-manifests/42859). + +> The feedback from the pitch and review was positive and the proposal has been accepted with a minor revision: The proposal should explicitly call out that starting with SwiftPM tools-version 5.4, declaring an executable target by using .target and having it inferred to be an executable by the presence of a top-level source file named main.swift is considered deprecated; That SwiftPM will continue to infer such targets as executable for a transition period but will eventually stop doing so and treat all targets declared using .target as library targets; And that in the transition period, using .target with main.swift will emit a warning or a fix-it based on technical feasibility. + +### Returned proposals + +[SE-0293](https://github.com/apple/swift-evolution/blob/main/proposals/0293-extend-property-wrappers-to-function-and-closure-parameters.md) has been [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0293-extend-property-wrappers-to-function-and-closure-parameters/42953). + +> Most of the discussion in the feedback thread centered around a central question of "what is the type of a function that has a property wrapper parameter?". The proposal describes a model where the wrapper is part of the exposed type (for example `(Binding<Item>)->Void`), but many data points in the thread argued for a model where the exposed type of a function is the unwrapped type (for example `(Item)->Void`). + +### Proposals in review + +[SE-0296](https://github.com/apple/swift-evolution/blob/main/proposals/0296-async-await.md): *Async/await* is [under a review](https://forums.swift.org/t/se-0296-async-await/42605). + +> Modern Swift development involves a lot of asynchronous (or "async") 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. + +[SE-0292](https://github.com/apple/swift-evolution/blob/main/proposals/0292-package-registry-service.md): *Package Registry Service* is [under a review](https://forums.swift.org/t/se-0292-package-registry-service/42623). + +> Swift Package Manager downloads dependencies using Git. Our proposal defines a standard web service interface that it can also use to download dependencies from package registries. + +[SE-0297](https://github.com/apple/swift-evolution/blob/main/proposals/0297-concurrency-objc.md): *Concurrency Interoperability with Objective-C* is [under a review](https://forums.swift.org/t/se-0297-concurrency-interoperability-with-objective-c/42702). + +> Swift's concurrency feature involves asynchronous functions and actors. While Objective-C does not have corresponding language features, asynchronous APIs are common in Objective-C, expressed manually through the use of completion handlers. This proposal provides bridging between Swift's concurrency features (for example, `async` functions) and the convention-based expression of asynchronous functions in Objective-C. It is intended to allow the wealth of existing asynchronous Objective-C APIs to be immediately usable with Swift's concurrency model. + +### Swift Forums + +[Keith Smiley](https://twitter.com/SmileyKeith) started discussion about supporting strict imports. + +> We have a large multi-module Swift codebase where we want to support strict imports, meaning files only import what they use, and they import everything they use (not particularly at the class level with import class Foo.bar, but at least import Foo). We have a few specific reasons for wanting this to be enforced: +> +> 1. When reading a diff it makes it clear when a new dependency on a module is being introduced +> 2. When this is explicitly defined we can enforce what types of modules are allowed to import what other types of modules, for example we don't want modules with business logic importing our UI layer etc +> 3. By trimming unused imports, we can eliminate unnecessary intermodule dependencies, simplifying the dependency graph and speeding up compilation + +[Dave Abrahams](https://twitter.com/DaveAbrahams) started [a discussion](https://forums.swift.org/t/long-term-implications-of-async-await-for-the-programming-model/42624) about long-term implications of `async/await` for the programming model. + +> This is not dependent on the specifics of any of the proposals under discussion, but I wanted to explore a little bit what the introduction of async/await might mean for the way we program in the long term. I have just two related concerns at this point. I hope the proposers have considered these questions and have some answers, but I'd be interested in anyone's thoughts. + +[Doug Gregor](https://twitter.com/dgregor79) [informed us](https://forums.swift.org/t/pitch-2-concurrency-interoperability-with-objective-c/42627) about an updated pitch for [Concurrency Interoperability with Objective-C](https://github.com/DougGregor/swift-evolution/blob/concurrency-objc/proposals/NNNN-concurrency-objc.md). + +> The first [pitch thread](https://forums.swift.org/t/concurrency-interoperability-with-objective-c/41616) provided a bit of feedback, which I've incorporated into this second pitch. The specific changes: + +> * Removed mention of asynchronous handlers, which will be in a separate proposal. +> * Introduced the `swift_async_error` Clang attribute to separate out "throwing" behavior from the `swift_async` attribute. +> * Added support for "Swift private" to the `swift_async` attribute. +> * Tuned the naming heuristics based on feedback to add (for example) `reply` , `replyTo` , `completionBlock` , and variants. +> * For the rare case where we match a parameter suffix, append the text prior to the suffix to the base name. +> * Replaced the `-generateCGImagesAsynchronouslyForTimes:completionHandler:` example with one from PassKit. +> * Added a "Future Directions" section about `NSProgress` . + +[Dave Abrahams](https://twitter.com/DaveAbrahams) raised a concern that the rule requiring a `try` label on every potentially-throwing statement was too indiscriminate. + +> It's not that requiring a `try` label is always a mistake, I argued—in fact, in _some_ cases being forced to acknowledge a possible throw could be extremely helpful in reasoning about code—it's just that there are so many cases where it wasn't helpful. + +[George Barnett](https://twitter.com/glbrntt) asked a couple of questions about source location in literals and result builders. + +> One issue I've come across recently is the fact that you cannot access the source location of the literal triggering a call to `ExpressibleByFooLiteral`, as `init(fooLiteral value: Foo, file: StaticString = #file)` would fail to fulfill the protocol requirement. There was [a pitch](https://forums.swift.org/t/pitch-allow-functions-with-default-arguments-to-fulfill-protocols/9186/15) quite some time ago to allow functions with default arguments to satisfy protocol requirements, but not much seems to have happened as a result. [Result builders](https://github.com/apple/swift-evolution/blob/main/proposals/0289-result-builders.md) might have a similar problem, as it seems one cannot write `static func buildExpression(..., file: StaticString = #file)`, though since this particular method participates on overload resolution it may just work. + +Swift on the Server Workgroup meeting notes: +* [October 28, 2020](https://forums.swift.org/t/october-28-2020/42655) by [Kaitlin Mahar](https://twitter.com/k__mahar) +* [November 11, 2020](https://forums.swift.org/t/november-11-2020/42704) by [Peter Adams](https://forums.swift.org/u/peteradams-a) +* [December 15th, 2020 Special Update](https://forums.swift.org/t/december-15th-2020-special-update/42865) by [Tom Doron](https://twitter.com/TomerDoron) + +[Michel Fortin](https://twitter.com/michel_fortin) started a discussion about interlocking in a hierarchy of actors. + +> I think it's a bit of a problem that actors can't talk to each other synchronously. I'm trying to find a model that would allow synchronous calls from actor to another actor while avoiding deadlocks and limiting blocking. So this an the idea I've come with. I'll be keeping an updated version of this document [here](https://gist.github.com/michelf/bb2d61f994306b61e5c26e076e4a2418). + +[Konrad `ktoso` Malawski](https://forums.swift.org/u/ktoso) pitched [an idea](https://forums.swift.org/t/pitch-task-local-values/42829) introducing task local values to the [Swift's concurrency model ](https://forums.swift.org/t/swift-concurrency-roadmap/41611). + +> Task local values provide a much needed missing piece in the [Task](https://github.com/apple/swift/blob/main/stdlib/public/Concurrency/Task.swift) infrastructure puzzle. It enables instrumentation, profiling and tracing tool authors to build truly great _contextualized_ experiences for debugging, profiling and tracing codebases using asynchronous functions and actors. +> +> At the same time this proposal avoids pitfalls of similar APIs thanks to embracing Swift's [Structured Concurrency](https://forums.swift.org/t/concurrency-structured-concurrency/41622) approach. +> +> Please refer to [the complete and up-to-date pitch document](https://github.com/ktoso/swift-evolution/blob/wip-tasklocals/proposals/nnnn-task-locals.md#alternative-api-considered) + +### Finally + +[A day in the life of an Apple Engineer](https://twitter.com/NovallSwift/status/1335358897926721539). + +[Advent of Code with Swift Argument Parser](https://forums.swift.org/t/parsing-into-a-dictionary-of-int-int/42564). \ No newline at end of file From 8402ef0ec3dabb437074264dda858933ea9f0558 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 17 Dec 2020 21:18:45 +0200 Subject: [PATCH 410/589] Move to posts --- {_drafts => _posts}/2020-12-17-issue-175.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2020-12-17-issue-175.md (100%) diff --git a/_drafts/2020-12-17-issue-175.md b/_posts/2020-12-17-issue-175.md similarity index 100% rename from _drafts/2020-12-17-issue-175.md rename to _posts/2020-12-17-issue-175.md From f105d41b8bf0a14deb4b4608331539a13ffe8c48 Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Sun, 20 Dec 2020 15:17:30 +0000 Subject: [PATCH 411/589] Update Gemfile.lock --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index de44ffde..62a98c04 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,7 +55,7 @@ GEM ruby2_keywords faraday-http-cache (2.2.0) faraday (>= 0.8) - ffi (1.13.1) + ffi (1.14.1) forwardable-extended (2.6.0) gemoji (3.0.1) git (1.7.0) @@ -275,7 +275,7 @@ GEM thread_safe (0.3.6) typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.8) + tzinfo (1.2.9) thread_safe (~> 0.1) unf (0.1.4) unf_ext From b88bd269c60d9ff41d182106c3b352bb4ba12420 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 14 Jan 2021 19:38:56 +0200 Subject: [PATCH 412/589] New draft (#581) Co-authored-by: Jared <JaredHalpern@users.noreply.github.com> --- Gemfile.lock | 23 ++++--- _drafts/2021-01-14-issue-176.md | 116 ++++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 10 deletions(-) create mode 100644 _drafts/2021-01-14-issue-176.md diff --git a/Gemfile.lock b/Gemfile.lock index 62a98c04..fb819144 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -50,15 +50,17 @@ GEM ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) - faraday (1.1.0) + faraday (1.3.0) + faraday-net_http (~> 1.0) multipart-post (>= 1.2, < 3) ruby2_keywords faraday-http-cache (2.2.0) faraday (>= 0.8) - ffi (1.14.1) + faraday-net_http (1.0.1) + ffi (1.14.2) forwardable-extended (2.6.0) gemoji (3.0.1) - git (1.7.0) + git (1.8.1) rchardet (~> 1.8) github-pages (209) github-pages-health-check (= 1.16.1) @@ -227,28 +229,28 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.3) - listen (3.3.3) + listen (3.4.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.4.0) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.14.2) + minitest (5.14.3) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) - octokit (4.19.0) + nokogiri (1.11.1-arm64-darwin) + racc (~> 1.4) + octokit (4.20.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (3.1.1) + racc (1.5.2) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) @@ -285,6 +287,7 @@ GEM PLATFORMS ruby + universal-darwin-20 DEPENDENCIES claide @@ -296,4 +299,4 @@ DEPENDENCIES octokit BUNDLED WITH - 2.1.4 + 2.2.2 diff --git a/_drafts/2021-01-14-issue-176.md b/_drafts/2021-01-14-issue-176.md new file mode 100644 index 00000000..2f9e427a --- /dev/null +++ b/_drafts/2021-01-14-issue-176.md @@ -0,0 +1,116 @@ +--- +layout: post +title: ! 'Issue #176' +author: fassko +--- + +We are back from the holiday break. Whether you celebrate or not, I hope you took some time off to relax after this crazy 2020. We're now in 2021, and I believe this year we will slowly move back to a more normal life. I hope we can meet in smaller meetups at the end of the year and start to safely travel again. + +We have significant updates from `async`/`await` field. A proposal adding this functionality has been accepted! There is a great [video](https://t.co/V6O6RDgjMe?amp=1) by [Vincent Pradeilles](https://twitter.com/v_pradeilles) demonstrating how we can experiment with it already using the Swift development snapshot. Check it out. + +I want to end this issue by calling for sponsors. Swift Weekly is a great place to promote your solution or company and target the Swift language professional audience. You'd also be supporting a community-backed project. This email and website would not be possible without our sponsors. We need to cover running costs and have some exciting plans to bring this project to the next level. Financial support would go a long way towards achieving these goals. + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-13976](https://bugs.swift.org/browse/SR-13976) [Compiler] Improve compiler error message: "partial application of ‘mutating’ method is not allowed" +- [SR-14015](https://bugs.swift.org/browse/SR-14015) [Docs] Update references master -> main for branch related information + +### Podcasts + +In [Empower Apps #74](https://www.empowerapps.show/34), [Leo Dion](https://twitter.com/leogdion) and [Tim Condon](https://twitter.com/0xtim) talk about the Swift Server Work Group, SwiftNIO, Server-Side Swift's growth in 2020 and Swift on Server-Side ARM. + +### News and community + +The founder of this newsletter, [Jesse Squires](https://twitter.com/jesse_squires), wrote a post exploring the type of `self` in a Swift self-executing anonymous closure used to initialize a stored property. [Nolan Waite](https://bugs.swift.org/secure/ViewProfile.jspa?name=nolanw) pointed out that this bug is being tracked at [SR-4559](https://bugs.swift.org/browse/SR-4559) and [SR-4865](https://bugs.swift.org/browse/SR-4865). + +[Kilo Loco](https://twitter.com/Kilo_Loco) shared a tool called [Swift Lambda Maker](https://github.com/Kilo-Loco/SLaM). Swift Lamda Maker is a CLI tool used to create and package AWS Lambda functions written in Swift. It can create a new executable Swift Package where you can start coding your Lambda as well as package that Lambda as a zipped Docker image. + +Great [blog post](https://blog.swiftwasm.org/posts/update-05-december-2020/) about updates from SwiftWasm team. + +### Accepted proposals + +[SE-0296](https://github.com/apple/swift-evolution/blob/main/proposals/0296-async-await.md): *Async/await* was [accepted](https://forums.swift.org/t/accepted-with-modification-se-0296-async-await/43318). + +> Feedback was very positive on the concept of adding async/await in general with a few key points raised. +> * It was suggested that `try await` reads better than `await try`. The core team agrees, and the proposal will be modified accordingly. +> * There was some discussion of alternatives to `async` (such as `suspends`) which may better describe the meaning. The core team feels that the benefit of sticking with `async` as a term of art with precedent in many other languages was preferable to the the slight descriptive benefit of alternative names. Note that other uses of `async` such as `async let` will be considered in other proposals. +> * Several reviewers expressed concern that it was hard to review this proposal "stand alone", since it interacts so closely with, and its use depends on, other yet-to-be-reviewed proposals. The core team acknowledges this, but feels that this is unavoidable given the large surface area of the whole concurrency feature. To mitigate this, reviewers of subsequent proposals should feel free to revisit parts of accepted concurrency proposals in reviewing those subsequent proposals when they interact. +> * Several reviewers were disappointed about subsetting out getters. The core team wants to be clear that this is just left as a future direction, not ruled out, and as such isn't a reason to hold back on accepting this proposal. +> * In a separate thread to the review, there was some discussion of the necessity of `try` and `await`. The core team does not believe the current requirement to mark throwing calls with `try` should be revisited, and thinks there is a similar need to mark possible suspension points with `await`. The core team would be open to considering future proposals that allow multiple calls needing either `try` or `await` to be sugared somehow (for example, some form of try block). + +### Rejected proposals + +[SE-0292](https://github.com/apple/swift-evolution/blob/main/proposals/0292-package-registry-service.md) has been [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0292-package-registry-service/43402). + +> The feedback to the idea of defining an open-standard Package Registry HTTP based API, and implementing support for it in SwiftPM as an alternative to resolving dependencies via git, was very positive. + +### Proposals in review + +[SE-0290](https://github.com/apple/swift-evolution/blob/main/proposals/0290-negative-availability.md): *Unavailability Condition* is [under a second review](https://forums.swift.org/t/se-290-second-review-unavailability-condition/43544). + +> The _second_ review of [SE-0290, "Unavailability Condition"](https://github.com/apple/swift-evolution/blob/main/proposals/0290-negative-availability.md), begins now and runs through January 12, 2021. This proposal was [previously returned for revision 1](https://forums.swift.org/t/se-0290-unavailability-condition/41873/34). + +[SE-0298](https://github.com/apple/swift-evolution/blob/main/proposals/0298-asyncsequence.md): *`Async`/`Await`: Sequences* is [under a review](https://forums.swift.org/t/se-0298-async-await-sequences/43786). + +> Swift's [async/await](https://github.com/apple/swift-evolution/blob/main/proposals/0296-async-await.md) feature provides an intuitive, built-in way to write and use functions that return a single value at some future point in time. We propose building on top of this feature to create an intuitive, built-in way to write and use functions that return many values over time. +> +> This proposal is composed of the following pieces: +> +> 1. A standard library definition of a protocol that represents an asynchronous sequence of values +> 2. Compiler support to use `for...in` syntax on an asynchronous sequence of values +> 3. A standard library implementation of commonly needed functions that operate on an asynchronous sequence of values + +### Swift Forums + +[Tom Doron](https://twitter.com/TomerDoron) [informed](https://forums.swift.org/t/development-open-for-swift-5-3-3-for-linux-and-windows/43007) us about development for Swift 5.3.3 for Linux and Windows. + +> We are happy to announce the opening of the development phase for Swift 5.3.3 for Linux and Windows. +> +>* Merge window open: 17th December 2020 (now) +>* Merge window close: 22nd January 2021 +>* Planned release: End of January or February 2021 + +[James Sherlock](https://forums.swift.org/u/sherlouk) [pitched](https://forums.swift.org/t/spm-multi-package-repositories/43193) to add support for repositories which contain multiple packages for the first time. + +> Many developers operate under a "[mono repo](https://en.wikipedia.org/wiki/Monorepo)" design pattern where code for multiple packages or projects exists under one repository. +> +> Swift Package Manager currently assumes that each repository only contains one package, this may not always be true - this proposal aims to add support for repositories which contain multiple packages. + +[Mattt](https://twitter.com/mattt) started a [discussion](https://forums.swift.org/t/urls-as-swift-package-identifiers/43404) about URLs as Swift package identifiers. + +> We believe that using URLs as package identifiers is intuitive and familiar for developers, and will best solve the immediate and future needs of this project. + +[Doug Gregor](https://twitter.com/dgregor79) posted an [update](https://forums.swift.org/t/pitch-2-structured-concurrency/43452) describing the [Structured Concurrency](https://forums.swift.org/t/concurrency-structured-concurrency/41622) Pitch Document revisions. + +[Jeff Kelley](https://twitter.com/SlaunchaMan) pitched [an idea](https://forums.swift.org/t/adding-sugar-for-preconditions-and-guards/43520) to add sugar for preconditions and guards. + +[Chuquimia_Max](https://forums.swift.org/u/chuquimia_max) expressed [an idea](https://forums.swift.org/t/pitch-enum-composition/43598) to add `enum` composition. + +> It seems this has _almost_ been discussed [here](https://forums.swift.org/t/enum-inheritance/9933) and [here](https://forums.swift.org/t/enums-as-enum-underlying-types/17375/19) but never with what I would consider to be an intuitive, Swift-esque syntax. +> +> Essentially, I reckon it would be beneficial to be able to create a composed enum using `&` in the same way protocol composition is currently functioning. +> Composable enums could also be handy if we get typed `throws` in the future: if only enum errors are thrown the compiler could implicitly compose an error enum based on the call stack. + +[Joe Groff](https://twitter.com/jckarter) pitched [an idea](https://forums.swift.org/t/concurrency-continuations-for-interfacing-async-tasks-with-synchronous-code/43619) about continuations for interfacing async tasks with synchronous code. + +> Asynchronous Swift code needs to be able to work with existing synchronous +code that uses techniques such as completion callbacks and delegate methods to +respond to events. Asynchronous tasks can suspend themselves on +**continuations** which synchronous code can then capture and invoke to +resume the task in response to an event. + +[Mishal Shah](https://twitter.com/mishaldshah) [informs](https://forums.swift.org/t/swift-5-4-nightly-development-snapshots/43791) us that Swift 5.4 nightly development snapshots are now available on [https://swift.org/download/#snapshots](https://swift.org/download/#snapshots). + +[Ted Kremenek](https://twitter.com/tkremenek) [updated](https://forums.swift.org/t/code-of-conduct-updated-january-12-2021/43807) the community concerning new changes to the Code of Conduct. + +> We all want the Swift community to be welcoming and inclusive, and a place where anyone can come to answer questions, propose their ideas, and help shape the future of Swift. To better promote inclusiveness, the Core team is revising the [Code of Conduct 47](https://swift.org/code-of-conduct/) on [Swift.org](http://swift.org/) that covers all aspects of the Swift project. +> +> The revision incorporates changes from [v1.4 of the Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct/), which provides examples of positive behaviors and suggestions for us all to keep in mind in our interactions. The revision also clarifies some policies to follow when issues arise. + +### Finally + +[The iOS Developer Community Survey 2020](https://iosdevsurvey.com/updates/launching-the-2020-survey/). From 3ff761946ebe1c44c4e8e876895970864ceae2a2 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 14 Jan 2021 19:54:20 +0200 Subject: [PATCH 413/589] Move to posts --- {_drafts => _posts}/2021-01-14-issue-176.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2021-01-14-issue-176.md (100%) diff --git a/_drafts/2021-01-14-issue-176.md b/_posts/2021-01-14-issue-176.md similarity index 100% rename from _drafts/2021-01-14-issue-176.md rename to _posts/2021-01-14-issue-176.md From a1e9e978bfb1f89280008dd07b3908a13b3e06b4 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 14 Jan 2021 20:17:32 +0200 Subject: [PATCH 414/589] Update sponsorship.md --- sponsorship.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 1a2c853a..b0ba261c 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,9 +60,13 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| December 31 | **No issue** | -| January 14 | Open | | January 28 | Open | +| February 11 | Open | +| February 25 | Open | +| March 11 | Open | +| March 25 | Open | +| April 8 | Open | +| April 22 | Open | {: class="table table-bordered"} </div> From d937d4f9ed93f527b226f7cf676bc06b96c8f97b Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Mon, 18 Jan 2021 17:59:48 +0000 Subject: [PATCH 415/589] Update Gemfile.lock --- Gemfile.lock | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index fb819144..1fb8c402 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -229,10 +229,11 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.3) - listen (3.4.0) + listen (3.4.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) + mini_portile2 (2.5.0) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) @@ -241,6 +242,9 @@ GEM multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) + nokogiri (1.11.1) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) nokogiri (1.11.1-arm64-darwin) racc (~> 1.4) octokit (4.20.0) @@ -270,7 +274,7 @@ GEM sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) - simpleidn (0.1.1) + simpleidn (0.2.1) unf (~> 0.1.4) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) From 40627be6886fbb083c498d81e462c79a57f62922 Mon Sep 17 00:00:00 2001 From: Bas Broek <BasThomas@users.noreply.github.com> Date: Tue, 19 Jan 2021 18:14:30 +0000 Subject: [PATCH 416/589] Name change (#585) * Name change * Update 2017-11-09-issue-94.md --- _posts/2016-02-11-issue-9.md | 2 +- _posts/2016-03-03-issue-12.md | 2 +- _posts/2016-03-10-issue-13.md | 2 +- _posts/2016-04-14-issue-18.md | 2 +- _posts/2016-06-02-issue-25.md | 2 +- _posts/2016-06-09-issue-26.md | 2 +- _posts/2016-06-23-issue-27.md | 4 ++-- _posts/2016-07-28-issue-32.md | 4 ++-- _posts/2017-04-13-issue-65.md | 2 +- _posts/2017-04-20-issue-66.md | 2 +- _posts/2017-05-04-issue-68.md | 2 +- _posts/2017-11-09-issue-94.md | 4 ++-- _posts/2018-02-08-issue-102.md | 2 +- _posts/2018-05-31-issue-110.md | 2 +- _posts/2018-06-28-issue-112.md | 2 +- _posts/2018-08-09-issue-115.md | 2 +- _posts/2019-04-04-issue-131.md | 2 +- _posts/2019-10-24-issue-146.md | 2 +- _posts/2019-11-21-issue-148.md | 2 +- _posts/2019-12-05-issue-149.md | 2 +- _posts/2020-05-21-issue-160.md | 2 +- 21 files changed, 24 insertions(+), 24 deletions(-) diff --git a/_posts/2016-02-11-issue-9.md b/_posts/2016-02-11-issue-9.md index 6bf057f0..35afcf98 100644 --- a/_posts/2016-02-11-issue-9.md +++ b/_posts/2016-02-11-issue-9.md @@ -46,7 +46,7 @@ let x = (1, b: 2) foo(x) {% endhighlight %} -Much of the feedback on this was "I've never used this", so I doubt it will be missed. However, Brent Royal-Gordon has already started a [discussion](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160208/009596.html) about a replacement. +Much of the feedback on this was "I've never used this", so I doubt it will be missed. However, Becca Royal-Gordon has already started a [discussion](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160208/009596.html) about a replacement. ### Mailing lists diff --git a/_posts/2016-03-03-issue-12.md b/_posts/2016-03-03-issue-12.md index 1a148990..541501af 100644 --- a/_posts/2016-03-03-issue-12.md +++ b/_posts/2016-03-03-issue-12.md @@ -48,7 +48,7 @@ Daniel Dunbar's proposal, [SE-0038](https://github.com/apple/swift-evolution/blo David Scrève's proposal, [SE-0026](https://github.com/apple/swift-evolution/blob/master/proposals/0026-abstract-classes-and-methods.md): *Abstract classes and methods*, is now [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2016-February/000048.html). I'm personally not a fan of this idea. I think that the problems that abstract classes and methods attempt to solve can be better solved with protocols, and design patterns that avoid the need for inheritance in the first place. [David Owens II](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160222/011163.html) and [Austin Zheng](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160222/011168.html) offer their views against and in favor, respectively. Overall feedback on the mailing lists is mixed. -Ilya Belenkiy's proposal, [SE-0025](https://github.com/apple/swift-evolution/blob/master/proposals/0025-scoped-access-level.md): *Scoped Access Level*, is now [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2016-February/000049.html). It aims to introduce a new access level modifier, `local`, which would make the specified members private to their class/struct. Support for this is mixed and I can understand both sides. [Stephen Celis](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160222/011201.html) and [Brent Royal-Gordon](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011405.html) have written great responses against this. [Nate Cook](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160222/011210.html) provided his thoughts on why he thinks this is a good change. And [Joe Groff](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160222/011314.html) suggested that this might be solvable with stored properties in extensions instead. +Ilya Belenkiy's proposal, [SE-0025](https://github.com/apple/swift-evolution/blob/master/proposals/0025-scoped-access-level.md): *Scoped Access Level*, is now [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2016-February/000049.html). It aims to introduce a new access level modifier, `local`, which would make the specified members private to their class/struct. Support for this is mixed and I can understand both sides. [Stephen Celis](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160222/011201.html) and [Becca Royal-Gordon](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011405.html) have written great responses against this. [Nate Cook](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160222/011210.html) provided his thoughts on why he thinks this is a good change. And [Joe Groff](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160222/011314.html) suggested that this might be solvable with stored properties in extensions instead. Erica Sadun drafted two proposals for refinements to Strides. So far there is mixed but mostly positive support for each of these. diff --git a/_posts/2016-03-10-issue-13.md b/_posts/2016-03-10-issue-13.md index fe9617d8..a7035d85 100644 --- a/_posts/2016-03-10-issue-13.md +++ b/_posts/2016-03-10-issue-13.md @@ -84,7 +84,7 @@ Russ Bishop [started a thread](https://lists.swift.org/pipermail/swift-evolution Erica Sadun [started](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011939.html) an interesting discussion on adopting a new common error type outside the bounds of `NSError`. *"Swift's redesigned error mechanism differs significantly from `NSError` in that its primary consumer are API calls, via the try-catch mechanism and not end-users. I would not like Swift to be tied down to an archaic construct for the sake of consistency."* [David Owens](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011944.html) and [Kevin Ballard](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011966.html) provided some good feedback. -There's been an on-going discussion about [removing failable initializers](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011631.html) and replacing them with *throwable* initializers, started by James Campbell. Overall, the community does not support this idea. Early on, Brent Royal-Gordon [pointed out](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011783.html) the unnecessary complexity and overhead of this approach. This week, [Austin Zheng](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160307/012107.html) provided a well-articulated and very practical argument against this, *"If the argument is that taking away `init?` is going to force Swift users to embrace the One True Path of Error Handling, I don't think that's going to happen. The more likely outcome is that people are going to wrap throwable initializers in factory methods returning optionals, and throw away whatever error returns."* I think failable initializers have the potential to be misused/abused/overused, and agree that throwable initializers would not provide any value. You can *almost always* design your APIs such that you don't need `init?`. +There's been an on-going discussion about [removing failable initializers](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011631.html) and replacing them with *throwable* initializers, started by James Campbell. Overall, the community does not support this idea. Early on, Becca Royal-Gordon [pointed out](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011783.html) the unnecessary complexity and overhead of this approach. This week, [Austin Zheng](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160307/012107.html) provided a well-articulated and very practical argument against this, *"If the argument is that taking away `init?` is going to force Swift users to embrace the One True Path of Error Handling, I don't think that's going to happen. The more likely outcome is that people are going to wrap throwable initializers in factory methods returning optionals, and throw away whatever error returns."* I think failable initializers have the potential to be misused/abused/overused, and agree that throwable initializers would not provide any value. You can *almost always* design your APIs such that you don't need `init?`. Dmitri Gribenko [posted](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160307/012037.html) a request for comment on a new collections model. *"What does everyone think about requiring indices to conform to `Hashable`, in addition to the existing requirements for `Equatable` and `Comparable`? I don't think this should limit any viable collection designs, and yet might be useful, for example, to store indices in a set."* It's an interesting idea, though Pyry Jahkola [pointed out](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160307/012054.html) that clients could simply enforce this on their own. diff --git a/_posts/2016-04-14-issue-18.md b/_posts/2016-04-14-issue-18.md index fbbe663e..66f0ce23 100644 --- a/_posts/2016-04-14-issue-18.md +++ b/_posts/2016-04-14-issue-18.md @@ -73,7 +73,7 @@ A proposal from Dmitri Gribenko, Dave Abrahams, and Maxim Moiseev, [SE-0065](htt > - A closed range that includes the maximal value of its `Bound` type is now representable and does not trap. > - Existing “private” in-place index traversal methods are now available publicly. -As expected with such a fundamental change, there's a lot of discussion. [Nate Cook](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160411/014741.html) expresses some concern over APIs and naming, but ultimately gives it a +1000. There are a number of other +1's on the lists, too. I think the community is in favor of the core idea, it's just a matter of working out some of the details, and [Brent Royal-Gordon](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160411/014658.html) is doing just that. +As expected with such a fundamental change, there's a lot of discussion. [Nate Cook](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160411/014741.html) expresses some concern over APIs and naming, but ultimately gives it a +1000. There are a number of other +1's on the lists, too. I think the community is in favor of the core idea, it's just a matter of working out some of the details, and [Becca Royal-Gordon](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160411/014658.html) is doing just that. ### Mailing lists diff --git a/_posts/2016-06-02-issue-25.md b/_posts/2016-06-02-issue-25.md index d3451eac..01d8fff0 100644 --- a/_posts/2016-06-02-issue-25.md +++ b/_posts/2016-06-02-issue-25.md @@ -81,7 +81,7 @@ Erica Sadun's and Chris Lattner's proposal, [SE-0099](https://github.com/apple/s Harlan Haskins [pitched an idea](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/019407.html) about introducing a `#warning` compiler directive that would emit a warning diagnostic. This would serve a similar purpose as a `// TODO ` or `// FIXME` comment, but produce an actual warning in Xcode. Jordan Rose [gave a +1](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160530/019845.html) to the proposal, noting how this could have a positive impact *outside* of IDEs like Xcode, for example with SwiftPM. -Tony Allevato [drafted](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/018920.html) a proposal for automatically deriving `Equatable` and `Hashable` for certain value types. It's an interesting idea, but certainly has challenging edge cases. There was some discussion over adding specific keywords to include or exclude which properties of a type are used in the `Equatable` and `Hashable` definitions, but this seems overly complicated. Brent Royal-Gordon [warned](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/018971.html) early on to keep it simple. Patrick Smith [suggested](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/019145.html) providing implementations by default, and allowing users to override. +Tony Allevato [drafted](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/018920.html) a proposal for automatically deriving `Equatable` and `Hashable` for certain value types. It's an interesting idea, but certainly has challenging edge cases. There was some discussion over adding specific keywords to include or exclude which properties of a type are used in the `Equatable` and `Hashable` definitions, but this seems overly complicated. Becca Royal-Gordon [warned](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/018971.html) early on to keep it simple. Patrick Smith [suggested](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/019145.html) providing implementations by default, and allowing users to override. Erica Sadun [pitched an idea](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/018919.html) about adding a `with` function to the standard library to address a common situation where developers want to duplicate and modify a constant value type (without having to use `var`). ([Gist here](https://gist.github.com/erica/96d9c5bb4eaa3ed3b2ff82dc35aa8dae)) Example: diff --git a/_posts/2016-06-09-issue-26.md b/_posts/2016-06-09-issue-26.md index 2cbb7e12..8c4e0521 100644 --- a/_posts/2016-06-09-issue-26.md +++ b/_posts/2016-06-09-issue-26.md @@ -43,7 +43,7 @@ Erica Sadun's and Chris Lattner's proposal, [SE-0099](https://github.com/apple/s ### Proposals in review -Austin Zheng's and Brent Royal-Gordon's proposal, [SE-0089](https://github.com/apple/swift-evolution/blob/master/proposals/0089-rename-string-reflection-init.md): *Renaming `String.init<T>(_: T)`*, is [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2016-June/000183.html) once again, after having been [returned for revision](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/019018.html). +Austin Zheng's and Becca Royal-Gordon's proposal, [SE-0089](https://github.com/apple/swift-evolution/blob/master/proposals/0089-rename-string-reflection-init.md): *Renaming `String.init<T>(_: T)`*, is [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2016-June/000183.html) once again, after having been [returned for revision](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160523/019018.html). > Swift's `String` type ships with a large number of initializers that take one unlabeled argument. One of these initializers, defined as `init<T>(_: T)`, is used to create a string containing the textual representation of an object. It is very easy to write code which accidentally invokes this initializer by accident, when one of the other synonymous initializers was desired. Such code will compile without warnings and can be very difficult to detect. diff --git a/_posts/2016-06-23-issue-27.md b/_posts/2016-06-23-issue-27.md index e33b5b5d..837d7e54 100644 --- a/_posts/2016-06-23-issue-27.md +++ b/_posts/2016-06-23-issue-27.md @@ -66,11 +66,11 @@ Brian Gesiak opened a [pull request](https://github.com/apple/swift/pull/3027) t ### Accepted proposals -Austin Zheng's and Brent Royal-Gordon's proposal, [SE-0089](https://github.com/apple/swift-evolution/blob/master/proposals/0089-rename-string-reflection-init.md): *Renaming `String.init<T>(_: T)`*, was [accepted](https://lists.swift.org/pipermail/swift-evolution-announce/2016-June/000190.html) for **Swift 3**. 🎉 +Austin Zheng's and Becca Royal-Gordon's proposal, [SE-0089](https://github.com/apple/swift-evolution/blob/master/proposals/0089-rename-string-reflection-init.md): *Renaming `String.init<T>(_: T)`*, was [accepted](https://lists.swift.org/pipermail/swift-evolution-announce/2016-June/000190.html) for **Swift 3**. 🎉 > The feedback from the community on this second round was light, which indicates that the extensive iteration on earlier rounds brought this to a good place. The core team discussed other possibilities for the parameter label (e.g. from: instead of describing:) but ended up agreeing that a more explicit “describing:” label is the best fit for this API. > -> Many thanks to Austin Zheng and Brent Royal-Gordon for driving this discussion, iterating on the design, and writing a great proposal! I filed [SR-1881](https://bugs.swift.org/browse/SR-1881) to track implementation of this work. This would be a great project for someone who wants to work on the standard library. +> Many thanks to Austin Zheng and Becca Royal-Gordon for driving this discussion, iterating on the design, and writing a great proposal! I filed [SR-1881](https://bugs.swift.org/browse/SR-1881) to track implementation of this work. This would be a great project for someone who wants to work on the standard library. ### Returned proposals diff --git a/_posts/2016-07-28-issue-32.md b/_posts/2016-07-28-issue-32.md index d351fd15..724d086f 100644 --- a/_posts/2016-07-28-issue-32.md +++ b/_posts/2016-07-28-issue-32.md @@ -131,11 +131,11 @@ Dave Liu [submitted](https://github.com/apple/swift-corelibs-foundation/pull/482 ### Deferred proposals -[SE-0132](https://github.com/apple/swift-evolution/blob/master/proposals/0132-sequence-end-ops.md): *Rationalizing Sequence end-operation names* by Brent Royal-Gordon and Dave Abrahams was [reviewed](https://lists.swift.org/pipermail/swift-evolution-announce/2016-July/000256.html) and [deferred](https://lists.swift.org/pipermail/swift-evolution-announce/2016-July/000267.html). +[SE-0132](https://github.com/apple/swift-evolution/blob/master/proposals/0132-sequence-end-ops.md): *Rationalizing Sequence end-operation names* by Becca Royal-Gordon and Dave Abrahams was [reviewed](https://lists.swift.org/pipermail/swift-evolution-announce/2016-July/000256.html) and [deferred](https://lists.swift.org/pipermail/swift-evolution-announce/2016-July/000267.html). > This is a very large proposal very late in the Swift 3 schedule. It has some clearly good pieces to it, but also many parts that are controversial with the community, and requires more design and iteration than time permits. It is best to defer this and make a change when we have something truly great, giving the benefit of proper time to design and evaluate the proposal. > -> Thank you to Brent Royal-Gordon and Dave Abrahams for driving this discussion. When the goals and parameters of Swift 4 are established, we should pick up this thread and see what makes sense to do here. +> Thank you to Becca Royal-Gordon and Dave Abrahams for driving this discussion. When the goals and parameters of Swift 4 are established, we should pick up this thread and see what makes sense to do here. ### Returned proposals diff --git a/_posts/2017-04-13-issue-65.md b/_posts/2017-04-13-issue-65.md index c85e0706..49013481 100644 --- a/_posts/2017-04-13-issue-65.md +++ b/_posts/2017-04-13-issue-65.md @@ -82,7 +82,7 @@ Doug Gregor [finished](https://github.com/apple/swift/commit/57c607e33990db400e6 > > With the base API discussed in [SE-0166](https://github.com/apple/swift-evolution/blob/master/proposals/0166-swift-archival-serialization.md), we want to provide new encoders for consumers of this API, as well as provide a consistent story for bridging this new API with our existing `NSCoding` implementations. We would like to offer a base level of support that users can depend on, and set a pattern that third parties can follow in implementing and extending their own encoders. -[SE-0168](https://github.com/apple/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md): *Multi-Line String Literals* by John Holdsworth, Brent Royal-Gordon, and Tyler Cloutier is [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2017-April/000347.html). +[SE-0168](https://github.com/apple/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md): *Multi-Line String Literals* by John Holdsworth, Becca Royal-Gordon, and Tyler Cloutier is [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2017-April/000347.html). > This proposal introduces multi-line string literals to Swift source code. This has been discussed a few times on swift-evolution most recently putting forward a number of different syntaxes that could achieve this goal each of which has their own use case and constituency for discussion. > diff --git a/_posts/2017-04-20-issue-66.md b/_posts/2017-04-20-issue-66.md index 7d763afc..6854e6ab 100644 --- a/_posts/2017-04-20-issue-66.md +++ b/_posts/2017-04-20-issue-66.md @@ -148,7 +148,7 @@ extension Sequence { } {% endhighlight %} -[SE-0172](https://github.com/apple/swift-evolution/blob/master/proposals/0172-one-sided-ranges.md): *One-sided Ranges* by Ben Cohen, Dave Abrahams, and Brent Royal-Gordon is [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2017-April/000358.html). +[SE-0172](https://github.com/apple/swift-evolution/blob/master/proposals/0172-one-sided-ranges.md): *One-sided Ranges* by Ben Cohen, Dave Abrahams, and Becca Royal-Gordon is [under review](https://lists.swift.org/pipermail/swift-evolution-announce/2017-April/000358.html). Currently in Swift, creating a slice of a collection means typing `startIndex` and `endIndex` a lot, like `s[s.startIndex..<i]`, or using the prefix and suffix methods. diff --git a/_posts/2017-05-04-issue-68.md b/_posts/2017-05-04-issue-68.md index 0cbcc2e1..bb669c1f 100644 --- a/_posts/2017-05-04-issue-68.md +++ b/_posts/2017-05-04-issue-68.md @@ -20,7 +20,7 @@ This week JP Simard and Jesse Squires discuss the String Manifesto! Slava Pestov [implemented](https://github.com/apple/swift/pull/9090) [SE-0156](https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md): *Class and Subtype existentials*. -Brent Royal-Gordon [opened a pull request](https://github.com/apple/swift/pull/9148) to improve diagnostics for multi-line string literals ([SE-0168](https://github.com/apple/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md)). +Becca Royal-Gordon [opened a pull request](https://github.com/apple/swift/pull/9148) to improve diagnostics for multi-line string literals ([SE-0168](https://github.com/apple/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md)). Brian King [implemented](https://github.com/apple/swift/pull/9098) [SE-0169](https://github.com/apple/swift-evolution/blob/master/proposals/0169-improve-interaction-between-private-declarations-and-extensions.md): *Improve Interaction Between `private` Declarations and Extensions*. 🚀 diff --git a/_posts/2017-11-09-issue-94.md b/_posts/2017-11-09-issue-94.md index a44729de..38368983 100644 --- a/_posts/2017-11-09-issue-94.md +++ b/_posts/2017-11-09-issue-94.md @@ -147,8 +147,8 @@ that whether the compilation target was a simulator or not was encoded in the target triple, a decision made recently in LLVM, so discussions of whether it should be encoded at all should be done on the LLVM mailing lists. -[Brent Royal-Gordon](https://twitter.com/brentdax) [asked](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20171030/040863.html) -about how he could update his once deferred proposal, [SE-0132](https://github.com/apple/swift-evolution/blob/master/proposals/0132-sequence-end-ops.md), +[Becca Royal-Gordon](https://twitter.com/beccadax) [asked](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20171030/040863.html) +about how she could update her once deferred proposal, [SE-0132](https://github.com/apple/swift-evolution/blob/master/proposals/0132-sequence-end-ops.md), which proposes renaming several `Sequence` and `Collection` methods such that they follow a consistent naming scheme. diff --git a/_posts/2018-02-08-issue-102.md b/_posts/2018-02-08-issue-102.md index 929cd38f..19d943fd 100644 --- a/_posts/2018-02-08-issue-102.md +++ b/_posts/2018-02-08-issue-102.md @@ -114,7 +114,7 @@ included in the standard library's stable ABI. There were a few discussions around Strings this week: -- [Brent Royal-Gordon](https://github.com/brentdax) started a discussion on a [String interpolation revamp](https://forums.swift.org/t/string-interpolation-revamp/9302) and is looking for some ideas to generate fewer temporary strings. Currenly in Swift interpolation, when you write code like this in Swift 4: +- [Becca Royal-Gordon](https://github.com/beccadax) started a discussion on a [String interpolation revamp](https://forums.swift.org/t/string-interpolation-revamp/9302) and is looking for some ideas to generate fewer temporary strings. Currenly in Swift interpolation, when you write code like this in Swift 4: {% highlight swift %} let foo: MyString = "foo \(bar) baz" diff --git a/_posts/2018-05-31-issue-110.md b/_posts/2018-05-31-issue-110.md index a3373194..f8dc0178 100644 --- a/_posts/2018-05-31-issue-110.md +++ b/_posts/2018-05-31-issue-110.md @@ -18,7 +18,7 @@ In [episode 60](https://spec.fm/podcasts/swift-unwrapped/144992), Jesse and JP d ### News and community -[Michael Ilseman](https://twitter.com/Ilseman) has [improved](https://twitter.com/brentdax/status/1001351681370542080) string interpolation in Swift 4.2 to be at least twice as fast! 🏎💨 +[Michael Ilseman](https://twitter.com/Ilseman) has [improved](https://twitter.com/beccadax/status/1001351681370542080) string interpolation in Swift 4.2 to be at least twice as fast! 🏎💨 ### Commits and pull requests diff --git a/_posts/2018-06-28-issue-112.md b/_posts/2018-06-28-issue-112.md index 5fa882f0..8563fe2d 100644 --- a/_posts/2018-06-28-issue-112.md +++ b/_posts/2018-06-28-issue-112.md @@ -83,7 +83,7 @@ Awesome stuff! > > There is currently no way to work with a buffer of uninitialized memory that then becomes a fully memory-managed `Array`. This limitation means that operations that don't know the final size of their data in advance, or that need to access noncontiguous parts of an array, are less efficient than necessary, often requiring an extra copy. This proposal suggests a new initializer for `Array` and `ContiguousArray` that would provide access to a newly created array's entire storage buffer. -[Brent Royal-Gordon](https://twitter.com/brentdax) pitched [a proposal](https://forums.swift.org/t/pitch-deprecate-strange-interpolations-in-swift-4-2/13694) that aims to clean up some of the lesser known rough edges in String interpolation. +[Becca Royal-Gordon](https://twitter.com/beccadax) pitched [a proposal](https://forums.swift.org/t/pitch-deprecate-strange-interpolations-in-swift-4-2/13694) that aims to clean up some of the lesser known rough edges in String interpolation. > So, everyone knows what a string interpolation looks like: diff --git a/_posts/2018-08-09-issue-115.md b/_posts/2018-08-09-issue-115.md index a6a9c852..7245e89a 100644 --- a/_posts/2018-08-09-issue-115.md +++ b/_posts/2018-08-09-issue-115.md @@ -54,7 +54,7 @@ While Jesse and JP are on a holiday break from the podcast, you can find all pre ### Swift Forums -[Brent Royal-Gordon](http://twitter.com/brentdax) pitched [a proposal](https://forums.swift.org/t/draft-fix-string-interpolation-swift-5-edition/14786) to fix String interpolation in Swift 5. +[Becca Royal-Gordon](http://twitter.com/beccadax) pitched [a proposal](https://forums.swift.org/t/draft-fix-string-interpolation-swift-5-edition/14786) to fix String interpolation in Swift 5. > String interpolation is a simple and powerful feature for expressing complex, runtime-created strings, but the current version of the `ExpressibleByStringInterpolation` protocol has been deprecated since Swift 3. We propose a new design which improves its performance, clarity, and efficiency. diff --git a/_posts/2019-04-04-issue-131.md b/_posts/2019-04-04-issue-131.md index eec47acb..d53ecd3e 100644 --- a/_posts/2019-04-04-issue-131.md +++ b/_posts/2019-04-04-issue-131.md @@ -307,7 +307,7 @@ on Swift on Windows. > libraries are now usable on Windows with the test coverage quickly converging > to the point where it is nearly as good as the other supported platforms! -[Brent Royal-Gordon](https://twitter.com/brentdax) +[Becca Royal-Gordon](https://twitter.com/beccadax) pitched [a proposal](https://forums.swift.org/t/pitch-static-and-class-subscripts/21850) to allow `static` and `class` subscripts. diff --git a/_posts/2019-10-24-issue-146.md b/_posts/2019-10-24-issue-146.md index c4ce8645..f2997b20 100644 --- a/_posts/2019-10-24-issue-146.md +++ b/_posts/2019-10-24-issue-146.md @@ -246,7 +246,7 @@ option that I think is the best choice. You can read the full proposal pitch [here](https://forums.swift.org/t/backwards-deployable-conformances/29876). [Lantua](https://forums.swift.org/u/lantua/summary) asked [for clarification](https://forums.swift.org/t/source-compatibility/29814) -on source compatability, and [Brent Royal-Gordon](https://twitter.com/brentdax) +on source compatability, and [Becca Royal-Gordon](https://twitter.com/beccadax) gave a great answer: > There are two kinds of Swift releases: diff --git a/_posts/2019-11-21-issue-148.md b/_posts/2019-11-21-issue-148.md index db8a4063..48991803 100644 --- a/_posts/2019-11-21-issue-148.md +++ b/_posts/2019-11-21-issue-148.md @@ -58,7 +58,7 @@ libraries have been [migrated to modern CMake (3.51.1)](https://forums.swift.org [Zoe Carver](https://github.com/zoecarver) is working on [a pull request](https://github.com/apple/swift/pull/28260) turning sequences of String comparisons into a fast switch. -[Brent Royal-Gordon](https://twitter.com/brentdax) is working on [a pull request](https://github.com/apple/swift/pull/25656) +[Becca Royal-Gordon](https://twitter.com/beccadax) is working on [a pull request](https://github.com/apple/swift/pull/25656) to make Swift `#file` strings include only the base name of the file, making them a lot easier to digest. diff --git a/_posts/2019-12-05-issue-149.md b/_posts/2019-12-05-issue-149.md index 1fee7665..120814f5 100644 --- a/_posts/2019-12-05-issue-149.md +++ b/_posts/2019-12-05-issue-149.md @@ -138,7 +138,7 @@ a fatal error (like the `publish` method in the extension of > What I propose is enabling the marking of Protocol requirements with Access Levels. -[Brent Royal-Gordon](https://twitter.com/brentdax) pitched [a proposal](https://forums.swift.org/t/concise-magic-file-names/31297) +[Becca Royal-Gordon](https://twitter.com/beccadax) pitched [a proposal](https://forums.swift.org/t/concise-magic-file-names/31297) to introduce a concise version of `#file`. > Today, `#file` evaluates to a string literal containing the full path to the diff --git a/_posts/2020-05-21-issue-160.md b/_posts/2020-05-21-issue-160.md index 015e175b..66d6629f 100644 --- a/_posts/2020-05-21-issue-160.md +++ b/_posts/2020-05-21-issue-160.md @@ -129,7 +129,7 @@ var location: Location { .init(latitude: lat, longitude: long) } var location: Location -> .init(latitude: lat, longitude: long) ``` -[Brent Royal-Gordon](https://twitter.com/brentdax) pitched [a follow-up proposal](https://forums.swift.org/t/pitch-2-cross-import-overlays/36710) +[Becca Royal-Gordon](https://twitter.com/beccadax) pitched [a follow-up proposal](https://forums.swift.org/t/pitch-2-cross-import-overlays/36710) to cross-importing overlays. >> Cross-import overlays allow Swift to automatically import additional From 1b1675b756efda4f4a23458473ca43dfeac8636f Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Sat, 23 Jan 2021 17:04:55 +0000 Subject: [PATCH 417/589] Update Gemfile.lock --- Gemfile.lock | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1fb8c402..fa5fbfde 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -23,10 +23,10 @@ GEM colorize (0.8.1) commonmarker (0.17.13) ruby-enum (~> 0.5) - concurrent-ruby (1.1.7) + concurrent-ruby (1.1.8) cork (0.3.0) colored2 (~> 3.1) - danger (8.2.1) + danger (8.2.2) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -62,7 +62,7 @@ GEM gemoji (3.0.1) git (1.8.1) rchardet (~> 1.8) - github-pages (209) + github-pages (210) github-pages-health-check (= 1.16.1) jekyll (= 3.9.0) jekyll-avatar (= 0.7.0) @@ -80,7 +80,7 @@ GEM jekyll-relative-links (= 0.6.1) jekyll-remote-theme (= 0.4.2) jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.6.1) + jekyll-seo-tag (= 2.7.1) jekyll-sitemap (= 1.4.0) jekyll-swiss (= 1.0.0) jekyll-theme-architect (= 0.1.1) @@ -171,8 +171,8 @@ GEM rubyzip (>= 1.3.0, < 3.0) jekyll-sass-converter (1.5.2) sass (~> 3.4) - jekyll-seo-tag (2.6.1) - jekyll (>= 3.3, < 5.0) + jekyll-seo-tag (2.7.1) + jekyll (>= 3.8, < 5.0) jekyll-sitemap (1.4.0) jekyll (>= 3.7, < 5.0) jekyll-swiss (1.0.0) @@ -233,7 +233,6 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.5.0) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) @@ -242,10 +241,7 @@ GEM multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.11.1) - mini_portile2 (~> 2.5.0) - racc (~> 1.4) - nokogiri (1.11.1-arm64-darwin) + nokogiri (1.11.1-x86_64-darwin) racc (~> 1.4) octokit (4.20.0) faraday (>= 0.9) @@ -263,7 +259,7 @@ GEM rouge (3.23.0) ruby-enum (0.8.0) i18n - ruby2_keywords (0.0.2) + ruby2_keywords (0.0.4) rubyzip (2.3.0) safe_yaml (1.0.5) sass (3.7.4) @@ -292,6 +288,7 @@ GEM PLATFORMS ruby universal-darwin-20 + x86_64-darwin-19 DEPENDENCIES claide From ff6dc9556948d15791cf1ef309559de96e2b95ef Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 00:26:20 +0200 Subject: [PATCH 418/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index b0ba261c..71948123 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,7 +60,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| January 28 | Open | +| January 28 | Taken | | February 11 | Open | | February 25 | Open | | March 11 | Open | From f39b3cddaedb69f3f2e8a16f03f5ab88e75ec63c Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 00:28:37 +0200 Subject: [PATCH 419/589] Add gem to pass the CI --- Gemfile | 2 ++ Gemfile.lock | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index b6b86fb4..637cc01e 100644 --- a/Gemfile +++ b/Gemfile @@ -9,3 +9,5 @@ gem 'danger-prose' gem 'claide' gem 'octokit' gem 'colorize' + +gem "jekyll-commonmark-ghpages", "~> 0.1.6" diff --git a/Gemfile.lock b/Gemfile.lock index fa5fbfde..1b76ebfd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,7 +62,7 @@ GEM gemoji (3.0.1) git (1.8.1) rchardet (~> 1.8) - github-pages (210) + github-pages (211) github-pages-health-check (= 1.16.1) jekyll (= 3.9.0) jekyll-avatar (= 0.7.0) @@ -104,7 +104,7 @@ GEM mercenary (~> 0.3) minima (= 2.5.1) nokogiri (>= 1.10.4, < 2.0) - rouge (= 3.23.0) + rouge (= 3.26.0) terminal-table (~> 1.4) github-pages-health-check (1.16.1) addressable (~> 2.3) @@ -256,7 +256,7 @@ GEM ffi (~> 1.0) rchardet (1.8.0) rexml (3.2.4) - rouge (3.23.0) + rouge (3.26.0) ruby-enum (0.8.0) i18n ruby2_keywords (0.0.4) @@ -296,6 +296,7 @@ DEPENDENCIES danger danger-prose github-pages + jekyll-commonmark-ghpages (~> 0.1.6) jekyll-sitemap octokit From abded14c88cab5a9c5fbde88178859a247052773 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 00:33:46 +0200 Subject: [PATCH 420/589] Fixing build --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a86098b..9ef1d3fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: - name: bundle install run: | + gem uninstall jekyll-commonmark-ghpages bundle config path vendor/bundle bundle install --without=documentation --jobs 4 --retry 3 echo "::add-path::/Users/runner/Library/Python/2.7/bin" From 9301ed80f7f61e98f87c8ea04e3ef6edd2ab925a Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 00:37:05 +0200 Subject: [PATCH 421/589] Install plugin --- Gemfile | 4 +++- Gemfile.lock | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 637cc01e..9cb4b594 100644 --- a/Gemfile +++ b/Gemfile @@ -10,4 +10,6 @@ gem 'claide' gem 'octokit' gem 'colorize' -gem "jekyll-commonmark-ghpages", "~> 0.1.6" +group :jekyll_plugins do + gem 'jekyll-commonmark-ghpages' +end \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 1b76ebfd..b8687170 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -296,7 +296,7 @@ DEPENDENCIES danger danger-prose github-pages - jekyll-commonmark-ghpages (~> 0.1.6) + jekyll-commonmark-ghpages jekyll-sitemap octokit From 9fdf9fbca848ef5e7ce4ccd61777a88446202f0b Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 00:38:59 +0200 Subject: [PATCH 422/589] Moving up --- Gemfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 9cb4b594..3c0c566b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,7 @@ source 'https://rubygems.org' gem 'github-pages', group: :jekyll_plugins +gem 'jekyll-commonmark-ghpages', group: :jekyll_plugins gem 'jekyll-sitemap' gem 'danger' @@ -8,8 +9,4 @@ gem 'danger-prose' gem 'claide' gem 'octokit' -gem 'colorize' - -group :jekyll_plugins do - gem 'jekyll-commonmark-ghpages' -end \ No newline at end of file +gem 'colorize' \ No newline at end of file From 570a8b0a62f889487c75c3d59762c705cb57255c Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 00:47:56 +0200 Subject: [PATCH 423/589] Not specific version --- Gemfile | 3 ++- Gemfile.lock | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 3c0c566b..0ec9607e 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,7 @@ source 'https://rubygems.org' gem 'github-pages', group: :jekyll_plugins gem 'jekyll-commonmark-ghpages', group: :jekyll_plugins +gem 'jekyll-paginate', group: :jekyll_plugins gem 'jekyll-sitemap' gem 'danger' @@ -9,4 +10,4 @@ gem 'danger-prose' gem 'claide' gem 'octokit' -gem 'colorize' \ No newline at end of file +gem 'colorize' diff --git a/Gemfile.lock b/Gemfile.lock index b8687170..41803372 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -297,6 +297,7 @@ DEPENDENCIES danger-prose github-pages jekyll-commonmark-ghpages + jekyll-paginate jekyll-sitemap octokit From ce1dd18669db3b25f80421cc678521a9855c9f1c Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 00:49:25 +0200 Subject: [PATCH 424/589] Add jekyll --- Gemfile | 1 + Gemfile.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 0ec9607e..9260fad4 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ gem 'github-pages', group: :jekyll_plugins gem 'jekyll-commonmark-ghpages', group: :jekyll_plugins gem 'jekyll-paginate', group: :jekyll_plugins gem 'jekyll-sitemap' +gem 'jekyll' gem 'danger' gem 'danger-prose' diff --git a/Gemfile.lock b/Gemfile.lock index 41803372..4656b95a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -296,6 +296,7 @@ DEPENDENCIES danger danger-prose github-pages + jekyll jekyll-commonmark-ghpages jekyll-paginate jekyll-sitemap From 31e432acb8f69d87d4f5d8c351f58adedbac2e29 Mon Sep 17 00:00:00 2001 From: Federico Zanetello <zntfdr@gmail.com> Date: Thu, 28 Jan 2021 16:13:08 +0700 Subject: [PATCH 425/589] Remove unnecessary `>` symbol (#583) Co-authored-by: Kristaps Grinbergs <fassko@gmail.com> --- _posts/2020-12-03-issue-174.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2020-12-03-issue-174.md b/_posts/2020-12-03-issue-174.md index ad4aabd6..329b3e35 100644 --- a/_posts/2020-12-03-issue-174.md +++ b/_posts/2020-12-03-issue-174.md @@ -35,7 +35,7 @@ In [episode 86](https://www.swiftbysundell.com/podcast/86/) of the Swift by Sund [Federico Zanetello](https://www.twitter.com/zntfdr) wrote a [blog post](https://fivestars.blog/swift/disfavoredOverload.html) about `@_disfavoredOverload`. > Function overloading is a powerful tool that enables us to define multiple functions of the same name with different implementations: -in this article we’ve covered how Swift addresses ambiguity and how > we can (_cautiously_) use the `@_disfavoredOverload` attribute in case of multiple matches. +in this article we’ve covered how Swift addresses ambiguity and how we can (_cautiously_) use the `@_disfavoredOverload` attribute in case of multiple matches. [James Dempsey](https://twitter.com/jamesdempsey) announced a new project - [Swift Version](https://swiftversion.net/) - a website that shows which version of Swift shipped with which version of Xcode. From d186d69b3e2ffa6e407e7e17c014dfe9693ce38e Mon Sep 17 00:00:00 2001 From: Zev Eisenberg <zev@zeveisenberg.com> Date: Thu, 28 Jan 2021 10:55:16 -0500 Subject: [PATCH 426/589] Add missing link. (#584) Co-authored-by: Kristaps Grinbergs <fassko@gmail.com> --- _posts/2021-01-14-issue-176.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_posts/2021-01-14-issue-176.md b/_posts/2021-01-14-issue-176.md index 2f9e427a..e686544c 100644 --- a/_posts/2021-01-14-issue-176.md +++ b/_posts/2021-01-14-issue-176.md @@ -25,9 +25,9 @@ In [Empower Apps #74](https://www.empowerapps.show/34), [Leo Dion](https://twitt ### News and community -The founder of this newsletter, [Jesse Squires](https://twitter.com/jesse_squires), wrote a post exploring the type of `self` in a Swift self-executing anonymous closure used to initialize a stored property. [Nolan Waite](https://bugs.swift.org/secure/ViewProfile.jspa?name=nolanw) pointed out that this bug is being tracked at [SR-4559](https://bugs.swift.org/browse/SR-4559) and [SR-4865](https://bugs.swift.org/browse/SR-4865). +The founder of this newsletter, [Jesse Squires](https://twitter.com/jesse_squires), wrote a [post exploring the type of `self`](https://www.jessesquires.com/blog/2020/12/28/the-different-types-of-self-in-swift/) in a Swift self-executing anonymous closure used to initialize a stored property. [Nolan Waite](https://bugs.swift.org/secure/ViewProfile.jspa?name=nolanw) pointed out that this bug is being tracked at [SR-4559](https://bugs.swift.org/browse/SR-4559) and [SR-4865](https://bugs.swift.org/browse/SR-4865). -[Kilo Loco](https://twitter.com/Kilo_Loco) shared a tool called [Swift Lambda Maker](https://github.com/Kilo-Loco/SLaM). Swift Lamda Maker is a CLI tool used to create and package AWS Lambda functions written in Swift. It can create a new executable Swift Package where you can start coding your Lambda as well as package that Lambda as a zipped Docker image. +[Kilo Loco](https://twitter.com/Kilo_Loco) shared a tool called [Swift Lambda Maker](https://github.com/Kilo-Loco/SLaM). Swift Lambda Maker is a CLI tool used to create and package AWS Lambda functions written in Swift. It can create a new executable Swift Package where you can start coding your Lambda as well as package that Lambda as a zipped Docker image. Great [blog post](https://blog.swiftwasm.org/posts/update-05-december-2020/) about updates from SwiftWasm team. @@ -107,7 +107,7 @@ resume the task in response to an event. [Ted Kremenek](https://twitter.com/tkremenek) [updated](https://forums.swift.org/t/code-of-conduct-updated-january-12-2021/43807) the community concerning new changes to the Code of Conduct. -> We all want the Swift community to be welcoming and inclusive, and a place where anyone can come to answer questions, propose their ideas, and help shape the future of Swift. To better promote inclusiveness, the Core team is revising the [Code of Conduct 47](https://swift.org/code-of-conduct/) on [Swift.org](http://swift.org/) that covers all aspects of the Swift project. +> We all want the Swift community to be welcoming and inclusive, and a place where anyone can come to answer questions, propose their ideas, and help shape the future of Swift. To better promote inclusiveness, the Core team is revising the [Code of Conduct](https://swift.org/code-of-conduct/) on [Swift.org](http://swift.org/) that covers all aspects of the Swift project. > > The revision incorporates changes from [v1.4 of the Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct/), which provides examples of positive behaviors and suggestions for us all to keep in mind in our interactions. The revision also clarifies some policies to follow when issues arise. From 8e7a97bedd50d786ad8d0ede6e1bb696566d5f71 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 20:07:57 +0200 Subject: [PATCH 427/589] Not using groups (#590) --- Gemfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 9260fad4..694223a8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ source 'https://rubygems.org' -gem 'github-pages', group: :jekyll_plugins -gem 'jekyll-commonmark-ghpages', group: :jekyll_plugins -gem 'jekyll-paginate', group: :jekyll_plugins +gem 'github-pages' +gem 'jekyll-commonmark-ghpages' +gem 'jekyll-paginate' gem 'jekyll-sitemap' gem 'jekyll' From a015e6252838698d1706b4f1e81b0c9802d8237e Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 20:30:42 +0200 Subject: [PATCH 428/589] New draft (#588) Co-authored-by: Jared <JaredHalpern@users.noreply.github.com> Co-authored-by: Morgan <send.morgan@gmail.com> --- _config.yml | 1 + _drafts/2021-01-28-issue-177.md | 148 ++++++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+) create mode 100644 _drafts/2021-01-28-issue-177.md diff --git a/_config.yml b/_config.yml index b1fdb3c9..13d9cbc3 100644 --- a/_config.yml +++ b/_config.yml @@ -4,6 +4,7 @@ highlighter: rouge plugins: - jekyll-sitemap + - jekyll-paginate # File rules exclude: [vendor, Dangerfile, Gemfile, Gemfile.lock, LICENSE, README.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, new_draft.sh, github_issue_generator.rb] diff --git a/_drafts/2021-01-28-issue-177.md b/_drafts/2021-01-28-issue-177.md new file mode 100644 index 00000000..414642ff --- /dev/null +++ b/_drafts/2021-01-28-issue-177.md @@ -0,0 +1,148 @@ +--- +layout: post +title: ! 'Issue #177' +author: fassko +sponsor: + link: https://matteomanferdini.com/architecting-swiftui-apps-with-mvc-and-mvvm/swift-weekly-brief/ + heading: Architecting SwiftUI apps with MVC and MVVM + body: It’s easy to make an app by throwing some code together. But without best practices and a robust architecture, you soon end up with unmanageable spaghetti code. Learn to create solid and maintainable apps with fewer bugs with this free guide. + displaylink: matteomanferdini.com/architecting-swiftui-apps-with-mvc-and-mvvm/swift-weekly-brief/ +--- + +The last two weeks have passed very quickly. I volunteered to help my country plan and develop a system for distributing Covid-19 vaccines to those most in need. I hope everything runs as smoothly as it can. + +I want to say thank you to the people and companies that have reached out about sponsorship. Thank you for that! It makes a big difference, and we still have free spots to [support this newsletter](/sponsorship) and help us cover the running costs. + +Lately, we have seen a rapid increase in new proposals from the community. It's been great to see new folks joining and expressing their ideas. That means there'll be more for us to cover, so let's get on with the news. + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-14058](https://bugs.swift.org/browse/SR-14058) Trying to coerce regular function to `@convention(c)` traps + +### Podcasts + +In [Empower Apps #77](https://www.empowerapps.show/77), [Leo Dion](https://twitter.com/leogdion) talks with [Sven A. Schmidt](https://twitter.com/_sa_s), co-creator of the Swift Package Index. They discuss the challenges of supporting thousands of Swift Packages, dealing with metrics and site ops with Vapor, running CI for the site and the plethora of Swift packages as well as Apple Silicon support. + +### News and community + +[Soroush Khanlou](https://twitter.com/khanlou) wrote [a blog post](https://khanlou.com/2021/01/meridian/) about launching [Meridian](https://github.com/khanlou/Meridian/) - a web server written in Swift that lets you write your endpoints in a declarative way. + +[Max Desiatov](https://twitter.com/maxdesiatov) wrote [an excellent article](https://desiatov.com/swift-structured-concurrency-introduction/) explaining structured concurrency in Swift. + +[Andreas Wendleder](https://github.com/gonsolo) wrote [a great article](https://gonsoloblog.wordpress.com/2021/01/14/rendering-moana-with-swift/) about rendering [Disney's Moana island scene](https://www.disneyanimation.com/resources/moana-island-scene/) with Swift. It's worth reading the [Hacker News thread](https://news.ycombinator.com/item?id=25779611) which contains a lot of valuable insights. + +### Commits and pull requests + +[Holly Borla](https://github.com/hborla) merged [a pull request](https://github.com/apple/swift/pull/35025) which implements heuristics for pruning the generic operator overload search space. + +[Meghana Gupta](https://github.com/meg-gupta) merged [a pull request](https://github.com/apple/swift/pull/35380) that enables `ArrayBoundsCheckElimination` on OSSA. + +[Erik Eckstein](https://github.com/eeckstein/) merged [a pull request](https://github.com/apple/swift/pull/35474) that fixes a crash related to single-element tuples containing a label and a closure. + +[Evan Wilde](https://github.com/etcwilde) merged [a pull request](https://github.com/apple/swift/pull/35215) that adds `async-main` support. + +### Accepted proposals + +[SE-0298](https://github.com/apple/swift-evolution/blob/main/proposals/0298-asyncsequence.md): *Async/Await: Sequences* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modification-se-0296-async-await/43318). + +> Feedback was overwhelmingly positive, with most of the discussion (and concerns) focused on the `cancel()` requirement of `AsyncSequence`. In light of this feedback, the proposal authors have [determined at `cancel()` should be removed](https://forums.swift.org/t/se-0298-async-await-sequences/43786/67). The Core Team has **accepted this proposal** with the following modifications: +> +> * The `cancel()` requirement has been removed from `AsyncSequence`, per discussion feedback. +> * The `first()` method has been removed. It's [non-asynchronous counterpart](https://developer.apple.com/documentation/swift/collection/3017676-first) is a property, but at present properties cannot be `async`. With `async` properties [under active discussion](https://forums.swift.org/t/pitch-effectful-read-only-properties/44090), the Core Team felt that it would be better to let that discussion settle first (which may result in `first` becoming an `async` property) than risk having to change this declaration from a method to a function soon. +> * The `makeAsyncIterator` has been marked as `__consuming`. This is mostly an implementation detail, but is in line with `Sequence.makeIterator`. + +### Proposals in review + +[SE-0300](https://github.com/apple/swift-evolution/blob/main/proposals/0300-continuation.md): *Continuations for interfacing async tasks with synchronous code* is [under a review](https://forums.swift.org/t/se-0300-continuations-for-interfacing-async-tasks-with-synchronous-code/43891). + +> Asynchronous Swift code needs to be able to work with existing synchronous code that uses techniques such as completion callbacks and delegate methods to respond to events. Asynchronous tasks can suspend themselves on continuations which synchronous code can then capture and invoke to resume the task in response to an event. + +[SE-0299](https://github.com/apple/swift-evolution/blob/main/proposals/0299-extend-generic-static-member-lookup.md): *Extending Static Member Lookup in Generic Contexts* is [under a review](https://forums.swift.org/t/se-0299-extending-static-member-lookup-in-generic-contexts/43958). + +> Using static member declarations to provide semantic names for commonly used values which can then be accessed via leading dot syntax is an important tool in API design, reducing type repetition and improving call-site legibility. Currently, when a parameter is generic, there is no effective way to take advantage of this syntax. This proposal aims to relax restrictions on accessing static members on protocols to afford the same call-site legibility to generic APIs. + +[SE-0295](https://github.com/apple/swift-evolution/blob/main/proposals/0295-codable-synthesis-for-enums-with-associated-values.md): *Codable synthesis for enums with associated values* is [under the second review](https://forums.swift.org/t/se-0295-codable-synthesis-for-enums-with-associated-values-second-review/44036). + +> Codable was introduced in [SE-0166](https://github.com/apple/swift-evolution/blob/master/proposals/0166-swift-archival-serialization.md) +with support for synthesizing `Encodable` and `Decodable` conformance for `class` and `struct` types, that only contain values that also conform +to the respective protocols. +> +> This proposal will extend the support for auto-synthesis of these conformances to enums with associated values. + +[SE-0293](https://github.com/apple/swift-evolution/blob/main/proposals/0293-extend-property-wrappers-to-function-and-closure-parameters.md): *Extend Property Wrappers to Function and Closure Parameters* is [under the second review](https://forums.swift.org/t/se-0293-second-review-extend-property-wrappers-to-function-and-closure-parameters/44220). + +> Property Wrappers were [introduced in Swift 5.1](https://github.com/apple/swift-evolution/blob/main/proposals/0258-property-wrappers.md), and have since become a popular mechanism for abstracting away common accessor patterns for properties. Currently, applying a property wrapper is solely permitted on local variables and type properties. However, with increasing adoption, demand for extending _where_ property wrappers can be applied has emerged. This proposal aims to extend property wrappers to function and closure parameters. + +### Swift Forums + +[Holly Borla](https://twitter.com/hollyborla) updated the [SE-0293](https://github.com/filip-sakel/swift-evolution/blob/NNNN-extend-property-wrappers-to-functions-and-closures-amended/proposals/0293-extend-property-wrappers-to-function-and-closure-parameters.md): *Extend Property Wrappers to Function and Closure Parameters* pitch. + +> * Passing a projected value using the `$` calling syntax is supported via `init(projectedValue:)`. +> * The type of the unapplied function reference uses the wrapped-value type by default. Referencing the function using the projected-value type is supported by writing `$` in front of the argument label, or `$_` if there is no argument label. +> * Closures with property-wrapper parameters have the same semantics as unapplied function references. +> * Additional arguments in the wrapper attribute are supported, and these arguments have the same evaluation semantics as default function arguments. + +[Yim Lee](https://github.com/yim-lee/) [purposed](https://forums.swift.org/t/package-collection-signing/43855) an idea to add _signed_ package collections. + +> Since **Package Collections** ([SE-0291](https://github.com/apple/swift-evolution/blob/main/proposals/0291-package-collections.md)) can be created and published by anyone, issues related to authenticity and integrity may emerge. +> +> * Publishers can establish authenticity and protect their collections from tampering. +> * Users can choose and consume collections based on trust guarantees and therefore help prevent package collections from being used as an attack vector. + +[Chris Lattner](https://twitter.com/clattner_llvm) [informed](https://forums.swift.org/t/pitch-3-concurrentvalue-and-concurrent-closures/43947) the community about updates to the `ConcurrentValue` and `@concurrent` closures pitch. + +> After a long hiatus due to the holidays and other constraints, I was able to incorporate [a bunch of feedback](https://forums.swift.org/t/pitch-2-protocol-based-actor-isolation/42123/) (primarily from [Doug](https://forums.swift.org/t/preventing-data-races-in-the-swift-concurrency-model/43175)) into [the old ActorSendable proposal](https://docs.google.com/document/d/1BEO6QwzcYCUhaGyA-WRoM_phRa7O7mGPNIMdSV4StEE/edit) -- largely rewriting it in the process. + +[Mishal Shah](https://twitter.com/mishaldshah/) [let folks know](https://forums.swift.org/t/updating-llvm-project-swift-main-branch/44019) that an update will be performed to the `swift/main` branch for `apple/llvm-project` repository. + +[Cory Benfield](https://twitter.com/Lukasaoz) [announced](https://forums.swift.org/t/introducing-swift-http-structured-headers/44041) a new project: [Swift HTTP Structured Headers](https://github.com/apple/swift-http-structured-headers) - a brand-new package that enables the Swift HTTP ecosystem to take advantage of new work being done by the IETF HTTP Working Group. + +> HTTP Structured Header fields are [a draft specification](https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-19) being worked on by the IETF. They provide a set of data types and algorithms for handling HTTP header field values in a consistent way, allowing a single parser and serializer to handle a wide range of header field values. Working with HTTP header fields in the absence of Structured Header Fields often requires separate parsers and serialisers for each individual field, leading to a proliferation of parsers and serializers. Structured Header Fields address this head-on, defining a common base language for defining header fields going forward. + +[Doug Gregor](https://twitter.com/dgregor79) updated the community regarding the revised [actor proposal](https://github.com/DougGregor/swift-evolution/blob/actors/proposals/nnnn-actors.md). + +> * Added a discussion of the tradeoffs with actor reentrancy, performance, and deadlocks, with various examples, and the addition of new attribute `@reentrant(never)` to disable reentrancy at the actor or function level. +> * Removed global actors; they will be part of a separate document. +> * Separated out the discussion of data races for reference types. +> * Allow asynchronous calls to synchronous actor methods from outside the actor. +> * Removed the `Actor` protocol; we'll tackle customizing actors and executors in a separate proposal. +> * Clarify the role and behavior of actor-independence. +> *Add a section to "Alternatives Considered" that discusses actor inheritance. +> * Replace "actor class" with "actor". + +(Kavon Farvardin)[https://twitter.com/call1cc] shared [a proposal](https://forums.swift.org/t/pitch-effectful-read-only-properties/44090) that allows some properties to have effects specifiers (`throws` and `async`) added to them. + +> Nominal types such as classes, structs, and enums in Swift support [computed properties](https://docs.swift.org/swift-book/LanguageGuide/Properties.html), which are members of the type that invoke programmer-specified computations when getting or setting them; instead of being tied to storage like stored properties. The recently accepted proposal [SE-0296](https://github.com/kavon/swift-evolution/blob/main/proposals/0296-async-await.md) introduced asynchronous functions via `async`, in conjunction with `await`, but did not specify that computed properties can support effects like asynchrony. Furthermore, to take full advantage of `async` properties, the ability to specify that a property `throws` is also important. This document aims to partially fill in this gap by proposing a syntax and semantics for effectful read-only computed properties. + +[Daniel Duan](https://forums.swift.org/u/duan) [pitched](https://forums.swift.org/t/idea-bytes-literal/44124) the idea of "bytes literals". + +> I think Swift should have "bytes literals", supported by the compiler, as well as the standard library. Both `'hello'` and `'\x68\x65\x6C\x6C\x6F'` would be valid bytes literals, representing the same value. +> +> **What _is_ a byte literal?** +> They are similar to literals for strings/integers/bools. The standard library would provide similar treatment as for other literals. Specifically: +> +> * Byte - Signless 8-bit value, not an int but has bit-twiddling facilities +> * Bytes - Collection of bytes with continuous storage: random access, range replaceable, etc. +> * `ExpressibleByBytesLiteral`, `BytesLiteralType` + +[Rintaro Ishizaki](https://forums.swift.org/u/rintaro) pitched [a feature](https://forums.swift.org/t/if-for-postfix-member-expressions/44159) that expands `#if` functionality to postfix member expressions. Aan update-version of this proposal will be kept [here](https://github.com/rintaro/swift-evolution/blob/proposal-postfix-ifconfig-expressions/proposals/NNNN-postfix-ifconfig-expressions.md) and implementation [here](https://github.com/apple/swift/pull/35097). + +> Swift has conditional compilation block `#if ... #endif` which allows code to be conditionally compiled depending on the value of one or more compilation conditions. Currently, unlike `#if` in C family languages, the body of each clause must surround complete statements. However, in some cases, especially in result builder contexts, demand for applying `#if` to partial expressions has emerged. This proposal expands `#if ... #endif` to be able to surround postfix member expressions. + +[Michael Ilseman](https://twitter.com/ilseman) updated us about version 2 of the `FilePath` APIs. + +> `FilePath` appeared in [System 0.0.1](https://github.com/apple/swift-system/releases/tag/0.0.1) with a minimal API. This proposal adds API for _syntactic operations_, which are performed on the structure of the path and thus do not consult with the file system or make any system calls. These include inspecting the structure of paths, modifying paths, and accessing individual components. +> +> Additionally, this proposal greatly expands Windows support and enables writing platform-agnostic path manipulation code. + +[Nate Cook](https://twitter.com/nnnnnnnn) pitched [an idea](https://forums.swift.org/t/renaming-subranges-where-of/44226) to rename the `subranges(where:)` and `subranges(of:)` methods, approved as part of [SE-0270](https://github.com/apple/swift-evolution/blob/master/proposals/0270-rangeset-and-collection-operations.md), to `indices(where:)` and `indices(of:)`. + +> The two methods in questions will be renamed to `indices(where:)` and `indices(of:)`. In addition to solving the problem described above, this brings these methods inline with their documentation, which describes the methods as returning the indices of the matching elements. + +### Finally + +[TDD](https://twitter.com/jckarter/status/1354460688740061185): [Thirsty Driven Development](https://twitter.com/jesse_squires?lang=en) From 5ce8297a459ee172a50637ce167a41ca64c9be3c Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 20:34:05 +0200 Subject: [PATCH 429/589] Mvoe to posts --- {_drafts => _posts}/2021-01-28-issue-177.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2021-01-28-issue-177.md (100%) diff --git a/_drafts/2021-01-28-issue-177.md b/_posts/2021-01-28-issue-177.md similarity index 100% rename from _drafts/2021-01-28-issue-177.md rename to _posts/2021-01-28-issue-177.md From 73c2f7caa87a98cc2af88f246f0eeabfef748892 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 28 Jan 2021 20:55:23 +0200 Subject: [PATCH 430/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 71948123..9bd0f80b 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -61,7 +61,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| | January 28 | Taken | -| February 11 | Open | +| February 11 | Taken | | February 25 | Open | | March 11 | Open | | March 25 | Open | From 0620399911d85e98114f702e1b1727977a49841d Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Tue, 9 Feb 2021 10:52:00 +0000 Subject: [PATCH 431/589] Update Gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4656b95a..dec7bb43 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -257,7 +257,7 @@ GEM rchardet (1.8.0) rexml (3.2.4) rouge (3.26.0) - ruby-enum (0.8.0) + ruby-enum (0.9.0) i18n ruby2_keywords (0.0.4) rubyzip (2.3.0) From 968d6a278e3ca75c43d91bd316b30eaa983974db Mon Sep 17 00:00:00 2001 From: basthomas <BasThomas@users.noreply.github.com> Date: Thu, 11 Feb 2021 10:24:58 +0000 Subject: [PATCH 432/589] Update Gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index dec7bb43..196e63b9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.3.4) + activesupport (6.0.3.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) From b0faab0c4e2e6946b7078aabb4718e123d11d5c3 Mon Sep 17 00:00:00 2001 From: Zev Eisenberg <zev@zeveisenberg.com> Date: Thu, 11 Feb 2021 11:30:01 -0500 Subject: [PATCH 433/589] Fix markdown link syntax. (#592) Co-authored-by: Kristaps Grinbergs <fassko@gmail.com> --- _posts/2021-01-28-issue-177.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2021-01-28-issue-177.md b/_posts/2021-01-28-issue-177.md index 414642ff..7a53b0a1 100644 --- a/_posts/2021-01-28-issue-177.md +++ b/_posts/2021-01-28-issue-177.md @@ -114,7 +114,7 @@ to the respective protocols. > *Add a section to "Alternatives Considered" that discusses actor inheritance. > * Replace "actor class" with "actor". -(Kavon Farvardin)[https://twitter.com/call1cc] shared [a proposal](https://forums.swift.org/t/pitch-effectful-read-only-properties/44090) that allows some properties to have effects specifiers (`throws` and `async`) added to them. +[Kavon Farvardin](https://twitter.com/call1cc) shared [a proposal](https://forums.swift.org/t/pitch-effectful-read-only-properties/44090) that allows some properties to have effects specifiers (`throws` and `async`) added to them. > Nominal types such as classes, structs, and enums in Swift support [computed properties](https://docs.swift.org/swift-book/LanguageGuide/Properties.html), which are members of the type that invoke programmer-specified computations when getting or setting them; instead of being tied to storage like stored properties. The recently accepted proposal [SE-0296](https://github.com/kavon/swift-evolution/blob/main/proposals/0296-async-await.md) introduced asynchronous functions via `async`, in conjunction with `await`, but did not specify that computed properties can support effects like asynchrony. Furthermore, to take full advantage of `async` properties, the ability to specify that a property `throws` is also important. This document aims to partially fill in this gap by proposing a syntax and semantics for effectful read-only computed properties. From 143bcc3f8e121862b0060d1ebc8b8c520b815ccb Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 11 Feb 2021 19:25:14 +0200 Subject: [PATCH 434/589] Issue 178 draft (#593) Co-authored-by: Jared <JaredHalpern@users.noreply.github.com> Co-authored-by: Morgan <send.morgan@gmail.com> --- _drafts/2021-02-11-issue-178.md | 113 ++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 _drafts/2021-02-11-issue-178.md diff --git a/_drafts/2021-02-11-issue-178.md b/_drafts/2021-02-11-issue-178.md new file mode 100644 index 00000000..3f3cad96 --- /dev/null +++ b/_drafts/2021-02-11-issue-178.md @@ -0,0 +1,113 @@ +--- +layout: post +title: ! 'Issue #178' +author: fassko +sponsor: + link: https://duckduckgo.applytojob.com/apply/oEuc5CypGM + heading: DuckDuckGo is Hiring iOS Mobile Developers + body: DuckDuckGo are on the hunt for senior iOS engineers to help shape the technology that powers the DuckDuckGo search experience. If you’re an engineer that enjoys the autonomy of leading projects and questioning the status quo this could be the perfect role for you. We’re a globally distributed team so regardless of where you’re based we’d love to hear from you. + displaylink: duckduckgo.applytojob.com +--- + +The last two weeks passed by so quickly! I've been busy with a new project, launching this week, and I've been exploring SwiftUI 2 new features like `LazyVStack`, `LazyHGrid`, `@StateObject` and more. So far, I love it a lot. + +In the interim, Apple released Xcode 12.5 Beta, which includes many important additions and fixes for the Swift language. We still need to wait a little longer for `async`/`await`, but it's getting closer. + +As always, thank you for supporting this newsletter. We are looking for all kinds of assistance - [financial](/sponsorship/), putting together new issues, or [contributing](https://github.com/SwiftWeekly/.github/blob/master/CONTRIBUTING.md) to improve the site. If there's something you think you can do, we'd love to hear from you. + +Now, straight to the news! + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-14137](https://bugs.swift.org/browse/SR-14137) [C++] Cache failed imports. + +### News and community + +[Xcode 12.5](https://developer.apple.com/documentation/xcode-release-notes/xcode-12_5-beta-release-notes#Swift) Beta has been released with some new and notable Swift features and issues resolved. + +[Tomer Doron](https://github.com/tomerd) announced [Swift 5.3.3 for Linux and Windows](https://forums.swift.org/t/announcing-swift-5-3-3-for-linux-and-windows/44258). + +[Paul Hudson](https://twitter.com/twostraws) wrote [an article](https://www.hackingwithswift.com/articles/228/whats-new-in-swift-5-4) explaining what's new in Swift 5.4. + +### Commits and pull requests + +[Andrew Trick](https://github.com/atrick) merged [a pull request](https://github.com/atrick) that adds `PhiOperand` and `PhiValue` types. + +[Adrian Prantl](https://github.com/adrian-prantl) merged [a pull request](https://github.com/apple/swift/pull/35444) that adds debug info support for boxed arguments in `async` functions and fixes [SR-14059](https://bugs.swift.org/browse/SR-14059). + +[Doug Gregor](https://twitter.com/dgregor79) merged [a pull request](https://github.com/apple/swift/pull/35784) that enables `async`/`await` by default. + +### Returned proposals + +[SE-0299](https://github.com/apple/swift-evolution/blob/main/proposals/0293-extend-property-wrappers-to-function-and-closure-parameters.md) has been [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0299-extending-static-member-lookup-in-generic-contexts/44466). + +> The review period for [SE-0299: Extending Static Member Lookup in Generic Contexts](https://forums.swift.org/t/se-0299-extending-static-member-lookup-in-generic-contexts/43958) has concluded. The core team has decided to **return this proposal for revision**. We agree that extending `.leadingDot` contextual member lookup to work in generic contexts fits well with the direction of Swift, and that extending it to find members from protocol extensions corresponding to constraints on the generic context is a reasonable incremental expansion of the existing model. However, the core team is concerned about the potential for namespace pollution when using this new feature as exemplified in the proposal, an issue the review discussion also raised concerns about, and would like to see the proposal revised to address this concern. + +[SE-0295](https://github.com/apple/swift-evolution/blob/main/proposals/0295-codable-synthesis-for-enums-with-associated-values.md) has been [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0295-codable-synthesis-for-enums-with-associated-values/44653). + +> We agree that having a default `Coding` synthesis for `enum`s with payloads is valuable. Although the encoding may not be perfect for every use case, the default encoding is still valuable as it simplifies the cases where the encoding is sufficient. For the other use cases, the user is still able define the synthesis as they could previously. +> +> Furthermore, the extensibility of `Codable` is beyond the scope of this proposal as is the "readability" of the serialization itself. The design choices of `Codable` are not grounds for preventing improvements to serialization in Swift. + +### Proposals in review + +[SE-0300](https://github.com/apple/swift-evolution/blob/main/proposals/0300-continuation.md): *Continuations for interfacing async tasks with synchronous code* is [under the second review](https://forums.swift.org/t/se-0300-second-review-continuations-for-interfacing-async-tasks-with-synchronous-code/44366). + +> Asynchronous Swift code needs to be able to work with existing synchronous code that uses techniques such as completion callbacks and delegate methods to respond to events. Asynchronous tasks can suspend themselves on continuations which synchronous code can then capture and invoke to resume the task in response to an event. +> ... +> Following the [first review](https://forums.swift.org/t/se-0300-continuations-for-interfacing-async-tasks-with-synchronous-code/) of this proposal, the core team feels that this is a good addition to the language, and is an important feature as part of Swift's concurrency roadmap. However, a number of clarifications to the proposal resulted from the first review, and so a second review of this clarified proposal is being conducted. + +[SE-0301](https://github.com/apple/swift-evolution/blob/main/proposals/0301-package-editing-commands.md): *Package Editor Commands* is [under a review](https://forums.swift.org/t/se-0301-package-editor-commands/44447). + +> Because Swift package manifests are written in Swift using the PackageDescription API, it is difficult to automate common tasks like adding a new product, target, or dependency. This proposal introduces new `swift package` subcommands to perform some common editing tasks which can streamline users' workflows and enable new higher-level tools. + +[SE-0299](https://github.com/apple/swift-evolution/blob/main/proposals/0299-extend-generic-static-member-lookup.md): *Extending Static Member Lookup in Generic Contexts* is [under the second review](https://forums.swift.org/t/se-0299-second-review-extending-static-member-lookup-in-generic-contexts/44565). + +> Using static member declarations to provide semantic names for commonly used values which can then be accessed via leading dot syntax is an important tool in API design, reducing type repetition and improving call-site legibility. Currently, when a parameter is generic, there is no effective way to take advantage of this syntax. This proposal aims to relax restrictions on accessing static members on protocols to afford the same call-site legibility to generic APIs. + +### Swift Forums + +[Doug Gregor](https://twitter.com/dgregor79) [updated us](https://forums.swift.org/t/pitch-3-actors/44470) about about the third **Actors** pitch. + +> After yet more interesting discussion in [pitch #2](https://forums.swift.org/t/pitch-2-actors/44094), we've revised the [actor proposal](https://github.com/DougGregor/swift-evolution/blob/actors/proposals/nnnn-actors.md) for this, pitch #3. +> +> Changes in the third pitch: +> +> * Narrow the proposal down to only support re-entrant actors. Capture several potential non-reentrant designs in the Alternatives Considered as possible future extensions. +> * Replaced `@actorIndependent` attribute with a `nonisolated` modifier, which follows the approach of `nonmutating` and ties in better with the "actor isolation" terminology (thank you to Xiaodi Wu for the suggestion). +> * Replaced "queue" terminology with the more traditional "mailbox" terminology, to try to help alleviate confusion with Dispatch queues. +> * Introduced "cross-actor reference" terminology and the requirement that cross-actor references always traffic in `ConcurrentValue` types. This goes along with the [latest pitch on `ConcurrentValue`](https://forums.swift.org/t/pitch-4-concurrentvalue-and-concurrent-closures-evolution-pitches/44446). +> * Reference `@concurrent` function types from their separate proposal (which his the same proposal as `ConcurrentValue`). +> * Moved Objective-C interoperability into its own section. +> * Clarify the "class-like" behaviors of actor types, such as satisfying an `AnyObject` conformance. + +[Chris Lattner](https://twitter.com/clattner_llvm) [pitched](https://forums.swift.org/t/pitch-4-concurrentvalue-and-concurrent-closures-evolution-pitches/44446) the fourth draft of **ConcurrentValue and `@concurrent` closures Evolution**. + +> Thank you for all the great feedback on the proposal. Doug and I have been iterating on it a bit and have a [draft #4](https://docs.google.com/document/d/1m2fLLq9_ArY1ySt108soxOZNX7XT0ixMlNLFK08789M/edit#) up. My sense is that this is getting close to convergence for a formal review. + +[John McCall](https://twitter.com/pathofshrines) pitched [an idea](https://forums.swift.org/t/support-custom-executors-in-swift-concurrency/44425) to add support custom executors in Swift concurrency. + +> It is sometimes important to control exactly how code is executed. This proposal lays out a system of custom executors which can schedule and run opaque jobs, and it describes how actors and tasks can be directed to run on a specific executor. +> +> Motivation +> Swift's concurrency design is intentionally vague about the details of how code is actually run. Most code does not rely on specific properties of the execution environment, such as being run to a specific operating system thread, and instead needs only high-level semantic properties, such as that no other code will be accessing certain variables concurrently. Maintaining flexibility about how work is scheduled onto threads allows Swift to avoid certain performance pitfalls by default. + +[Joe Groff](https://twitter.com/jckarter) [informed us](https://forums.swift.org/t/pitch-3-structured-concurrency/44496) about another revision of the [Structured Concurrency proposal](https://github.com/DougGregor/swift-evolution/blob/eb149799aac93b3fb84a97adb2bb3db47179a21b/proposals/nnnn-structured-concurrency.md). + +[Chris Lattner](https://twitter.com/clattner_llvm) [expressed](https://forums.swift.org/t/exploration-type-system-considerations-for-actor-proposal/44540) his [concerns](https://docs.google.com/document/d/1rka0MkYMQ31EhtmCO-ZEHw1zar5M3ZzA6oBitcf-cYg/edit#) about the actor proposal. + +[Morten Bek Ditlevsen](https://forums.swift.org/u/morten_bek_ditlevsen) pitched [an idea](https://forums.swift.org/t/pitch-allow-coding-of-non-string-int-keyed-dictionary-into-a-keyedcontainer/44593) that solves an issue with the current state of `Dictionary` encoding and decoding. + +> The current conformance of Swift's `Dictionary` to the `Codable` protocols has a somewhat-surprising limitation in that dictionaries whose key type is not `String` or `Int` (values directly representable in `CodingKey` types) encode not as `KeyedContainer`s but as `UnkeyedContainer`s. This behavior has caused much confusion for users and I would like to offer a way to improve the situation. + +[George](https://forums.swift.org/u/george) proposed [a solution](https://forums.swift.org/t/new-de-en-codingcontainer-types-to-support-enums-with-associated-types-and-tuples/44647) for how to fix the issue of automatic `Codable` synthesis for enums with associated types. + +> I think we can solve both of these issues by introducing four new codable container types: `Tagged{En,De}codingContainer<Tag>`, and `Tuple{En,De}codingContainer<Tag>`. + +### Finally + +[Typical swifts](https://twitter.com/stu_bot3000/status/1356921895883571200). From 2f4c34bc08b4b7a797c5273867e67dd3c7bd8b2f Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 11 Feb 2021 19:28:56 +0200 Subject: [PATCH 435/589] Move post from drafts --- {_drafts => _posts}/2021-02-11-issue-178.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2021-02-11-issue-178.md (100%) diff --git a/_drafts/2021-02-11-issue-178.md b/_posts/2021-02-11-issue-178.md similarity index 100% rename from _drafts/2021-02-11-issue-178.md rename to _posts/2021-02-11-issue-178.md From 574ef7b95f9412c061e8b2854105686b77245f68 Mon Sep 17 00:00:00 2001 From: Zev Eisenberg <zev@zeveisenberg.com> Date: Fri, 12 Feb 2021 11:05:05 -0500 Subject: [PATCH 436/589] Fix pull request link. (#596) --- _posts/2021-02-11-issue-178.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2021-02-11-issue-178.md b/_posts/2021-02-11-issue-178.md index 3f3cad96..4db3fb92 100644 --- a/_posts/2021-02-11-issue-178.md +++ b/_posts/2021-02-11-issue-178.md @@ -35,7 +35,7 @@ Now, straight to the news! ### Commits and pull requests -[Andrew Trick](https://github.com/atrick) merged [a pull request](https://github.com/atrick) that adds `PhiOperand` and `PhiValue` types. +[Andrew Trick](https://github.com/atrick) merged [a pull request](https://github.com/apple/swift/pull/35677) that adds `PhiOperand` and `PhiValue` types. [Adrian Prantl](https://github.com/adrian-prantl) merged [a pull request](https://github.com/apple/swift/pull/35444) that adds debug info support for boxed arguments in `async` functions and fixes [SR-14059](https://bugs.swift.org/browse/SR-14059). From fef83719bc9643cf467b3ca5b40fcb5edb6aa752 Mon Sep 17 00:00:00 2001 From: Bas Broek <bas@basbroek.nl> Date: Mon, 22 Feb 2021 00:28:09 +0000 Subject: [PATCH 437/589] Update Gemfile.lock --- Gemfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 196e63b9..38929029 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,8 +62,8 @@ GEM gemoji (3.0.1) git (1.8.1) rchardet (~> 1.8) - github-pages (211) - github-pages-health-check (= 1.16.1) + github-pages (212) + github-pages-health-check (= 1.17.0) jekyll (= 3.9.0) jekyll-avatar (= 0.7.0) jekyll-coffeescript (= 1.1.1) @@ -106,11 +106,11 @@ GEM nokogiri (>= 1.10.4, < 2.0) rouge (= 3.26.0) terminal-table (~> 1.4) - github-pages-health-check (1.16.1) + github-pages-health-check (1.17.0) addressable (~> 2.3) dnsruby (~> 1.60) octokit (~> 4.0) - public_suffix (~> 3.0) + public_suffix (>= 2.0.2, < 5.0) typhoeus (~> 1.3) html-pipeline (2.14.0) activesupport (>= 2) @@ -249,7 +249,7 @@ GEM open4 (1.3.4) pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (3.1.1) + public_suffix (4.0.6) racc (1.5.2) rb-fsevent (0.10.4) rb-inotify (0.10.1) From ccfbcd2c2166129e5f2ba8fb4438a8d0ecc8f7d4 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 25 Feb 2021 20:13:33 +0200 Subject: [PATCH 438/589] Issue #179 draft (#598) Co-authored-by: Morgan <send.morgan@gmail.com> Co-authored-by: Jared <JaredHalpern@users.noreply.github.com> --- Gemfile.lock | 2 +- _drafts/2021-02-25-issue-179.md | 124 ++++++++++++++++++++++++++++++++ new_draft.sh | 2 +- 3 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 _drafts/2021-02-25-issue-179.md diff --git a/Gemfile.lock b/Gemfile.lock index 38929029..15cbcbe1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -237,7 +237,7 @@ GEM jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.14.3) + minitest (5.14.4) multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) diff --git a/_drafts/2021-02-25-issue-179.md b/_drafts/2021-02-25-issue-179.md new file mode 100644 index 00000000..d6e94cd9 --- /dev/null +++ b/_drafts/2021-02-25-issue-179.md @@ -0,0 +1,124 @@ +--- +layout: post +title: ! 'Issue #179' +author: fassko +sponsor: + link: TODO + heading: TODO + body: TODO + displaylink: TODO +--- + +This month we are [celebrating](https://swift.org/blog/black-history-month/) Black History Month, which makes this a good time to recognize those Swift community members who have had a tremendous impact on all of us. I want to thank them and everyone else who enriches and moves our community forward. + +It's sad to see that [Swift for TensorFlow](https://github.com/tensorflow/swift) has been archived. On a positive note, the project shows us that Swift can be used for advanced experiments in machine learning. + +Lately, I have been enjoying discussions on [Clubhouse](https://www.joinclubhouse.com), the drop-in audio chat app. There is already a large Swift community putting on events like Ladies Who Code, daily get-togethers, interview coaching, even teaching Swift — thanks to [Stephanie Chiu](https://twitter.com/stephanielatte_), [Ting Becker](https://twitter.com/Teekachu1), [Vivian Phung](https://twitter.com/vivianphung), [Paul Hudson](https://twitter.com/twostraws), and [Majid Jabrayilov](https://twitter.com/mecid) for setting up some of these rooms. + +We still have several [sponsorship slots](/sponsorship) available. Please reach out to me [through email](mailto:fassko@gmail.com), or [say hello on Twitter](https://twitter.com/swiftlybrief). + +Thank you. Now it's time for the news! + +<!--excerpt--> + +{% include sponsor.html %} + +### Starter tasks + +- [SR-14221](https://bugs.swift.org/browse/SR-14221) [Compiler] Add tricky parsing test case. + +### News and community + +[Holly Borla](https://twitter.com/hollyborla) and [Kristina Fox +](https://twitter.com/krstnfx/) wrote an [excellent article](https://swift.org/blog/black-history-month/) celebrating Black History Month. They have curated a handful of outstanding contributions from the Black Swift community to acknowledge and celebrate their impact on the Swift ecosystem. + +The Swift language has been included in the [Google Summer of Code](https://summerofcode.withgoogle.com/) this year again. The program is currently collecting ideas, matching them with mentors, and slowly putting them up on the (work in progress) [Swift.org - Project Ideas for GSoC 2021](https://swift.org/gsoc2021/) site. + +Robert Pieta shared a great [article](https://www.advancedswift.com/typealias-examples/) explaining variable, tuple, closure, and generic typealias in Swift. + +[Tibor Bödecs](https://twitter.com/tiborbodecs) wrote an article explaining the Swift compiler for beginners. + +### Commits and pull requests + +[Luciano Almeida](https://github.com/LucianoPAlmeida) merged [a pull request](https://github.com/apple/swift/pull/36076) that implements a rule on ranking where overload choices that have `@autoclosure` parameters are disfavored over the ones that aren't to avoid ambiguity and resolves [SR-2705](https://bugs.swift.org/browse/SR-2705). + +[Konrad Malawski](https://github.com/ktoso) merged [a pull request](https://github.com/apple/swift/pull/36032) that implements `withCancellationHandler`. + +### Accepted proposals + +[SE-0301](https://github.com/apple/swift-evolution/blob/main/proposals/0301-package-editing-commands.md): *Package Editor Commands* was [[accepted with modifications](https://forums.swift.org/t/accepted-with-modification-se-0296-async-await/43318](https://forums.swift.org/t/accepted-with-modification-se-0301-package-editor-commands/45069)). + +> The feedback from the [pitch](https://forums.swift.org/t/pitch-package-editor-commands/) and [review](https://forums.swift.org/t/se-0301-package-editor-commands/) has been enthusiastically positive and the proposal has been accepted with a few minor revisions: +> +> 1. Change comma delimited arguments to space delimited. +> 2. Add `—to` and `—through` flags to `add-dependency` command. +> 3. Add information in the "alternatives considered" about alternative command spelling and their tradeoffs. + +### Returned proposals + +[SE-0293](https://github.com/apple/swift-evolution/blob/main/proposals/0293-extend-property-wrappers-to-function-and-closure-parameters.md) has been [returned for revision](https://forums.swift.org/t/returned-for-revision-2-se-0293-extend-property-wrappers-to-function-and-closure-parameters/44832). + +> The improvements from the first draft are significant and addressed all of the concerns from the first round of core team feedback. Community feedback was very positive, including a number of useful discussions and clarifications. While the proposal is very close, the core team would like more exploration of one specific topic: protocol conformance with property wrappers. +> +> The core team feels that property wrappers on functions should compose (somehow) with protocol requirements. The overall model explained in the proposal is that the exposed function type does not have the wrappers on it. One approach would be to be consistent with that where implementations with wrappers on them would fulfill the projected types, an alternate approach would allow fulfilling requirements with the wrapped types. Either way, the core team feels that this should be defined as part of the proposal. + +### Proposals in review + +[SE-0291](https://github.com/apple/swift-evolution/blob/main/proposals/0300-continuation.md): *Package Collection Signing* is [under a review](https://forums.swift.org/t/amendment-se-0291-package-collection-signing/44887). + +> The [amendment](https://github.com/apple/swift-evolution/pull/1270) was requested by the core team to reflect the security model for package collections as discusses in a recent [discussion thread](https://forums.swift.org/t/package-collection-signing/) on the topic. The goal of the amendment is to provide transparency and document that security model. + +[SE-0302](https://github.com/apple/swift-evolution/blob/main/proposals/0302-concurrent-value-and-concurrent-closures.md): *ConcurrentValue and `@concurrent` closures* is [under a review](https://forums.swift.org/t/se-0302-concurrentvalue-and-concurrent-closures/44919). + +> The [Swift Concurrency Roadmap](https://forums.swift.org/t/swift-concurrency-roadmap/41611/) was recently announced, and a key goal of that roadmap is to “provide a mechanism for isolating state in concurrent programs to eliminate data races.” Such a mechanism will be a major progression for widely used programming languages — most of them provide concurrent programming abstractions in a way that subjects programmers to a wide range of bugs, including race conditions, deadlocks and other problems. +> +> This proposal describes an approach to address one of the challenging problems in this space — how to type check value passing between structured concurrency constructs and actors messages. As such, this is a unifying theory that provides some of the underlying type system mechanics that make them both safe and work well together. +> +> This implementation approach involves marker protocols named `ConcurrentValue` and `UnsafeConcurrentValue`, as well as a `@concurrent` attribute that may be applied to functions. + +### Swift Forums + +[Zoe Carver](https://forums.swift.org/u/zoecarver) [updated](https://forums.swift.org/t/a-short-term-roadmap-for-c-interop/44768) the short-term roadmap for C++ interop. + +> My primary goal over the next few months will be to fully import libc++ headers, LLVM headers, and Swift headers without crashing. This doesn't mean we'll necessarily be able to use any of these APIs, just that we'll be able to load the headers without crashing or having other errors. Ideally, we won't regress in terms of what C++ programs we can accept. +> +> This should be mostly compiler bug fixes. However, there will be some larger projects, such as making all the headers we plan to use self-contained. + +[Holly Borla](https://twitter.com/hollyborla) [informed](https://forums.swift.org/t/pitch-4-se-0293-extend-property-wrappers-to-function-and-closure-parameters/44858) us about updates to [SE-0293](https://github.com/hborla/swift-evolution/blob/se-0293-revision-3/proposals/0293-extend-property-wrappers-to-function-and-closure-parameters.md). + +> * The distinction between property wrappers that are API and property wrappers that are implementation detail is formalized via the `api` option in the `@propertyWrapper` attribute, i.e. `@propertyWrapper(api)` +> * Implementation-detail property wrappers on parameters are sugar for a local wrapped variable. +> * API-level property wrappers on parameters use caller-side application of the property wrapper. The design of API-level property wrappers attached to parameters is the same as the previous revision of SE-0293. +> * Overload resolution for property wrapper initializers will always be done at the property wrapper declaration. + +[Slava Pestov](https://twitter.com/slava_pestov) pitched [a proposal](https://forums.swift.org/t/pitch-fix-rethrows-checking-and-add-rethrows-unsafe/44863) that fixes a soundness hole in `rethrows` checking, and introduces a new `rethrows(unsafe)` escape hatch for situations where a function has the correct behavior at runtime, but the compiler is unable to prove that this is the case. + +[Anders Bertelrud](https://forums.swift.org/u/abertelrud) pitched [a proposal](https://forums.swift.org/t/pitch-swiftpm-extensible-build-tools/44715) to add SwiftPM Extensible build tools. + +> Because extensibility is a broad topic and there are a wide variety of needs, this proposal takes the approach of: +> +> 1. Providing a way for packages to implement extensions and letting them define the capabilities of those extensions +> 2. Providing a way for packages to vend extensions to other packages (or choose to keep them as a private implementation detail of the package) +> 3. Providing an initial set of extension capabilities that is narrowly focused on source generation and analysis, which seems to be one of the most common needs today + +[Johannes Weiss](https://twitter.com/johannesweiss/) shared Swift on the Server Workgroup [January 6, 2021 meeting notes](https://forums.swift.org/t/january-6-2021/44908). + +[Xiaodi Wu](https://forums.swift.org/u/xwu) pitched [a proposal](https://forums.swift.org/t/exponentiation-operator-and-precedence-group/44895) to add an exponentiation operator and precedence group. + +> We propose the addition of `**` as the exponentiation operator, assigned to a precedence group named `ExponentiationPrecedence` that is higher than `MultiplicationPrecedence`. + +[Tim Condon](https://twitter.com/0xTim) shared news from the Vapor team that they are [renaming the default branch](https://forums.swift.org/t/vapor-branch-renaming/45017) and an update describing how they [found and fixed](https://forums.swift.org/t/vapor-4-40-1-denial-of-service-vulnerability-in-the-metrics-integration/44985) a vulnerability in Vapor's Swift Metrics integration. + +[Holly Borla](https://twitter.com/hollyborla) informed us that [Filip Sakel](https://forums.swift.org/u/filip-sakel) has revised the design of SE-0293 again, and the latest proposal draft is available [here](https://github.com/hborla/swift-evolution/blob/se-0293-revision-3/proposals/0293-extend-property-wrappers-to-function-and-closure-parameters.md). + +> Here is a list of changes to the design in this revision (compared to the last reviewed version): +> +> * The distinction between API wrappers and implementation-detail wrappers is formalized, and determined by the compiler based on whether the property wrapper type allows the call-site to pass a different type of argument. +> * Implementation-detail property wrappers on parameters are sugar for a local wrapped variable. +> * API property wrappers on parameters use caller-side application of the property wrapper. +> * Overload resolution for property wrapper initializers will always be done at the property wrapper declaration to minimize the semantic differences between the two property wrapper models. + +### Finally + +* [`then`](https://twitter.com/jckarter/status/1359983768488955904) +* [souiphte](https://twitter.com/gregheo/status/1361589553463664640) diff --git a/new_draft.sh b/new_draft.sh index 1c2b616a..7ae3facc 100755 --- a/new_draft.sh +++ b/new_draft.sh @@ -62,7 +62,7 @@ sponsor: ### Starter tasks -> TODO +> TODO - [SR-](https://bugs.swift.org/browse/SR-) [] ### Podcasts From 8dddbcf71613c63a5b295b61c5ce740e8950bfb3 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Thu, 25 Feb 2021 20:15:34 +0200 Subject: [PATCH 439/589] Move draft to posts --- {_drafts => _posts}/2021-02-25-issue-179.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2021-02-25-issue-179.md (100%) diff --git a/_drafts/2021-02-25-issue-179.md b/_posts/2021-02-25-issue-179.md similarity index 100% rename from _drafts/2021-02-25-issue-179.md rename to _posts/2021-02-25-issue-179.md From 1a9782178927911f20c7fed72895f0fc54928477 Mon Sep 17 00:00:00 2001 From: Max Desiatov <max@desiatov.com> Date: Fri, 26 Feb 2021 20:58:23 +0000 Subject: [PATCH 440/589] Add a missing link to issue 179 (#600) --- _posts/2021-02-25-issue-179.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2021-02-25-issue-179.md b/_posts/2021-02-25-issue-179.md index d6e94cd9..2d1d2e85 100644 --- a/_posts/2021-02-25-issue-179.md +++ b/_posts/2021-02-25-issue-179.md @@ -36,7 +36,7 @@ The Swift language has been included in the [Google Summer of Code](https://summ Robert Pieta shared a great [article](https://www.advancedswift.com/typealias-examples/) explaining variable, tuple, closure, and generic typealias in Swift. -[Tibor Bödecs](https://twitter.com/tiborbodecs) wrote an article explaining the Swift compiler for beginners. +[Tibor Bödecs](https://twitter.com/tiborbodecs) wrote [an article explaining the Swift compiler for beginners](https://theswiftdev.com/the-swift-compiler-for-beginners/). ### Commits and pull requests From 865564380344216fd47ee60089d1a9258014628a Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Sat, 27 Feb 2021 00:04:21 +0200 Subject: [PATCH 441/589] Remove sponsor --- _posts/2021-02-25-issue-179.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/_posts/2021-02-25-issue-179.md b/_posts/2021-02-25-issue-179.md index d6e94cd9..28d86af8 100644 --- a/_posts/2021-02-25-issue-179.md +++ b/_posts/2021-02-25-issue-179.md @@ -2,11 +2,6 @@ layout: post title: ! 'Issue #179' author: fassko -sponsor: - link: TODO - heading: TODO - body: TODO - displaylink: TODO --- This month we are [celebrating](https://swift.org/blog/black-history-month/) Black History Month, which makes this a good time to recognize those Swift community members who have had a tremendous impact on all of us. I want to thank them and everyone else who enriches and moves our community forward. From b6800cad6002f8fa4ff17e3fc73cba8e150329a2 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Mon, 1 Mar 2021 23:08:12 +0200 Subject: [PATCH 442/589] Update sponsorship.md --- sponsorship.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index 9bd0f80b..4afa385d 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,9 +60,6 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| January 28 | Taken | -| February 11 | Taken | -| February 25 | Open | | March 11 | Open | | March 25 | Open | | April 8 | Open | From 0e9cd8db42893d5b4ea7eb1c1e378f641aa07b10 Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts <jeroen.leenarts@gmail.com> Date: Wed, 3 Mar 2021 08:52:59 +0100 Subject: [PATCH 443/589] Add landing pages for new newsletter backend. (#602) Co-authored-by: Kristaps Grinbergs <fassko@gmail.com> --- subscribed.html | 16 ++++++++++++++++ subscribedalready.html | 17 +++++++++++++++++ unsubscribed.html | 16 ++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 subscribed.html create mode 100644 subscribedalready.html create mode 100644 unsubscribed.html diff --git a/subscribed.html b/subscribed.html new file mode 100644 index 00000000..743c6f58 --- /dev/null +++ b/subscribed.html @@ -0,0 +1,16 @@ +--- +layout: default +title: Subscribed +--- + +<div class="row"> + <div class="col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> + <h2 class="text-center">{{ page.title }}</h2> + <p class="lead">Subscribe to our mailing list to get the best summary about what's happening in the Swift.org open source projects every week. + Published every other Thursday for free. + </p> + + <h3>Thank you for subscribing.</h3> + + </div> <!-- col --> +</div> <!-- row --> diff --git a/subscribedalready.html b/subscribedalready.html new file mode 100644 index 00000000..b13ca2b5 --- /dev/null +++ b/subscribedalready.html @@ -0,0 +1,17 @@ +--- +layout: default +title: Subscribed already +--- + +<div class="row"> + <div class="col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> + <h2 class="text-center">{{ page.title }}</h2> + <p class="lead">Subscribe to our mailing list to get the best summary about what's happening in the Swift.org open source projects every week. + Published every other Thursday for free. + </p> + + <h3>You are already subscribed.</h3> + <p>Either you are dying to see our next newsletter, or the last on got stuck in some spam filter. Please check yours if you think you did not receive our newsletter.</p> + + </div> <!-- col --> +</div> <!-- row --> diff --git a/unsubscribed.html b/unsubscribed.html new file mode 100644 index 00000000..4d0f552c --- /dev/null +++ b/unsubscribed.html @@ -0,0 +1,16 @@ +--- +layout: default +title: Undubscribed +--- + +<div class="row"> + <div class="col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> + <h2 class="text-center">{{ page.title }}</h2> + <p class="lead">Subscribe to our mailing list to get the best summary about what's happening in the Swift.org open source projects every week. + Published every other Thursday for free. + </p> + + <h3>Sorry to see you go, thank you for having been a subscriber to the Swift Weekly Brief newsletter.</h3> + + </div> <!-- col --> +</div> <!-- row --> From ad3f4607ff2f6dba047009cb746f9c428bd39ddc Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts <jeroen.leenarts@gmail.com> Date: Wed, 3 Mar 2021 11:09:34 +0100 Subject: [PATCH 444/589] Fix typo (#606) --- unsubscribed.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/unsubscribed.html b/unsubscribed.html index 4d0f552c..531ad7c2 100644 --- a/unsubscribed.html +++ b/unsubscribed.html @@ -1,15 +1,11 @@ --- layout: default -title: Undubscribed +title: Unsubscribed --- <div class="row"> <div class="col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2"> <h2 class="text-center">{{ page.title }}</h2> - <p class="lead">Subscribe to our mailing list to get the best summary about what's happening in the Swift.org open source projects every week. - Published every other Thursday for free. - </p> - <h3>Sorry to see you go, thank you for having been a subscriber to the Swift Weekly Brief newsletter.</h3> </div> <!-- col --> From 938db678ed5a2aac54a2f4c06fd9dcc060d79082 Mon Sep 17 00:00:00 2001 From: Federico Zanetello <zntfdr@gmail.com> Date: Wed, 3 Mar 2021 17:12:27 +0700 Subject: [PATCH 445/589] Remove extra char (#604) Co-authored-by: Kristaps Grinbergs <fassko@gmail.com> --- _posts/2021-02-25-issue-179.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2021-02-25-issue-179.md b/_posts/2021-02-25-issue-179.md index 72b7ae9a..993150b0 100644 --- a/_posts/2021-02-25-issue-179.md +++ b/_posts/2021-02-25-issue-179.md @@ -41,7 +41,7 @@ Robert Pieta shared a great [article](https://www.advancedswift.com/typealias-ex ### Accepted proposals -[SE-0301](https://github.com/apple/swift-evolution/blob/main/proposals/0301-package-editing-commands.md): *Package Editor Commands* was [[accepted with modifications](https://forums.swift.org/t/accepted-with-modification-se-0296-async-await/43318](https://forums.swift.org/t/accepted-with-modification-se-0301-package-editor-commands/45069)). +[SE-0301](https://github.com/apple/swift-evolution/blob/main/proposals/0301-package-editing-commands.md): *Package Editor Commands* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modification-se-0296-async-await/43318](https://forums.swift.org/t/accepted-with-modification-se-0301-package-editor-commands/45069)). > The feedback from the [pitch](https://forums.swift.org/t/pitch-package-editor-commands/) and [review](https://forums.swift.org/t/se-0301-package-editor-commands/) has been enthusiastically positive and the proposal has been accepted with a few minor revisions: > From 91c5cc000026e6850967a706810a2679c030d6f9 Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts <jeroen.leenarts@gmail.com> Date: Wed, 3 Mar 2021 11:30:22 +0100 Subject: [PATCH 446/589] Switch from Mailchimp to AppForce1 newsletter service. (#603) Co-authored-by: Kristaps Grinbergs <fassko@gmail.com> --- css/style.css | 47 +++++++++++++++++++++++++++++++++++++++++++++++ subscribe.html | 45 ++++++++++----------------------------------- 2 files changed, 57 insertions(+), 35 deletions(-) diff --git a/css/style.css b/css/style.css index 6bbfa035..bbd80cad 100644 --- a/css/style.css +++ b/css/style.css @@ -338,3 +338,50 @@ footer a, footer a:visited, font-size: 13px; } } + +#newsletter_signup form { + text-align: center; + padding: 10px 0 5px 0; +} + +#newsletter_signup input.email { + font-family: "Open Sans","Helvetica Neue",Arial,Helvetica,Verdana,sans-serif; + font-size: 15px; + border: 1px solid #ABB0B2; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + color: #343434; + background-color: #fff; + box-sizing: border-box; + height: 32px; + padding: 0px 0.4em; + display: inline-block; + margin: 0; + width: 350px; + vertical-align: top; +} + +#newsletter_signup .button { + font-size: 13px; + border: none; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + letter-spacing: .03em; + color: #fff; + background-color: #aaa; + box-sizing: border-box; + height: 32px; + line-height: 32px; + padding: 0 18px; + display: inline-block; + margin: 0; + transition: all 0.23s ease-in-out 0s; +} + +#newsletter_signup .button:hover { + background-color: #FF8300; + color: white; +} + diff --git a/subscribe.html b/subscribe.html index 3c6b9e79..4e393f65 100644 --- a/subscribe.html +++ b/subscribe.html @@ -10,40 +10,15 @@ <h2 class="text-center">{{ page.title }}</h2> Published every other Thursday for free. </p> - <!-- Begin MailChimp Signup Form --> - <div id="mc_embed_signup"> - <form action="https://github.us19.list-manage.com/subscribe/post?u=2951f6b6f2d9b152b48176dab&id=a881f89716" - method="post" - id="mc-embedded-subscribe-form" - name="mc-embedded-subscribe-form" - class="validate" - target="_blank" novalidate> - <div id="mc_embed_signup_scroll"> - <div class="form-group"> - <label for="mce-EMAIL">Email Address</label> - <input type="email" value="" name="EMAIL" class="form-control" id="mce-EMAIL" placeholder="Enter your email"> - </div> - - <div id="mce-responses" class="clear"> - <div class="response alert alert-danger" id="mce-error-response" style="display:none"></div> - <div class="response alert alert-success" id="mce-success-response" style="display:none"></div> - </div> - - <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> - <div style="position: absolute; left: -5000px;" aria-hidden="true"> - <input type="text" name="b_5230bf0236a0adb19995a2eb4_0d4b4bbe45" tabindex="-1" value=""> - </div> - - <div class="clear"> - <button type="submit" id="mc-embedded-subscribe" name="subscribe" class="btn btn-warning btn-lg btn-block">Subscribe</button> - </div> - <p class="text-center text-muted"><small>No spam, ever. You can opt out at any time.</small></p> - </div> - </form> - </div> <!-- mc_embed_signup --> - - <script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script> - <script type='text/javascript'>(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';}(jQuery));var $mcj = jQuery.noConflict(true);</script> - + <div id="newsletter_signup"> + <form action="https://sendy.appforce1.net/subscribe" method="POST" accept-charset="utf-8"> + <input type="email" name="email" id="email" class="email" placeholder="email address" required/> + <div style="display:none;"><label for="hp">HP</label><input type="text" name="hp" id="hp"/></div> + <input type="hidden" name="list" value="eRY2pDRVFX3fdATf2AZbaQ"/> + <input type="hidden" name="subform" value="yes"/> + <input type="submit" value="Subscribe" name="submit" id="submit" class="button"/> + </span> + </form> + </div> </div> <!-- col --> </div> <!-- row --> From 66ad50ebbb4a372f4ec322c3e6a6ee42e4558275 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs <fassko@gmail.com> Date: Wed, 3 Mar 2021 22:01:22 +0200 Subject: [PATCH 447/589] Update sponsorship.md --- sponsorship.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sponsorship.md b/sponsorship.md index 4afa385d..ca200dda 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -60,7 +60,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso <div class="table-responsive" markdown="1"> | <i class="fa fa-calendar" aria-hidden="true"></i>  Issue | <i class="fa fa-star" aria-hidden="true"></i>  Status | |:-|:-| -| March 11 | Open | +| March 11 | Taken | | March 25 | Open | | April 8 | Open | | April 22 | Open | From 14c1178d512d9fdac38b396ae32b0eb55b20873b Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts <jeroen.leenarts@gmail.com> Date: Sun, 7 Mar 2021 07:53:07 +0100 Subject: [PATCH 448/589] Add newsletter template rendering through Jekyll. (#607) --- Gemfile.lock | 10 +- newsletter-template.html | 696 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 704 insertions(+), 2 deletions(-) create mode 100644 newsletter-template.html diff --git a/Gemfile.lock b/Gemfile.lock index 15cbcbe1..5960d300 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,7 +57,7 @@ GEM faraday-http-cache (2.2.0) faraday (>= 0.8) faraday-net_http (1.0.1) - ffi (1.14.2) + ffi (1.15.0) forwardable-extended (2.6.0) gemoji (3.0.1) git (1.8.1) @@ -233,6 +233,7 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) + mini_portile2 (2.5.0) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) @@ -241,6 +242,11 @@ GEM multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) + nokogiri (1.11.1) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) + nokogiri (1.11.1-arm64-darwin) + racc (~> 1.4) nokogiri (1.11.1-x86_64-darwin) racc (~> 1.4) octokit (4.20.0) @@ -303,4 +309,4 @@ DEPENDENCIES octokit BUNDLED WITH - 2.2.2 + 2.2.6 diff --git a/newsletter-template.html b/newsletter-template.html new file mode 100644 index 00000000..39a231be --- /dev/null +++ b/newsletter-template.html @@ -0,0 +1,696 @@ +--- +layout: none +title: newsletter-template +--- +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head><!-- NAME: BASIC RSS --><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">{% assign post = site.posts.first %} + <title>{{ post.title }} + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + +
    + + + + + + +
    + + + + + + +
    + + + + + + +
     
    + + + + + + + +
    View this email in your browser
    +
    +
    +
    + + + + + + +
     
    +
    + + + + + + +
    + + + + + + +
    + + + + + + +
    +

    Swift Weekly Brief

    +
    +
    + + + + + + + +
    + + + + + + +
    +

    {{ post.title }}

    + By {{ site.data.authors[post.author].name }}
    + {{ post.content }}
    + Open in browser »
    +
    +
    +
    + + + + + + +
    + + + + + + +
    + + + + + + + + + +
    + Newsletter hosting by AppForce1.
    Copyright © [currentyear] Swift Weekly Brief, All rights reserved.
    + You are receiving this email because you opted in via our website.
    + You can unsubscribe here.
    +
    +
    +
    +
    +
    + + + From 995698ff0162ff1e45e22a29fac0943b759a464c Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts Date: Mon, 8 Mar 2021 16:05:40 +0100 Subject: [PATCH 449/589] Replace one forgotten *|URL|* template tag in the newsletter template with the jekyll equivalent. (#608) --- newsletter-template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newsletter-template.html b/newsletter-template.html index 39a231be..49601065 100644 --- a/newsletter-template.html +++ b/newsletter-template.html @@ -567,7 +567,7 @@ - +
    View this email in your browserView this email in your browser
    From bfa9b99a83b2ec02690710a51bd8d0ba55618c1b Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts Date: Mon, 8 Mar 2021 16:22:38 +0100 Subject: [PATCH 450/589] Update info on UTM params on newsletter links. (#609) Co-authored-by: Kristaps Grinbergs --- sponsorship.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sponsorship.md b/sponsorship.md index ca200dda..04dbf950 100644 --- a/sponsorship.md +++ b/sponsorship.md @@ -25,7 +25,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso

    -Thank you for supporting this independent, community-driven newsletter! +Thank you for supporting this independent, community-driven newsletter.

    Details

    @@ -34,8 +34,8 @@ Sponsored Links should be relevant to the Swift programming community. To sponso

    -Analytics: for each issue, the following UTM parameters are generated for sponsored links: -utm_campaign=Swift_Weekly_Brief and utm_source=Swift_Weekly_Brief_{Issue} where {Issue} is the issue number of the newsletter. For example "Swift_Weekly_Brief_42" would be generated for Issue #42. +Analytics: for each issue, the following UTM parameters are generated for all links: +utm_source=Swift_Weekly_Brief, utm_medium=email and utm_campaign=Issue_{Issue} where {Issue} is the issue number of the newsletter. For example "Issue_42" would be generated for Issue #42.

    @@ -49,7 +49,7 @@ Sponsored Links should be relevant to the Swift programming community. To sponso

    -When contacting us, please provide your sponsorship materials! +When contacting us, please provide your sponsorship materials.

    Get in touch From e0688bba99f6226dde9582653cbad12d5379b83f Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs Date: Thu, 11 Mar 2021 18:38:41 +0200 Subject: [PATCH 451/589] 180 issue draft (#611) Co-authored-by: Jeroen Leenarts Co-authored-by: Jared Co-authored-by: Morgan --- .gitignore | 1 + Gemfile.lock | 12 +-- _drafts/2021-03-11-issue-180.md | 161 ++++++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+), 9 deletions(-) create mode 100644 _drafts/2021-03-11-issue-180.md diff --git a/.gitignore b/.gitignore index 3da9b95d..1fc4b930 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store _site/ .jekyll-metadata +.Ulysses-Settings.plist diff --git a/Gemfile.lock b/Gemfile.lock index 5960d300..cb370be1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,7 +26,7 @@ GEM concurrent-ruby (1.1.8) cork (0.3.0) colored2 (~> 3.1) - danger (8.2.2) + danger (8.2.3) claide (~> 1.0) claide-plugins (>= 0.9.2) colored2 (~> 3.1) @@ -38,7 +38,7 @@ GEM kramdown-parser-gfm (~> 1.0) no_proxy_fix octokit (~> 4.7) - terminal-table (~> 1) + terminal-table (>= 1, < 4) danger-prose (2.0.7) danger dnsruby (1.61.5) @@ -233,7 +233,6 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.5.0) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) @@ -242,12 +241,7 @@ GEM multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) - nokogiri (1.11.1) - mini_portile2 (~> 2.5.0) - racc (~> 1.4) - nokogiri (1.11.1-arm64-darwin) - racc (~> 1.4) - nokogiri (1.11.1-x86_64-darwin) + nokogiri (1.11.2-x86_64-darwin) racc (~> 1.4) octokit (4.20.0) faraday (>= 0.9) diff --git a/_drafts/2021-03-11-issue-180.md b/_drafts/2021-03-11-issue-180.md new file mode 100644 index 00000000..8639831f --- /dev/null +++ b/_drafts/2021-03-11-issue-180.md @@ -0,0 +1,161 @@ +--- +layout: post +title: ! 'Issue #180' +author: fassko +sponsor: + link: https://www.keysmith.app + heading: Keep your hands on the keyboard with Keysmith + body: Keysmith is a native Mac app that makes it easy to create macros for your favorite apps and websites. Hit record and do your thing - Keysmith detects buttons, lists, and page loads automatically. Advanced features like AppleScript support, macro repetition, and Cyborg Mode make Keysmith a well-loved Mac power user tool. Try it for free with no time limit, up to 5 macros at a time. + displaylink: www.keysmith.app +--- + +Another two weeks have passed in the blink of an eye. I've been busy launching my new project into the wild, listening to critical feedback from early users, and doing my best to improve it. + +[Jeroen Leenarts](https://twitter.com/AppForce1) and I teamed up to improve the mailing list platform we're using to send out this newsletter, and hopefully to cut costs. This week is the first real test. If this email finds your mailbox, then we know it's working. :) + +I want to thank all the supporters, sponsors and everyone in the Swift community who help make this project happen. If you have any ideas about things to change, improve upon, or help [support this newsletter financially](https://swiftweekly.github.io/sponsorship/), please [let me know](mailto:fassko@gmail.com). + +Without further ado, we have some great news this time! + + + +{% include sponsor.html %} + +### Podcasts + +In [episode 92](https://swiftbysundell.com/podcast/92/) of the Swift by Sundell podcast, [Kaitlin Mahar](https://twitter.com/k__mahar) joins [John Sundell](https://twitter.com/johnsundell) to discuss the current state of server-side Swift, designing APIs for server-side libraries, and Swift's upcoming suite of structured concurrency features. + +### News and community + +[Adam Fowler](https://twitter.com/o_aberration) wrote [a blog post](https://opticalaberration.com/2021/02/hummingbird.html) about [Hummingbird](https://github.com/hummingbird-project/hummingbird): A Swift HTTP server framework. Hummingbird is a lightweight, flexible server framework. It is split into three sections: HummingbirdCore, the HTTP server; Hummingbird, the web application framework; and finally the extension modules. + +[Dave DeLong](https://twitter.com/davedelong) wrote [a great article](https://davedelong.com/blog/2021/03/04/exploiting-string-interpolation-for-fun-and-for-profit/) talking about exploiting String interpolation for fun and profit. + +[Tibor Bödecs](https://twitter.com/tiborbodecs) wrote [an article](https://theswiftdev.com/memory-layout-in-swift/) explaining memory layout in Swift. + +### Commits and pull requests + +[Slava Pestov](https://twitter.com/slava_pestov) merged [a pull request](https://github.com/apple/swift/pull/36109) that adds a new algorithm for identifying redundant non-same-type requirements. + +[Kavon Farvardin](https://twitter.com/call1cc) merged [a pull request](https://github.com/apple/swift/pull/35965) that allows `get` access to properties from outside the actor. + +[Victor Guerra](https://twitter.com/vguerra) merged [a pull request](https://github.com/apple/swift/pull/36128) that improves diagnostics for when a registered derivative function differs from the function it derived from. + +### Accepted proposals + +[SE-0299](https://forums.swift.org/t/se-0299-second-review-extending-static-member-lookup-in-generic-contexts/44565): *Extending Static Member Lookup in Generic Contexts* was [accepted with modifications](https://forums.swift.org/t/accepted-with-modification-se-0299-extending-static-member-lookup-in-generic-contexts/45238). + +> The second review period for [SE-0299: Extending Static Member Lookup in Generic Contexts](https://forums.swift.org/t/se-0299-second-review-extending-static-member-lookup-in-generic-contexts/44565) has concluded. The core team has decided to **accept** this revision proposal, with one more modification suggested by John McCall: + +> I'm somewhat happy with the new restriction requiring a `Self` constraint, but I'm worried that making that unconditional is going to be unnecessarily limiting on the case where you're just building a value of protocol type. Or does that not work because we don't know what to bind `Self` to? +> +> I would suggest the rule that the variable type / function return type should be required to be a subtype of the `Self` type. + +### Returned proposals + +[SE-0302](https://github.com/apple/swift-evolution/blob/main/proposals/0302-concurrent-value-and-concurrent-closures.md) has been [returned for revision](https://forums.swift.org/t/returned-for-revision-se-0302-concurrentvalue-and-concurrent-closures/45251). + +> SE-0302 is **accepted** in its basic approach. It will be revised according to the above decisions, and the community will have an opportunity to review the result shortly. We ask that reviewers focus on just the changed aspects of the proposal, unless they feel that something important was missed in the first review. + +### Proposals in review + +[SE-0295](https://github.com/apple/swift-evolution/blob/main/proposals/0295-codable-synthesis-for-enums-with-associated-values.md): *Codable synthesis for enums with associated values* is [under a third review](https://forums.swift.org/t/se-0295-codable-synthesis-for-enums-with-associated-values-third-review/45190). + +> For the third review, the goal is not to re-litigate the entire proposal, but to focus on reviewing the additional details around the schema evolution. The updates for handling of certain overloaded enums and the choice to exclude certain enums from auto-synthesis due to evolution restrictions as specified in the proposal are also in scope. + +[SE-0302](https://github.com/apple/swift-evolution/blob/main/proposals/0302-concurrent-value-and-concurrent-closures.md): *Sendable and sendable closures* is [under a second review](https://forums.swift.org/t/se-0302-second-review-sendable-and-sendable-closures/45253). + +> This is a narrow re-review, and reviewers should focus on the changes made in the first revision, which are described in the [announcement post](https://forums.swift.org/t/returned-for-revision-se-0302-concurrentvalue-and-concurrent-closures/45251). To briefly summarize them: +> +> * The `@concurrent` function attribute is now named `@sendable`. +> * The `ConcurrentValue` protocol is now named `Sendable`. +> * The `UnsafeConcurrentValue` protocol no longer exists, but `Sendable` conformances may be explicitly decorated with `@unchecked`, e.g. +> +> ```swift +> class MyClass: @unchecked Sendable {} +> ``` +> +> * Non-`public` `struct` and `enum` types now implicitly conform to `Sendable` if their stored properties and case payloads all conform. + +[SE-0300](https://github.com/apple/swift-evolution/blob/main/proposals/0300-continuation.md): *Continuations for interfacing async tasks with synchronous code* is [under a third review](https://forums.swift.org/t/se-0300-third-review-continuations-for-interfacing-async-tasks-with-synchronous-code/45245). + +> Following the [second review](https://forums.swift.org/t/se-0300-second-review-continuations-for-interfacing-async-tasks-with-synchronous-code/) of this proposal, the core team feels that the proposal is close to acceptance, and is an important feature as part of Swift's concurrency roadmap. However, a small number of amendments have been made based on feedback during the second review. +> +> * Replaced separate `*Continuation` and `*ThrowingContinuation` types with a single `Continuation` type parameterized on the error type. +> * Added a convenience `resume()` equivalent to `resume(returning: ())` for continuations with a `Void` return type. +> * Changed `with*ThrowingContinuation` to take an `operation` block that may throw, and to immediately resume the task throwing the error if an uncaught error propagates from the operation + +[SE-0304](https://github.com/apple/swift-evolution/blob/main/proposals/0304-structured-concurrency.md): *Structured Concurrency* is [under a review](https://forums.swift.org/t/se-0304-structured-concurrency/45314). + +> [`async`/`await`](https://github.com/DougGregor/swift-evolution/blob/async-await/proposals/nnnn-async-await.md) is a language mechanism for writing natural, efficient asynchronous code. Asynchronous functions (introduced with `async`) can give up the thread on which they are executing at any given suspension point (marked with `await`), which is necessary for building highly-concurrent systems. +> +> However, the `async`/`await` proposal does not introduce concurrency _per se_: ignoring the suspension points within an asynchronous function, it will execute in essentially the same manner as a synchronous function. This proposal introduces support for [structured concurrency](https://en.wikipedia.org/wiki/Structured_concurrency) in Swift, enabling concurrent execution of asynchronous code with a model that is ergonomic, predictable, and admits efficient implementation. +> +> Swift-evolution threads: +> [Pitch #1](https://forums.swift.org/t/concurrency-structured-concurrency/41622), +> [Pitch #2](https://forums.swift.org/t/pitch-2-structured-concurrency/43452), +> [Pitch #3](https://forums.swift.org/t/pitch-3-structured-concurrency/44496) + +[SE-0226](https://github.com/apple/swift-evolution/blob/main/proposals/0226-package-manager-target-based-dep-resolution.md): *Package Manager Target Based Dependency Resolution* [amendment](https://github.com/apple/swift-evolution/pull/1278) is [under a review](https://forums.swift.org/t/amendment-se-0226-package-manager-target-based-dependency-resolution/45552). + +> The [amendment](https://github.com/apple/swift-evolution/pull/1278) goal is to address a usability issue introduced in the original design of target based dependencies and was discussed in a recent [pitch thread](https://forums.swift.org/t/pitch-simplifying-target-based-dependencies-syntax/45102) on the topic. + +### Swift Forums + +[Doug Gregor](https://twitter.com/dgregor79) [updated us](https://forums.swift.org/t/pitch-4-actors/45215) about changes to the [actors proposal](https://github.com/DougGregor/swift-evolution/blob/actors/proposals/nnnn-actors.md). + +> * Allow cross-actor references to actor properties, so long as they are reads (not writes or inout references) +Added isolated parameters, to generalize the previously-special behavior of self in an actor and make the semantics of nonisolated more clear. +> * Limit nonisolated(unsafe) to stored instance properties. The prior definition was far too broad. +> * Clarify that super is isolated if self is. +> * Prohibit references to actor-isolated declarations in key paths. +> * Clarify the behavior of partial applications. +> * Added a "future directions" section describing isolated protocol conformances. + +[James Sherlock](https://forums.swift.org/u/sherlouk) pitched [an idea](https://forums.swift.org/t/pitch-swift-package-access-control/45174) for how the Swift language could be evolved to add a new access control keyword designed for use in Swift Packages. + +> Swift currently has a handful of access control modifiers, namely: `open public internal private fileprivate`. These keywords change the visibility of parts of our code to change what other parts of our codebase have access to said code. +> +> Swift Packages define targets which are groups of code. Targets can depend on other targets, and multiple targets can be combined to create a product. A product can be a dependency of another application or package. + +[Slava Pestov](https://twitter.com/slava_pestov) started [a discussion](https://forums.swift.org/t/formalizing-swift-generics-as-a-term-rewriting-system/45175) about formalizing Swift generics as a term rewriting system. + +> Previously I wrote about how the full generality of [the Swift generic system is undecidable](https://forums.swift.org/t/swift-type-checking-is-undecidable/39024). The basic idea is that "finitely-presented monoids" can be written as a Swift protocol where the "word problem" on the monoid reduces to proving an equivalence between two types. Since the word problem is known to be undecidable, this shows that Swift generics (as currently defined) are undecidable. + +[Tim Condon](https://twitter.com/0xTim) pitched the [MultipartKit](https://github.com/vapor/multipart-kit) to the SSWG. MultipartKit is a Swift library for encoding and decoding multipart form data based on SwiftNIO. It contains a C library used for the actual parsing of the request data and a Swift wrapper to integrate the C library with SwiftNIO. + +> Multipart is a popular mechanism for sending data to servers, especially when doing file uploads. It's supported by both browsers and HTTP libraries and we feel that having a Swift implementation in the SSWG is an important step for the ecosystem. +> +> MultipartKit was originally built into Vapor for the release of Vapor 4 with the intention of splitting it out at a later date and pitching it to the SSWG so here we are! Since the implementation has been used in Vapor 4 it's fairly well battle tested and deployed. + +[Tom Doron](https://twitter.com/TomerDoron) posted the Swift on the Server Workgroup [Jan 20th, 2020 meeting](https://forums.swift.org/t/jan-20th-2020/45276) notes. + +[Pavel Yaskevich](https://twitter.com/pyaskevich) pitched [an idea](https://forums.swift.org/t/pitch-allow-interchangeable-use-of-cgfloat-and-double-types/45324) to allow interchangeable use of `CGFloat` and `Double` types. + +> When Swift was first released, the type of `CGFloat` presented a challenge. At the time, most iOS devices were still 32-bit. SDKs such as CoreGraphics provided APIs that took 32-bit floating point values on 32-bit platforms, and 64-bit values on 64-bit platforms. When these APIs were first introduced, 32-bit scalar arithmetic was faster on 32-bit platforms, but by the time of Swift's release, this was no longer true: then, as today, 64-bit scalar arithmetic was just as fast as 32-bit even on 32-bit platforms (albeit with higher memory overhead). But the 32/64-bit split remained, mostly for source and ABI stability reasons. + +[Tim Vermeulen](https://twitter.com/tim_vermeulen) pitched [an idea](https://forums.swift.org/t/pitch-efficient-collection-startindex-throughout-the-standard-library/45317) about efficient `Collection.startIndex` throughout the standard library. + +> `Collection.startIndex` is [expected](https://github.com/apple/swift/blob/main/stdlib/public/core/Collection.swift#L322-L329) to be an O(1) operation, but some collections in the standard library deviate from this, which can lead to unpredictable performance. We should change these collections to properly meet this O(1) performance expectation, by doing any expensive work needed to reach the first element ahead of time, in the collection's initializer. + +[Doug Gregor](https://twitter.com/dgregor79) informed us again about more revisions to the [Actors](https://forums.swift.org/t/pitch-6-actors/45519) proposal. + +> After yet more interesting discussion in [pitch #4 (and 5)](https://forums.swift.org/t/pitch-4-actors/45215), we've revised the [actor proposal](https://github.com/DougGregor/swift-evolution/blob/actors/proposals/nnnn-actors.md) for this, pitch \#6, addressing more feedback. +> +> Changes in the sixth pitch: +> +> * Make the instance requirements of `Actor` protocols actor-isolated to `self` , and allow actor types to conform to such protocols using actor-isolated witnesses. +> * Reflow the "Proposed Solution" section to get the bigger ideas out earlier. +> * Remove `nonisolated(unsafe)`. + +Gwendal Roué pitched [a proposal](https://forums.swift.org/t/pitch-scoped-functions/45486) about introducing scoped functions. + +> Scoped Functions are functions that enhance the leading dot syntax inside their body, so that it gives short-hand access to the members of a specific value. Such functions exist so that API designers and their consumers can collaborate towards a way to write focused code where an agreed implicit and obvious context does not have to be spelled out. + +[Nate Cook](https://twitter.com/nnnnnnnn) pitched an idea to codify end-of-iteration behavior for `AsyncSequence` and its iterators to match the existing `Sequence` protocol. + +> The recent [proposal for asynchronous sequences](https://github.com/apple/swift-evolution/blob/main/proposals/0298-asyncsequence.md) left open a question about how asynchronous iterators must behave when reaching the end of their elements. We should amend the proposal to clarify that after returning `nil` or throwing an error from an iterator's `next()` method, all subsequent calls to `next()` must return `nil`. + +### Finally + +[fatalError("this should never happen")](https://twitter.com/IanKay/status/1367523396272058368) From 5818721fe34d7322cb4d075cfb299aa831040de8 Mon Sep 17 00:00:00 2001 From: Kristaps Grinbergs Date: Thu, 11 Mar 2021 18:46:34 +0200 Subject: [PATCH 452/589] Move issue 180 to posts (#615) --- {_drafts => _posts}/2021-03-11-issue-180.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {_drafts => _posts}/2021-03-11-issue-180.md (100%) diff --git a/_drafts/2021-03-11-issue-180.md b/_posts/2021-03-11-issue-180.md similarity index 100% rename from _drafts/2021-03-11-issue-180.md rename to _posts/2021-03-11-issue-180.md From 0c7971c77485765f1648c77aeb6c132ded010902 Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts Date: Sat, 13 Mar 2021 13:17:08 +0100 Subject: [PATCH 453/589] Create CNAME --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..31841c86 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +swiftweeklybrief.com \ No newline at end of file From a69433a1e4c0ce9746b588c29ab4dbfea62dc1c0 Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts Date: Sat, 13 Mar 2021 13:37:06 +0100 Subject: [PATCH 454/589] Change base url of jekyll site. --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 13d9cbc3..6854c1f0 100644 --- a/_config.yml +++ b/_config.yml @@ -15,7 +15,7 @@ permalink: /:title/ # Site title: 'Swift Weekly Brief' description: 'A community-driven weekly newsletter about Swift.org' -url: https://swiftweekly.github.io +url: https://swiftweeklybrief.com logo: /img/logo.png timezone: America/Los_Angeles From 7cfbaf7090bbc5688e27ad00b69507700320878b Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts Date: Sat, 13 Mar 2021 13:52:17 +0100 Subject: [PATCH 455/589] Update several pages with new domain name. --- README.md | 2 +- _includes/search_box.html | 2 +- _posts/2017-06-15-issue-74.md | 2 +- _posts/2017-07-06-issue-77.md | 2 +- _posts/2017-08-10-issue-82.md | 2 +- _posts/2017-11-30-issue-96.md | 2 +- _posts/2017-12-21-issue-99.md | 2 +- _posts/2018-01-04-issue-100.md | 2 +- _posts/2018-01-25-issue-101.md | 2 +- _posts/2018-10-04-issue-119.md | 2 +- _posts/2020-05-21-issue-160.md | 2 +- _posts/2020-10-22-issue-171.md | 2 +- _posts/2021-03-11-issue-180.md | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 3fda4094..1457c988 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Lovingly built with [Jekyll](https://jekyllrb.com), [Bootstrap](https://getboots ## Authors -There are a number of [contributing authors](https://swiftweekly.github.io/authors/) to the newsletter. If you'd like to join, open an issue to discuss! +There are a number of [contributing authors](https://swiftweeklybrief.com/authors/) to the newsletter. If you'd like to join, open an issue to discuss! ## Usage diff --git a/_includes/search_box.html b/_includes/search_box.html index b0549868..f17397aa 100644 --- a/_includes/search_box.html +++ b/_includes/search_box.html @@ -10,7 +10,7 @@
    - + diff --git a/_posts/2017-06-15-issue-74.md b/_posts/2017-06-15-issue-74.md index 755a302d..f630ec40 100644 --- a/_posts/2017-06-15-issue-74.md +++ b/_posts/2017-06-15-issue-74.md @@ -75,7 +75,7 @@ Chris Lattner [responded to an ongoing thread](https://lists.swift.org/pipermail > > ? -We covered this back in [issue #72](https://swiftweekly.github.io/issue-72/). In Swift 4, N-ary tuples are no longer expanded to N arguments in a closure (the “tuple splat behavior”). This means closures will receive a single tuple parameter and you’ll have to expand them manually. This has (obviously) proved to be much less ergonomic and poorer developer experience. It's nice to see the Core Team reconsider this change! And who said swift-evolution wasn't great? 😉 +We covered this back in [issue #72](https://swiftweeklybrief.com/issue-72/). In Swift 4, N-ary tuples are no longer expanded to N arguments in a closure (the “tuple splat behavior”). This means closures will receive a single tuple parameter and you’ll have to expand them manually. This has (obviously) proved to be much less ergonomic and poorer developer experience. It's nice to see the Core Team reconsider this change! And who said swift-evolution wasn't great? 😉 ### Finally diff --git a/_posts/2017-07-06-issue-77.md b/_posts/2017-07-06-issue-77.md index de908555..74725dca 100644 --- a/_posts/2017-07-06-issue-77.md +++ b/_posts/2017-07-06-issue-77.md @@ -9,7 +9,7 @@ sponsor: displaylink: buddybuild.com --- -After some time off and a break from the weekly, I'm back! Before we get started, I'd like to send a final massive thanks to the other [Swift Weekly writers and contributors](https://swiftweekly.github.io/authors/) for doing such a great job the past few weeks. This team is great and they worked super hard to bring you the best Swift news, and even helped with this issue. Alright — let's get to it! +After some time off and a break from the weekly, I'm back! Before we get started, I'd like to send a final massive thanks to the other [Swift Weekly writers and contributors](https://swiftweeklybrief.com/authors/) for doing such a great job the past few weeks. This team is great and they worked super hard to bring you the best Swift news, and even helped with this issue. Alright — let's get to it! diff --git a/_posts/2017-08-10-issue-82.md b/_posts/2017-08-10-issue-82.md index 1f60cf41..754c1473 100644 --- a/_posts/2017-08-10-issue-82.md +++ b/_posts/2017-08-10-issue-82.md @@ -49,7 +49,7 @@ From [Slava Pestov](https://twitter.com/slava_pestov/status/895097488079634433) Roman Levenstein [merged](https://github.com/apple/swift/pull/11380) changes to reduce the stdlib size by 200KB. -Back in [Issue #71](https://swiftweekly.github.io/issue-71/), we covered George Karpenkov's [pull request](https://github.com/apple/swift/pull/9450) to add support for the `-sanitize=fuzzer flag`. This was finally merged this week. +Back in [Issue #71](https://swiftweeklybrief.com/issue-71/), we covered George Karpenkov's [pull request](https://github.com/apple/swift/pull/9450) to add support for the `-sanitize=fuzzer flag`. This was finally merged this week. Michael Ilseman opened a [pull request](https://github.com/apple/swift/pull/11373) to change `String.CharacterView` from being its own slice type to use `Substring.CharacterView` instead, as well as making it `RangeReplaceable`. *"This aligns with the goal of introducing Substring as a separate type to avoid accidental memory 'leaks'."* The PR also removes some old Unicode 8 code. diff --git a/_posts/2017-11-30-issue-96.md b/_posts/2017-11-30-issue-96.md index 2d1415ba..248231e8 100644 --- a/_posts/2017-11-30-issue-96.md +++ b/_posts/2017-11-30-issue-96.md @@ -4,7 +4,7 @@ title: ! 'Issue #96' author: jsq --- -I've returned! 😊 Welcome back to the weekly. We skipped last week and I haven't written the last few issues, but luckily we have [some amazing contributors](https://swiftweekly.github.io/authors/) to help bring this to your inbox each week. Big thanks to [Bas](https://twitter.com/basthomas), [Brian](https://twitter.com/modocache), and [Roman](https://twitter.com/volkovre). I was traveling and speaking at [iOS Conf Singapore](http://iosconf.sg) and then the very first [try! Swift India](https://www.tryswift.co/events/2017/bangalore/) — both of which were great! +I've returned! 😊 Welcome back to the weekly. We skipped last week and I haven't written the last few issues, but luckily we have [some amazing contributors](https://swiftweeklybrief.com/authors/) to help bring this to your inbox each week. Big thanks to [Bas](https://twitter.com/basthomas), [Brian](https://twitter.com/modocache), and [Roman](https://twitter.com/volkovre). I was traveling and speaking at [iOS Conf Singapore](http://iosconf.sg) and then the very first [try! Swift India](https://www.tryswift.co/events/2017/bangalore/) — both of which were great! This week, we saw a progress on conditional conformances, a few new proposals, and discussions on Swift interop with Python. diff --git a/_posts/2017-12-21-issue-99.md b/_posts/2017-12-21-issue-99.md index ed0e34c6..6b60ca48 100644 --- a/_posts/2017-12-21-issue-99.md +++ b/_posts/2017-12-21-issue-99.md @@ -4,7 +4,7 @@ title: ! 'Issue #99' author: jsq --- -Welcome to issue #99! 🎈 [Last week we discussed](https://swiftweekly.github.io/issue-98/) the move away from the mailing lists to official Swift forums, which were intended to be fully rolled out by now. Unfortunately, the rollout has been delayed until early next year due to feedback from users and the holiday season. Almost there! In other news, two exciting proposals were introduced this week that have significant implications for library authors, the Swift ABI, and potential performance improvements. Swift 5 is starting to look like a very exciting release! +Welcome to issue #99! 🎈 [Last week we discussed](https://swiftweeklybrief.com/issue-98/) the move away from the mailing lists to official Swift forums, which were intended to be fully rolled out by now. Unfortunately, the rollout has been delayed until early next year due to feedback from users and the holiday season. Almost there! In other news, two exciting proposals were introduced this week that have significant implications for library authors, the Swift ABI, and potential performance improvements. Swift 5 is starting to look like a very exciting release! diff --git a/_posts/2018-01-04-issue-100.md b/_posts/2018-01-04-issue-100.md index 15a6d394..50fd1493 100644 --- a/_posts/2018-01-04-issue-100.md +++ b/_posts/2018-01-04-issue-100.md @@ -72,6 +72,6 @@ case bar: ### Finally -And finally — thank you for reading. I cannot say 'thank you' enough. Thanks for reading these issues over the past two years. Thanks to all of the fantastic sponsors that helped motivate and incentivize me to keep writing. And thanks to [the other great writers](https://swiftweekly.github.io/authors/) who wrote issues so that I could take much-needed breaks: [Brian Gesiak](https://twitter.com/modocache), [JP Simard](https://twitter.com/simjp), [Bas Broek](https://twitter.com/BasThomas), [Greg Heo](https://twitter.com/gregheo), [Ben Asher](https://twitter.com/benasher44), [Garric Nahapetian](https://twitter.com/garricn), and [Roman Volkov](https://twitter.com/volkovre). +And finally — thank you for reading. I cannot say 'thank you' enough. Thanks for reading these issues over the past two years. Thanks to all of the fantastic sponsors that helped motivate and incentivize me to keep writing. And thanks to [the other great writers](https://swiftweeklybrief.com/authors/) who wrote issues so that I could take much-needed breaks: [Brian Gesiak](https://twitter.com/modocache), [JP Simard](https://twitter.com/simjp), [Bas Broek](https://twitter.com/BasThomas), [Greg Heo](https://twitter.com/gregheo), [Ben Asher](https://twitter.com/benasher44), [Garric Nahapetian](https://twitter.com/garricn), and [Roman Volkov](https://twitter.com/volkovre). This is the final "finally", at least for awhile. Until next time.
    —jsq diff --git a/_posts/2018-01-25-issue-101.md b/_posts/2018-01-25-issue-101.md index 6dc6fd1a..9747d2a3 100644 --- a/_posts/2018-01-25-issue-101.md +++ b/_posts/2018-01-25-issue-101.md @@ -7,7 +7,7 @@ author: btb Hi! 👋 [We're back](https://basthomas.github.io/curating-swift-weekly). After a short hiatus, we are continuing Swift Weekly Brief every other week. 🎉 -As Jesse [mentioned](https://www.jessesquires.com/blog/swift-weekly-brief-hiatus/), he will be taking a break from writing the newsletter. I will be taking over the curation of the newsletter for now, with the help of some awesome [contributors](https://github.com/SwiftWeekly/swiftweekly.github.io/graphs/contributors) and [writers](https://swiftweekly.github.io/authors/). +As Jesse [mentioned](https://www.jessesquires.com/blog/swift-weekly-brief-hiatus/), he will be taking a break from writing the newsletter. I will be taking over the curation of the newsletter for now, with the help of some awesome [contributors](https://github.com/SwiftWeekly/swiftweekly.github.io/graphs/contributors) and [writers](https://swiftweeklybrief.com/authors/). There is more great news: the [Swift Forums](https://forums.swift.org/t/welcome-to-the-swift-forums/8) are now live! They offer a more visual, searchable and navigatable way of browsing through the previous mailing lists. This will hopefully make the barrier for chiming in on everything Swift.org lower. Go [have a look](https://forums.swift.org) - and a huge congratulations to the team at Apple for realising this. diff --git a/_posts/2018-10-04-issue-119.md b/_posts/2018-10-04-issue-119.md index a5d66e6f..a34aa22a 100644 --- a/_posts/2018-10-04-issue-119.md +++ b/_posts/2018-10-04-issue-119.md @@ -9,7 +9,7 @@ sponsor: displaylink: do-ios.com --- -We're very happy to re-introduce the newsletter's mail subscriptions, so that you can once again receive Swift Weekly Brief in your inbox. If you haven't yet and are interested, you can subscribe [here](https://swiftweekly.github.io/subscribe/). +We're very happy to re-introduce the newsletter's mail subscriptions, so that you can once again receive Swift Weekly Brief in your inbox. If you haven't yet and are interested, you can subscribe [here](https://swiftweeklybrief.com/subscribe/). Enjoy the newsletter and have a great weekend and week! diff --git a/_posts/2020-05-21-issue-160.md b/_posts/2020-05-21-issue-160.md index 66d6629f..0f80fd5c 100644 --- a/_posts/2020-05-21-issue-160.md +++ b/_posts/2020-05-21-issue-160.md @@ -20,7 +20,7 @@ After all, I took over the curation of this newsletter from Jesse because I wanted to keep sharing what's happening in Swift open source with all those others benefiting from it. -There are also still [sponsorship opportunities](https://swiftweekly.github.io/sponsorship/) +There are also still [sponsorship opportunities](https://swiftweeklybrief.com/sponsorship/) for the newsletter, and I would greatly appreciate it if you could share that with those who might be interested in helping with the newsletter in that way. It allows us to keep delivering it to your inbox every other Thursday! diff --git a/_posts/2020-10-22-issue-171.md b/_posts/2020-10-22-issue-171.md index 06b5f57b..0114d4db 100644 --- a/_posts/2020-10-22-issue-171.md +++ b/_posts/2020-10-22-issue-171.md @@ -6,7 +6,7 @@ author: fassko The last two weeks were somewhat slow in the Swift open source world but then Apple published yet another open-source library - [Swift Service Discovery](https://github.com/apple/swift-service-discovery). Apart from the announcement of the new iPhones we had some weird times with Xcode 12.1 and 12.2 beta 3 🤔. -To continue sending out this newsletter to your emails, we are looking for sponsors to cover the cost of the platform we are using. More info about that can be found [here](https://swiftweekly.github.io/sponsorship/). Or you can reach out to me personally on Twitter [@fassko](https://twitter.com/fassko). Thanks! 🙏 +To continue sending out this newsletter to your emails, we are looking for sponsors to cover the cost of the platform we are using. More info about that can be found [here](https://swiftweeklybrief.com/sponsorship/). Or you can reach out to me personally on Twitter [@fassko](https://twitter.com/fassko). Thanks! 🙏 diff --git a/_posts/2021-03-11-issue-180.md b/_posts/2021-03-11-issue-180.md index 8639831f..dc56a954 100644 --- a/_posts/2021-03-11-issue-180.md +++ b/_posts/2021-03-11-issue-180.md @@ -13,7 +13,7 @@ Another two weeks have passed in the blink of an eye. I've been busy launching m [Jeroen Leenarts](https://twitter.com/AppForce1) and I teamed up to improve the mailing list platform we're using to send out this newsletter, and hopefully to cut costs. This week is the first real test. If this email finds your mailbox, then we know it's working. :) -I want to thank all the supporters, sponsors and everyone in the Swift community who help make this project happen. If you have any ideas about things to change, improve upon, or help [support this newsletter financially](https://swiftweekly.github.io/sponsorship/), please [let me know](mailto:fassko@gmail.com). +I want to thank all the supporters, sponsors and everyone in the Swift community who help make this project happen. If you have any ideas about things to change, improve upon, or help [support this newsletter financially](https://swiftweeklybrief.com/sponsorship/), please [let me know](mailto:fassko@gmail.com). Without further ado, we have some great news this time! From 8a728286e596a5b7f7b000a48cc31878f9a1f396 Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts Date: Sat, 13 Mar 2021 13:57:45 +0100 Subject: [PATCH 456/589] Update two more links. --- _posts/2017-08-17-issue-83.md | 2 +- _posts/2017-12-14-issue-98.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2017-08-17-issue-83.md b/_posts/2017-08-17-issue-83.md index 02affda6..39820008 100644 --- a/_posts/2017-08-17-issue-83.md +++ b/_posts/2017-08-17-issue-83.md @@ -36,7 +36,7 @@ Chris Lattner [officially announced](https://twitter.com/clattner_llvm/status/89 [Slava Pestov](https://github.com/slavapestov) [merged changes](https://github.com/apple/swift/pull/11462) to improvement to SIL by recording whether vtable entries are inherited or overridden. -[Harlan Haskins](https://github.com/harlanhaskins) [merged](https://github.com/apple/swift/pull/11320) the initial implementation of the Swift libSyntax API, which was discussed first in [Issue #81](https://swiftweekly.github.io/issue-81/). +[Harlan Haskins](https://github.com/harlanhaskins) [merged](https://github.com/apple/swift/pull/11320) the initial implementation of the Swift libSyntax API, which was discussed first in [Issue #81](https://swiftweeklybrief.com/issue-81/). Deyton Sehn [fixed SR-5677](https://github.com/apple/swift/pull/11448) to clarify unsupported options passed to `swift` on the command line where users probably intended to use `swiftc`. diff --git a/_posts/2017-12-14-issue-98.md b/_posts/2017-12-14-issue-98.md index fdd58176..0a609109 100644 --- a/_posts/2017-12-14-issue-98.md +++ b/_posts/2017-12-14-issue-98.md @@ -4,7 +4,7 @@ title: ! 'Issue #98' author: jsq --- -All the way back in [Issue #55](https://swiftweekly.github.io/issue-55/) we covered discussions on the swift-evolution mailing list about possibly moving to a "modern" form-based solution for discussion and leaving the mailing lists behind. This week, about a year later, the transition to Discourse.org is starting **today**! This means the mailing lists will be disabled tonight (US Pacific time) with the transition completing by Monday (Dec 18). +All the way back in [Issue #55](https://swiftweeklybrief.com/issue-55/) we covered discussions on the swift-evolution mailing list about possibly moving to a "modern" form-based solution for discussion and leaving the mailing lists behind. This week, about a year later, the transition to Discourse.org is starting **today**! This means the mailing lists will be disabled tonight (US Pacific time) with the transition completing by Monday (Dec 18). I think most are excited about the move. Given the volume of discussions and the lack of adequate search for the mailing lists, I think this will be a great improvement for the Swift community — not to mention more approachable. If you've been avoiding swift-evolution because you aren't a fan of email (who isn't?!), then this might be your chance to get more involved. You'll be able to sign up via email or with your GitHub account. From 84e89ef9da43f52be7373f0b0e2ccf1b0cdedaa3 Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts Date: Fri, 19 Mar 2021 10:37:27 +0100 Subject: [PATCH 457/589] Switch to Bootstrap 4. (#618) --- Gemfile.lock | 6 ++++++ _includes/foot.html | 4 ++-- _includes/footer.html | 2 +- _includes/head.html | 8 ++++---- _includes/header.html | 4 ++-- _includes/search_box.html | 8 ++++---- _includes/subscribe.html | 12 +++++------- _layouts/default.html | 2 +- authors.html | 2 +- css/style.css | 13 ++++++++++++- index.html | 2 +- sponsorship.md | 2 +- 12 files changed, 40 insertions(+), 25 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cb370be1..b2fb2161 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -233,6 +233,7 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) + mini_portile2 (2.5.0) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) @@ -241,6 +242,11 @@ GEM multipart-post (2.1.1) nap (1.1.0) no_proxy_fix (0.1.2) + nokogiri (1.11.2) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) + nokogiri (1.11.2-arm64-darwin) + racc (~> 1.4) nokogiri (1.11.2-x86_64-darwin) racc (~> 1.4) octokit (4.20.0) diff --git a/_includes/foot.html b/_includes/foot.html index 988132a8..f6c4fc0f 100644 --- a/_includes/foot.html +++ b/_includes/foot.html @@ -2,6 +2,6 @@ - diff --git a/_includes/footer.html b/_includes/footer.html index e84e58d2..5bcaead6 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -21,7 +21,7 @@