EffectivePower VS swift-async-algorithms

Compare EffectivePower vs swift-async-algorithms and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
EffectivePower swift-async-algorithms
3 6
156 2,780
- 3.4%
4.2 6.6
5 months ago 4 days ago
Swift Swift
- Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

EffectivePower

Posts with mentions or reviews of EffectivePower. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-06.
  • Ask HN: Resources to Learn macOS Development?
    6 projects | news.ycombinator.com | 6 Feb 2023
    Pretty recent, I check it every once in a while to see what’s going on. Of course, with macOS generally most of the changes happen around WWDC ;)

    SwiftUI on macOS is currently ok for a few usecases. One is little document apps. Emphasis on little, this is going to be things that wrap an image or a text file or something. The API is reactive so it’s not really designed for complex/partial file formats. Another good usecase is just pure drawing/animation. This code will look identical on macOS and iOS and is very easy to write with SwiftUI. Finally, the last thing that mostly works is just lists of content. Not table views, those aren’t very good yet. I’m talking about Twitter-like content, as in a media viewer in list form.

    What doesn’t work well is anything that has to do with controls (either they look very ugly, the control doesn’t exist, or SwiftUI has no concept of some significant portion of the control). If you want to do like focus loops or right clicks or anything complicated, forget it. (Some of these are getting fixed piecemeal, but AppKit has like a thousand little things that make good apps and it’ll be a while before they are all fixed.)

    By way of example, I actually have some small apps that show this off well. https://github.com/saagarjha/EffectivePower is a little view-only document shoebox style app. It’s 100% SwiftUI, has one main screen that is a hand-drawn graph, and some auxiliary UI. This makes it about as good as it could be for using the framework. Making the graph was a delight. Making it perform well was a little bit of work but not too bad. The document abstraction mostly works except SwiftUI expects me to be able to create new documents and I’m just a viewer app so I need to crash if you try to make a new document. The sidebar is a List, which is fine, but I actually wanted it to be a Table. However Table selection asserts right now if you update its selection faster than the NSTableView that backs it animated. Of course in SwiftUI there is no concept of animation duration so you can’t really stop this from happening. You can also zoom the graph in the app. On Monterey if you tried to zoom a couple of times the system magnification gesture just stopped working silently. On Ventura I believe they have fixed this, or at least it isn’t trivially broken anymore. This is common for SwiftUI.

    By way of contrast, https://github.com/saagarjha/VirtualApple is also pretty simple but it’s 100% AppKit. I had originally written it in SwiftUI but it’s just not possible to make it be a good Mac citizen. It is “document based” but because it deals with multi-gigabyte VMs I can’t actually let it do the default document based behavior, which includes making hidden revisions whenever the files update (which means you get a dozen secret copies of the VM). In AppKit I can just turn this all off and still look identical to any other system app. (Caveat: if I want the recent files menu and don’t want to use a storyboard, this is actually not available even in AppKit without SPI). Also, I have a little configuration screen which is all buttons and checkboxes. AppKit lets me align it precisely how I want so it looks nice. In SwiftUI it would look pretty awful.

  • SwiftUI in 2022
    7 projects | news.ycombinator.com | 25 May 2022
    I just finished writing a little Mac app in SwiftUI for my personal use yesterday: https://github.com/saagarjha/EffectivePower (https://twitter.com/_saagarjha/status/1528937319171887104 for a slightly out-of-date screenshot). Here are my thoughts.

    The good:

    * Making all the graphs (they're drawn by hand!) was very nice and easy. The speed at which I could iterate with them was incredible, and I could just move code around and lay things out and move them between moves in a way that AppKit (or UIKit) would not allow, at all.

    * I could keep the code very clean, with each component being very specific and isolated. Plumbing bindings through made things very natural and I can imagine taking the code I made there and just plopping it into another project as-is.

    * The result is actually kind of nice, IMO? There's a lot of focus on whether SwiftUI works and stuff but not much focuses on what the end result is. I had an app in my mind that I wanted to make, and it was mostly possible to make it in SwiftUI. In some places I was pleasantly surprised that things I would have been hesitant to try before (slider in a toolbar!) "just worked".

    The middling:

    * I initially supported macOS 12.0 only. Someone asked me to backdeploy to 11.0, which was a little painful mostly because Material didn't exist back then and neither did support for initializing a color from a NSColor. I did kind of a lazy stab at it and the end result being fairly simple, but took about an hour to write: https://github.com/saagarjha/EffectivePower/blob/main/Effect.... If I had to support 10.15 I think I would honestly rewrite large parts of the app in AppKit, maybe keeping just the graphs as view representables.

    * My data model has tens of thousands of elements. Ensuring the "reactivity" didn't cause a bunch of things to be recalculated when they shouldn't was a bit of a challenge. The place I have it now is very nice (I have them defined in such a way that they will never update unless they need a redraw) but this definitely does not come "for free", you'll find out about it after profiling and need to figure out how to fix it.

    * I wrote simple versions of things that don't seem to exist in SwiftUI but AppKit provides for free, such as magnification bouncing. It was like three lines of code to get something that seems reasonable, but with SwiftUI I'm never sure if this is a "we just didn't add it yet" thing or a "oh this is so simple in the framework that you should just write it yourself".

    The bad:

    * Things are broken and I don't know why. If you use magnification gestures the callbacks stop getting called. No indication why. I have some commented out code that would've used a table in the sidebar, but I had to use a List instead because it seems like SwiftUI does not properly update the table and it crashes with an assertion.

    * Documentation sucks but that's nothing new. There's a lot of things that work but you need to be clever at arriving to getting to that point. It's a fun challenge for a toy project but for a production thing I can see this being super frustrating.

    * If you mismatch a type somewhere the compiler is just going to time out rather than telling you what is wrong. Thankfully you can just go through and comment out large parts of the app to reduce the scope of where the error is coming from, but the fact that this is necessary is kind of annoying.

  • Effective Power is a viewer for Apple's power logging diagnostics
    1 project | news.ycombinator.com | 23 May 2022

swift-async-algorithms

Posts with mentions or reviews of swift-async-algorithms. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-08-16.
  • Swift Concurrency: Sequential Async Task Architecture
    1 project | /r/swift | 31 May 2023
    Last weekend, I started reading up on Swift Concurrency through the use of async-await, actors, etc... I really liked what I read and thought of converting my current code to use these new Swift Concurrency tools and ditch the GCD. I used continuation to convert all methods with completion handlers from the Device class to async throw methods and turned Device into an actor in order to protect some members from race conditions. Once more, I am faced with the issue of calling the async methods of the Device actor one by one (waiting for each ones completion before starting the next one). I spent a lot of time thinking on how to do this and came across a number of useful references such as this one and this one. I tried to think of ways of implementing such a channel in my controller class, to guarantee sequential execution of different tasks that require the underlying library, but I'm facing a few issues with this approach:
  • Let's do a quick poll: Async/Await vs Combine in your codebase going forward
    1 project | /r/swift | 5 Dec 2022
    AsyncStreams also now has the associated AsyncAlgorithms library https://github.com/apple/swift-async-algorithms which covers a lot of the Combine features (debounce, merge zip etc.)
  • XCTest: How do you test async fuctnions?
    1 project | /r/swift | 2 Oct 2022
    You might find the treasure trove known as Swift Async Algorithms and look at their test suite.
  • Functional Reactive Programming
    9 projects | news.ycombinator.com | 16 Aug 2022
    https://github.com/apple/swift-async-algorithms

    Requires Xcode 14, which is still in beta and cannot push to the App Store.

    Also, Apple fucked their back port badly. It’s supposedly fixed now, but if you built an app that used async/await anywhere in Xcode 13.X and a user installed running iOS 12/13/up to 14.5 they’d crash on launch.

    So I personally wouldn’t trust it, and instead just push to raise your iOS minimum. I’ve had no problems requiring iOS15 in my projects over 1M installs

  • Anyone know how to create a collection view using RxSwift? I can't seem to find a tutorial on how to create a basic collection view in RxSwift, was able to find ones for Table View though. Appreciate your help!
    1 project | /r/iOSProgramming | 11 Aug 2022
    Asynchronicity is only one aspect of Functional Reactive Programming. You’re comparing single values vs. multiple values. AsyncStream is a better analog, but I’m pretty sure you still need to bring in swift-async-algorithms to have an apples-to-apples comparison.
  • SwiftUI in 2022
    7 projects | news.ycombinator.com | 25 May 2022

What are some alternatives?

When comparing EffectivePower and swift-async-algorithms you can also consider the following projects:

DeepMenu

book - V2 of Real World OCaml

RIBs - Uber's cross-platform mobile architecture framework.

BreadBuddy - Recipe scheduler for iOS

dream - Tidy, feature-complete Web framework

dns-heaven - Fixes stupid macOS DNS stack (/etc/resolv.conf)

Builder - Demonstrates SwiftUI builder patterns for UIKit and networking.

learn-you-a-haskell - “Learn You a Haskell for Great Good!” by Miran Lipovača

reflex - Interactive programs without callbacks or side-effects. Functional Reactive Programming (FRP) uses composable events and time-varying values to describe interactive systems as pure functions. Just like other pure functional code, functional reactive code is easier to get right on the first try, maintain, and reuse.