This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-10
Channels
- # beginners (6)
- # calva (1)
- # cider (17)
- # clj-kondo (10)
- # clojure (4)
- # clojure-austin (3)
- # clojure-spec (3)
- # clojurescript (40)
- # clojurex (17)
- # core-async (10)
- # cursive (1)
- # data-science (2)
- # datomic (15)
- # emacs (10)
- # fulcro (15)
- # funcool (1)
- # graalvm (15)
- # joker (3)
- # nrepl (34)
- # off-topic (10)
- # pedestal (3)
- # rewrite-clj (6)
- # spacemacs (5)
- # sql (11)
I do not know how others have applied 'the other patch' successfully, or not, but patch -p1 < patchfile.txt
run from the root directory of a project is sometimes more forgiving of differences between the version of the code that was used to create the patch, vs. the code you are trying to apply it to, if they differ.
thanks for the tip -- iiuc, the suggestion is that possibly using patch -p1
might work better than using git apply
. i gave that a try, but it seems to fail on the same bit.
ah, this is the first time in years of using patch that i've gotten to the bottom of why a patch didn't work 🙂
it appears that clj-1472-3.patch doesn't know about the RT.init();
after:
static public Object loadWithClass(String scriptbase, Class<?> loadFrom) throws IOException, ClassNotFoundException{
in the current code base.https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Util.java#L248 was added in: https://github.com/clojure/clojure/commit/d07ef175c700329f7afbef8770332b6247a34a49
Yeah that was 1.10.1
@lee i tried your updated script twice -- once with each patch, then with /tmp/parallel.clj, i got:
$ clj -J-XX:-EliminateLocks
Clojure 1.10.1-patch_clj_1472_3
user=> (load-file "/tmp/parallel.clj")
Java version: 11.0.5
Clojure version: 1.10.1-patch_clj_1472_3
"Elapsed time: 19899.181595 msecs"
10000000
nil
and
$ clj -J-XX:-EliminateLocks
Clojure 1.10.1-patch_clj_1472_reentrant_finally2
user=> (load-file "/tmp/parallel.clj")
Java version: 11.0.5
Clojure version: 1.10.1-patch_clj_1472_reentrant_finally2
"Elapsed time: 19817.686781 msecs"
10000000
nil
it's nice to be able to tell from the output which patched clojure is being used :thumbsup:
and thanks to @borkdude for being so very @borkdude on this! what a whirlwind of productivity!
Just spotted one use of locking
in this blog article: https://jacobobryant.com/post/2019/ion/