173 points · by mattyb · 16y ago · 85 comments
Python is now my go-to language, especially because of Scipy, NetworkX and bridges like RPy.
I would definitely put in the time if someone with mathematical modelling experience can support the idea that I'll be more productive in Clojure. Anyone?
I really would love to see a list of testimonials and anti-testimonials of people from various fields that switched to Clojure and either got much more done or got burned.
Sorry, I realise that this is a wee bit off the main topic.
So far the experience has been great. Apart from the language being really well designed, there is the wealth of java libraries accessible just by adding a single line to your project.clj. And there is Clojure support for parallel programming — there is nothing like spending all of 5 seconds on making one of your hotspots use 16 cores just by adding a 'p' in front of 'map'.
All in all, so far it has been a great experience. There were amazingly few bugs and problems.
At the moment my vote would be for python or clojure + r.
Maybe that's what I should lose, the paralysis of starting out down the wrong track and simply do stuff wrong until I find a better way.
This shows a lot of promise, and it would be great if App Engine could become (in a way) Clojure's Heroku.
Do you still have to deal with Java's baggage even if you run Clojure on App Engine? How much can you abstract away? Any libs?
The good news is that you also get Java's "Deployment for Dummies" solutions (just copy the JAR/WAR and you're good to go), though.
The nice thing is that if you suddenly decide you need to use a Java library (say, one of the Apache Commons libs), you just add one line to your project.clj file, do "lein deps" and boom, you can use the library in your project.
Having written quite a bit of software in Common Lisp, this is a welcome change.
Using ring and ring-servlet you can build the servlet app engine wants. Libraries like compojure build on top of ring.
The datastore can be accessed using http://github.com/r0man/appengine-clj or http://github.com/smartrevolution/clj-gae-datastore.
Accessing the blobstore has not been abstracted away yet and requires a bit of work to get uploads acting correctly with ring/compojure.
I've not touched task queues, xmpp, mail, or memcache and have not seen any abstractions for them.
I'm curious about the "how to get rid of Eclipse"-part. How do you "Go to implementation" and "Find usages" in Clojure without a 7 key-combination in Emacs? I would love to take a Clojure-IDE for a spin.
Go to implementation is M-. with SLIME in Emacs. It can even open up Clojure source in jar files on the classpath and let you edit (and save!) them from there.
Find usages is a little more complicated: C-c C-w c, but not too bad.
If you could write a server (not a plain HTTP webapp necessarily) in Clojure, Python, or Node.JS, provided you know all three, which would you choose and why?
1. Concurrency 2. The most (largest qty of) available FOSS libs anywhere 3. Speed 4. The ability to extend the language 5. WORA 6. Text/string processing
Python will win in scripting/*NIX integration, though.
Don't really know enough about Node.JS
Quick heads up. The ease of FFI (in Clojure's case with Java) is not unique to Clojure and it isn't necessarily a great thing. It's also an issue with Common Lisp: as FFI with C is easy, there's less incentive to develop idiomatic libraries for the language. E.g., Common Lisp lacks a standard modern way to network I/O, but it's largely been ignored as larger users of the language e.g., ITA could always build and standardize upon an internal C-based extension.
That being said, Clojure is great for reasons beyond running on the JVM: a unique approach to concurrency, incorporation of ML-family features, first order data structures beyond lists (maps, vectors) and the fact it's a Lisp-1 with a great macro facility. I'd love to see Clojure also go beyond the JVM and onto CLR, Parrot and LLVM.
Interestingly enough the other prominent "next generation Lisp", arc, is also a Lisp-1 with true macros (as opposed to Scheme's hygienic macros).
Why target another platform if not for its libraries? If Clojure is exactly the same on the JVM as it is on LLVM, why should it ever leave the JVM?
Haskell is one language where i encountered that too often, whereas Clojure's Windows support does not feel second rate. The portability of the JVM and Java's libraries combined with a joyful functional language like Clojure is very attractive.
It's kind of similar to the feeling you get once you've programmed in a language with GC. You really don't want to go back, unless you have to.
Java has a lot of great libraries for which there are not terrific examples in Python. Clojure gets all of them.
> Where does Python lack in text processing?
Clojure handles large strings better than Python (unless you start using substrings, in which case an underlying java bug hits you).
(oh, and Clojure is not a deliberately and comically crippled language).
As far as I know, there are semi-frequent breaking changes. Ryan Dahl has said that API stability should come with version 0.2.
Ha! It's a brave new world. It used to be you needed a whole version number under your belt before critical stuff could be built..
BTW, the new Buffer objects are awesome, and provide massive speed increases with binary data.
Do you literally mean anywhere or compared to other GAE languages?
If so do you have a rough estimate on how many Java/Clojure FOSS libraries/modules/packages there are?
http://code.google.com/appengine/kb/java.html#What_Is_A_Load...
It bothers me that people don't mention this.
That said, I have doubts about Clojure + AppEngine because of the loading request times. I can get a Java + AppEngine app to do about a 1 to 2 second loading request time by not using JDO and minimizing dependencies.
Unfortunately, loading the Clojure JARs (or the JRuby JARs) increase the loading request time.
Sometimes when I go to TheDeadline, I see almost a 10 second delay on the first page load. Does not happen often, but it does happen.
If they've got Python running on the JVM, why aren't they contributing back to Jython (or releasing their own Python->JVM bytecode compiler)?
"Writing less code requires less time."
Seriously? Then again, it /is/ a "to-do" app...