This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-04
Channels
- # 100-days-of-code (8)
- # announcements (4)
- # beginners (77)
- # boot (11)
- # business (13)
- # cider (69)
- # clara (2)
- # cljdoc (51)
- # clojure (59)
- # clojure-dev (18)
- # clojure-italy (4)
- # clojure-nl (11)
- # clojure-spec (54)
- # clojure-uk (115)
- # clojurescript (33)
- # core-async (4)
- # cursive (95)
- # datomic (27)
- # duct (1)
- # emacs (58)
- # figwheel (22)
- # figwheel-main (63)
- # garden (1)
- # graphql (10)
- # hyperfiddle (1)
- # leiningen (1)
- # luminus (6)
- # off-topic (12)
- # planck (7)
- # portkey (1)
- # quil (3)
- # re-frame (3)
- # reagent (5)
- # ring-swagger (3)
- # shadow-cljs (34)
- # slack-help (19)
- # spacemacs (57)
- # testing (2)
- # timbre (2)
- # tools-deps (42)
- # yada (6)
@ghadi Sorry for the directed ping, but also asking others, but I have a half-remembering of some code you wrote that demonstrates that at least some JVMs return methods matching by some partial signature in a non-deterministic order. Do you have that or a pointer to it handy?
No worries @andy.fingerhut I'll try to dig it up when I get home but essentially I called Class::getMethods on a clj function class, filtered only arity-0 things, and printed. You have to do it in fresh JVMs though
@bronsa I was just working on https://dev.clojure.org/jira/browse/CLJ-2358 and saw your note there. On https://github.com/clojure/tools.reader/blob/master/src/main/clojure/clojure/tools/reader.clj#L1013-L1015 this works except you’ve violated the doc string which claims same args in same order as read. You’ve made (read+string reader opts)
call (read opts reader)
. This is sane, no doubt, but does not agree with the docstring or where I’m heading with CLJ-2358.
@alexmiller subtle, let me know which direction you're going for CLJ-2358 and I'll follow
will drop a patch shortly
but it’s basically doing what the docstring says
which is super irritating
the docstring says "like read, taking the same args", but the impl doesn't, I don't see any way to make the impl match the docstring without changing the impl?
yes, changing the impl
https://dev.clojure.org/jira/secure/attachment/18535/clj-2358.patch
I’m saying the docstring is the intent and the impl was broken (in Clojure itself as well)
i=0; while clojure -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.10.0-alpha8"}}}' -e '(require (quote clojure.pprint))' -e "(let [lass fc (class #())] (clojure.pprint/pprint (vec (filter #(zero? (.getParameterCount %)) (.getMethods fc)))))"; do echo '---'; i=$(( i + 1 )); done
@andy.fingerhut something like that could serve as a basisIf my "Rich/Stu/Alex sense" is anywhere near accurate (probably not), the fact that the JVM gives back a non-deterministic order here, leading to some people maybe wishing that Clojure sorted the return value in some deterministic way, is a highly suspect, risky, and needs-more-thinking-time enhancement, not a bug fix, yes?