Fork me on GitHub
#clojure
<
2019-01-19
>
borkdude13:01:57

anyone got a quick example how to postwalk an edn file using clj-rewrite? I simply want to replace a few keywords by postwalking it, but the README doesn’t have a good example of this

borkdude13:01:16

I want to preserve whitespace and comments, therefore normal clojure postwalk doesn’t suffice

borkdude13:01:59

I vaguely remember @robert-stuttaford sending me a snippet of this a while ago

schmee13:01:37

is anyone aware of a persistent data structure library for Java that is adapted for primitives, like a persistent vector that is based on int[]? i.e something like FastUtil or Agrona but persistent. Does such a thing even make sense?

rakyi14:01:21

@schmee I think bifurcan has those. You’ll hardly find anything better https://github.com/lacuna/bifurcan

schmee14:01:01

Bifurcan has an IntMap, but it implements ISortedMap<java.lang.Long,V> so it still uses boxed longs, not primitives 😕

borkdude14:01:33

@schmee Clojure has them: (conj (vector-of :int) 1)

schmee14:01:45

hah, in 5 years of Clojure I’ve never seen those! 😄

🙂 5
lmergen15:01:39

they’re useful for java interop

lmergen15:01:54

array-of is equally useful

Alex Miller (Clojure team)16:01:12

note that while vector-of helps with primitive storage, boxing will still happen on access

Alex Miller (Clojure team)16:01:00

as it’s going through the same Clojure interfaces that take objects

Alex Miller (Clojure team)16:01:39

that’s not necessarily true for arrays - with care you can avoid boxing in most uses of arrays

pbaille18:01:40

hello, how can I push a repo using tool.deps to clojars?

cjohansen18:01:54

It focuses on clojurescript, but should work for Clojure too

cjohansen18:01:07

Scroll down to the part about publishing

pbaille18:01:51

@christian767 this is great, thank you!