0

I'm new to Clojure development and I was following Eric Rochester tutorials on the subject, most precisily: Tokenization Part 4

When namespaces are introduced Eric asks the users to write this header on a file named word.clj as I did:

(in-ns 'word)
(clojure/refer 'clojure)

And using La Clojure plugin for intellij IDEA I launch a Clojure REPL and get this:

Clojure 1.5.1
user=> (load-file "C:/folder/Dev/src/clojure/src/word.clj")
CompilerException java.lang.RuntimeException: No such namespace: clojure, compiling:(C:\folder\Dev\src\clojure\src\word.clj:2:1) 

For such a simple two line program I wouldn't expect these to be missing dependencies, especially when I'm referring the closure core library.

Can someone explain what kind of noob mistake I'm doing?

Thank you.

bitoiu
  • 6,893
  • 5
  • 38
  • 60
  • I would also give cursive clojure plugin a shot over la clojure, as la clojure is not being actively developed anymore. – RedDeckWins Sep 05 '14 at 16:39
  • Hey @RedDeckWins, I'm going to wait until cursive comes into a proper release build, my IntelliJ didn't like the plugin although I followed to set up to the line, including testing older versions. I'm sticking to la clojure for the next few months and then swap :) – bitoiu Sep 05 '14 at 21:36
  • I also have light table on the side... – bitoiu Sep 05 '14 at 21:36
  • which version of Intellij are you using, just curious? – RedDeckWins Sep 05 '14 at 21:38

1 Answers1

2

Namespace clojure is obsolete (that blog is quite old, 2008). Use clojure.core:

user> (in-ns 'word)
;; => #<Namespace word>
user> (clojure.core/refer 'clojure.core)
;; => nil
Mark Karpov
  • 7,499
  • 2
  • 27
  • 62