Hacker News new | ask | show | jobs
by mynameisme 4654 days ago
Saying Clojure is a counter example kinda ignores the big reason companies don't want to use Lisp/Haskell/etc. When you're on the JVM, you get to use that gigantic collection of Java libraries and Java community for almost no downside. With Common Lisp/Scheme, so much time is spent reinventing wheels due to smaller communities that they're not worth using for larger projects, in my opinion. Also with Clojure, you always fairly easily port to Java if you decide things aren't going as planned a couple of years down the line, as CodeHaus did with Scala. Don't get me wrong, I think Clojure is by far the best Lisp to choose out there for a product, but that's mainly because it has its big "Java ogre" brother standing behind it.

edit: And also, you don't need to write Java in a factories on top of factories style just because some choose to do that. The same is even more true of xml configuration.

4 comments

> With Common Lisp/Scheme, so much time is spent reinventing wheels due to smaller communities

I'm not sure, but I think that C and C++ ecosystem has at least the same amount of libraries available as Java. And the reason why I mention this is that many Lisps have FFI which makes integrating those libraries almost seamless. Aside from Gambit-C, which compiles Scheme code to C and so supports inline C code, for example Racket has very nice DSSL for FFI, which reduces the need for glue code to one or two lines of code per imported function.

Integration with native Java libraries is easier from JVM languages, of course, but then there are many Lisps for JVM too. And for CLR, where tail call elimination exists. So if you want to write in Lisp, but are worried about lack of libraries, you really have many options. Clojure is alright, but saying that it's the only choice if you need access to libraries is not quite true.

>I'm not sure, but I think that C and C++ ecosystem has at least the same amount of libraries available as Java.

Uh, no. Not for the kind of applications and systems that get built these days.

I have to admit I'm ignorant as to what Java libraries I'm missing out on by not using a JVM language. I hear about this advantage a lot though! What are some examples of good Java libraries that aren't as good in other common languages?
Natural Language Processing libraries

https://opennlp.apache.org/ http://nlp.stanford.edu/

Cloud provider automation libraries

http://jclouds.incubator.apache.org/

Distributed stream computing

https://incubator.apache.org/s4/

Asynchronous event driven IO, battle tested, mother recommended

http://netty.io/

In-process webserver

http://www.eclipse.org/jetty/

....to name a few. It's probably useful to take some thing that you'll need and look in ecosystem X for it (say... .NET) and then compare what's available there to what's available on the JVM. In my experience, the JVM wins out almost every time when it comes to number of options and maturity of options.

The best Java libraries from my perspective are the ones for large scale projects. You can leverage proven techniques and technologies.

e.g. http://twitter.github.io or http://netflix.github.io

Is it a syntax error to talk Java without playing buzzword bingo?

"Leverage proven techniques and technologies"? What does that even mean?

What do you mean what does it mean ?

Leverage = take advantage of

Proven = demonstrated to have worked

Techniques = using one approach versus another

Technologies = existing code

Right..... So you're saying that your code works? Like, it doesn't crash? That's... awesome...

Buzzword bingo does not add value. It only obscures meaning. Of course your code works. Of course you use existing technologies. That work. In existing code. That you leveraged. Using techniques. And technologies.

Jesus, I hate this kind of language.

I think the OP's point was clear, Java has a big library of tested, debugged, robust libraries.
Java does seem to have some sort of strange connection to the business world (which just can't get enough of buzzwords).
Of all the buzzwords available, you chose an oddly benign set to criticize and get worked up over.
He wasn't saying that his code doesn't crash.

He was saying many other people have contributed java libraries his programs can use, so that he doesn't have to hire an expert in HTTP, or computational geometry, or many problem domains that aren't the direct concern of his application, yet are necessary for it to work.

He said it in a compact way. It's a form of compression.

(i) Never use a metaphor, simile, or other figure of speech which you are used to seeing in print.

(ii) Never use a long word where a short one will do.

(iii) If it is possible to cut a word out, always cut it out.

(iv) Never use the passive where you can use the active.

(v) Never use a foreign phrase, a scientific word, or a jargon word if you can think of an everyday English equivalent.

(vi) Break any of these rules sooner than say anything outright barbarous.

[1] https://www.mtholyoke.edu/acad/intrel/orwell46.htm

Thank you for linking this. English is a second language to me, and reading that list i found i've been following those rules a lot and have been getting grumpy about people who didn't and made it difficult to understand them. Now i can point those people at that essay.
These are only the relatively new additions, and there are really too many to count. I would certainly add the JDK's java.util.concurrent to the list, as well as Netty and the excellent servlet containers (Tomcat, Jetty, JBoss and others).
I think the point is that most of the time when you think "I need something that does x", there is a library for that; whether it is a core library or not. In Lisp I guess you often find something very specific that doesn't quite solve the problem you have.

Having said that, I really liked the Google Guava library, although a good bit of that stuff is working around or solving problems with Java itself.

https://code.google.com/p/guava-libraries/

Guava is fantastic. So many times in the last few years, I've pointed people to Guava in code reviews "hey, this thing you just wrote, Guava already has that."
If you're using another "common" language, you're probably not missing out on anything. The distinction he was making was between Java and a "not common" language, like Common Lisp, for example.
That doesn't explain the original adoption of Java, though. Put a billion dollars of marketing into Clojure and see where that gets you. Just the marketing effort alone. Do you guys remember all the managers, directors, secretaries taking Java courses because it was going to change everything? Java rode a big wave of stupid that was the internet boom.
Wish I could up this one more. I am in the process of playing with Lisp (in my case, Common Lisp, the SBCL variant to be specific) and I would love to see people with production services in any Lisp, or even Scheme.

I have been very attracted to the idea of Lisp, specifically as I discovered teepeedee and teepeedee2 as being some of the first truly fast web servers [0], and now I found wookie,[1] an evented web server running on top of libevent. I really want to play with that.

The closest thing I know of to people running "prod services on Lisp" are the Untyped guys in the Racket Scheme community [2], and not much else. I know pg and company became famous on Viaweb and Lisp, but since then there are scarce examples. However, the amount of bitching libraries and cool books (pg's book included) make me want to buck the trend and do it anyway, even if no one watches and I end up in my own ditch writing code to dig my way out for the all the unstable or non-existent pieces of code waiting for me.

[0] https://github.com/vii/teepeedee2

[1] https://github.com/orthecreedence/wookie/

[2] https://github.com/untyped

Without mentioning the usual Emacs, AutoCad(AutoLISP), and ITA:

[0] Google App Inventor http://googleresearch.blogspot.com/2009/08/under-hood-of-app...

[1] Quickdocs is written in Lisp http://quickdocs.org/

[2] Jak and Daxter http://www.gamasutra.com/view/feature/2985/postmortem_naught...

[3] Maxima http://maxima.sourceforge.net/

[4] Prime Trader (Lisp Works) http://www.lispworks.com/success-stories/netfonds-primetrade...

[5] Franz success stories http://www.franz.com/success/

Thanks for the list (pun kind of intended). I am well aware of Emacs (who does Lisp without SLIME, that seems painful) and Autocad.

Your list is very cool, but I meant people writing production web services and startups that are often featured here. Of them all, the most interesting one I saw a month or so ago was someone writing production services in Haskell. That generated a lot of interest, and I have not heard of anyone brave enough to do it with a Lisp, save Clojure.

I was unaware of Jak and Daxter, but I would hope people who use Common Lisp, manage their packages in Quicklisp, and do other CL stuff know what Quickdocs. I am in that camp. :-)

Lispworks is an excellent commercial IDE as well, however its editor is not as nice (but similar to Emacs) as using Emacs itself and the license is quite expensive compared to other IDEs/toolchains, but it offers greater code introspection than what is available in SLIME.

Personally, I use SLIME + Emacs as I do not do enough CL development to warrant dropping over a thousand USD for a license and I find SLIME good enough for my usage.

The Lisp Hackers interviews are also a good resource and quite interesting. The use case I found the most surprising was a developer using CL to prototype chip ideas at Intel before implementing them in C or C++. All the interviews in one book can be found here: https://leanpub.com/lisphackers