Hopac
swift-corelibs-libdispatch
Hopac | swift-corelibs-libdispatch | |
---|---|---|
3 | 3 | |
518 | 2,422 | |
0.0% | 0.7% | |
0.0 | 6.5 | |
about 2 years ago | 4 days ago | |
F# | C | |
MIT License | Apache License 2.0 |
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.
Hopac
-
Is Parallel Programming Hard, and, If So, What Can You Do About It? v2023.06.11a
https://github.com/Hopac/Hopac is such an impressive piece of software. Too bad it never really took off like it deserved but with more popular competition like rx or just tasks/async (which is enough for most stuff) pretty unavoidable.
-
How do I get around the lack of MailboxProcessor in Fable?
Found this article, it didn't even occur to me to look for a channel library in JS. This is definitely the direction to go in. Incidentally, Hopac is the most underrated of all F# libraries, just sayin'.
-
Learning about typed languages, static analysis, and tools
3) This third part is the hardest, and that is to get proficient at concurrency itself. For this I had to study various libraries like Rx, but what I settled on after a lot of experimentation was to first compile the various passes to streams of lazy promises. For languages in particular, they have a top down structure and what is needed is to employ a lot of diffing in order to reuse old results. The difficult part is to organize all of this. I can't praise a library like Hopac enough, but even with it, it still took me months to get a grasp on the way the editor support segments should be designed. At the time of writing, I am a day away of finalizing what will be the true design of the language server. It is not that the end result is complex, this latest redesign of the last 1.5 weeks is in fact significantly simpler than what I had before, but concurrency requires different design principles than sequential programming and getting used to the new domain takes an active effort.
swift-corelibs-libdispatch
-
Is Parallel Programming Hard, and, If So, What Can You Do About It? v2023.06.11a
GCD/libdispatch is a fantastic approach to concurrency and you can build and install support for non-Apple operating systems:
https://github.com/apple/swift-corelibs-libdispatch
Here’s a simple echo server:
https://github.com/williamcotton/c_playground/blob/master/sr...
Here’s a simple multithreaded database pool:
https://github.com/williamcotton/express-c/blob/master/src/d...
-
Cross-platform I/O built on io_uring and kqueue (in TigerBeetle)
One of the reasons is that libdispatch's I/O functions introduce extra dynamic allocations for internal queueing via `dispatch_async` ([0],[1],[2]) and from an API perspective of realloc-ing ([3]) an internally owned ([4]) buffer.
TigerBeetle, on the other hand, statically allocates all I/O buffers upfront ([5]), treats these buffers as intrusively-provided typed data ([6]) (no growing/owned buffers), and does internal queueing without synchronization or dynamic allocation ([7]).
[0]: https://github.com/apple/swift-corelibs-libdispatch/blob/469...
-
What are the best books/courses for rigorous study of concurrency in iOS?
If you want iOS in particular, read the source of GCD itself.
What are some alternatives?
ThreadPool - A simple C++11 Thread Pool implementation
c_playground - C Playground
tigerbeetle - The distributed financial transactions database designed for mission critical safety and performance.
ideas5 - Batch 5 of Ideas for Computing
express-c - Fast, unopinionated, minimalist web framework for C
vscode-extension-samples - Sample code illustrating the VS Code extension API.
fio - :wrench: A type-safe, highly concurrent library for F# based on pure functional programming
SObjectizer - SObjectizer: it's all about in-process message dispatching!
The-Spiral-Language - Functional language with intensional polymorphism and first-class staging.