Live data from Hacker News

Functional Quadtrees

lbjgruppen.com

51–52 of 52 posts

Re: Functional Quadtrees

#51

Earlier quoted context omitted.

The problem is rather, that most data structure tutorials and books don't even get the idea, to introduce a purely functional version, but merely state the imperative versions. Coming up with the functional versions of data structures can be difficult. Papers about it can be hard to understand and often require one to already know some niche language, that a researcher used for the paper. Even if you can find a funct…

I've been looking for the same for scheme and clojure. Here are a few I've found: Functional Data Structures and Algorithms, A Proof Assistant Approach by Tobias Nipkow (Ed.) [ https://fdsa-book.net/functional_data_structures_algorithms.... ] Purely Functional Data Structures thesis by Chris Okasaki [ https://www.cs.cmu.edu/~rwh/students/okasaki.pdf ] https://en.wikipedia.org/wiki/Purely_functional_data_structu...

[1] are the exercises with solutions (!) of a lecture [2] at ETH Zurich, which include AVL trees in Isabel. The whole list of exercise PDFs is at [3]. I started porting the AVL trees to Scheme [4], but lately have not worked more on this. I also try to make it easy to understand the implementation by providing explanatory comments.

[1]: https://archiv.infsec.ethz.ch/education/permanent/csmr/exerc...

[2]: https://archiv.infsec.ethz.ch/education/permanent/csmr.html

[3]: https://archiv.infsec.ethz.ch/education/permanent/csmr/exerc...

[4]: https://codeberg.org/ZelphirKaltstahl/guile-data-structures/...

Re: Functional Quadtrees

#52
post #12

Earlier quoted context omitted.

You can even build them with basically one line of code by sorting points using Morton / Z-curve order. It's linear time if you use a counting/radix sort. Edit: lol, downvoted for this post. Never change, HN.

It’s super easy to click the downvote button by accident on mobile when you meant to upvote. And this UI will never be fixed because this is HN after all.

[deleted]
Post reply on HN