Fork me on GitHub
quan xing00:08:19

How do I align comments in VSCode. I press TAB can aligned clojure code, but comments is not align. I press Space key every time

Evan Z01:08:57

When working with CIDER/shadow-cljs, do you expect stuff in the browser to update when you C-x C-e?

Drew Verlee04:08:53

I think so, assume that's an eval command.

quan xing03:08:34

In vscode use ctrl+alt+c i`` can instrument a top level function for debugging like this : the function name add double line. How can I cancel it , exit debugging


Most likely just reevaluate the function

quan xing04:08:41

alt+enter the function is break everytime. I don't know how to cancel it


Shift+F5 should exit the debugger, or there should be a debug toolbar that looks like, and you can click the icon on the right


Re-evaluating the function definition should do it.


does array-map guarantees the order of elements when retrieving?


what do you mean by retrieving?


if you want to iterate over array-map the order will be the same as it was when array-map was called. But if your array-map is big (> 32 elements (?), unsure about exact number) adding an element might turn array-map into hash-map which does not preserve insertion order.


Thanks for the response @U04V4KLKC


Which collection type provide me insertion order ?


nothing from clojure core, but there is a library -


i mean if I add a value in the list ( 1 2 3 4 5 6 7 8 9) does it return in same order when I try to retrieve it?


and usually when I start looking at this library it is an indicator I should be using different data structure in the first place. sequence or vector


retrieve how?


and how you add an element to the list, this is also important.


fyi, array-map has nothing to do with list


ex- if I retrieve it using for -loop or doseq does it return in the same order ? 1 - 9 or , it might shuffle the order


no, the order will be the same as it was in the list.


Same if we use vector?


maybe you could explain your problem a bit more?


No, this confirmation should be fine for me 🙂 Thanks


for, map, and many other Clojure functions and macros that "iterate over elements of a collection" do so by calling seq on that collection. So it is the order of elements returned by seq on that collection that is the implementation issue that answers your question.


seq on lists and vectors is guaranteed to contain elements in the order that they are in that list or vector.


seq on a Clojure map returns the same key/value pairs in the same order for the same identical Clojure map object, but if you then add a new key, or remove a key, to produce a new Clojure map, calling seq on the new map provides no guarantees on the relative order of key/value pairs, as compared to the original map.


seq on the ordered library variant of maps does provide guarantees that key/value pairs will be returned in "insertion order", as described in its documentation, because its implementation is different than the built-in Clojure maps.


Hi, I'm struggling with following the instructions to build an uberjar in! It's almost certainly something laughably simple, but when I run clj -T:build uber I get an error:

Execution error (FileNotFoundException) at (
-T:build (No such file or directory)
So I don't think it's even getting to the function defn in my build.clj file! Any help would be much appreciated!


where did you get clj from


That's a good point, I think the one I have is a little out of date!

ls -l `which clj`
-rwxr-xr-x 1 root root 217 Sep 15  2018 /usr/local/bin/clj


Much better:

clj -version
Clojure CLI version
Thank you for your help - I have an uberjar now!


it may not be the same command referenced in that guide