Clojure: A program which seems to require heavy use of data structure mutation

Let's say I have a list of vectors like this:and I want to convert this list into a tree like structure. Every node can be represented with a map of …

Lisp (Programming Language)

Can not access to static methods in Clojure

I have a problem when trying to access a static method of some class. Here is the code and the error message:The java doc follows: …


How to read individual key from EDN file in Clojure [on hold]

I have read the EDN file till EOF, Now I want to read the first value of first key. Thanks in advance.

Lisp (Programming Language)

Emacs Cider Debugger locals navigation

I use Emacs with Cider to debug Clojure Code. After setting a breakpoint using the default debugging framework , there appears the list of debugging …


Finding a regular-expression-like sequence of values in a Clojure vector

I am using the libpostal library to find an full address (street, city, state, and postal code) within a news article. libpostal when given input …

Lisp (Programming Language)

What are the alternatives of pexpect in Clojure, Racket, Scala, and Common Lisp?

I want a library to interact with CLI apps in these languages. (Is this off-topic in SO? If so, where do I post it?)

Common Lisp

Clojure program works fine when debugged, fails in repl

I'm learning core.async and have written a simple producer consumer code:This code works fine when I step in through the process function in debugger …


Clojure Sente: Sente sends a follow up message to the client after page load and destroys the view

I'm quite confused about why sente is sending the client a message all on its own around 8 seconds after the page is initially loaded. What else is …


How can I write this Clojure macro more idiomatically?

I like to avoid using the (var-get (resolve (symbol ... (str '~parem)))). Something like am using this macro in a …

Lisp (Programming Language)

What's the best of live-calling quil functions?

I use Emacs+CIDER. I like to be able to do something akin to just evaling (quil/frame-rate 90). But Calling that function is only possible within a …

Lisp (Programming Language)

Does clojure repl store the return value of previous commands

If I execute this commands in the clojure repl:This command prints out numbers upto 5 million (it takes some time) and the memory usage of clojure …

Lisp (Programming Language)

Clojure Macros: When can a function not duplicate a macro's behaviour?

I'm playing around with clojure macros and I'm finding that a lot of macro behavior I can just replicate with function composition.A good example of …


Clojure Spec and destructuring?

Not sure how to write a Spec to check the destructured arguments to a function.If I have this simple function:And I write this Spec for the …

Lisp (Programming Language)

Clojure Lazy Sequences: Equivalents in Kotlin

Clojure offers lazy evaluation of values in (infinite) sequences. With this approach, values will only be computed when they are actually consumed.An …

Stack Overflow

Popup Cards and Clojure

At Lovepop we use Clojure to write server-side web services in the e-commerce and design spaces. We have a few Clojure applications that power our 3D …


How do I undo or reverse a transaction in datomic?

I committed a transaction to datomic accidentally and I want to "undo" the whole transaction. I know exactly which transaction it is and I can see …

Lisp (Programming Language)

Get key by first element in value list in Clojure

This is similar to Clojure get map key by valueHowever, there is one difference. How would you do the same thing if hm is likeThe idea being to get 1 …

Lisp (Programming Language)

Reading text files and calculating values in clojure

I have three text files as explained below:1) I want to calculate total sales and total products like for example to calculate the total sales , to …

Lisp (Programming Language)

Clojure build failed on Travis CI with OpenJDK 9 during lein deps

BackgroundI have a simple Clojure 1.9 project.It was configured with a minimal .travis.yml.Travis CIThe builds for OpenJDK 8, OracleJDK 8 and …

Lisp (Programming Language)

Cross platform Clojure mobile-app development [on hold]

I'm looking into frameworks to develop a cross platform app (android & ios) using Clojure.The 2 most actively supported I came upon are:• re-natal<br>• expo …

Lisp (Programming Language)

(split "cat|of|dog" #"|") does not work as intended in Clojure

Output received by doing (split "cat|of|dog" #"|"):But the intended output is "cat", "of", "dog". If I do the split using any other character like …

Lisp (Programming Language)

Converting string to nested map in Clojure

I have a file containing some text like:I want to work with this input using a map. In Java or Python, I would have made a nested map like:Or even a …


Clojurescript macro and name mangling

<b>Context</b><p>I am using Clojurescript and I am trying to define a lot of functions at compile time to wrap a Javascript API. My code works fine with lower …


Filter on the values of multiple keys in a map entry and return a map with those entries Clojure

I am new to clojure and need some help.In clojurescript I build up a html table using a map (stored in atom) e.g.I want to create a search that …

Lisp (Programming Language)

Fresh clojure installation in Ubuntu - Error building classpath

I just installed a fresh copy of Ubuntu on VirtualBox to try out Clojure. I followed the instructions @, …

Ubiquitous Computing

java.jdbc clojure execute! insert arity

I'm working with a postgres database from clojure using java.jdbc.I want to do an 'upsert' operation on a database using some code like this:The …

Lisp (Programming Language)

Convert vector of lists into vector of vectors

I have the following data in a .txt file:<p>I get the data and convert it to a vector using the following code:<p>Which gives me the following vector:<p>I …

Lisp (Programming Language)

Linear Regression in Clojure

I am going through the Clojure for Machine Learning book and in chapter 2 "Understanding Linear Regression" I have these two functions:I can't figure …

Lisp (Programming Language)

What is the most performant lisp on the JVM

What is the most performant (fastest) lisp implementation on the JVM? By lisp implementation I consider all implementations of any language in lisp …


how to write this select where clause

How can I implement <b>select * from fruit where cost > 22 and cost < 44</b> w/ DSL way, by example below from clojure/java.jdbc demo:Thanks in advance.

Lisp (Programming Language)