This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-28
Channels
- # aleph (16)
- # announcements (7)
- # asami (4)
- # aws (26)
- # babashka (26)
- # babashka-sci-dev (50)
- # beginners (118)
- # biff (7)
- # calva (15)
- # cider (6)
- # clj-kondo (8)
- # cljs-experience (3)
- # clojure (30)
- # clojure-austin (26)
- # clojure-europe (20)
- # clojure-france (2)
- # clojure-ireland (1)
- # clojure-nl (3)
- # clojure-norway (2)
- # clojure-spec (7)
- # clojure-uk (6)
- # clojurescript (12)
- # community-development (5)
- # conjure (1)
- # copenhagen-clojurians (3)
- # core-typed (71)
- # cursive (3)
- # datomic (1)
- # emacs (4)
- # fulcro (2)
- # helix (2)
- # introduce-yourself (3)
- # jobs (1)
- # london-clojurians (6)
- # lsp (122)
- # malli (2)
- # missionary (5)
- # overtone (14)
- # pathom (4)
- # polylith (1)
- # reagent (4)
- # reitit (1)
- # releases (1)
- # shadow-cljs (80)
- # testing (10)
- # tools-deps (6)
- # vim (3)
- # xtdb (19)
(defmacro symap [& exprs]
(zipmap (map keyword exprs) exprs))
(let [a 1 b 2]
(symap a b))
=> {:a 1
:b 2}
that sweet sweet syntax sugar…It's like a syntax sugar in js to build maps with keys from names of locals. Keywords are natural keys.
Map lookup is hash lookup + equality. If keywords are identical their equality check is very fast, almost free relative to the lookup
I’ve not tested it, but I’m gonna guess that the longest part of this process isn’t the equality check.
At any rate, I was making a suggestion to @U47G49KHQ — not looking for an empty debate with no constraints 😄
I refer to comment by @U2FRKM4TW which (I possibly misunderstood) wanted to show that not identical keys could be used as map keys.
Oh yes, they can, I assumed the original argument was that it makes equality more complicate (but I possibly misunderstood too 🙂)
Map lookup is hash lookup + equality. If keywords are identical their equality check is very fast, almost free relative to the lookup
A while ago I changed the organization name of SCI from borkdude/sci
to org.babashka/sci
. This caused quite a few problems, since some people included both as (transitive) dependencies and while they though they were using the newest, they were actually hitting the old library. I've been through quite a few repos making PRs to move to the new org. Now I'm trying to come up with one last thing: do one more update to borkdude/sci
and print a warning on requiring sci.core
that people should move to org.babashka/sci
. Do you think that's a reasonable thing to do?
Seems like there'd need to be a redirect feature in the Maven protocol for that. I wonder if there is one such mechanism and we don't know?
Now I'm not sure if Clojars and/or tools.deps or pomegranate support the relocation feature of Maven 2. It seems like a good feature to support.
@U0K064KQV very interesting!
longer answer: that sounds like a kind and thoughtful way of helping people. if you want to be extra nice you could make it so the library has a way of disabling that warning for those who can't or don't want to move
How much does printing a warning do? Are there people that are bumping dependencies on sci but aren't aware of the groupid change? If not, then the old version will be included without a warning. Maybe I'm seeing this wrong and enough people are using tools like neil that you'd see projects update sci to the latest, but I don't know.
At least I would reach the people who auto-upgrade their deps using a tool like antq, neil, lein ancient, etc. Can't reach everybody.
that's fair
@borkdude antq
seems to have been pretty good about identifying group changes for me -- no idea how it does it.