Fork me on GitHub
#clojure
<
2020-06-21
>
lilactown04:06:30

are there any zero-copy serialization formats for Clojure(Script)?

lilactown04:06:13

I think messagepack might fit the bill

p-himik06:06:44

Seems like it being zero-copy depends on a particular implementation. Seems like C++ and Ruby ones have it, but there are no mentions of it for Clojure or Java. Although there are mentions of it in closed issues of msgpack-java.

flowthing09:06:31

So it appears this doesn’t work:

(map #(var %) [inc dec])
Is there a way to turn a list of symbols into a list of vars?

flowthing09:06:03

I’m trying to get the metadata of a list of symbols.

flowthing10:06:49

Actually, never mind — it turns out I needed to take a step back and just use they values instead of the keys of ns-publics and ns-map.

Ben Sless15:06:02

how about

(map #(resolve %) '[inc dec])

flowthing15:06:24

Yeah, that’d work — thanks! :thumbsup:

Ben Sless06:06:25

Oh, I'm silly

Ben Sless06:06:35

just

(map resolve syms)

adam17:06:32

How should I go about getting a list of timezones to populate a select form field in Clojure? I thought about hardcoding them but they may change based on DST

Lennart Buit17:06:32

Doesn’t java.time list zones somewhere?

Lennart Buit17:06:59

Yep, there we go (ZoneId/getAvailableZoneIds) . Uhh, maybe you need to filter that, because some zones aren’t really human

adam17:06:07

Thanks, will look into that

tstout18:06:43

I have a lein-based project I'd like to convert to deps.edn. It is mixed java and clj source. Leiningen makes this pretty easy to do. Can someone point me to an example deps.edn which builds java source and clj source into an uberjar?

p-himik18:06:00

Maybe of interest to you: https://github.com/ztellman/virgil Doesn't have anything specifically for tools.deps, but can be used to mix Java in a Clojure project.

seancorfield20:06:01

@tstout The general recommendation with deps projects is to build your Java stuff separately and treat it as a dependency of your Clojure project.

👍 3