HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

CppCon 2017: Juan Pedro Bolivar Puente “Postmodern immutable data structures”

CppCon5 HN recommenders · recommended in 7 months, 2017-2025
YouTube
31K views · 9 years ago · talk · evergreen

Juan Pedro Bolivar Puente explains immutable and persistent data structures in C++ and how they support value semantics. He presents the Immer library, rrb-trees, and a prototype text editor that opens a huge file instantly.

HN people point to it for rrb-trees, text editor data structures and bringing Clojure-style persistent structures to C++.

C, C++, Rust, Go & systems languagesFunctional programmingAlgorithms & data structures#immutabledata#rrb-trees#c++#immer#texteditors#functionalprogramming

13 comments from Hacker News

@zelphirkalt2025 · in “Type Theory and Functional Programming (1999) [pdf]”

> [...] which is a must for anything performance oriented. But that's also not really true. Using functional data structures it is possible to write highly performant software. Check out for example "CppCon 2017: Juan Pedro Bolivar Puente - Postmodern immutable data structures"[1], an impressive talk, in which someone shows their developed editor that can edit huge text files without lag faster than any mainstream editor today. This is enabled by functional data structures. Usage of functional data structures throughout a project also ensures, that parts can be trivially parallelized, which is not true for traditional algorithms, and therefore can easily scale with number of CPUs available. For more on that subject, you might want to watch a few Joe Armstrong talks. Rust achieves type safety by introducing more language concepts like ownership, borrowing, and lifetimes, to formalize, who has access when and how. It also creates things as immutable by default, unless you make use of `mut`. Unfortunately, Rust's philosophy is shared memory and making shared memory access safe, rather than message passing, which is at odds with FP. [1]: ▶ this video

RecommendsView on HN
@modernerd2023 · in “Text Editor Data Structures”

You might be interested in ewig and immer by Juan Pedro Bolivar Puente: link link 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: ▶ this video It’s backed by a “vector of vectors” data structure called a relaxed radix balanced tree: link That original paper has seen lots of attention and attempts at performance improvements, such as: link link

RecommendsView on HN
@henrydark2023 · in “Functional Programming – How and Why”

Not to disagree, but to be fair modern fp runtimes use data structures that wouldn't have to copy so many bytes as the whole state. A nice showcase of this idea is in Juan Pedro Bolivar Puente's CppCon '17 talk Postmodern Immutable Data Structures: ▶ this video

CitesView on HN
@bertmuthalaly2021 · in “Joker: A small interpreted dialect of Clojure written in Go”

Immer [0][1] seems like a really serious attempt at bringing high-quality persistent data structures to C++. [0]: ▶ this video [1]: link

RecommendsView on HN
@arximboldi2021 · in “Build Your Own Text Editor”

For another approach: I built a didactic text editor to teach "value oriented design" and immutable data-structures in C++: link It's design is covered in these talks: - Postmodern immutable data structures: ▶ this video - The most valuable values: link

CitesView on HN
@nightowl_games2020 · in “Ask HN: What are the best advanced computer science courses online?”

Hey. Check out Juan Pedro Bolivar Puente's talks om value oriented design. He worked on Ableton which is a large application. He specifically speaks to Undo. He describes a much better pattern than the Command Pattern. He also released his source for Value Oriented Data structures Juan Pedro is a next level programmer who I think has pushed the craft forward through his work on bringing Value Oriented Design into the C++ world. Talk I ▶ this video Talk II link Data Structures: link Application Structure: link Text Editor: link Good luck.

Strongly recommendsView on HN
@proverbialbunny2020 · in “Alex: ML-enhanced range index, similar in functionality to a B+ Tree”

Mmm tasty. If anyone wants a backstory building up to this data structure checkout this talk: ▶ this video He builds an rrb-tree which uses the same underlying concepts ALEX uses, just without the ML-enhancement.

RecommendsView on HN
@proverbialbunny2019 · in “You're doing it wrong: B-heap 10x faster than binary heap (2010)”

Not a benchmark but rrb-trees are pretty neat. They give an effective O(1) for all operations. Modern languages like Scala's Vector type is an rrb-tree under the hood: link For more fun: ▶ this video

RecommendsView on HN
@proverbialbunny2019 · in “Show HN: Array with Constant Time Access and Fast Insertion and Deletion”

Interesting. I wonder how similar a Judy array is to an rrb-tree (relaxed radix binary tree), or if they're the same thing. An rrb-tree is an effective O(1) time for every category. Scala's Vector type implements one. If interested about the data structure: ▶ this video Scala bigO doc: link Scala's doc on it: link

CitesView on HN
@proverbialbunny2019 · in “Why Are So Many Developers Hating on Object-Oriented Programming?”

One example is streaming. Streams allow for a near infinite array size to be processed, because it works on one element at a time as it comes in. Streams come from the FP world. From that function chaining originates from the FP world and is used in modern languages like Python quite heavily. You mentioned research, so a valid example of this is the difference between Spark and MapReduce. Spark was introduced to optimize processing large sets of data, by streaming it. MapReduce does not. For a more heavy example, a few data structures that are quite powerful come from the FP world. For example, this cppcon talk is introduces one, which gives near O(1) time for all uses (insert, delete, lookup, ...), and can be used in a thread safe way: ▶ this video

CitesView on HN
@proverbialbunny2019 · in “Build Your Own Text Editor”

In case anyone hasn't seen it this CppCon talk ▶ this video talks about rrb-trees and how they're a great data structure for writing a text editor that can handle unlimited sized documents without locking up, and allows for editing while saving and opening, and an easy way to support an undo command. Most text editors today do not support such functionality. With lockless data structures like an rrb-tree it becomes easy. It really is an ideal way to do write a text editor.

RecommendsView on HN
@arximboldi2018 · in “Clojure at Netflix (2013) [slides]”

Interesting to hear about C++ in this context, since of my goals is to make C++ more like Clojure: ▶ this video link There is a lot of I could say about the relationship between C++ and Clojure, but I'll leave it at that for now :-)

CitesView on HN
@arximboldi2017 · in “Ask HN: How much time do you spend on “marketing” your open source projects?”

My most popular open-source project [1] I talk about at conferences, mostly C++ ones (last example [2]). I was lucky to also land a paper about it at ICFP'17 [3]. On Friday I will talk at the MeetingCpp conference in Berlin about a new library I am building (kind of experimental Redux for C++ with time-travelling debugger!). I work as a freelancer and at the moment I do client work 3 days a week and dedicate the rest of the time to the open-source work. The open-source work includes doing research and implementing these tools, but also preparing the talks, which is a very time consuming task for me. Doing conference talks is very emotionally exhausting, I dread the previous weeks to the talk---but the feeling afterwards is very good and it is a good way to get exposure, I hope. My dream is to some day form a social company with a coop structure that works full-time on open-source, either directly or indirectly helping clients use these tools in their system. I hope I am set up in the right direction. Recently I opened a Twitter account to talk mostly about my open-source stuff [1]. I admittedly hate Twitter as a social network, but I've been convinced that it is a good place for networking in our industry, so I just play the game. I keep telling myself that I should open blog too, but then I realize that one can't simply do everything all the time, so I guess maybe I'll never do it. To your last question: is it unfair to not do marketing to your work? Totally not. Just do wha

CitesView on HN
CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"55:49

CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"

CppCon
119K views • 10 years ago
CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”1:19:52

CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”

CppCon
264K views • 10 years ago
CppCon 2015: Sean Parent "Better Code: Data Structures"1:04:00

CppCon 2015: Sean Parent "Better Code: Data Structures"

CppCon
106K views • 11 years ago
Lucas Cavalcanti & Edward Wible - Exploring four hidden superpowers of Datomic40:42

Lucas Cavalcanti & Edward Wible - Exploring four hidden superpowers of Datomic

ClojureTV
29K views • 11 years ago
CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"1:13:41

CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"

CppCon
235K views • 12 years ago
CppCon 2017: Herb Sutter “Meta: Thoughts on generative C++”1:47:45

CppCon 2017: Herb Sutter “Meta: Thoughts on generative C++”

CppCon
105K views • 9 years ago
React.js Conf 2015 - Immutable Data and React31:11

React.js Conf 2015 - Immutable Data and React

Meta Developers
159K views • 11 years ago
Stanford Seminar - Concatenative Programming: From Ivory to Metal1:04:45

Stanford Seminar - Concatenative Programming: From Ivory to Metal

Stanford Online
14K views • 8 years ago
CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”59:53

CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”

CppCon
147K views • 7 years ago
CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”1:39:25

CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”

CppCon
149K views • 10 years ago
Clojure in a nutshell by James Trunk32:44

Clojure in a nutshell by James Trunk

Func Prog Sweden
104K views • 5 years ago
CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced.  What do they really do?”1:14:22

CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”

CppCon
288K views • 9 years ago
Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 20231:35:12

Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 2023

CppNow
71K views • 3 years ago
CppCon 2018: Hana Dusíková “Compile Time Regular Expressions”54:48

CppCon 2018: Hana Dusíková “Compile Time Regular Expressions”

CppCon
14K views • 8 years ago
Can C++ be 10x Simpler & Safer?  - Herb Sutter - CppCon 20221:54:00

Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022

CppCon
277K views • 3 years ago
2013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++1:33:02

2013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++

CppNow
34K views • 13 years ago
Stuart Sierra - Components Just Enough Structure41:19

Stuart Sierra - Components Just Enough Structure

ClojureTV
36K views • 12 years ago
CppCon 2014: Mike Acton "Data-Oriented Design and C++"1:27:46

CppCon 2014: Mike Acton "Data-Oriented Design and C++"

CppCon
862K views • 12 years ago
CppCon 2015: Herb Sutter "Writing Good C++14... By Default"1:29:06

CppCon 2015: Herb Sutter "Writing Good C++14... By Default"

CppCon
193K views • 11 years ago
"Outperforming Imperative with Pure Functional Languages" by Richard Feldman34:55

"Outperforming Imperative with Pure Functional Languages" by Richard Feldman

Strange Loop Conference
98K views • 5 years ago