robrix/Madness 302
Recursive Descent Into Madness
robrix/Set 115
An implementation of Multiset and PredicateSet in Swift.
Human-oriented testing in Swift
Command line helpers for Xcode
Companion application used for dynamically managing the environment variables for a target application.
clone of https://bitbucket.org/atlassian/jiraconnect-ios as a cocoapod
Companion App for Caveman
Outware Mobile's Viper Demo
pull request commentRxSwiftCommunity/Action
Thanks @ashfurrow!
comment created time in 11 days
push eventsharplet/Action
commit sha 8fd0019fd0f470ca3c1a6002393155e0ba4ea082
Update to Nimble 9.0
push time in 11 days
push eventsharplet/Action
commit sha 7688e52376933435dd5b8153f4aecb2fc2cd9c78
Don't override SDK when selecting simulator destination
push time in 11 days
pull request commentRxSwiftCommunity/Action
I had some issues with Xcode 12 locally, specifically https://github.com/Carthage/Carthage/issues/3019, so I just went with 11.7 for now.
comment created time in 11 days
push eventsharplet/Action
commit sha f26e79ad0356e7bc25d61a12f4bf43e9f09d7466
Use Xcode 11.7 on CI
push time in 11 days
pull request commentRxSwiftCommunity/Action
Maybe we need an Xcode update?
Yeah I was able to build with Carthage locally, so I'll try this.
comment created time in 11 days
push eventsharplet/Action
commit sha ccce814a45046820e0df9797be86fb63d04a2c33
Add support for RxSwift 6 RxSwift 6 doesn't introduce any source-breaking changes that affect Action, so it's safe to extend our version compatibility to include both RxSwift 5 and 6.
push time in 14 days
push eventsharplet/Action
commit sha 652c7ead799b2ddc0d8fd762b49c9d8f785cb797
Add support for RxSwift 6 RxSwift 6 doesn't introduce any source-breaking changes that affect Action, so it's safe to extend our version compatibility to include both RxSwift 5 and 6.
push time in 14 days
PR opened RxSwiftCommunity/Action
RxSwift 6 (as of 6.0.0-rc.1) doesn't introduce any source-breaking changes that affect Action, so it's safe to extend our version compatibility to include both RxSwift 5 and 6.
pr created time in 14 days
push eventsharplet/modcpp
commit sha effd23ebaf6770de5e906784f86c5ef8aa3ce069
Exercise 2: stop the ship on EOF
commit sha 567b1569b4ccb5f6e80d5e8e07ca399f9c0a3aa2
Exercise 2: Add comments about potential improvements
push time in a month
push eventsharplet/modcpp
commit sha 7cb29c3da82145e264878b92ede53c30cd5d6aae
Exercise 2: main command parsing loop
commit sha df7a339212fcb8aa21e84559c3e64df3fc94e1cf
Exercise 2: Implement commands
push time in a month
issue openedthoughtbot/CombineViewModel
Add ObservableObject.objectDidChange
This would provide a nice dual to objectWillChange and improve discoverability of the functionality. The implementation practically writes itself:
extension ObservableObject {
public var objectDidChange: ObservableObjectPublisher<Self, DispatchQueue> {
observe(on: .main)
}
}
created time in a month
push eventthoughtbot/constable
commit sha 0fbb24ba5a1fa5875c901e24f57d83823e3a6afb
wip: factories
push time in a month
issue commentthoughtbot/CombineViewModel
It's not ViewModel specific, make it a generic "@ObservedObject"
Raised https://bugs.swift.org/browse/SR-13470.
comment created time in 2 months
issue commentthoughtbot/CombineViewModel
It's not ViewModel specific, make it a generic "@ObservedObject"
Qualifying with the module name still works, it just that this diagnostic is not helpful at all.
comment created time in 2 months
issue commentthoughtbot/CombineViewModel
It's not ViewModel specific, make it a generic "@ObservedObject"
This is kind of disappointing — I tried renaming to ObservedObject, and this is the compiler error when importing both CombineViewModel and SwiftUI:
Sources/App/ProfileViewController.swift:7:3: error: unknown attribute 'ObservedObject'
@ObservedObject var viewModel: ProfileViewModel
^
comment created time in 2 months
push eventsharplet/Regex
commit sha 95acb4af767533670985d5090ce137be7c5fc0e3
Nest Options within the Regex type Fixes #73. Because Regex vends a public type with the same name as its module, there's no way to disambiguate between these two meanings of `Regex.Options`: it's either a type name `Options` in the `Regex` module or a type named options in the `Regex.Regex` type. Swift _always_ picks the latter, so `Regex.Options` does not compile. Additionally, if another module exports a public `Options` type, the problem gets even tricker. To resolve this we officially nest `Options` inside the `Regex` type, so the notation which previously failed to compile now works. We also introduce a deprecated top level typealias for the old symbol, directing users to use canonical name `Regex.Options`.
commit sha d3ba024b643b5e8ed4451617195f4fa180c88cb1
Merge pull request #74 from sharplet/disambiguate-options Nest Options within the Regex type
push time in 2 months
PR merged sharplet/Regex
Fixes #73.
Because Regex vends a public type with the same name as its module, there's no way to disambiguate between these two meanings of Regex.Options: it's either a type name Options in the Regex module or a type named options in the Regex.Regex type. Swift always picks the latter, so Regex.Options does not compile. Additionally, if another module exports a public Options type, the problem gets even tricker.
To resolve this we officially nest Options inside the Regex type, so the notation which previously failed to compile now works. We also introduce a deprecated top level typealias for the old symbol, directing users to use canonical name Regex.Options.
pr closed time in 2 months
issue closedsharplet/Regex
public struct Options has generic name that cannot be disambiguated
Because of Regex is both the name of the struct and the module, then as discussed in Swift bug SR-5304 Regex's struct Option cannot be disambiguated using Regex.Options. Method to workaround this issue are less than ideal https://stackoverflow.com/a/38508385/592739
Renaming either the module or the struct would break existing code. Would it be terrible to rename Options to something like RegexOptions. Or instead adding a public typealias RegexOptions = Options might work.
closed time in 2 months
jpmhoustonissue closedthoughtbot/CombineViewModel
The README should link to the Example app for more complex examples
closed time in 2 months
sharpletissue commentthoughtbot/CombineViewModel
The README should link to the Example app for more complex examples
Fixed by #21.
comment created time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 300ce4967df5fe62d47e663204c511a516276769
Replace "Getting Started" with a more complete "Introduction"
commit sha 9bc54bbd302116f9d913e9c7a6811055273d6a6a
Fix a crash on empty Tasks view
commit sha 2ab46820e0cca25b3a3cebafe56bd5add697c521
Add README for Example app
commit sha e2d1edda2b958e55b36e9e5be5b9ee5e76de39a7
Merge pull request #21 from thoughtbot/new-introduction New introduction
push time in 2 months
PR merged thoughtbot/CombineViewModel
Fixes #15 and #16.
pr closed time in 2 months
issue closedthoughtbot/CombineViewModel
The README could use a concise explanation of what the project is for
closed time in 2 months
sharpletPR opened sharplet/Regex
Fixes #73.
Because Regex vends a public type with the same name as its module, there's no way to disambiguate between these two meanings of Regex.Options: it's either a type name Options in the Regex module or a type named options in the Regex.Regex type. Swift always picks the latter, so Regex.Options does not compile. Additionally, if another module exports a public Options type, the problem gets even tricker.
To resolve this we officially nest Options inside the Regex type, so the notation which previously failed to compile now works. We also introduce a deprecated top level typealias for the old symbol, directing users to use canonical name Regex.Options.
pr created time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 2ab46820e0cca25b3a3cebafe56bd5add697c521
Add README for Example app
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha c70670181cde43c23db730655d36193171bc1b7f
Add README for Example app
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 9bc54bbd302116f9d913e9c7a6811055273d6a6a
Fix a crash on empty Tasks view
commit sha 9acecd7b4a3949204f4a5e7aa450b918d421062d
Add README for Example app
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 300ce4967df5fe62d47e663204c511a516276769
Replace "Getting Started" with a more complete "Introduction"
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 7d0c187cb015be81804fdfacadbd1b2befceb0b0
Replace "Getting Started" with a more complete "Introduction"
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 9f604babf48792723dfd808f3ff855a37623aaf3
Replace "Getting Started" with a more complete "Introduction"
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 1fc3a6944d6ddb92741b66d060484b2cdfda8de4
Replace "Getting Started" with a more complete "Introduction"
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 18dabd9ce00746ed027ba808566d48f616d7101e
Replace "Getting Started" with a more complete "Introduction"
push time in 2 months
issue commentthoughtbot/CombineViewModel
It should be possible to initialise a @ViewModel property with a default value
Possible duplicate of #18.
comment created time in 2 months
issue openedthoughtbot/CombineViewModel
It should be possible to initialise a @ViewModel property with a default value
Because we rely on the "enclosing self" subscript to hook into a view controller's viewDidLoad method, we can't use the more obvious syntax:
@ViewModel var counter = Counter()
This is a wrinkle that it would be nice to smooth out, but it would involve complicating the implementation. A possible approach:
- Swizzle
-[UIViewController viewDidLoad]globally at load time to post our view did load notification. - Eagerly observe all
viewDidLoadnotifications and use reflection to find@ViewModelproperties. - If any are found, start observing those objects and trigger
updateView().
One downside of swizzling at the UIViewController level is that the viewDidLoad notification will often get posted before a subclass's viewDidLoad implementation has returned. This could result in some tricky issues with initialisation order that aren't a problem when we can guarantee that the most-derived subclass is being swizzled.
created time in 2 months
issue openedthoughtbot/CombineViewModel
The README should direct users to the Example app for more complex examples
created time in 2 months
issue openedthoughtbot/CombineViewModel
The README could use a concise explanation of what the project is for
created time in 2 months
created tagthoughtbot/CombineViewModel
An implementation of the Model-View-ViewModel (MVVM) pattern using Combine.
created time in 2 months
push eventthoughtbot/CombineViewModel
commit sha b7620fca762258cf0cc5e06dd19fa921f3ed6058
Work around segfault compiling ObjCRuntime.swift in Release config When the local variable `class` is declared as type `AnyClass`, the compiler segfaults on line 43 when it is coerced to type `Any`. Avoiding `AnyClass` altogether works around the segfault.
commit sha 164be4ad00372b9ac44b029530c0e48c168203be
Build targets in separate steps
commit sha b3fa610f8adb37f71e60cee86eab458a60956739
Merge pull request #14 from thoughtbot/compiler-segfault Work around segfault compiling ObjCRuntime.swift in Release config
push time in 2 months
PR merged thoughtbot/CombineViewModel
When the local variable class is declared as type AnyClass, the compiler segfaults on line 43 when it is coerced to type Any. Avoiding AnyClass altogether works around the segfault.
pr closed time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 164be4ad00372b9ac44b029530c0e48c168203be
Build targets in separate steps
push time in 2 months
PR opened thoughtbot/CombineViewModel
When the local variable class is declared as type AnyClass, the compiler segfaults on line 43 when it is coerced to type Any. Avoiding AnyClass altogether works around the segfault.
pr created time in 2 months
push eventthoughtbot/CombineViewModel
commit sha c99fcaf91474bdfa853683b07bdcbd8b70a861c7
Add CI action to build for release
commit sha c5537a571b21cc4fabe40ebd731323eafe733710
Add iOS build actions
commit sha c486f3f46de9491e47496abae12bf1cbaa5b859d
Merge pull request #13 from thoughtbot/release-ci Add CI action to build for release
commit sha b7620fca762258cf0cc5e06dd19fa921f3ed6058
Work around segfault compiling ObjCRuntime.swift in Release config When the local variable `class` is declared as type `AnyClass`, the compiler segfaults on line 43 when it is coerced to type `Any`. Avoiding `AnyClass` altogether works around the segfault.
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha c99fcaf91474bdfa853683b07bdcbd8b70a861c7
Add CI action to build for release
commit sha c5537a571b21cc4fabe40ebd731323eafe733710
Add iOS build actions
commit sha c486f3f46de9491e47496abae12bf1cbaa5b859d
Merge pull request #13 from thoughtbot/release-ci Add CI action to build for release
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha c5537a571b21cc4fabe40ebd731323eafe733710
Add iOS build actions
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 65408194649287f77f5b9d12eb4eb584726bc6a7
Add iOS build actions
push time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 79291a86c54c388bccd7d6876293e3954343eca1
Avoid defer for clarity in UnfairAtomic.swap(_:) Instead of the slightly-fancy defer we were doing to return the old value, be more straightforward and move the old value out of memory before reinitialising it with the newValue.
commit sha 20a8b235c01a088a29ed75edf1c23efb377b9b2d
Merge pull request #12 from thoughtbot/just-plain-unfair Avoid defer for clarity in UnfairAtomic.swap(_:)
push time in 2 months
PR merged thoughtbot/CombineViewModel
Instead of the slightly-fancy defer we were doing to return the old value, be more straightforward and move the old value out of memory before reinitialising it with the newValue.
pr closed time in 2 months
PR opened thoughtbot/CombineViewModel
Instead of the slightly-fancy defer we were doing to return the old value, be more straightforward and move the old value out of memory before reinitialising it with the newValue.
pr created time in 2 months
push eventsharplet/PackageList
commit sha 1724ec03e87a62f0fb631c3aa05ff3b0201ae322
Add CombineViewModel
commit sha f149dbcc37e6e5a169f3c26aadfdad73dde2ea57
Merge pull request #589 from sharplet/combine-view-model Add CombineViewModel
push time in 2 months
pull request commentSwiftPackageIndex/PackageList
@finestructure Thank you!
comment created time in 2 months
push eventthoughtbot/CombineViewModel
commit sha 2389cef3e847c0622014d0b7953bd6b280a96f16
About section now references CombineViewModel instead of Bindings
push time in 2 months
PR opened SwiftPackageIndex/PackageList
The package(s) being submitted are:
Checklist
I have either:
- [x] Run
swift ./validate.swift.
Or, checked that:
- [ ] The package repositories are publicly accessible.
- [ ] The packages all contain a
Package.swiftfile in the root folder. - [ ] The packages are written in Swift 4.0 or later.
- [ ] The packages all contain at least one product (either library or executable).
- [ ] The packages all have at least one release tagged as a semantic version.
- [ ] The packages all output valid JSON from
swift package dump-packagewith the latest Swift toolchain. - [ ] The package URLs are all fully specified including
httpsand the.gitextension. - [ ] The packages all compile without errors.
pr created time in 2 months
fork sharplet/PackageList
The master list of repositories for the Swift Package Index.
fork in 2 months
startedthoughtbot/CombineViewModel
started time in 2 months
created tagthoughtbot/CombineViewModel
An implementation of the Model-View-ViewModel (MVVM) pattern using Combine.
created time in 2 months
issue openedthoughtbot/Bindings
Should @ViewModel properties provide projected Bindings?
created time in 2 months
created tagthoughtbot/Bindings
Unidirectional binding operators for Combine
created time in 2 months
push eventthoughtbot/Bindings
commit sha abf0b2c97fda59fa55754414d62f6118de47363c
Use _read/set/_modify for associated-object-based subscriptions Extracts a `_getBox()` helper method that initialises an empty `Subscriptions` box if necessary and then returns a reference. This is used to streamline the implementation of _read/set/_modify accessors. These are also marked inlinable.
commit sha 3b8cf0e430ee9bcc9abe8bdf760c19a8388645dd
Merge pull request #7 from thoughtbot/cosubscriptions Use _read/set/_modify for associated-object-based subscriptions
push time in 2 months
PR merged thoughtbot/Bindings
Extracts a _getBox() helper method that initialises an empty Subscriptions box if necessary and then returns a reference. This is used to streamline the implementation of _read/set/_modify accessors. These are also marked inlinable.
pr closed time in 2 months
push eventthoughtbot/Bindings
commit sha 32708f60441809804cf5fccc7b1311ca096b79c1
Use Set as the default Subscriptions collection `Cancellable.store(in:)` is overloaded for two kinds of collection: either any `RangeReplaceableCollection`, or `Set`. Given that `Set` is more specific, prefer it over `Array`.
commit sha c0a0d98f6028e393830c4cf7ffddb0615d7ae80a
Merge pull request #6 from thoughtbot/subscriptions-set Use Set as the default Subscriptions collection
push time in 2 months
PR merged thoughtbot/Bindings
Cancellable.store(in:) is overloaded for two kinds of collection: either any RangeReplaceableCollection, or Set. Given that Set is more specific, prefer it over Array.
pr closed time in 2 months
PR opened thoughtbot/Bindings
Extracts a _getBox() helper method that initialises an empty Subscriptions box if necessary and then returns a reference. This is used to streamline the implementation of _read/set/_modify accessors. These are also marked inlinable.
pr created time in 2 months
PR opened thoughtbot/Bindings
Cancellable.store(in:) is overloaded for two kinds of collection: either any RangeReplaceableCollection, or Set. Given that Set is more specific, prefer it over Array.
pr created time in 2 months
Pull request review commentReactiveCocoa/ReactiveSwift
Non-serializing and Reentrant `Signal`s
class SignalSpec: QuickSpec { } } + describe("reentrant") {+ #if arch(x86_64) && canImport(Darwin)
What's the reason for restricting this text to x86?
comment created time in 2 months
Pull request review commentReactiveCocoa/ReactiveSwift
Non-serializing and Reentrant `Signal`s
public final class Signal<Value, Error: Swift.Error> { /// - parameters: /// - generator: A closure that accepts an implicitly created observer /// that will act as an event emitter for the signal.- public init(_ generator: (Observer, Lifetime) -> Void) {- core = Core(generator)+ public static func reentrant(_ generator: (Observer, Lifetime) -> Void) -> Signal {
Should this also use "unserialized"? I wonder if it would be valuable to add the terms "reentrant" and "unserialized" to a glossary somewhere to make it clear when each is used and why?
comment created time in 2 months
Pull request review commentReactiveCocoa/ReactiveSwift
Non-serializing and Reentrant `Signal`s
public final class Signal<Value, Error: Swift.Error> { } } + private init(_ core: CoreBase) {+ self.core = core+ }++ /// Initialize a Signal that will immediately invoke the given generator,+ /// then forward events sent to the given input observer.+ ///+ /// The input observer serializes events it received. In other words, it is thread safe, and+ /// can be called on multiple threads concurrently.+ ///+ /// - note: The disposable returned from the closure will be automatically+ /// disposed if a terminating event is sent to the observer. The+ /// Signal itself will remain alive until the observer is released.+ ///+ /// - parameters:+ /// - generator: A closure that accepts an implicitly created observer+ /// that will act as an event emitter for the signal.+ public convenience init(_ generator: (Observer, Lifetime) -> Void) {+ self.init(Core<Lock>(generator))+ }++ /// Initialize a Signal that will immediately invoke the given generator,+ /// then forward events sent to the given non-serializing input observer.+ ///+ /// Unlike `init(_:)`, the provided input observer does not serialize the events it received, with the assumption+ /// that it can inherit mutual exclusion from its callers.+ ///+ /// Note that the created `Signal` still guarantees thread safe observer manipulation.+ ///+ /// - warning: The input observer **is not thread safe**.+ ///+ /// - note: The disposable returned from the closure will be automatically+ /// disposed if a terminating event is sent to the observer. The+ /// Signal itself will remain alive until the observer is released.+ ///+ /// - parameters:+ /// - generator: A closure that accepts an implicitly created observer+ /// that will act as an event emitter for the signal.+ public static func nonSerializing(_ generator: (Observer, Lifetime) -> Void) -> Signal {
"Non-serialising" reads a bit awkwardly to me. How about "unserialized"? It also shares a prefix with "unsafe", which feels at least helpfully coincidental.
comment created time in 2 months
issue commentninjaprox/NVActivityIndicatorView
Why NVActivityIndicatorPresenter is deprecated, whats the alternate approach?
Here's the simpler version that I'm using as a workaround as I move away from using app-global activity indicators. Hope it helps. (Note that I chose to put this API on UIWindow instead of UIViewController to avoid relying on global state like UIWindow.keyWindow. As such it's not quite a drop-in replacement.)
import NVActivityIndicatorView
import UIKit
final class BlockingActivityIndicator: UIView {
private let activityIndicator: NVActivityIndicatorView
override init(frame: CGRect) {
self.activityIndicator = NVActivityIndicatorView(
frame: CGRect(
origin: .zero,
size: NVActivityIndicatorView.DEFAULT_BLOCKER_SIZE
)
)
activityIndicator.startAnimating()
activityIndicator.translatesAutoresizingMaskIntoConstraints = false
super.init(frame: frame)
backgroundColor = UIColor.systemBackground.withAlphaComponent(0.6)
addSubview(activityIndicator)
NSLayoutConstraint.activate([
activityIndicator.centerXAnchor.constraint(equalTo: safeAreaLayoutGuide.centerXAnchor),
activityIndicator.centerYAnchor.constraint(equalTo: safeAreaLayoutGuide.centerYAnchor),
])
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension UIWindow {
func startBlockingActivityIndicator() {
guard !subviews.contains(where: { $0 is BlockingActivityIndicator }) else {
return
}
let activityIndicator = BlockingActivityIndicator()
activityIndicator.autoresizingMask = [.flexibleWidth, .flexibleHeight]
activityIndicator.frame = bounds
UIView.transition(
with: self,
duration: 0.3,
options: .transitionCrossDissolve,
animations: {
self.addSubview(activityIndicator)
}
)
}
}
comment created time in 3 months
pull request commentonmyway133/DeepDiff
Update build settings for Xcode 12
Any interest in merging this?
comment created time in 3 months
fork sharplet/GRDB.swift
A toolkit for SQLite databases, with a focus on application development
http://groue.github.io/GRDB.swift/
fork in 3 months