@thom704 got a point .. we need to have a Declarativeness Scale to measure libraries. I will make one tonight.
Hey guys, I am looking at picking a time series database for some metric aggregation. I am currently stuck between InfluxDB and Crux, on the surface they seem similar, what are their main pros and cons? What was your experience with them? For context, we already have an InfluxDB instance in the company which is used mostly by other teams and departments, but I can also freely setup my own instance of Influx/Crux if needed.
Crux isn't a time series database. Use influx.
How do I write U+1F464 in a Java string?
the unicode symbol
(str (.appendCodePoint
(StringBuilder.)
0x1F464))
That looks like it won't fit in 16 bits, so requires a sequence of 2 UTF-16 "things" (I've forgotten the official terminology) in a sequence.
Let me see if I've got a little bit of Clojure code in a repo that might do this for you ...
by making Java API calls, not because I wanted to implement the bit twiddling in Clojure myself...
> I've forgotten the official terminology Hmm, maybe code points?
@andy.fingerhut https://clojurians.slack.com/archives/C03RZGPG3/p1602519497293500
I think 'code points' is the official unicode name for a thing that can take about 20 or 21 bits to store fully. For those that require two 16-bit values to represent in UTF-16, I think the 16-bit things are called 'code units', according to some comments in this old code repo I made: https://github.com/jafingerhut/text.unicode
I doubt there is much of use there to make a dependency on that -- it is test code for me learning about Unicode.
Unsurprisingly, looks like there are a couple of Java APIs that let you do that. The one I found and used in my earlier repo is the second one below, which gives the same result as the code snippet above:
user=> (def s1 (str (.appendCodePoint (StringBuilder.) 0x1f464)))
#'user/s1
user=> (map int s1)
(55357 56420)
user=> (def s2 (String. (Character/toChars 0x1f464)))
#'user/s2
user=> (count s2)
2
user=> (map int s2)
(55357 56420)