Fork me on GitHub

is there an easy way to call JS functions from klipse? or is klipse off in it's own isolated space ?


hi all, should select-keys work over a sorted-map-by? I am confused about the behaviour of some code I am trying. I have a sorted-map-by and when I do a (select-keys tasks [:bflf2hs5qrtrefivkbj0]) nothing is returned, although the sorted map has that key with a coresponding value


@nustiudinastea could be bug, if so open a ticket with the minimal steps to reproduce


@dnolen ok, I will first try re-produce in a different example and if it has the same behaviour I will open a ticket


I can already say I can't reproduce it in a simple example, could be related to the re-frame/reagent application db


@dnolen I now understand what happened. My sorted-map-by was constructed using a custom comparison function, which only returned -1 and 1, and never 0. Once I added the equality case which returns 0, the resulting sorted map started to behave normally. I still find it a bit confusing because the comparison function doesn't use the key in the map, but a sub-field of the value, so I don't understand why a select-keys does not work. Since the map keys are different than the sub-field I use to perform the sorting comparison


@nustiudinastea I’m assuming to find the key you must provide a proper comparison fn


so I don’t know it could work w/o that


@nustiudinastea Are you using a comparison function that uses only part of a value for comparing two things, and then you try adding keys that are not = but your comparison function treats them as equal, because they differ in parts of the value that are ignored by your comparison function?


If so, that will not lead to happiness.


~so, I'm timidly trying to move from lein to the new `clj` cli tools, and I'm going through this page... there are some things I dont understand:~ ~<> &gt; ~Now that we have a simple program, let’s build and run some ClojureScript:~ &gt; ~`clj --main cljs.main --compile hello-world.core --repl`~


where is cljs.main coming from? should that be on my classpath? when I run that command, I get a Could not locate cljs/main__init.class or cljs/main.clj on classpath.


the clj command works fine and loads a repl


I'll move this to #beginners, I suppose