libflow | CXXIter | |
---|---|---|
5 | 3 | |
63 | 36 | |
- | - | |
4.1 | 0.0 | |
over 2 years ago | over 1 year ago | |
C++ | C++ | |
Boost Software License 1.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.
libflow
-
CXXIter: A chainable c++20 LINQ-like iterator library
Have you seen libflow? It's also built on the same model (Rust-style iterators), curious how they compare.
-
Modern C++ in Advent of Code
Just to get on the bandwagon: here are my C++20 Advent of Code solutions, mostly using my work-in-progress Flow library
-
T* makes for a poor optional<T&>
Perhaps relevant since Barry mentioned my Flow library as an example: the following (written a couple of years ago for another Reddit thread) is what would appear in Flow's documentation as a justification for using optional references -- if Flow actually had any documentation, that is...
-
Is it well defined if you pipe a stateful transform into views::drop?
If you want to use the Rust iterator model in C++, then you can do so.
-
What are coroutines even for?
I have a work-in-progress-for-a-long-time-now functional-style programming library called libflow, which uses Swift/Rust style iterators. It has optional support for coroutines ("flowroutines", heh) which can make writing "one-shot" iterators very simple indeed.
CXXIter
-
5 Ways to Improve or Avoid Loops in C++20...23
I mostly agree. Though more often than not, it's not as easy as just switching to another language. If you've got a large codebase in C++, switching to Rust is unpracticable. But I think there are some nice lessons to be learned from Rust, that can be translated over to C++. I liked the idea of having the data stored within the locking structure, so it's impossible to access it incorrectly e.g.. And for iterators, I basically cloned Rust's interface in a C++20 library: https://github.com/seijikun/CXXIter
-
ReactivePlusPlus (reactive programming library for c++20) v0.0.1 is out with base operators (looking for feedback)
I'm especially intrigued by the way you implemented your usable interface that contains all of the chainable methods. I used a large struct where I manually added methods for every supported operator. And the operators themselves are then implemented each with their own struct in the back. Arguably, that makes it impossible to extend the public interface from the outside as a user. If I understood it correctly, that's where you used your member_overload mechanism, right? I'm still digging and trying to understand how it works though.
-
CXXIter: A chainable c++20 LINQ-like iterator library
I thought it might be a nice opportunity to get to know C++20 in the process, so I first read up about the new features, and then started applying them to a little iterator library I call CXXIter... that then somehow ended up getting a little bigger and more ergonomic than I had expected. I took inspiration for functions and appearance from LINQ, as well as from Rust's iterators. CXXIter allows passing elements as references, as well as using moves to pass them through the iterator. I know that there already are a couple of these libraries - but what would programming be without a little NIH here and there? :)
What are some alternatives?
zab - C++20 liburing backed coroutine executor and event loop framework.
cpplinq - LINQ for C++ (cpplinq) is an extensible C++11 library of higher-order functions for range manipulation. cpplinq draws inspiration from LINQ for C#.
scnlib - scanf for modern C++
RxCpp - Reactive Extensions for C++
AdventOfCode2021 - Solutions to all 25 AoC 2021 problems in Rust :crab: Less than 100 lines per day and under 1 second total execution time! :christmas_tree:
ReactivePlusPlus - Implementation of async observable/observer (Reactive Programming) in C++ with care about performance and templates in mind in ReactiveX approach
CPython - The Python programming language
range-v3 - Range library for C++14/17/20, basis for C++20's std::ranges
advent-of-code-2021 - 🦀 Rust solutions to AoC 2021