Skip to content

Instantly share code, notes, and snippets.

@yedi yedi/error
Last active Jan 1, 2016

Embed
What would you like to do?
;; when trying to load rhyme_finder/app/handler.clj
java.lang.Exception: namespace 'rhyme-finder.core' not found
at clojure.core$load_lib.doInvoke (core.clj:5380)
clojure.lang.RestFn.applyTo (RestFn.java:142)
clojure.core$apply.invoke (core.clj:619)
clojure.core$load_libs.doInvoke (core.clj:5413)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invoke (core.clj:619)
clojure.core$require.doInvoke (core.clj:5496)
clojure.lang.RestFn.invoke (RestFn.java:551)
rhyme_finder.app.handler$eval2532$loading__4910__auto____2533.invoke (handler.clj:1)
rhyme_finder.app.handler$eval2532.invoke (handler.clj:1)
clojure.lang.Compiler.eval (Compiler.java:6619)
clojure.lang.Compiler.eval (Compiler.java:6608)
clojure.lang.Compiler.load (Compiler.java:7064)
rhyme_finder.app.handler$eval2528.invoke (NO_SOURCE_FILE:1)
clojure.lang.Compiler.eval (Compiler.java:6619)
clojure.lang.Compiler.eval (Compiler.java:6582)
clojure.core$eval.invoke (core.clj:2852)
clojure.main$repl$read_eval_print__6588$fn__6591.invoke (main.clj:259)
clojure.main$repl$read_eval_print__6588.invoke (main.clj:259)
clojure.main$repl$fn__6597.invoke (main.clj:277)
clojure.main$repl.doInvoke (main.clj:277)
clojure.lang.RestFn.invoke (RestFn.java:1096)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__1960.invoke (interruptible_eval.clj:56)
clojure.lang.AFn.applyToHelper (AFn.java:159)
clojure.lang.AFn.applyTo (AFn.java:151)
clojure.core$apply.invoke (core.clj:617)
clojure.core$with_bindings_STAR_.doInvoke (core.clj:1788)
clojure.lang.RestFn.invoke (RestFn.java:425)
clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke (interruptible_eval.clj:41)
clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__2001$fn__2004.invoke (interruptible_eval.clj:171)
clojure.core$comp$fn__4154.invoke (core.clj:2330)
clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__1994.invoke (interruptible_eval.clj:138)
clojure.lang.AFn.run (AFn.java:24)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask (ThreadPoolExecutor.java:895)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:918)
java.lang.Thread.run (Thread.java:695)
Yedis-MacBook-Pro:rhyme-finder yedianyansi$ lein repl
#<CompilerException java.lang.ClassNotFoundException: clojure.walk, compiling:(rhyme_finder/core.clj:23:5)>
nREPL server started on port 50385
REPL-y 0.1.10
Clojure 1.5.1
Exit: Control+D or (exit) or (quit)
Commands: (user/help)
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
(user/sourcery function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Examples from clojuredocs.org: [clojuredocs or cdoc]
(user/clojuredocs name-here)
(user/clojuredocs "ns-here" "name-here")
rhyme-finder.app.handler=> (in-ns 'rhyme-finder.app.handler)
#<Namespace rhyme-finder.app.handler>
(ns rhyme-finder.app.handler
(:use compojure.core)
(:require [compojure.route :as route]
[compojure.handler :as handler]
[compojure.response :as response]
[ring.util.response :as resp]
[ring.adapter.jetty :refer [run-jetty]]
[rhyme-finder.core :as rhyme]
[rhyme-finder.app.db :as db]))
(defroutes app-routes
(GET "/" [] (resp/redirect "/client.html"))
(route/resources "/")
;; ... and so on
(ns rhyme-finder.core
(:require [clojure.string :as str]
[clojure.walk :refer [keywordize-keys]]
[rhyme-finder.streams :as streams]))
(defn parse-lines [txt]
(map str/lower-case (str/split-lines txt)))
(defn parse-words [txt]
(map str/lower-case (str/split txt #"\s+")))
(defn clean-string [string]
(str/replace string #"[^a-zA-Z_0-9'-]" " "))
(def pronunciations (parse-lines (slurp "cmudict.txt")))
(defn update-values [f m]
(zipmap (keys m) (map f (vals m))))
(defn parse-phones [filename]
(let [phone-lines (map str/lower-case (parse-lines (slurp filename)))
phone-list (map #(str/split % #"\s") phone-lines)
add-to-list-fn (fn [m [v k]] (update-in m [k] #(conj % v)))]
(keywordize-keys
(reduce add-to-list-fn {} phone-list))))
;; ... and so on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.