Thanks again to Alex for helping me with my Clojure mojo in order to
get around a ClassCastException. I'm writing to request a code review
of my simple "Hello, world!" genetic algorithm simulator written in
Clojure. I've written an implementation in Java and I have used that
as the basis for my C
That was it, thanks!
On Feb 8, 5:01 pm, Alex Osborne wrote:
> John Svazic writes:
>
> Snipping to the relevant portion of the exception (always look at the
> last "Caused by"):
>
> > Caused by: java.lang.ClassCastException: clojure.lang.Cons cannot be
>
So I've put together a small genetic algorithm simulation that I've
written in Java which I have recently ported to Clojure. While the
code looks sound from my perspective, yet I get the following
exception when I run my uberjar:
Exception in thread "main" java.lang.RuntimeException:
java.lang.Cl
Benny already answered, but here's the common block that I'm using for
my Clojure submissions:
(import '(java.io BufferedReader FileReader))
(defn process-file [file-name]
(let [rdr (BufferedReader. (FileReader. file-name))]
(line-seq rdr)))
(defn my-func [col]
; Do something interesting
They do seem to allow whatever you like if you upload your own
package. I'm hooked on using their built-in editor, so in some cases
I copy-and-paste code until they get around to updating their version
of Clojure. The one nice thing about the site is that they do seem
rather responsive to questio
Thanks Sean and Benjamin. I've started at Coderloop and I must admit
that I'm hooked. I'll take a look at Project Euler next, once I'm
done providing suggestions and finishing a few more quizzes at
Coderloop. :-) Now I'll have to hit the IRC channel to get help on
some minor issues so as not to
I'm new to the Clojure community (admittedly, I'm only on chapter 6 of
Clojure in Action, so my Clojure skills are sub-sub-par at the
moment), but I was wondering if there were any weekly challenges for
writing Clojure code like there is (was?) for Ruby, i.e:
http://rubyquiz.com/
When I was start