This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-05
Channels
- # admin-announcements (1)
- # architecture (29)
- # beginners (244)
- # boot (5)
- # cider (2)
- # clara (8)
- # cljs-dev (58)
- # clojure (93)
- # clojure-australia (1)
- # clojure-dusseldorf (4)
- # clojure-france (1)
- # clojure-greece (16)
- # clojure-italy (9)
- # clojure-norway (1)
- # clojure-romania (1)
- # clojure-serbia (3)
- # clojure-spec (68)
- # clojure-uk (103)
- # clojurescript (41)
- # code-reviews (4)
- # community-development (4)
- # cursive (11)
- # data-science (2)
- # datascript (6)
- # defnpodcast (4)
- # docs (21)
- # duct (4)
- # emacs (118)
- # fulcro (120)
- # graphql (1)
- # jobs (1)
- # jobs-discuss (43)
- # leiningen (12)
- # off-topic (39)
- # onyx (11)
- # parinfer (13)
- # perun (1)
- # re-frame (2)
- # shadow-cljs (4)
- # spacemacs (5)
- # unrepl (6)
- # yada (1)
What's the reason that Atom
doesn't actually just implement -reset!
and -swap!
protocols and instead the entire validation/resetting is done in reset!
and swap!
?
if so I think we've got minimum example, patch, and tests for the letfn
bug https://dev.clojure.org/jira/browse/CLJS-1965
@dpsutton just from a quick review of the patch I think it could maybe be a smaller change
i've never made a patch to the compiler so i left what was done as is. happy to chat about how to improve, read comments on jira, or just mull it over if you don't have time
(let [containing-environment {}]
(letfn [(g [] 3)]
(defn f3 [] (g)))
(letfn [(g [] 4)]
(defn f4 [] (g))))
(deftest letfn-expression-tests
(is (= (f3) 3))
(is (= (f4) 4)))
if i'm understanding you these examples should not need to work around the bug. but the tests for these faili'm new to the compiler. is there a way to ask for a var name for that function that no one else will ever use?
@dpsutton Maybe try this later: (defmethod emit* :letfn [ast] (emit-let ast false))
. Perhaps js hoisting can work for us for once.
the invariants that prohibit clj let
from referencing before assignment are enforced before emission; at emission it looks like it would work
Wow. I was thinking of publishing Coal Mine to Clojars to make it a little easier to use it for regression testing. But now you can just do something like this with the latest command line tools:
{
:deps {
org.clojure/clojurescript {:mvn/version "1.9.1007"}
coal-mine {:git/url "" :rev "HEAD"}
}
}
Awesome!Boom! But don’t use HEAD.
By the way @alexmiller Coal Mine works for Clojure as well, if you are ever in want of running a Clojure change through a large corpus of code.
Cool, I do that :)