Live data from Hacker News

Try Clojure in your browser

tryclj.com

21–30 of 30 posts

Re: Try Clojure in your browser

#21

Ummm.... Following the first thing in the tutorial: Clojure> (+3 3) java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn http://gyazo.com/22c613f5bb4ebda5a36d0fbc0a85b83d What have I missed?

So just to give you some background. In any Lisp, when you evaluate a list, the first element is treated as an operator, and the remaining items are treated as arguments. Moreover, there is no distinction between graphic characters or alphabetic characters for the purposes of defining variable names. So '+' is a valid name for a variable (which is bound to the addition function), and so is '+3'. So without the space, it thinks you are trying to call the function '+3' with the argument '3'.

Re: Try Clojure in your browser

#23
post #8

Earlier quoted context omitted.

Not recommended. Matrix multiplication is really slow, even with Incanter. I doubt you'll get very far with data analysis without multiplying a few matrices so avoid.

Slow compared to what? Numpy (or equivalent) or optimized fortran?

[deleted]

Re: Try Clojure in your browser

#24
post #8

Earlier quoted context omitted.

Not recommended. Matrix multiplication is really slow, even with Incanter. I doubt you'll get very far with data analysis without multiplying a few matrices so avoid.

Slow compared to what? Numpy (or equivalent) or optimized fortran?

You know what? I realized that I didn't read the whole question. I switched from Octave, not Python. Oops.

Re: Try Clojure in your browser

#26
post #2

I found it fun to see division results returned as fractions. Has anyone here switched from Python to Clojure for data analysis? What has been their experience?

I'm in the process right now. I didn't want to use Incanter since I don't like the kitchen sink reinvent R style, but there aren't any Clojure-esque matrix libraries around.

You, flatly, gain the language advantages of Clojure but have absolutely none of the Numpy/Matlab/R-like environments.

Re: Try Clojure in your browser

#30
post #29

Earlier quoted context omitted.

Presumably because Clojure runs on the JVM.

Java also runs on the JVM and there's GWT

The GWT compiler doesn't ship with the Java standard library though. You're not gonna be able to compile most Java code with the GWT compiler.
Post reply on HN