Fork me on GitHub
#off-topic
<
2020-10-12
>
Daniils Petrovs12:10:45

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.

dominicm14:10:50

Crux isn't a time series database. Use influx.

3
borkdude16:10:55

How do I write U+1F464 in a Java string?

andy.fingerhut18:10:17

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.

andy.fingerhut18:10:44

Let me see if I've got a little bit of Clojure code in a repo that might do this for you ...

andy.fingerhut18:10:01

by making Java API calls, not because I wanted to implement the bit twiddling in Clojure myself...

eggsyntax18:10:01

> I've forgotten the official terminology Hmm, maybe code points?

andy.fingerhut18:10:24

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

👍 3
andy.fingerhut18:10:50

I doubt there is much of use there to make a dependency on that -- it is test code for me learning about Unicode.

andy.fingerhut18:10:24

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)

borkdude16:10:04

the unicode symbol

borkdude16:10:17

(str (.appendCodePoint
                              (StringBuilder.)
                              0x1F464))