Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Benedek Fazekas
@benedekfazekas
@expez probably a silly question, but does ::set/foo make sense? if setprefix refers to a namespace then it should be :set/foo right? double colon is a shortcut to create keyword in current ns, or?
Lars Andersen
@expez
You are right ofc, not sure why I didn't see that at the time
Think I got confused because the clj reader accepted it, but the cljs reader did not heh
Benedek Fazekas
@benedekfazekas
haha no worries
nothing blocks the release then?
Lars Andersen
@expez
No, just gotta find a slot of time to fix that one
Lars Andersen
@expez
Actually can't reproduce it
seems to be working just fine
I can reproduce in 1.7 but not in 1.9
shiiiiit
Lars Andersen
@expez
so our current code works just fine in 1.9, but not in 1.7 (I tested this upgrading both clj and cljs to 1.9)
I'll dig into that another day
Benedek Fazekas
@benedekfazekas
coolio. no rush
Lars Andersen
@expez
:)
Benedek Fazekas
@benedekfazekas
never tried lispy tho.. i might
Benedek Fazekas
@benedekfazekas
@rxx
@expez I will have a proper look on #184 today and then merge. any objections?
Lars Andersen
@expez
sounds good to me
I don't think we should worry about staying close to slamhound (to make backporting easier) that project hasn't seen any activity for a long time
Benedek Fazekas
@benedekfazekas
yup. agreed
Lars Andersen
@expez
Thought about it when he wanted to change some of the code just because it used a style from 2008 :p
it makes my eyes hurt too, so I think it's fine lol
Arne Brasseur
@plexus
:wave:
Arne Brasseur
@plexus
just looking over some of the recent history here,
does ::set/foo make sense? if setprefix refers to a namespace then it should be :set/foo right? double colon is a shortcut to create keyword in current ns, or?
I may be missing some context here, but you can use ::foo/bar when foo is a namespace alias, e.g. (require '[hello-world :as foo]), then ::foo/bar is the same as :hello-world/bar
thanks for all the quick merges!
Lars Andersen
@expez
@plexus Does cljs support it, though?
Lars Andersen
@expez
Let me try with the updated reader
Invalid token: ::set/foo
bleh
Arne Brasseur
@plexus
oh really? that's surprising... but good to know
Lars Andersen
@expez
I'm not sure why it happens, makes no sense to me
I'm inclined to believe I'm doing something wrong
Arne Brasseur
@plexus
always a good belief to start from :)
Benedek Fazekas
@benedekfazekas
thx for the insight @plexus. strange... so is that a case of cljs being a bit behind in implementation or is this an undocumented feature of clj? (talking about the ::foo/bar style keywords)
Benedek Fazekas
@benedekfazekas
or am i completely confused? ;)
Lars Andersen
@expez
definitely a feature
If you google 'keyword alias clojure' you'll get some examples
I've been using this in clojure, in conjuction with spec, yet I got tripped up when you asked if they were legit a little while back
They aren't very intuitive
Benedek Fazekas
@benedekfazekas
is that documented somewhere? i only remember to see :foo/bar style in clojure doc
i seldom use them tbh. not much spec or datomic lately
Lars Andersen
@expez
clojure-emacs/cider-nrepl#224 here support was added to cider
there's no docs for this in the reader docs for clojure
You can even destructure using auto-resolved keywords, which will again be bound to only the name part of the key:
(require '[person :as p])

(let [person {::p/name "Franklin", ::p/age 25}
      {:keys [::p/name ::p/age]} person]
  (println name "is" age))

;= Franklin is 25
seems they are called 'auto-resolved keywords'
Benedek Fazekas
@benedekfazekas
bit confusing tbh... thx for the info @expez