Top all-time · #1132
hyPiRion
Personal blog · hypirion.com/musings · on HN as JeanPierreprogramming
hyPiRion is a personal blog at hypirion.com about programming. Since 2013, 60 different Hacker News readers have linked it 90 times, most often “Understanding Clojure's Persistent Vectors, Part 1”. No feed was found, so read it on the site itself.
Sometimes recommended · 7 of 40 sampled comments recommend it?
Why HN links it
HN readers link hyPiRion's blog for its posts on persistent data structures, especially the multi-part series on Clojure's persistent vectors, which commenters use to explain immutability and performance.
- Recommended for · 7 comments
- Called an excellent five-part series, a good resource and a nice explanation of persistent vectors; also a good start and a clear pros-and-cons post.
Summarised by Claude from a sample of 40 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
This is hyPiRion's blog, with posts about data structures and other things.
Most-linked posts?
- Understanding Clojure's Persistent Vectors, Part 121 people · 24 mentions · first linked 2013-09-25
- Understanding Clojure's Persistent Vectors (2013)15 people · 18 mentions · first linked 2018-08-12
- Implementing system-versioned tables in Postgres3 people · 4 mentions · first linked 2024-01-22
- Understanding Clojure's Persistent Vectors2 people · 3 mentions · first linked 2014-11-01
- Smaller Static Sites with New Formats2 people · 2 mentions · first linked 2022-06-14
- Clojure's Transducers in Haskell2 people · 2 mentions · first linked 2016-06-05
- Using Python for Scripting2 people · 2 mentions · first linked 2025-12-06
- Understanding Clojure's Persistent Vectors (Part 2)2 people · 2 mentions · first linked 2013-10-24
- A Resilient Git Dependency Algorithm2 people · 2 mentions · first linked 2018-03-27
- Type-Safe HTTP Servers in Go via Generics2 people · 2 mentions · first linked 2021-10-08
What Hacker News says?
For those like me who are unfamiliar with Relaxed Radix Balanced trees, here's the paper presenting the algorithm: RRB-Trees: Efficient Immutable Vectors (2012) https://infoscience.epfl.ch/record/169879/files/RMTrees.pdf EDIT: For further reading: Improving RRB-Tree Performance through Transience (2014) https://hypirion.com/thesis.pdf Article: https://hypirion.com/musings/thesis Code: https://github.com/hyPiRion/c-r…
Comment linking /musings/thesis
on “Build Your Own Text Editor”Submitted Using Python for Scripting as a story · 167 points
HN discussionWhat's your use case for system-versioned tables? You could use some extensions like Periods that support bi-temporal tables: https://wiki.postgresql.org/wiki/Temporal_Extensions Or you could use triggers to build one: https://hypirion.com/musings/implementing-system-versioned-t...
Comment linking /musings/implementing-system-versioned-tables-in-postgres
on “PostgreSQL 17”Submitted Implementing system-versioned tables in Postgres as a story · 161 points
HN discussionI suppose it's quite similar to the idea of Bagwell's persistent data structures[1] — those are particularly useful for lock free coding and with a high enough branching factor could be not as much overhead as a linked list or just plain copying. [1] https://hypirion.com/musings/understanding-persistent-vector...
Comment linking /musings/understanding-persistent-vector-pt-1
on “In defense of linked lists”Submitted Understanding Clojure's Persistent Vectors, Part 1 as a story · 106 points
HN discussionThink of strings in JavaScript. Those are already immutable: var fooString = "foo"; var secondFooString = fooString; secondFooString; // => "foo" fooString = "bar"; secondFooString; // => "foo" We set the variable fooString to point to a different string, but the original, underlying string hasn't changed . In JavaScript, we can think of a string as a value . This is not the case with arrays in JavaScript: var first…
Comment linking /musings/understanding-persistent-vector-pt-1
on “The Future of JavaScript MVCs”Submitted A Language Without Conditionals as a story · 67 points
HN discussionSomeone on HN mentioned the 'magic of ____ arrays' or something like that where search, insertion, merge, etc. were all constant time operations... Ah! Clojure's persistent vectors: https://hypirion.com/musings/understanding-persistent-vector... I would use stacks to sort. The book was about 1000 pages? I'll do about 10 stacks. Then figuring out which stack to put a given page in is fast. (Abstract this and you wind…
Comment linking /musings/understanding-persistent-vector-pt-1
on “Stop Learning Frameworks”Submitted Understanding Clojure's Persistent Vectors (2013) as a story · 64 points
HN discussionThe canonical text discussing how this is achieved refers to data structures optimized for immutability as "purely functional data structures". [1] These type of data structures are the default for Clojure as well, and there are a number of blog posts and presentations discussing their implementation. [2] [3] It's a reasonably complicated topic, but the basic idea is that since the data structures are immutable, muc…
Comment linking /musings/understanding-persistent-vector-pt-1
on “Comparing Elixir and Go”Submitted Understanding Clojure's Persistent Vectors, Pt. 3 as a story · 62 points
HN discussionThat's still not quite right. It's not lazy evaluation that makes it feasible to "make a new tree" in Haskell (although it doesn't hurt), it's the fact that the new tree shares most of the state of the old tree and the data structures make the asymptotic time complexity of both update and retrieval very close to (but not quite) O(n). If you haven't looked at persistent data structures yet then I'd definitely recomme…
Comment linking /musings/understanding-persistent-vector-pt-1
on “Why Go Is Not Good”Submitted Persistent Vector Performance, summarised as a story · 38 points
HN discussion>locally scoped, mutation-heavy, imperative code is fine as long as you can wrap it in a deterministic, immutable interface for general use. Yes! Clojure supports this via transients. What's even better is that you can write the loop using immutable data, make sure it works. Then just 1. add a call to transient in the initializations, 2. add a call to persistent! in the end and 3. add a ! to each function that modif…
Comment linking /musings/understanding-clojure-transients
on “Functional core, imperative shell (2012)”Submitted Understanding Clojure's Persistent Vectors, Pt. 1 as a story · 30 points
HN discussionThanks for clarifying. I think we're just using different definitions. The only real definition of an array I've encountered in work and school is that it's just a one dimensional collection of elements, usually of static size. A vector depending on context is usually the same thing as an array but you conveniently change the size dynamically. Lists can whatever you need it to be given the context, just needs to be…
Comment linking /musings/understanding-persistent-vector-pt-1
on “Learn Rust with entirely too many linked lists (2019)”Submitted Understanding Clojure's Persistent Vectors (Part 2) as a story · 19 points
HN discussionThe implementations of immutable data structures in most concurrency aware functional languages are smarter than that. Take Clojure as an example: "All of the Clojure collections are immutable and persistent. In particular, the Clojure collections support efficient creation of 'modified' versions, by utilizing structural sharing, and make all of their performance bound guarantees for persistent use." https://hypirio…
Comment linking /musings/understanding-persistent-vector-pt-1
on “Concurrent Programming, with Examples”Submitted Understanding Clojure's Persistent Vectors (2013) as a story · 14 points
HN discussionYou are of course correct. I recommend you check out this 5 posts on Persistent vectors in Clojure http://hypirion.com/musings/understanding-persistent-vector-... "Spoiler from part 4": >Transients are an optimisation on persistent data structures, which decreases the amount of memory allocations needed. This makes a huge difference for performance critical code. http://hypirion.com/musings/understanding-clojure-tra…
Comment linking /musings/understanding-clojure-transients
on “Running three hours of Ruby tests in under three minutes”Submitted Swearjure - Clojure without alphanumerics as a story · 12 points
HN discussionYes, mutating something at one place in memory is more efficient, because you don't need to allocate new memories. I don't know all to much about other functional languages, as I learned perl -> ruby -> javascript -> little bit C & Java & Go -> now doing Clojure. But I find Clojures collection data structures interesting. The vector (collection like lists or array) type look immutable, but under the hood are trees.…
Comment linking /musings/understanding-persistent-vector-pt-1
on “Running three hours of Ruby tests in under three minutes”Submitted Persistent Vector Performance as a story · 11 points
HN discussion> Conceptually, it does this by constructing a new copy of the result for every addition, since conj is not destructive That's not how persistent data structures work http://hypirion.com/musings/understanding-persistent-vector-... > why does efficient set union of two collections require one of the two collections to support fast membership tests I haven't thought much about this but it seems intuitively true to me.…
Comment linking /musings/understanding-persistent-vector-pt-1
on “My Increasing Frustration with Clojure”Submitted Getting OCaml Through the Eye of a Needle as a story · 5 points
HN discussionI'm not sure how it's implemented in Ferret but Clojure's data structures are implemented as trees so there's structural sharing that happens when a vector or hash map is updated or when a new version is produced. So the whole data structure isn't copied but only the relevant parts are added / updated in the tree and the rest is shared with the "new" data structure. Mutable data structures are still more memory effe…
Comment linking /musings/understanding-persistent-vector-pt-1
on “Ferret – A free software Clojure implementation”Submitted Implementing system-versioned tables in Postgres as a story · 5 points
HN discussionIt's hard. http://hypirion.com/musings/understanding-persistent-vector-...
Comment linking /musings/understanding-persistent-vector-pt-1
on “Carp, a compiled Lisp with type inference and a borrow checker”Submitted Type-Safe HTTP Servers in Go via Generics as a story · 5 points
HN discussion