profile
viewpoint
Point-Free pointfreeco Brooklyn, NY https://www.pointfree.co A video series exploring Swift and functional programming.

pointfreeco/swift-composable-architecture 2430

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.

pointfreeco/swift-snapshot-testing 1656

📸 Delightful Swift snapshot testing.

pointfreeco/swift-overture 910

🎼 A library for function composition.

pointfreeco/swift-tagged 738

🏷 A wrapper type for safer, expressive code.

pointfreeco/pointfreeco 727

🎬 The source for www.pointfree.co, a video series on functional programming and the Swift programming language.

pointfreeco/swift-nonempty 572

🎁 A compile-time guarantee that a collection contains a value.

pointfreeco/swift-html 518

🗺 A Swift DSL for type-safe, extensible, and transformable HTML documents.

pointfreeco/episode-code-samples 440

💾 Point-Free episode code.

pointfreeco/swift-web 410

🕸 A collection of Swift server-side frameworks for handling HTML, CSS, routing and middleware.

pointfreeco/swift-validated 346

🛂 A result type that accumulates multiple errors.

fork jonbash/swift-html

🗺 A Swift DSL for type-safe, extensible, and transformable HTML documents.

https://www.pointfree.co/episodes/ep28-an-html-dsl

fork in 6 hours

startedpointfreeco/swift-snapshot-testing

started time in 8 hours

startedpointfreeco/swift-composable-architecture

started time in 10 hours

startedpointfreeco/swift-snapshot-testing

started time in 13 hours

startedpointfreeco/swift-nonempty

started time in 14 hours

push eventpointfreeco/pointfreeco

Brandon Williams

commit sha fd1beeea87311d5197ce5c331cb68a7ce3351132

Add parser recap to parser collection.

view details

push time in 18 hours

issue commentpointfreeco/pointfreeco

Uppdatera payment options doesn’t remove banner

Hi @barksten, thanks for the report! This does seem like a bug, or at the least a strange user experience. What is happening is that after you update your payment info there is a bit of delay before your card will actually be charged to bring your account into good standing. So the banner remains during that time. We will look into ways of closing that gap.

Thanks again!

barksten

comment created time in 18 hours

pull request commentpointfreeco/swift-snapshot-testing

Fix crash when using `UIWindow` in `assertSnapshot`

@stephencelis

i3K1nMkuEtBeR

zenangst

comment created time in 19 hours

startedpointfreeco/swift-composable-architecture

started time in 19 hours

startedpointfreeco/swift-composable-architecture

started time in 20 hours

startedpointfreeco/swift-composable-architecture

started time in 21 hours

startedpointfreeco/episode-code-samples

started time in a day

issue openedpointfreeco/pointfreeco

Uppdatera payment options doesn’t remove banner

My credit card was expired and I was shown a banner on top of the page that prompted me to update my payment information. After updating I got another banner (confirmation) but the first one didn't go away. I'm not sure if itäs a bug or a feature.

created time in a day

startedpointfreeco/swift-composable-architecture

started time in a day

startedpointfreeco/pointfreeco

started time in a day

startedpointfreeco/DoctorPretty

started time in a day

startedpointfreeco/swift-snapshot-testing

started time in a day

startedpointfreeco/swift-composable-architecture

started time in a day

startedpointfreeco/swift-composable-architecture

started time in a day

PR opened pointfreeco/swift-composable-architecture

ComposableCoreBluetooth

This is a WIP pull request for the addition of CoreBluetooth into TCA as discussed in #248.

  • [ ] Add documentation
  • [ ] Add example usage
  • [ ] Add unit tests
  • [ ] Maybe improve handling of immutability of CBPeripheral, CBService, ...
+1363 -0

0 comment

12 changed files

pr created time in 2 days

push eventpointfreeco/episode-code-samples

Brandon Williams

commit sha b5c578a76b12bde6518bb229fb1e6b267484b432

wip

view details

push time in 2 days

issue commentpointfreeco/swift-snapshot-testing

Snapshot save location as an Environment Variable

It looks like I may have spoke too soon. There's already a PR open with the aforementioned functionality to support Test Plans

cjrieck

comment created time in 2 days

startedpointfreeco/swift-snapshot-testing

started time in 2 days

issue openedpointfreeco/swift-snapshot-testing

Snapshot save location as an Environment Variable

I first wanted to say thank you for the amazing library! We love using it in our project 😃

We want to utilize Test Plans to test our app against English and Spanish locales. We have snapshots recorded for the English variant of our app, but were unclear about how we can save Spanish snapshots side-by-side with our existing snapshots.

A solution that came to mind was, much like how we can alter the destination of snapshot diffs via the SNAPSHOT_ARTIFACTS env variable, we can allow a user to define an environment variable for the destination of the recorded snapshots. This would allow us to declare something like

// English Test Plan Configuration
SNAPSHOTS_DIR="__English_Snapshots__"

// Spanish Test Plan Configuration
SNAPSHOTS_DIR="__Spanish_Snapshots__"

and allow us to assert against the appropriate snapshots per test plan configuration.

I was wondering if this has already been discussed and is documented somewhere or if this would be a new feature altogether.

created time in 2 days

push eventpointfreeco/episode-code-samples

Stephen Celis

commit sha 320588e8eea595b442d1902c08cd88defa163f17

122

view details

push time in 2 days

startedpointfreeco/episode-code-samples

started time in 2 days

issue closedpointfreeco/swift-composable-architecture

ComposableCoreBluetooth

I'm currently working on an app for which I use the CoreBluetooth framework. I wrote a wrapper around the framework for TCA and figured why not open-source it to this library. The CoreBluetooth framework might not be the most used framework but I think it has some pitfalls which might be worth sharing here.

Considerations

  • There are three "managers" in CoreBluetooth (CBCentralManager, CBPeripheralManager, CBPeripheral) and all of them use the delegate pattern. Both CBCentralManager and CBPeripheralManager can we wrapped in the same manner as the CLLocationManager.
  • CoreBluetooth heavily relies on [String: Any] for passing options to specific methods like scanning for devices, connecting and initializations. Since Any does not conform to Equatable I had to wrap those dictionary into concrete types that do conform to the Equatable protocol.
  • Like in ComposableCoreLocation I created a struct for every value type (like CBService, CBCharacteristic and CBDescriptor) to increase testability.

I've uploaded all of the files to a gist for now: https://gist.github.com/ph1ps/d2a276168b4fa3c1bcb5b91cfbe8a4c8

Discussion

  • I've noticed that my implementation of Peripherals could cause confusion. One the one hand it has properties of a dependency (all of the Effects). On the other hand it has properties of a state (eg. binding a SwiftUI List to the array of Service). Is it a dependency or a state? I couldn't come up with a better implementation for now. Maybe someone else has an opinion on that.
  • A further downside of the CoreBluetooth implementation is that a CBPeripheral has no visible initializers. Therefore we can only wrap peripherals when they are given to us by the delegate methods. This forced me to create a peripheral(Peripheral, Peripheral.Action) case in the BluetoothManager's action enum since the only way to get a subscriber for a live Peripheral is from the upstream BluetoothManager.
  • I noticed that the .debug higher order reducer is quite verbose when being used on the reducer that implements the didDiscover(Peripheral, AdvertismentData, NSNumber) case as it is constantly being called when a new device was discovered. In addition it also prints the whole Peripheral struct which has so many properties that someone might lose track of other actions being printed. Maybe there is a way to suppress that a specific action is being printed or maybe redact long action bodies.

I'd like to state that the code in the gist is still a WIP and I haven't tested it thoroughly. Furthermore there are still some missing pieces I did not wrap yet. I just wanted to check if there is interest for me to continue this project in an open-source way. If there is no demand for this project being included in TCA I wouldn't mind either. I still need it for my personal project so I'm not going to stop working on it 🙂.

I'm looking forward to hearing your opinion.

closed time in 2 days

ph1ps

issue commentpointfreeco/swift-composable-architecture

ComposableCoreBluetooth

I'll close this issue for now and I will create a WIP pull request.

ph1ps

comment created time in 2 days

more