off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
2020-10-12T06:24:08.289500Z

@thom704 got a point .. we need to have a Declarativeness Scale to measure libraries. I will make one tonight.

Daniils Petrovs 2020-10-12T12:52:45.292Z

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.

dominicm 2020-10-12T14:13:50.292400Z

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

1
borkdude 2020-10-12T16:14:55.293100Z

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

borkdude 2020-10-12T16:15:04.293300Z

the unicode symbol

borkdude 2020-10-12T16:18:17.293500Z

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

2020-10-12T18:50:17.294600Z

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.

2020-10-12T18:50:44.294800Z

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

2020-10-12T18:51:01.295Z

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

eggsyntax 2020-10-12T18:52:01.295200Z

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

2020-10-12T18:54:24.295800Z

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

👍 1
2020-10-12T18:54:50.296300Z

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

2020-10-12T18:57:24.296600Z

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)