Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I really have a hard time seeing Python losing to Clojure on (2), (5) and (6). What kind of software/library would you find on Clojure but not Python? How is Python not WORA? Where does Python lack in text processing?


Not Python specific but languages that regularly interface with C code are often troublesome on Windows because the library writer assumes Posix functionality is available or the library depends on Unix libraries that are at best badly ported to Windows.

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.


Java & the JVM give me 2 & 5. While Pythons text processing is great, I think functional composition & juxtaposition give Clojure and edge. Plus, strings are simply sequences, so the core language works well with them too.


Python has no parallelism story. Once you start using the Clojure parallel primitives, there is no going back: you will never want to deal with managing threads and mutexes again.

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.


All your repliers seem to forget that Jython exists and can be run on the app engine as well, putting Jython on par with Clojure in terms of available Java libraries.


Let's not forget JRuby. Java might be stalled but the JVM is really starting to show a lot more value.


Interestingly in the beginnings of java the JVM was just another abstraction layer.

Now that the JVM is really running just about anywhere it has become a viable platform to target, and java is just one more language that targets it.

Clojure, groovy and scala are built on top of the JVM, but there are also plenty of languages that are available on mutliple platforms.

Whoever came up with just-in-time compilation deserves a gold medal, without that none of this would have ever happened.


Whoever came up with just-in-time compilation deserves a gold medal, without that none of this would have ever happened.

My understanding is that JIT in Java is a variation on what the Smalltalk world called dynamic optimization. That was introduced into Smalltalk by Peter Deutsch and Allan Schiffman in the 1980s, but I don't know whether or not they invented it independently.


Yes, that's true. I'm not claiming that the just-in-time compilation technique was invented specifically for java, merely that it was a very useful addition to it and that whoever did invent it probably helped saving the platform.

That invention pre-dates java itself by quite a few years, but then again, java has a lot of elements in it that were considerably older, iirc there was UCSD pascal P-code, which was another virtual machine like environment with an abstracted machine, and the 'forth' language which has quite a bit in common with how the JVM operates on the lowest level.


I was giving you the information I had that would help you if you you wanted to track down who invented it.


Right, sorry, the endless downmods made it seem as though that comment was interpreted as though I made it seem as though the jit was invented after or because of java. Of course it wasn't. (see the other comment above).

I was just reading that 'early history of smalltalk' thing the other day, and it struck me as though really, since the 60's there hasn't been that much progress at all.

The 'mother of all demos' combined with the 'dynabook' (iPad?) really pretty much covered everything with the exception of the mobile phones.

Sure, we all have the equivalent of several Cray-1's in our houses now (or even in our pockets), but conceptually we are still were we were back then.

Everything looks great, we're burning billions of cycles on spiffy user interfaces and showing movies.

But under the hood it's old hat.

That's why I keep circling around and around trying to find my new 'home', the environment that I think will last me for the next 10 or 20 years.

I haven't found it yet. All I see is endless repetition, configuration files, minor tweaks. Rarely a bold move (fleet comes to mind, but I don't think it will ever be a commercial success). Programming seems to be mired in endless detail, fiddling the bits and tweaking things to get a link here or a widget there and to get them to talk to each other. User interfaces have become the main focal point, when they weren't (or at least when they weren't as pretty) we were happy if stuff just worked.

I feel like a homeless guy looking for a place to stay.

Clojure might be it, I don't know...

but I'll try it for sure. No point criticizing the soup before you've eaten it.

Thanks for digging up that jit reference.


Just-in-time compilation is not a new idea. According to the book "The Practice of Programming" (by Brian W. Kernighan and Rob Pike, Ch9, pg. 242):

"Generalizing the idea for the full set of operations, we can write an on-the-fly compiler that translates the current regular expression into special code optimized for that expression.

Ken Thompson did exactly this for an implementation of regular expressions on the IBM 7094 in 1967. His version generated little blocks of binary 7094 instructions for the various operations in the expressions, threaded them together, and then ran the resulting program by calling it, just like a regular function."


It seems you are confusing JIT and bytecode interpreters.

Why wouldn't Scala/Clojure/Groovy et al be possible without JIT? It's possible to run on the JVM anyway, whether said VM supports JIT or not.


They'd be possible, but they wouldn't be nearly as fast without it.

Java before JIT was added to the JVM was dead slow.


speaking of which. I'm testing a big multithreaded jruby app I wrote as I type this, and it's running very solidly. anytime I need parallel I'm going straight to jruby.


> What kind of software/library would you find on Clojure but not Python?

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).


How is Python deliberately and comically crippled? I'm honestly curious.


I think he may be refering to the GIL.


That and certain deficiencies spawned by a desire for “simplicity.”


Don't forget one-line lambdas.


It is true. I really, really, really do not like those. I dislike them to the point of irrationality.


Many python libraries have a C component which makes them a no go when it comes to app engine. Two big examples are image manipulation and numeric and scientific computation. The pure java libraries in these categories are much faster and more complete than the pure python libraries.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: