OK, so I reserved a Conj Hilton room with double beds for 10/21-23,
two nights at $99, with tax $227. If a fellow clojurer wants to save
$110, email me directly!
-- Alexy
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send em
Greetings -- I'm paying my way to Conj and would like to split the
hotel with someone who doesn't snore! Driving is probably too far
from NH, but in case you sail your boat down the coast, I'd like to
jump in, too. Let's split the room at least!
Cheers,
Alexy
--
You received this message becau
On Sep 2, 5:24 pm, Stuart Sierra wrote:
> You'll need to adjust the version numbers for the Clojure
> dependencies. These are configured in clojure-contrib/modules/parent/
> pom.xml at the line:
>
>
> 1.2.0
>
> Change that to 1.3.0-SNAPSHOT for the latest snapshot (including the
> ones you
I usually git pull clojure, ant, mvn install, then git pull and build
clojure-contrib against it. There used to be a -Dclojure.jar=...
option mentioned in README.txt for the contrib. The new modular
version, however, doesn't mention it, just saying, use these contrib
versions for those clojure on
While writing JSON is fast, reading it back into a Clojure map is
slow; even with clj-json, based on Jackson.
Here's an idea: use Jackson's ObjectMapper. The following line
extracts a Java Map:
Map userData = mapper.readValue(new File("user.json"),
Map.class)
(from http://wiki.fasterxml.com/Jac
On May 18, 11:45 am, Christophe Grand wrote:
> (defn sorted-by? [pred s]
> (if-let [ns (next s)]
> (let [[a b] s]
> (and (pred a b) (recur pred ns)))
> true))
> (defn reps-sorted2? [dreps]
> (every? #(sorted-by? >= (map first (val %))) dreps))
>
> and it should be as fast as the
Christophe -- thanks for the wonderful tuning! I build my graph using
sorted-map for the nested maps, i.e. adjacency lists. Then it's
dumped to disk via jiraph, serializing the adjacency lists with Google
Protocol Buffers, and loaded back from them. The question I had was
whether the sorting ord
On May 18, 10:47 am, "Heinz N. Gies" wrote:
> Out of curiosity, can you remove the pmap and run them in the opposite order?
> as first (time (reps-sorted1? dreps)) then (time (reps-sorted2? dreps))?
user=> (time (reps-sorted1? dreps))
"Elapsed time: 8254.967 msecs"
true
(defn reps-sorted2? [drep
On May 18, 10:27 am, David Nolen wrote:
> On Tue, May 18, 2010 at 10:18 AM, braver wrote:
> The documentation is pretty clear about how pmap works. Your work needs to
> be greater than the coordination overhead. You probably need to batch your
> work before trying to call pmap.
D
I have a huge graph of the form
{"john" {1 {"alice" 1, "bob" 3}, 4 {"alice" 2, "stan" 1}, "alice" {1
{"john" 1, "mandy" 2}, 2 {"john" 3, "stan" 2}}}
It shows for each user days on which he communicated, and for each
day, with whom and how many times he addressed that person.
Essentially this is a
If get-in is to be consistent with get, it better allow to specify a
default value:
(get-in nested-structure [k1 k2 ... kN] :default something)
-- would it make sense to add that to the standard get-in?
Cheers,
Alexy
--
You received this message because you are subscribed to the Google
Groups
Meikel -- cool lazy solution, but doesn't generalize to replace <=
with a predicate. Here's my non-lazy, reduce-based one generic with
instantiations:
(defn clis-pred
[pred s]
(let [[x & xs] s [r zs _]
(reduce (fn [[r zs z] e]
(if (pred z e) [r (conj zs e) e] [(conj r zs) [e] e]))
I'd like to partition a positive numeric sequence into subsequences so
that each increasing subsequence is the longest possible among its
neighbors. Here's the closest I got so far:
(use 'clojure.contrib.seq-utils)
(defn clis [s] (->> s (into [-1]) (partition 2 1) (partition-by (fn
[[x y]] (< x y
13 matches
Mail list logo