announcements

Project/library announcements ONLY - use threaded replies for discussions. Do not cross post here from other channels. Consider #events or #news-and-articles for other announcements.
plexus 2020-12-27T15:03:08.347200Z

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

👏 6
🎉 20
oxalorg (Mitesh) 2020-12-27T15:10:31.347600Z

Thanks, this was super fun to work on and definitely a team effort! 🦜 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 ^_^

👍 3
🙏 2
ikitommi 2020-12-27T21:13:43.366300Z

[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.

🦜 3
🎉 22
ikitommi 2020-12-28T09:11:46.374Z

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

ikitommi 2020-12-28T09:16:09.374500Z

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

borkdude 2020-12-28T09:17:35.376Z

@ikitommi 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.

ikitommi 2020-12-28T09:17:43.376200Z

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

ikitommi 2020-12-28T09:18:29.377200Z

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

borkdude 2020-12-28T09:19:21.378500Z

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ójcik 2020-12-28T09:19:22.378700Z

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.

ikitommi 2020-12-28T09:19:30.378900Z

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

ikitommi 2020-12-28T09:22:58.379300Z

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

ikitommi 2020-12-28T09:23:40.379500Z

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

borkdude 2020-12-28T09:27:09.379700Z

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

borkdude 2020-12-28T09:27:27.380100Z

This is due to too many flushes

2020-12-28T09:41:52.380500Z

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

👍 1
dominicm 2020-12-28T10:19:06.380900Z

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

ikitommi 2020-12-28T10:24:32.381800Z

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.

borkdude 2020-12-28T10:27:26.382Z

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

☝️ 1
2020-12-28T10:28:07.382200Z

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

roklenarcic 2020-12-31T12:35:38.412Z

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

ikitommi 2020-12-27T21:14:58.366500Z

guide for the tagged json here: https://github.com/metosin/jsonista#tagged-json

vemv 2020-12-27T21:56:23.368100Z

Thanks for pouring the json 🍻

Karol Wójcik 2020-12-27T22:08:03.370200Z

Will tagged json get support on cljs side?

2020-12-27T22:58:15.370600Z

(-&gt; (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.

2020-12-27T23:00:43.370800Z

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

borkdude 2020-12-27T23:06:29.371Z

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, ...

2020-12-27T23:26:22.371500Z

definitely make sense to me, I will need it anyway

borkdude 2020-12-27T23:39:38.371900Z

transonista

💯 1