This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-12
Channels
- # bangalore-clj (1)
- # beginners (10)
- # boot (5)
- # cljs-dev (47)
- # cljsrn (19)
- # clojure (57)
- # clojure-russia (63)
- # clojure-spec (26)
- # clojure-uk (7)
- # clojurescript (104)
- # cursive (26)
- # data-science (2)
- # datomic (1)
- # dirac (1)
- # hoplon (11)
- # juxt (23)
- # off-topic (16)
- # om (6)
- # onyx (3)
- # parinfer (2)
- # protorepl (2)
- # re-frame (1)
- # ring-swagger (1)
- # untangled (2)
working out how to use fully-qualified keys in our maps to work with spec, without making our code too verbose. how would I create an alias for keyword namespaces without requiring the namespace like (require [foo.bar :as foo])
? sometimes it’s impossible to require a certain namespace because of circular dependencies, but I'd still like to use an alias for creating keywords. also is there a valid syntax for referring to the current namespace in the new namespaced map syntax, something like #::{:a 1 :b 2}
?
also when I eval this on the repl I get RuntimeException EOF while reading
and then RuntimeException Unmatched delimiter: }
:
(def a #:test{:a 1
:b 1})
You can use create-ns and alias to create an alias
The #:: syntax should work for current ns
Not sure on the reader eof - which repl are you using
See http://clojure.org/reference/reader under Namespace Map Syntax for docs
thanks for the reply @alexmiller. using lein repl on 1.9-alpha14
#::
not working for me in some cases
foo.bar=> #::{:a 1}
RuntimeException EOF while reading, starting at line 1 clojure.lang.Util.runtimeException (Util.java:221)
RuntimeException Unmatched delimiter: } clojure.lang.Util.runtimeException (Util.java:221)
feels like a bug to me
I reproduced
um, is there a reason i could be getting a file not found exception for clojure/spec__init.class and clojure/spec.clj after switching to the 1.90-alpha14? i ran lein deps and even downloaded the zip in case that was necessary. do i need to run lein install in the 1.9 folder? i thought lein would have handled that
@sophiago try lean clean
first. if you’re still having problems, could you try including spec in a new project as a sanity check?
i'm running it from a checkout dependency. so probably need to run lein install in the original directory
hmm, ok. lein install seems to have worked, but still getting that error in the other project
oh, i guess i probably just need matching versions of clojure in both? that makes sense
you can only have one version of clojure at a time
they don't have to match, but the dependent will use the depender's version