<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming · HackerPapers discussions</title><link>https://hackerpaper.kaipfister.de/p/1908.05647/</link><description>Collected HN comments and submissions linking this paper.</description><language>en</language><lastBuildDate>Mon, 02 Nov 2026 11:16:22 GMT</lastBuildDate><atom:link href="https://hackerpaper.kaipfister.de/p/1908.05647/feed.xml" rel="self" type="application/rss+xml" /><item><title>Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming — mentioned by agentultra</title><link>https://news.ycombinator.com/item?id=43167364</link><guid isPermaLink="false">urn:hackerpapers:mention:1908.05647:43167364</guid><pubDate>Tue, 25 Feb 2025 02:26:21 GMT</pubDate><description>&lt;p&gt;There might even be some possibility for cross-pollination with ideas such as Counting Immutable Beans [0]. I’ve long wondered if there could be a functional programming language that made static memory management less verbose and easier to manage without monads and other explicit structures. [0] https://arxiv.org/abs/1908.05647&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1908.05647/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item><item><title>Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming — mentioned by yashrk</title><link>https://news.ycombinator.com/item?id=38361948</link><guid isPermaLink="false">urn:hackerpapers:mention:1908.05647:38361948</guid><pubDate>Tue, 21 Nov 2023 10:49:27 GMT</pubDate><description>&lt;p&gt;Two main papers about this topic AFAIK are: «Counting Immutable Beans» by Sebastian Ullrich and Leonardo de Moura (https://arxiv.org/pdf/1908.05647.pdf) and «Perceus: Garbage Free Reference Counting with Reuse» by Alex Reinking, Ningning Xie,Leonardo de Moura, Daan Leijen (https://dl.acm.org/doi/pdf/10.1145/3453483.3454032). See also Anton Felix Lorenzen&amp;#x27;s master thesis: https://antonlorenzen.de/master_thesis_perceus_borrowing.pdf Mr. Feldman also mentioned some «alias analysis» library «Morphic Solver» from Berkley University, but I cannot find anything about it. BTW compile time reference…&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1908.05647/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item><item><title>Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming — mentioned by dunham</title><link>https://news.ycombinator.com/item?id=38041075</link><guid isPermaLink="false">urn:hackerpapers:mention:1908.05647:38041075</guid><pubDate>Fri, 27 Oct 2023 17:08:03 GMT</pubDate><description>&lt;p&gt;Yeah, I believe they said they intend for it to be used as a general purpose programming language. I used it to complete Advent of Code last year. There are some really interesting features for general purpose programming in there. For example: you can code updates to arrays in a functional style (change a value, get a new array back), but if the refcount is 1, it updates in place. This works for inductive types and structures, too. So I was able to efficiently use C-style arrays (O(1) update/lookup) while writing functional code. (paper: https://arxiv.org/abs/1908.05647 ) Another interesting…&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1908.05647/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item><item><title>Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming — mentioned by francasso</title><link>https://news.ycombinator.com/item?id=36477631</link><guid isPermaLink="false">urn:hackerpapers:mention:1908.05647:36477631</guid><pubDate>Mon, 26 Jun 2023 09:42:46 GMT</pubDate><description>&lt;p&gt;I&amp;#x27;m sure the details are different, but the general idea, to me, seems the same as the one descibed by Leo and Sebastian in https://arxiv.org/abs/1908.05647. Both Koka and Lean 4 use reference counting to know if it&amp;#x27;s safe to reuse a structure. This paper (Daan is a collegue of Leo at MS Research) gives a different formalization and proofs. The file is still named &amp;quot;fbip.pdf&amp;quot; though :)&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1908.05647/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item><item><title>Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming — mentioned by nequo</title><link>https://news.ycombinator.com/item?id=33020530</link><guid isPermaLink="false">urn:hackerpapers:mention:1908.05647:33020530</guid><pubDate>Thu, 29 Sep 2022 13:45:23 GMT</pubDate><description>&lt;p&gt;&amp;gt; When I think of how the java streams API is used, it generates lots of garbage (i.e. lots of intermediary allocs) Not extremely relevant because it’s Lean 4 and not Java, but destructive updates can help with that: https://arxiv.org/pdf/1908.05647.pdf Edit: Now linking to the right paper.&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1908.05647/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item><item><title>Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming — mentioned by agentultra</title><link>https://news.ycombinator.com/item?id=32276823</link><guid isPermaLink="false">urn:hackerpapers:mention:1908.05647:32276823</guid><pubDate>Fri, 29 Jul 2022 13:47:46 GMT</pubDate><description>&lt;p&gt;A paper I quite enjoyed on automatic reference counting for pure, immutable functional programming: https://arxiv.org/abs/1908.05647 It can be quite &amp;quot;fast.&amp;quot;&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1908.05647/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item><item><title>Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming — mentioned by tomhoule</title><link>https://news.ycombinator.com/item?id=25988700</link><guid isPermaLink="false">urn:hackerpapers:mention:1908.05647:25988700</guid><pubDate>Mon, 01 Feb 2021 13:57:34 GMT</pubDate><description>&lt;p&gt;I am really enjoying lean 3 as a theorem prover; lean 4 as a programming language is a really intriguing/enticing prospect. The &amp;quot;functional but in place&amp;quot; paradigm is something quite new, as far as I can tell. For reference, see the &amp;quot;Counting Immutable Beans&amp;quot; paper[1] by the designers of the language, that details how the runtime makes use of reference counts to do destructive updates in pure code whenever possible. [1]: https://arxiv.org/pdf/1908.05647.pdf&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1908.05647/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item><item><title>Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming — mentioned by lakecresva</title><link>https://news.ycombinator.com/item?id=25565964</link><guid isPermaLink="false">urn:hackerpapers:mention:1908.05647:25565964</guid><pubDate>Tue, 29 Dec 2020 02:19:54 GMT</pubDate><description>&lt;p&gt;The Lean developers put out a paper about v4&amp;#x27;s reference counting last year which shows that in basic benchmarks, Lean 4 is in the same ballpark as Haskell, Swift, and ML. https://arxiv.org/abs/1908.05647&lt;/p&gt;&lt;p&gt;&lt;a href="https://hackerpaper.kaipfister.de/p/1908.05647/"&gt;Paper and discussion history&lt;/a&gt;. A mention is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item><item><title>Counting Immutable Beans: Reference Counting Optimized for Purely Functional Programming — HN submission</title><link>https://news.ycombinator.com/item?id=20767271</link><guid isPermaLink="false">urn:hackerpapers:submission:1908.05647:20767271</guid><pubDate>Thu, 22 Aug 2019 12:29:16 GMT</pubDate><description>&lt;p&gt;Counting Immutable Beans: Reference Counting for Purely Functional Programming&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;2 points; 0 discussion replies on HN. &lt;a href="https://hackerpaper.kaipfister.de/p/1908.05647/"&gt;Paper and source history&lt;/a&gt;. A submission is not an endorsement.&lt;/p&gt;</description><category>cs.PL</category></item></channel></rss>
