other-lisps

cp4n 2021-12-01T00:09:31.006Z

As I understand it, Clojure does things in the background so that returning new data instead of changing mutable data in place isn't a big drag on performance and garbage collection. Do all lisps do this? Like can you work with Common Lisp or Racket in this way or am I incorrectly assuming similarities because they are also lisps? (disclaimer: have tried neither CL or Racket)

2021-12-01T00:15:06.006500Z

that understanding is not correct

2021-12-01T00:16:34.007900Z

clojure's primary data structures are implemented as trees, for sharing the structure of the tree between versions of the data structure, which gives you immutable data structures with better performance than naive copy on write

2021-12-01T00:16:46.008200Z

there is no "doing things in the background"

2021-12-01T00:17:06.008700Z

a lot of other languages have libraries these days that provide similar data structures

2021-12-01T00:17:58.009700Z

(the kind of tree clojure uses for the most part is a hash array mapped trie)

cp4n 2021-12-01T00:18:51.011600Z

Oh ok, thank you for the clarification. So basically Clojure was built to do this and other lisps may not be, although libraries could be available

2021-12-01T00:19:13.011800Z

yes

cp4n 2021-12-01T00:19:28.012200Z

thank you!

2021-12-01T00:20:53.012800Z

there is a nice paper from the recent history of programming languages conference https://download.clojure.org/papers/clojure-hopl-iv-final.pdf

👍🏻 1
2021-12-01T00:21:39.013300Z

What I thought would be a simple matter of shopping for
best-of-breed functional data structures ended up being a search and engineering exercise that
dominated my early Clojure work, as evidenced by the gap in commits during the winter of 2006/7
(figure 2). 

2021-12-01T00:22:31.014200Z

which is eventual what lead to him settling on hamts, created by, uh, Phil Bagwell I think

2021-12-01T00:24:43.014800Z

https://quickref.common-lisp.net/cl-hamt.html looks like a common lisp library, and https://docs.racket-lang.org/hamt/index.html is one for racket

cp4n 2021-12-01T00:26:43.017Z

Good stuff, I had just found the Racket one as well when you posted, now that I know what I am looking for. And thanks for the link to the paper. Will read that