I've been having trouble with setting up SLIME to work with both Clojure and Common Lisp. Most Clojure devs tend to use the stripped down SLIME available via ELPA that is frozen for Clojure compatibility. I, however, do a lot of Common Lisp hacking as well and I generally use the SLIME CVS version (obtained via QuickLisp). There are some well known problems with the swank implementation for Clojur
I've found myself using the following idiom lately in clojure code. (def *some-global-var* (ref {})) (defn get-global-var [] @*global-var*) (defn update-global-var [val] (dosync (ref-set *global-var* val))) Most of the time this isn't even multi-threaded code that might need the transactional semantics that refs give you. It just feels like refs are for more than threaded code but basically for an
FWIW, I'm interpreting the question here as specifically asking how to run a single file, like a script, versus as a part of a compiled project. Obviously though, there's a relationship between how and why you would want to run a single file, and how you would want to build a full project, so I weigh that in some as well. Best choice: the clj tooling Docs are here: https://clojure.org/guides/deps_
What is the preferred way of reloading functions defined in a Clojure file without having to restart the REPL. Right now, in order to use the updated file I have to: edit src/foo/bar.clj close the REPL open the REPL (load-file "src/foo/bar.clj") (use 'foo.bar) In addition, (use 'foo.bar :reload-all) does not result in required effect, which is evaluating the modified bodies of functions and return
I'm pulling data from Redis using Aleph: (apply hash-map @(@r [:hgetall (key-medication id)])) The problem is this data comes back with strings for keys, for ex: ({"name" "Tylenol", "how" "instructions"}) When I need it to be: ({:name "Tylenol", :how "instructions}) I was previously creating a new map via: { :name (m "name"), :how (m "how")} But this is inefficient for a large amount of keys. If t
Transducers are recipes of what to do with a sequence of data without knowledge of what the underlying sequence is (how to do it). It can be any seq, async channel or maybe observable. They are composable and polymorphic. The benefit is, you don't have to implement all standard combinators every time a new data source is added. Again and again. As a result, you as user are able to reuse those reci
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く