Questions tagged [clojure-repl]

17 questions
10
votes
2 answers

Missing doc in non-user namespaces in Clojure 1.5

What should I do to get doc available again? brew install --devel leiningen lein new app yeehaw cd yeehaw ; edit project.clj and replace "1.4.0" with 1.5.0-RC1" lein repl yeehaw.core=> (doc map) CompilerException java.lang.RuntimeException: Unable…
David J.
  • 31,569
  • 22
  • 122
  • 174
4
votes
1 answer

best clojure repl?

there is bunch of repl in clojure ? lein repl cursive clojure repl plugin inteljidea gorilla repl newly launched cider for emacs is anybody having idea which one is good?
piyushmandovra
  • 4,219
  • 3
  • 19
  • 30
4
votes
1 answer

Suppress the printing of the data an atom holds in the REPL? (or ref, agent, ...)

The following is perfectly valid Clojure code: (def a (atom nil)) (def b (atom a)) (reset! a b) it is even useful in situations where back references are needed. However, it is annoying to work with such things in the REPL: the REPL will try to…
amadeoh
  • 95
  • 6
3
votes
1 answer

How can I repeat the last line in the Clojure REPL?

In bash or Ruby's IRB, I can run a command or evaluate an expression, then use the up arrow on my keyboard to edit and rerun the same code. (This may be something I have configured, but I don't think so.) This doesn't work for me in the Clojure…
Nathan Long
  • 122,748
  • 97
  • 336
  • 451
2
votes
3 answers

Clojure Vector of maps

I am new to clojure programming and need a little help. Say I have a vector of maps as shown. (def testVMap [ {:name "AAA" :rate 100 } {:name "GEICO" :rate 120 } {:name "PROGRESSIVE" :rate 118} ] ) How do I do some operations like…
sunny
  • 69
  • 1
  • 11
2
votes
2 answers

"Can only recur from tail position, compiling" error while using recur in loop

I'm very newbie with Clojure, and for practice I am trying to apply a simple algorithm for semi random numbers. A few days ago, I read about loops in the docs of clojure, and how they work using recur, so I tried to write a loop with this lines of…
Fernandosg
  • 23
  • 3
2
votes
1 answer

How to stop a orphan thread in clojure REPL

I am doing something related with thread with clojure. Now I am working in REPL, write and update code in REPL. My problem is, sometime there will be some futures left running. And I lost the ref by some kind of mistakes. My only way to stop them…
Mavlarn
  • 3,807
  • 2
  • 37
  • 57
2
votes
1 answer

How to Increase REPL font size in intellij idea...?

i use intellij 11.1.2 and is there a way to change REPL font size. Thank you
ngesh
  • 13,398
  • 4
  • 44
  • 60
1
vote
2 answers

(Clojure) Count how many times any character appear in a string

I am trying to write a function (char-count) which takes a pattern and a string, then returns a number (count) which represents how many times any of the characters in the pattern appear in the string. For example: (char-count "Bb" "Best buy") would…
1
vote
1 answer

Clojure/Java error when connecting to REPL - java.io.FileNotFoundException: Could not locate 'clojure/core/server__init.class

I am on Windows 10. I succeed to compile and run this jar. But when I try to connect to Socket REPL from telnet I get this error and telnet wrote Connection closed by foreign host. ERROR Exception in thread "Clojure Connection mine 1"…
1
vote
2 answers

Clojure: Why can't I reference class methods without calling them?

Here's a Clojure REPL session: moon.core> Double java.lang.Double moon.core> (Double/parseDouble "1.0") 1.0 moon.core> Double/parseDouble CompilerException java.lang.RuntimeException: Unable to find static field: parseDouble in class…
Brendan
  • 1,995
  • 1
  • 20
  • 35
1
vote
1 answer

Why does the Clojure reader get confused with keywords containing colons?

From the reader docs: Keywords are like symbols, except: They can and must begin with a colon, e.g. :fred. They cannot contain '.' or name classes. A keyword that begins with two colons is resolved in the current namespace and A symbol can…
Joe
  • 46,419
  • 33
  • 155
  • 245
1
vote
1 answer

What is `clojure.main` in the REPL command?

On the Clojure Getting Started page, it shows to start the REPL like this: java -cp clojure-1.5.1.jar clojure.main The first argument is a file, which can also be specified via the environment variable CLASSPATH. But what is clojure.main?
Nathan Long
  • 122,748
  • 97
  • 336
  • 451
0
votes
2 answers

Clojure IntelliJ Repl can't reload files properly

First, thank you for take your time reading my question! The problem is that when I try to start my system, the repl can't find some files, but if I go and load manually, each of this file's dependencies one by one before it, the file loads…
0
votes
1 answer

custom accept function in start-server clojure

I'm trying to run clojure.core.server/start-server but instead of using the repl I want a custom function as accept option. I'm following this post where a repl server is executed as clojure -X clojure.core.server/start-server :name '"server"' :port…
Rafael
  • 555
  • 6
  • 19
1
2