Fork me on GitHub
#cider
<
2021-07-31
>
Steiner15:07:50

hey, I copy this code from tutorial,

(ns project-euler.problem3
  (:use [clojure.contrib.lazy-seqs :only (primes)])
  (:use [clojure.contrib.math :only (sqrt)]))
but there is something wrong
1. Unhandled java.io.FileNotFoundException
   Could not locate clojure/contrib/lazy_seqs__init.class,
   clojure/contrib/lazy_seqs.clj or clojure/contrib/lazy_seqs.cljc on
   classpath. Please check that namespaces with dashes use underscores
   in the Clojure file name.

dpsutton15:07:28

i don't recognize those files and neither does clojure. what library are you using?

dpsutton15:07:23

did you add the org.clojure/clojure-contrib "1.2.0" to your project.clj file and restart your repl?

Steiner15:07:02

sorry, I forget it

Steiner15:07:57

@dpsutton by the way, how do I now the latest version of clojure-contrib ??

dpsutton15:07:30

That repo is not active and it has been broken out into several constituents

dpsutton15:07:50

But I usually just go to the project repo and check the documentation

Steiner15:07:27

@dpsutton may I ask more about it, how can I find the repo for org/clojure/clojure-contrib?

dpsutton15:07:46

I just googled it and it was the second or third result

dpsutton15:07:57

Whatever tutorial you are using is a bit old though

dpsutton15:07:43

is the repo

Steiner16:07:06

how to import sqrt into clojure, I failed with this code

(ns project-euler.problem3
  (:use [java.lang.Math :only [sqrt]]))

dpsutton16:07:24

You can’t do that with methods from Java like that

dpsutton16:07:52

I think at this point you should ask questions in #beginners as the CIDER part seems largely solved