Skip to main content

Questions tagged [clojure]

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

Filter by
Sorted by
Tagged with
-3 votes
2 answers
157 views

Let's say, that we keep track of students entering the auditorium using their IDs(Key) and their check-in time(Value) in a Map. We delete the entries once they move out of the auditorium. I want to ...
Vicky's user avatar
  • 399
-2 votes
1 answer
505 views

I am planning to improve my knowledge of Clojure and algorithms at the same time by implementing some known data structures in Clojure (e.g. linked lists, skip lists, bloom filter, etc.). However, I ...
Attilio's user avatar
  • 487
1 vote
2 answers
921 views

Using Functional language, How can 2 different parties achieve the result of increment/decrement operations concurrently? For the below scenario, Let's say, I've 2 quantities in stock and 2 users in ...
Vicky's user avatar
  • 399
2 votes
3 answers
968 views

This older question tells us that in functional programming "true" randomness cannot be achieved since in FP functions are pure/idempotent and return the same value irrespective of number of ...
Vicky's user avatar
  • 399
3 votes
1 answer
208 views

I am designing a DSL (in clojure, specifically; though this question is more general than that) in which 'entities' are tracked as immutable hashes/maps, and where the 'concept' membership of an ...
nben's user avatar
  • 345
12 votes
1 answer
2k views

I've heard that Clojure macros are easier to write but not as reliable as Racket's hygienic macros. My question has 2 parts: How does gensym differ from hygienic macros? What do Racket macros provide ...
Alex's user avatar
  • 284
2 votes
0 answers
390 views

I'm in the process of making a simple game using re-frame (and thus react and reagent), but I'm stuck at one point. In https://github.com/Day8/re-frame#control-via-fsm they claim Not every app ...
NiklasJ's user avatar
  • 675
1 vote
1 answer
222 views

I am new to Clojure and trying to get a handle on organizing a project's namespaces. I am working on a solver for the knapsack problem. Currently, I have broken the modules into files, but everything ...
ben rudgers's user avatar
25 votes
7 answers
17k views

In this video by Rich Hickey, the Clojure creator, he advises to use map to represent data instead of using a class to represent it, as done in Java. I don't understand how it can be better, since how ...
Emil's user avatar
  • 359
1 vote
1 answer
825 views

I heard a friend say: The first real use of Chris Okasaki's book was in Clojure's data structures I heard another friend say: No, they influenced the design of Scala in quite a subtle way. My ...
hawkeye's user avatar
  • 4,849
7 votes
2 answers
521 views

I have a polyline "class" in my Clojure program, which is represented by a vector of points. (It's not really a class or anything.) The polyline's length (in the geometric sense) is something that is ...
Leonid Shevtsov's user avatar
2 votes
1 answer
610 views

I'm using OSGi for some time and I really like the ability to swap/replace components while my application is running. I simply have to build my module and push it to the OSGi container. Is there a ...
Adam Arold's user avatar
  • 1,190
4 votes
2 answers
463 views

I'm currently learning Clojure (my first functional programming language), and I'm curious as to its order of evaluation. Here is an example: (take 10 (cycle [1 2 3])) If the cycle expression was ...
joecritch's user avatar
  • 143
3 votes
3 answers
2k views

I am fascinated to Lisp as it is simple yet powerful. I am just a beginner and I know there have been lots of discussions on removing parentheses from Lisp and its dialects. Yet I request Lisp ninja's ...
user115126's user avatar
7 votes
1 answer
1k views

On this blog post aphyr (who is a brilliant programmer) states: Clojure macros come with some important restrictions. Because they’re expanded prior to evaluation, macros are invisible to functions. ...
hawkeye's user avatar
  • 4,849
4 votes
3 answers
331 views

When we look at the the overlap between the Ruby Community - we see the following overlaps: Think Relevance (now Cognitect) has switched from Ruby to Clojure Jay Fields has switched from Ruby to ...
hawkeye's user avatar
  • 4,849
7 votes
1 answer
2k views

I'm writing a simple game in Java and I want to learn Clojure, so I've decided to refactor my current Java code to Clojure. The problem is that I've coded so much in object-oriented languages that I ...
m0skit0's user avatar
  • 175
8 votes
3 answers
1k views

My background is Ruby, C#, JavaScript and Java. And now I'm learning Clojure. What makes me feel uncomfortable about the later is that idiomatic Clojure seems to neglect the Uniform access principle (...
Alexey's user avatar
  • 1,269
46 votes
6 answers
10k views

I found this quote in "The Joy of Clojure" on p. 32, but someone said the same thing to me over dinner last week and I've heard it other places as well: [A] downside to object-oriented programming ...
GlenPeterson's user avatar
0 votes
1 answer
2k views

This question could be generalized to any language where the language development is open-source, potentially, but I'm most curious about Clojure specifically. If Clojure (as a language) is open-...
Ben Mosher's user avatar
8 votes
3 answers
3k views

I am new to Clojure, I am new to Macros and I have no prior background in Lisp. I went on to create my own switch case like form and ended up with this: (defmacro switch-case [v cases default] (if (...
Amogh Talpallikar's user avatar
0 votes
2 answers
527 views

I'm a web developer, but lately I have been learning Clojure and now I'm interested in creating a p2p application. And since Clojure is a general purpose language, I guess I can just use that. Any ...
ChocoDeveloper's user avatar
14 votes
1 answer
4k views

I am new to Clojure. I can understand the code I write but it becomes too difficult to understand it later.It becomes difficult to match parentheses. What are the generic conventions to follow ...
Amogh Talpallikar's user avatar
10 votes
2 answers
2k views

I've been told in previous questions that functional programming languages are unsuited for dynamic systems such as a physics engine, mainly because it's costly to mutate objects. How realistic is ...
MaiaVictor's user avatar
  • 5,860
3 votes
2 answers
2k views

I have a project that will need to handle 1000s of requests a second with a decent amount of processing for each. For the most part, the processing will be done on a list of items, basically ...
tonyl7126's user avatar
  • 297