This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-31
Channels
- # aws (1)
- # beginners (70)
- # boot (12)
- # calva (45)
- # cider (45)
- # clara (1)
- # cljdoc (10)
- # cljs-dev (133)
- # clojure (315)
- # clojure-dev (2)
- # clojure-europe (2)
- # clojure-italy (16)
- # clojure-nl (1)
- # clojure-spec (23)
- # clojure-uk (19)
- # clojurescript (48)
- # cursive (11)
- # data-science (5)
- # datomic (18)
- # figwheel-main (3)
- # fulcro (18)
- # graphql (14)
- # jackdaw (1)
- # juxt (1)
- # kaocha (1)
- # off-topic (10)
- # other-languages (3)
- # pathom (2)
- # pedestal (7)
- # re-frame (23)
- # reagent (1)
- # reitit (4)
- # ring-swagger (12)
- # rum (4)
- # shadow-cljs (26)
- # specter (6)
- # speculative (12)
- # tools-deps (44)
- # vim (8)
- # yada (2)
Updated the news post PR: https://github.com/clojure/clojurescript-site/pull/280
@mfikes maybe minor, but the performance of re-seq is also improved:
v8: 1.69
sm: 1.66
jc: 1.51
nh: 1.37
ck: 1.79
gvm: 1.04
We could add a bit of copy in a section under https://github.com/clojure/clojurescript-site/blob/9fe44f51168c8b6b39b0bed282bbc6882f744f24/content/news/2019-01-31-release.adoc#improved-performance
Any copy we could include? Or just something like
re-seq
performance has been improved, with a speedup of 1.5 or more under major JavaScript engines.
Sounds good; I suspect that once we merge the news post, we may need Alex to do the manual deploy
yeah, just let me know
@alexmiller if you want to deploy now go for it
Want me to merge https://github.com/clojure/clojurescript-site/pull/280 first?
probably the
Release
Current version: 1.10.439
on the front-page needs updating too?pushing button now
Running clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.514"}}}' -m cljs.main -re node -e '(1 - 1)'
I get
(node:9430) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
.
I have been getting that warning in previous versions as well, so it’s not a regression. I have ignored it so far…
@dnolen accoding to the clojure.core.specs the use of keywords in :keys
desctructuring is invalid. this fails to compile in shadow-cljs. the core.specs aren't actively used in CLJS yet but this should probably be addressed? https://github.com/clojure/clojurescript/blob/c7cd3a1f4265dd1f9687da7e1076223a4da8ce20/src/main/cljs/cljs/repl.cljs#L121
@alexmiller ^ that's surprising, I could have sworn that keywords in :keys
was explicitly allowed when namespace maps landed - am I misremembering?
$ clj
Clojure 1.10.0
user=> (let [{:keys [:foo]} {}])
nil
user=> (let [{::keys [:foo]} {}])
Syntax error macroexpanding clojure.core/let at (REPL:1:1).
why would ::keys
not be a thing?
user=> (let [{::keys [foo]} {::foo "bar"}] foo)
"bar"
user=> (let [{:foo/keys [:foo]} {}])
Syntax error macroexpanding clojure.core/let at (REPL:1:1).
At some point we could also just enable core specs (unless a compiler flag is used to opt out) https://dev.clojure.org/jira/browse/CLJS-3016
sorry, did y’all figure it out?
ah, that goes back to 1.9
@alexmiller any ruling on whether it should work in :keys
but not ::keys
? feels a bit inconsistent
those look like the same thing?
both :keys and ::keys should work
$ clj
Clojure 1.10.0
user=> (let [{:keys [:foo]} {}])
nil
user=> (let [{::keys [:foo]} {}])
Syntax error macroexpanding clojure.core/let at (REPL:1:1).
FWIW, the above is the same as https://dev.clojure.org/jira/browse/CLJS-3015 I think
it is worrying that I remembered the jira ticket number for this enhancement off the top of my head?
@alexmiller another push would be good?
I’m still assessing your question @thheller
so it seems the syntax for destructuring namespaced keys just doesn’t support simple keywords, only simple symbols
> The key list after :ns/keys should contain either non-namespaced symbols or non-namespaced keywords. Symbols are preferred. proposal originally intended to include the behavior but no comment remarks that it does not in practice
the primary reason to support keywords in the original :keys [:a :b]
syntax was to have support for autoresolved keywords so you could do :keys [::a ::b]
(as there are no auto-resolved symbols). With the namespaced :keys enhancement, you can do that on :keys itself (or :syms) with ::keys [a b]
or ::syms [a b]
, so it’s not really needed there.
One facet is that it appears ClojureScript has a more lenient / broad destructuring implementation. (That's how https://dev.clojure.org/jira/browse/CLJS-3015 was initially missed, IIRC.)
from looking at the patch, it seems like it would work with either symbol or keyword so perhaps the spec is overly restrictive
Oh, makes sense, perhaps just a overly tight spec, while both Clojure and ClojureScript's destructuring algorithms are OK with it.
I’d say the spec should additionally allow simple keywords, but not namespaced keywords?
if you skip macro spec checking and test this without you’ll see the destructuring code actually works with symbols and keywords, namespaced or not
the :keys namespace dominates
(let [{::keys [:foo/bar]} {:cljs.user/bar 1}] bar)
1
hmyeah, I can see how that would be confusing and I would still argue simple keywords in the spec for thatyes. just wondering if an analogue to this worked. #:a{:a 1 :_/b 2 } => {:a/a 1, :b 2}
cljs.user>
(let [{::keys [:foo]} {::foo 1}] foo)
1
cljs.user> *clojurescript-version*
"1.9.946"
@dpsutton this also worked in 1.10.514
. it only failed in shadow-cljs because that has the core specs enabled by default which is not true for CLJS currently
I guess the updated core.specs lib can be released before clojure 1.11 so people can already bump that version?
yes, we use the fix version for bucketing but those can be released off-cycle
but it will go through screening before that (whenever we do another round of screening)
Merged. Maybe we can do another small PR for the Quick Start update, and then have Alex do a deploy?
Confirmed download of that JAR is good:
$ java -cp cljs.jar cljs.main -re node -r
ClojureScript 1.10.516
cljs.user=> (+ 1 2)
3
is the website stuff manual now (to deploy) @alexmiller?
Let me merge that Quick Start PR so that both the news and Quick Start changes go out with one manual deploy.
Yes, it’s manual at the moment
Do you need me to deploy?
Any reason why ClojureScript releases aren’t mentioned on https://twitter.com/cognitect ? I see nothing about the previous release.
deploying
deployed - let me know if it looks good