Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality. Learn more →
C++ Immutable Projects
-
immer
Postmodern immutable and persistent data structures for C++ — value semantics at scale (by arximboldi)
-
ewig
The eternal text editor — Didactic Ersatz Emacs to show immutable data-structures and the single-atom architecture
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I've been working on an editor (not text) in C++ and pretty early got into undo/redo. I went down the route of doIt/undoIt for commands but that quickly got old. There was both the extra work needed to implement undo separately for every operation, but also the nagging feeling that the undo operation for some operation wasn't implemented correctly.
In the end, I switched to representing the entire document state using persistent data structures (using the immer library). This vastly simplified things and implementing undo/redo becomes absolutely trivial when using persistent data structures. It's probably not something that is suitable for all domains, but worth checking out.
https://github.com/arximboldi/immer
You might be interested in ewig and immer by Juan Pedro Bolivar Puente:
https://github.com/arximboldi/ewig
https://github.com/arximboldi/immer
See the author instantly opening a ~1GB text file with async loading, paging through, copying/pasting, and undoing/redoing in their prototype “ewig” text editor about 27 minutes into their talk here:
https://m.youtube.com/watch?v=sPhpelUfu8Q
It’s backed by a “vector of vectors” data structure called a relaxed radix balanced tree:
https://infoscience.epfl.ch/record/169879/files/RMTrees.pdf
That original paper has seen lots of attention and attempts at performance improvements, such as:
https://hypirion.com/musings/thesis
https://github.com/hyPiRion/c-rrb
C++ Immutable related posts
- The Everything NPM Package
- Show HN: A hash array-mapped trie implementation in C
- Text Editor Data Structures
- value semantics and spans/views
- How to synchronize access to application data in multithreaded asio?
- Persistent and immutable data structures written in C++14
- Introducing B++ Trees, a C++ B+ Tree library
-
A note from our sponsor - InfluxDB
www.influxdata.com | 25 Apr 2024
Index
Sponsored