This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-09
Channels
- # announcements (5)
- # babashka (1)
- # beginners (116)
- # calva (139)
- # cider (11)
- # clara (2)
- # clj-kondo (13)
- # clojure (247)
- # clojure-dev (18)
- # clojure-europe (5)
- # clojure-france (2)
- # clojure-italy (2)
- # clojure-nl (7)
- # clojure-spec (24)
- # clojure-uk (34)
- # clojurescript (41)
- # cursive (11)
- # data-science (2)
- # datomic (33)
- # emacs (10)
- # events (3)
- # fulcro (134)
- # graphql (9)
- # jackdaw (3)
- # jobs (1)
- # joker (20)
- # kaocha (3)
- # leiningen (7)
- # luminus (2)
- # malli (3)
- # music (1)
- # pedestal (7)
- # re-frame (25)
- # remote-jobs (7)
- # ring (7)
- # shadow-cljs (85)
- # spacemacs (13)
- # testing (2)
- # tools-deps (60)
- # xtdb (11)
- # yada (7)
gostd
fork (at v0.12.9) now supports more types and receivers: https://github.com/jcburley/joker/; docs at: https://burleyarch.com/joker/docs/
(Plenty more work to do, but it's a noticeable improvement.)
Thanks for mentioning! Here it is, corrected: https://github.com/jcburley/joker/
Just updated the overview doc here: https://github.com/jcburley/joker/blob/gostd/GOSTD.md
Just now uploaded a new version that supports more functions (those with certain cross-package/namespace dependencies).
Fields in structs can now be access (as GoVar
objects) via (Go obj :FieldName)
. Also, besides (deref govar)
to get the underlying value of a GoVar
, a rudimentary assignment (that works only for string types at the moment) is now available as in (Go govar := newval)
.
The Go*
functions are not really intended for use by applications and are probably temporary until and unless we figure out what would be more Clojure-like while respecting the semantic differences between Go and Clojure/JVM.
E.g. this fork (if not canonical Joker) should at some point support (.field object)
to get the value of a field in a (struct) object, just as it should support (type. vals...)
as an abbreviation for (new type vals...)
.
In particular, I couldn't find any existing Clojure form that provided the semantic equivalent of Go's obj.field = some-value
, though reset!
comes closest.
set!
looks like it covers the analogous case in Clojure and ClojureScript. See http://clojure.github.io/clojure/branch-master/clojure.core-api.html#clojure.core/set! and http://cljs.github.io/api/cljs.core/setBANG
But having said that, I didn't appreciate that the Go*
functions weren't really supposed to be for public use. It makes sense to introduce idiomatic forms later.
As for the fork, I was wondering if it would be helpful to have its own name. I find it really awkward to say out loud but 'Gojure' would make a lot of sense :P I'll note that there are two existing projects with this name on GitHub.