This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # beginners (53)
- # cider (10)
- # cljs-dev (23)
- # cljsrn (25)
- # clojure (68)
- # clojure-italy (4)
- # clojure-spec (25)
- # clojure-uk (7)
- # clojurebridge-ams (1)
- # clojurescript (10)
- # cursive (20)
- # datomic (21)
- # duct (4)
- # fulcro (1)
- # graphql (4)
- # hoplon (1)
- # java (7)
- # luminus (9)
- # off-topic (111)
- # om-next (2)
- # onyx (14)
- # re-frame (3)
- # reagent (9)
- # shadow-cljs (182)
- # test-check (32)
- # tools-deps (53)
- # uncomplicate (1)
- # vim (94)
- # yada (2)
I only ask, because it appears to be a valid character when constructing symbols in clojure
the edn format doesn't list it as a valid symbol, would it be a bad idea to use it in symbols? https://github.com/edn-format/edn
https://github.com/clojure/clojure-clr/wiki/Specifying-types | has a special mening on clr
It's not listed here https://clojure.org/reference/reader#_reader_forms so I would avoid it.
Also, libraries like https://github.com/tonsky/clojure.unicode shouldn't work then, no?
I'm not saying it doesn't work. But if it's undocumented things might change. How necessary is it to use that character? Not at all I suspect.
But now that I think about it, it's unlikely to change so it shouldn't really matter.
@benzap you should also consider that it's hard to google this sort of name, it's also not obvious how to pronounce it.
I would stay away from using it in a symbol. We have talked about using | as an escaping character in symbols in the future so you could for example have spaces in a symbol name
is it possible to specify environmental variables like
LD_LIBRARY_PATH in leiningen or if possible, in the java runtime? I'm loading jna native library which works well witha java.library.path an jna.library.path, but I have a shared library that depends on another shared library, and for that it seems that I can only reply on LD_LIBRARY_PATH. Since the shared library will be provided as a resource, I would like if it would be possible to have to specified within the project.
I have a :gen-class'd namespace -- is there a way during testing (with clojure.test) to get an instance of that ns and call that method? I'm guessing... maybe not, because :gen-class only matters when compiling?
I just dropped transit into a project and I’m getting an exception simply trying the most basic example from the README:
;; Write data to a stream (def out (ByteArrayOutputStream. 4096)) (def writer (transit/writer out :json)) (transit/write writer "foo")
pushed it up as a very basic lein project here: https://github.com/ddellacosta/broken-transit, code and notes are here: https://github.com/ddellacosta/broken-transit/blob/master/src/broken_transit/core.clj
I don't know if cider is using this specific library but https://github.com/AvisoNovate/pretty is used by eg. Timbre and eftest to prettify stacktraces to similar form
@ddellacosta looks like this change yesterday might have broken something wrt reify https://github.com/cognitect/transit-clj/commit/92e694b799cb41bbcaf530c0e61f80dff9c55c4f#diff-afb95c976d41724a7445ca89b9c653c1L154
added all this to an issue (https://github.com/cognitect/transit-clj/issues/41), will move down a version and see if that fixes thing
Does clojure arrays box each element and/or store the type of each element alongside the element? I have a huge map where the values are arrays of floats, and I seem to get ~8 times more memory utilization than the size of a float (4 bytes) implies
Your stack trace wrt reify does seem tied directly to the change yesterday. Yes I'm using 0.8.303
Hi, I'm in the process of trying to grok specter and don't understand this difference in the output of the select, and the function that handles the output from the transform.
The select yields a vector of vectors, while the transform fn takes in the first and the last separately. Also when trying to call LAST again in the select path, it errors out with
Don't know how to create ISeq from: java.lang.Long which tells me that it actually selected individual values already. It's a little confusing by the output.
(select [INDEXED-VALS (collect-one FIRST) LAST] [5 6 7 8]) ;; => [[0 5] [1 6] [2 7] [3 8]] (transform [INDEXED-VALS (collect-one FIRST) LAST] (fn [a b] (println a "\n" b "\n===") (* a b)) [5 6 7 8]) ;; actual output [0 6 14 24] ;; Println output ;; 0 ;; 5 ;; === ;; 1 ;; 6 ;; === ;; 2 ;; 7 ;; === ;; 3 ;; 8 ;; ===
select puts everything you've navigated to in your path in a vector
LAST operates on whatever it's currently navigated to at that point and has nothing to do with anything else you've navigated to
if you want to navigate to the last thing navigated to by another path, you can use
so that's why I'm confused. In this case
(select [INDEXED-VALS (collect-one FIRST)] [5 6 7 8]) ;; => [[0 [0 5]] [1 [1 6]] [2 [2 7]] [3 [3 8]]]
LASTwould get me the vector in that, so why would a subsequent LAST not work. Sorry if the meaning is in your answer already, I'm just having a hard time connecting the dots with the example
at the end of that path you're navigated to 4 different locations,
[2 7], and
I guess that may be my understanding gap, the (collect-one FIRST) does not factor into the subsequent selections it seems.
Ok great, thanks for the help, something just clicked 🙂. Hopefully nothing broke.