Clojure is a general-purpose language supporting interactive development that encourages a functional programming style, and simplifies multithreaded programming.

learn more… | top users | synonyms

4
votes
2answers
737 views

Alternate method to dependent, nested if statements to check multiple states

Is there an easier way to process multiple true/false states than using nested if statements? I think there is, and it would be to create a sequence of states, and then use a function like when to ...
1
vote
1answer
563 views

Understanding clojure keywords

I'm taking my first steps with Clojure. Otherwise, I'm somewhat competent with JavaScript, Python, Java, and a little C. I was reading this artical that describes destructuring vectors and maps. E.g. ...
8
votes
9answers
3k views

OS choice for functional developing

I'm mainly a .NET developer so I normaly use Windows/VisualStudio (that means: I'm spoiled) but I'm enjoying Haskell and other (mostly functional) languagues in my spare time. Now for Haskell the ...
13
votes
1answer
1k views

Does Clojure have the continuation?

I started programming with Python. When using python, concepts like coroutine, closure made me really confusing. Now I think I know them some superficial level, but I want to get the "enlightement" ...
3
votes
1answer
145 views

For csv database extracts, how do map keys not create a dependency?

A lot of my work is done with .csv extracts (reports) from databases. As I have been programming in Clojure, I've received comments that relying on vector indexes creates dependencies. I understand ...
4
votes
3answers
567 views

Clojure state and persistence

I'm learning Clojure to see if it's something I can leverage at my current job, and more importantly, how I can convince my bosses that Clojure has a 'killer feature' over java that makes it worth the ...
25
votes
4answers
4k views

What limitations does the JVM impose on tail-call optimization

Clojure does not perform tail call optimization on its own: when you have a tail recursive function and you want to have it optimized, you have to use the special form recur. Similarly, if you have ...
5
votes
2answers
229 views

Can the Clojure set and maps syntax be added to other Lisp dialects?

In addition to create list using parentheses, Clojure allows to create vectors using [ ], maps using { } and sets using #{ }. Lisp is always said to be a very extensible language in which you can ...
1
vote
2answers
178 views

Is it bad form to stage a function's steps in intermediate variables (let bindings)?

I find I tend to need intermediate variables. In Clojure that's in the form of let bindings, like cmp-result-1 and cmp-result-2 in the following function. (defn str-cmp "Takes two strings and ...
11
votes
3answers
1k views

Scala or Clojure Functional Programming best practices

I did a lot of self-study coding, got some experience with Parallel Programming Models: Actors, Software Transactional Memory, Data Flow. When I am trying to apply these architectures to real life - ...
4
votes
2answers
2k views

Getting started with ClojureScript and Google Closure

I would like to investigate whether ClojureScript, with the associated Google Closure library is a reasonable tool to build modern, in-browser, Javascript applications. My current Javascript stack ...
6
votes
2answers
230 views

Language that can statically ensure a map's fields are present

If data is simple and objects are complex, I'm curious if there are any existing statically typed languages that would be able to augment(?) a map type into a type with guaranteed fields. I realize ...
4
votes
1answer
1k views

Clojure: vars, atoms, and refs (oh my)

also: defs, java fields, agents The clojure website has documentation for these concepts: Vars Atoms Refs Agents I understand the words, but I don't conceptually get the purpose / meaning of ...
4
votes
1answer
352 views

Is re-defing idiomatic in clojure?

Simple example: (def ticks 0) (defn run-iteration [] (def ticks (inc ticks))) Though the usual case involves things that don't change more than once every several hundred ms. How to do this ...
4
votes
4answers
3k views

Using Clojure instead of Python for scalability (multi core) reasons, good idea?

After reading http://clojure.org/rationale and other performance comparisons between Clojure and many languages, I started to think that apart from ease of use, I shouldn't be coding in Python ...
9
votes
3answers
407 views

Making LISPs manageable

I am trying to learn Clojure, which seems a good candidate for a successful LISP. I have no problem with the concepts, but now I would like to start actually doing something. Here it comes my ...
11
votes
3answers
2k views

How dependent on Rich Hickey is Clojure? [closed]

I was just asked this question by my company who is investing in a Clojure application and I did not have a good answer? Can anyone, in all seriousness tell me what would happen to Clojure if Rich ...
31
votes
13answers
2k views

Problems (such as maintenance) in development with unpopular language

I'm developing some application with clojure(lisp) alone in my team. It starts as small application. No problem. But as it's having features and extending the area, it's becoming important program. I ...
14
votes
6answers
3k views

Best practices in comment writing and documentation

Commenting nowadays is easier than ever. In Java, there are some nice techniques for linking comments to classes, and Java IDEs are good at making comment shells for you. Languages like Clojure even ...
13
votes
3answers
1k views

How independent is Clojure from Java?

I am quite new to the Clojure world. I appreciate the fact that one has easy access to all Java libraries via Clojure interop features, but I was wondering how much Clojure stands on its own legs. Of ...
2
votes
5answers
634 views

Programming language with native concurrency support for large graphs?

I'm currently looking for a new programming language to learn (currently working through some C++, know some C and Python), specifically one that has built-in concurrency support? I want to try to ...
8
votes
1answer
738 views

What are the essential Clojure libraries to learn beyond the basics of “core”

I am teaching myself Clojure. I've started using Leiningen, I'm working on Clojure Koans, plan to do LabREPL next, and will have a look at Noir. My question is: what are the essential "must know" ...
6
votes
5answers
2k views

Clojure Web Application: EC2 or GAE?

I am developing a web application written in Clojure using the Compojure framework. My question is, should I deploy to Amazon EC2 or Google App Engine? I've read this article on running Clojure code ...
14
votes
3answers
7k views

On the path to Enlightenment: Scheme, Common Lisp, Clojure? [closed]

A lot of people smarter than me keep writing about when you learn Lisp it makes you a better programmer because you "get it". Maybe all I hear about Lisp(s) changing your life is just a big practical ...
37
votes
7answers
3k views

C# Dev - I've tried Lisps, but I don't get it

After a few months of learning about and playing with Lisp, both CL and a bit of Clojure, I'm still not seeing a compelling reason to write anything in it instead of C#. I would really like some ...
17
votes
3answers
2k views

Why does the Lisp community prefer to accumulate all the parentheses at the end of the function?

Why does the Lisp community prefer to accumulate all the parentheses at the end of the function: (defn defer-expensive [cheap expensive] (if-let [good-enough (force cheap)] good-enough ...
3
votes
1answer
265 views

Incanter for real world statistical projects

I'm interested in statistical computing. R is a leader platform obviously but what about Incanter? Incanter is at the top of my list since I'm a Clojure and JVM guy. Do you have any real world ...
9
votes
1answer
326 views

Software Transactional Memory - Composability Example

One of the major advantages of software transactional memory that always gets mentioned is composability and modularity. Different fragments can be combined to produce larger components. In ...
3
votes
2answers
1k views

Clojure: Adding functions to defrecord without defining a protocol

A record can implement protocols. However, each time I think of a new function that I would like the record to implement, I have to add it to an existing protocol or create a new protocol. How do I ...