Fork me on GitHub

I’m running Cursive (latest beta) in IntelliJ 14.1, running a local REPL (nREPL) — how do I get the REPL to recompile my code (without launching an entirely new REPL)? I tried (use ‘mynamespace) again but that doesn’t reload it


@jeffh-fp: Tools -> REPL -> (Load file/Sync files) in REPL


You can also set up a keymap for that.


that works great — yea a shortcut will be necessary


why does (assoc (hash-map) 1 1000) return a PersistentArrayMap and not PersistentHashMap?


@potetm: looks like there are Cursive and Emacs keybinding default sets that I just hadn’t loaded


@bmay: That’s a really good question. From the best I can gather, the evaluation of an empty expression (one with a fn but no args) is somewhat different from the evaluation of expressions with args. The return value for an empty hash-map expression (or empty {} expression) seems to be a static final PersistentArrayMap.


I don’t have any real knowledge about the clojure compiler/parser though. This may be a better question for the #C03S1KBA2 channel.


@bmay: array maps and hash maps are two different implementations of persistent maps. array maps are generally used for maps with <= 8 entries and then auto-promote to a hash map when they get bigger.


array maps store entries in a single array and use linear searches rather than in the tree structure used by hash map