Thanks, Tim. This looks great.
For those of you who don't want to go digging through the thread, here's
the summary:
Step 1. Download nrepl-0.1.4-preview from Marmalade or MELPA (depends on
clojure-mode 1.11).
Step 2. Add this code to your .emacs file:
;; Patch ob-clojure to work with nrepl
For those people (like myself) who do a lot of Literate Programming in
Emacs using Clojure and org-babel, migrating to nrepl and nrepl.el is
somewhat non-trivial. This is because the existing Clojure support in
org-babel (ob-clojure.el) relies on slime and swank-clojure when running
Eppccc!!
On Friday, August 3, 2012 6:47:50 AM UTC-4, Sam Aaron wrote:
Hi everyone,
for those interested, I just put up a screencast of a performance I did
with Overtone on Friday the 27th of July at the Arnolfini art gallery in
Bristol, UK:
I built a modeling system that uses the multi-method namespace separation
you are talking about. The solution that I use simply leverages the
difference between require, use, and refer. In each namespace that
implements the multi-method, put (refer 'parent) after the ns form. In the
parent
The classpath is specified in the lein and cake scripts respectively.
lein is a shell script, and cake is a ruby script, so pop them open in
your favorite text editor and take a look.
~Gary
On Jun 24, 4:56 pm, Lee Spector lspec...@hampshire.edu wrote:
Oops: Ignore my last BTW -- now load
The way that cake and lein behave is generally this:
1) Search up the file tree starting from the directory in which cake
or lein is called until a project.clj file is encountered. Consider
this to be the project root.
2) Start a JVM in this directory with the classpath set to contain any
files
Lee,
You're just making a simple typo. To get the REPL to switch to the
source file's namespace, you have several options:
1) With the point in the source file, press C-c M-p ENTER
2) With the point in the REPL, type ,in ENTER overtoneproject.core
ENTER
3) With the point in the REPL,
I just have to add that your code is really not idiomatic for
Clojure. The do is not required here because there is an implicit do
around the body of every fn (including one created with defn). Also,
it's somewhat bad form to vertically align parentheses in Lisps.
Finally, if you want to place
My 2c:
Regarding learning how to model a complex data structure in a
functional paradigm:
I can think of few resources which sum up the proper mindset you
need to get into
better than the canonical Clojure essay on state and identity, found
here:
http://clojure.org/state
Regarding how
I've been using a number of similar functions in my own coding. This
was my approach.
(defn seq2map
Constructs a map from a sequence by applying keyvalfn to each
element of the sequence. keyvalfn should return a pair [key val]
to be added to the map for each input sequence element.
Umm mbrodersen...I believe Laurent was merely pointing out that you
can accomplish everything you did with your macros with regular
functions. The functions are actually shorter and clearer to read
than the macros as well. That is a pretty clear abuse of macros.
The only thing macros do here is
This shaves 7 characters off Sean's solution and short circuits just
as fast:
(some #(and (some #{rabble} (val %)) (key %)) players)
Happy hacking!
On Dec 10, 3:29 pm, Sean Devlin francoisdev...@gmail.com wrote:
Oops! Slight mistake
(ffirst (filter (comp (partial some #{rabble}) val)
12 matches
Mail list logo