Clojure is a modern Lisp dialect for the Java Virtual Machine (with versions for the CLR and JavaScript).

learn more… | top users | synonyms (1)

1
vote
2answers
47 views

Is there a Java version of Clojure's or Scala's persistent immutable vector?

It should be immutable but and allow data sharing with effectively O(1) indexing.
-1
votes
2answers
69 views

Programming language to process large data for R

Recently I got some time to learn data visualization, as a kind of replacement for Excel's Chart. My choice is R (with ggplot2) and have started to learn it. In "R in a nutshell", Joseph Adler put ...
0
votes
1answer
19 views

Clojure way of reading large files and transforming data therein

I am processing a Subrip subtitles file which is quite large and need to process it one subtitle at a time. In Java, to extract the subtitles from file, I would write a method with following ...
0
votes
1answer
22 views

Clojure:Why is Ref Lost on Assoc

I am working on updating counters in a map ref in Clojure. (defn increment-key [this key] (dosync (let [value (get @this key)] (if (= value nil) (alter this ...
0
votes
1answer
16 views

Clojure: Accessing Unique Field of a Datatype Directly

Suppose I have a datatype with only one field that holds a sorted map. (defrecord AdjacencyList [data]) (def adjacency-list (AdjacencyList. (sorted-map 1 {2 100}, 2 {3 -100}))) Now, if I want to ...
0
votes
1answer
12 views

Calling SVNKit from Clojure

I'm trying to follow this tutorial for using svnkit, but doing it from clojure. My code is: (defn svntest [ url ] (. DAVRepositoryFactory setup) (try (let [ repository (. SVNRepositoryFactory ...
0
votes
3answers
11 views

Display loaded dependencies in leiningen REPL

I'm running into problems because the library I have appears to conflict with the published documentation. I had a few problems with getting the right version of things installed before, and I'm ...
1
vote
1answer
37 views

Clojure: Idiomatic use of atom and ref?

I am working out a bit of Clojure code that will take a ref to a map and increment a key value pair in the map. I think I am using ref correctly, but Im not sure about atom. Do I need to use swap! ...
1
vote
1answer
18 views

calculating the max of a variable number of parameters

I'm new to Clojure so I'm wondering if someone could explain to me where I'm going wrong. I'm solving some problems in 4clojure to get familiar, and one of them is to calculate the max of a variable ...
2
votes
1answer
40 views

Clojure head retention

I'm reading Clojure Programming book by O'Reilly.. I came over an example of head retention. First example retains reference to d (I presume), so it doesnt get garbage collected: (let [[t d] ...
1
vote
3answers
49 views

How to Increment Values in a Map

I am wrapping my head around state in Clojure. I come from languages where state can be mutated. For example, in Python, I can create a dictionary, put some string => integer pairs inside, and then ...
0
votes
1answer
29 views

how to model the below transformation

I have a hashmap of data with the key a string description and value an integer weight. {:a 2 :b 3 ......} I need to transform the hash into a vector of vectors. Each internal vector contains the ...
2
votes
1answer
64 views

IntelliJ IDEA plugin development in other JVM languages

Is it possible to use other JVM languages such as Scala and Clojure for developing an IntelliJ IDEA plugin? Or do we have to use Java for this purpose? I could find no pointers on this on web, hence ...
1
vote
3answers
52 views

Consume http requests lazy

I'm trying to enrich data and the interface I have available for this is a web form. Due to the very poorly quality of the data on the remote end, I run through a chain of different searches until I ...
2
votes
1answer
61 views

next and rest in clojure

I am reading explanations on rest vs next in clojure. As I understand it, it breaks down to next evaluating/realizing the tail of the sequence, to know wether it should return nil or not, while rest ...

1 2 3 4 5 331
15 30 50 per page