This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-08
Channels
- # announcements (12)
- # aws (4)
- # beginners (92)
- # calva (2)
- # cider (28)
- # clara (11)
- # clj-kondo (5)
- # cljdoc (9)
- # cljs-dev (195)
- # cljsjs (1)
- # clojure (82)
- # clojure-italy (18)
- # clojure-losangeles (1)
- # clojure-nl (2)
- # clojure-spec (10)
- # clojure-uk (51)
- # clojurescript (40)
- # cursive (7)
- # datomic (19)
- # duct (9)
- # emacs (2)
- # figwheel (3)
- # fulcro (56)
- # graphql (8)
- # jobs (3)
- # luminus (2)
- # off-topic (15)
- # re-frame (5)
- # reitit (3)
- # ring (5)
- # shadow-cljs (22)
- # slack-help (2)
- # sql (51)
- # test-check (9)
- # vim (64)
- # yada (1)
I am looking for a serialization format that is compact and bijective, i.e. I can compare encoded values to know if the values are equal. Any suggestions?
I found https://en.wikipedia.org/wiki/Bencode but it's a bit primitive (no UTF support)
I think bencode is out of band utf @polymeris nrepl certainly sends utf over bencode
Yep, seems to work. I wish it mapped better to cljs types, but I think I can work with it
Do these data classes smell anything like Clojure records to any of y'all? https://www.infoq.com/news/2018/02/data-classes-for-java
"data class" timeline: 2012 - defrecord 2017 - python https://www.python.org/dev/peps/pep-0557/ 2018 - java http://cr.openjdk.java.net/~briangoetz/amber/datum_2.html
@souenzzo I'd say Scala got there first with case
classes...?
case
classes date back to around 2008 in Scala I think? Looking at Clojure's change log, defrecord
came in 1.2 which was released in late 2010.
OCaml with Records back in 1997: http://caml.inria.fr/pub/distrib/ocaml-1.07/ocaml-1.07-refman.txt
(at least the documentation I found for case
classes in Scala is dated 2008 so they may predate that)
@lilactown I'd wager other FP languages had record-like types before even then... but they're also not really classes in the same way Scala/Clojure/etc have them.