Fork me on GitHub
#announcements
<
2020-12-27
>
plexus15:12:08

Clojurians-log, the publicly searchable archive of this Slack community, now renders emoji reactions. With thanks to @mitesh who did the bulk of the work on this. e.g. https://clojurians-log.clojureverse.org/announcements/2020-12-22

🎉 60
👏 18
oxalorg (Mitesh)15:12:31

Thanks, this was super fun to work on and definitely a team effort! parrot If anyone has some cool ideas of what we can do with the logs feel free to create an issue: https://github.com/clojureverse/clojurians-log-app/issues ^_^

👍 9
🙏 6
ikitommi21:12:43

[metosin/jsonista "0.3.0"] is out. Jsonista fast JSON decoding & encoding library for Clojure built directly on top of Jackson Databind. • updated to use latest Jackson version, 0.12.0 • BREAKING: Joda-classes are not support by default, register com.fasterxml.jackson.datatype.joda/JodaModule to add support - or use java.time classes instead. • new jsonista.tagged ns for building Transit-style tagged JSON value representations. Users have reported up to 10x better encoding throughput compared to vanilla Transit. • Jsonista just hit 1M downloads on clojars 🎉 Github: https://github.com/metosin/jsonista Big thanks to all contributors.

🎉 66
parrot 9
vemv21:12:23

Thanks for pouring the json 🍻

Karol Wójcik22:12:03

Will tagged json get support on cljs side?

delaguardo22:12:15

(-> (keyword "x/z" "y") (j/write-value-as-string mapper) (doto prn) (j/read-value mapper) ((juxt namespace name)))
"[\"!kw\",\"x/z/y\"]"
["x" "z/y"]
using single argument for tagged form of keyword (and symbol as well) could cause problems for keywords slightly violating clojure’s reading rules I would like to suggest this form ["!kw",["namespace","name"]] for namespaced and ["!kw",["name"]] for simple keywords. I did something similar in one of my projects and nether regretted it.

delaguardo23:12:43

awesome lib btw! I already scheduled some time for “cheshire->jsonista” type of refactoring

borkdude23:12:29

Would it make sense to come up with a default scheme that would allow you to serialize EDN via jsonista as an alternative to transit, for full compatibility? Support for sets, uuids, bytes, ...

delaguardo23:12:22

definitely make sense to me, I will need it anyway

borkdude23:12:38

transonista

💯 3
ikitommi09:12:46

@U04V4KLKC good point about the keywords. Just merged in https://github.com/metosin/jsonista/pull/40, didn’t check if that resolves the issue

ikitommi09:12:09

@UJ1339K2B cljs not planned, but interesting idea. Interested in developing the cljs-client? could be just a new ns?

borkdude09:12:35

@U055NJ5CC One of the attractive properties of transit is that it is cross-language, not just clj <-> clj. So when using tags in clj, it would be nice to be able to decode this in Go or Ruby, or whatnot. Btw, this is a real problem, not just one I made up.

ikitommi09:12:43

@U04V15CAJ I think there could be encoders & decoders for all common types. Also, need to handle keys too, the current impl just handles values.

ikitommi09:12:29

are there any cross-language tagging conventions out there? (besided transit, which hasn’t gained much traction outside of clojure, I believe)

borkdude09:12:21

but I guess in Go you could look at your own made up tags and do the custom serialization. Good question. I think JSON schema has something around content types

Karol Wójcik09:12:22

Would love to, but certainly not in this year. To much consumed by studies and work ;( Anyway if this implementation could be faster than transit a lot of companies could benefit from it. Especially when doing SPA SSR.

ikitommi09:12:30

btw, the tagged-json is faster than nippy in the simple benchmarks. which sounds fishy.

ikitommi09:12:58

If performance is the goal, one option is to help make the current Transit faster.

ikitommi09:12:40

great discussion, will start a Clojureverse thread out of this.

borkdude09:12:09

I've had this problem for a while https://github.com/cognitect/transit-clj/issues/43 which may be low hanging fruit to speed up transit

borkdude09:12:27

This is due to too many flushes

delaguardo09:12:52

https://github.com/metosin/jsonista/pull/41 here is a PR to handle keyword format suggested by me

👍 3
dominicm10:12:06

Can this be used to build a new transit server? Then you can use the transit cljs client?

ikitommi10:12:32

honestly, haven't checked the transit internals for a while. Might be able to do a transit server, but would need to read the spec/source.

borkdude10:12:26

transit also does caching of symbols and values which compresses the payload. this is relevant for network traffic, but it may be less good for performance. so it's good take make explicit what you are optimizing for

☝️ 3
delaguardo10:12:07

https://github.com/cognitect/transit-format#recursive-tag-based-encoding there are two formats missing in jsonista: • string-based encoding • object-based encoding

roklenarcic12:12:38

I think transit might have ability to represent recursive data structures, which JSON lacks?