0
votes

I found that I can use Chris Houser's repl-utils library (clojure.contrib.repl-utils/source or show) for poking into Java by reading Programming Clojure book page 20.

I searched the web and downloaded the 'clojure-contrib.jar', and set it as a part of classpath.

The problem is I can't run the following command

(use 'clojure.contrib.repl-utils)

on both command line clojure and emacs/slime.

What might be wrong? Is Chirs Houser's library is different from 'clojure-contrib.jar'?

2
Monolithic contrib has been deprecated for many releases now and has not been maintained / updated for years. See this page for more details: dev.clojure.org/display/community/Where+Did+Clojure.Contrib+GoSean Corfield

2 Answers

1
votes

it works for me, we need more information to help you: what happend exactly when you run it? does it raise an error?

0
votes

FOUND A SOLUTION

I asked and got some answers.

In short, - it's OK to have it require, but gives me an error to refer. As a result, I need to use as follows

user=> (require 'clojure.contrib.repl-utils)
user=> (clojure.contrib.repl-utils/expression-info '(+ 1 2))
{:class java.lang.Number, :primitive? false}