interop

zugnush 2022-06-05T14:21:22.568479Z

I'm trying to play around with https://github.com/google/zetasketch The java instructions say to start with

HyperLogLogPlusPlus<String> hll = new HyperLogLogPlusPlus.Builder().buildForStrings();
I've added the dependancy {:paths ["src" "resources"] :deps {org.clojure/clojure {:mvn/version "1.10.1"} com.google.zetasketch/zetasketch {:mvn/version "0.1.0"}}...}and imported (:import [com.google.zetasketch HyperLogLogPlusPlus]) but (HyperLogLogPlusPlus.) gives me no matching ctor, and I don't seem to be able to import Builder, to be able to execute (HyperLogLogPlusPlus. Builder/buildForStrings) am I missing something or is the package not as documented?

Alex Miller (Clojure team) 2022-06-05T14:40:15.272709Z

Nested classes use $ as a separator

Alex Miller (Clojure team) 2022-06-05T14:42:11.491819Z

So (:import [com.google.zetasketch HyperLogPlusPlus$Builder])

Alex Miller (Clojure team) 2022-06-05T14:42:43.962509Z

And then use the $ in the code too

Alex Miller (Clojure team) 2022-06-05T14:42:55.681429Z

When you invoke the static method

zugnush 2022-06-05T16:10:25.090569Z

Ah, Thanks Alex.