News for hackers. Stuff that matters.
Re:Ask HN: what language should I learn next? by pmjordan on Thursday July 17, 2008 @11:49AM (#248584)
I'm enjoying Clojure - in terms of web frameworks there's Webjure and Enclojure, for example. The latter seems more Rails-ish whereas the former is more Javaesque, but it's still pretty early days. I prefer Clojure to Common Lisp as it doesn't have a lot of the cruft you'll find in CL, it has some cool concurrency features, and you get easy access to any Java library you might want to use. Plus, the source code to the language itself and its supporting libraries is very readable and hackable, which is something I haven't found in other languages.

I can't really recommend web programming with C, although it's a wonderful language to learn; I'm sure you'll have many revelatory moments as you get to grips with it and discover things about the higher level languages that you normally use.

Common Lisp is definitely usable for web development, and Hunchentoot is a pretty decent web server and programming environment, although it's certainly not the only one.

Re:Ask HN: what language should I learn next? by meredydd on Thursday July 17, 2008 @01:39PM (#248784)
My personal opinion is that one should learn, and become comfortable in, Java before attempting Clojure. Clojure is a very neat little language, but if you don't understand what it's doing under the hood on the JVM, a lot of stuff is going to end up being mysterious.

Don't get me wrong, I love the language to bits, but a lot of its beauty is in how it takes the existing Java model and does something cool with it - and to understand that, you need to understand what it's working with.

Re:Ask HN: what language should I learn next? by scott_s on Thursday July 17, 2008 @02:18PM (#248841)
Interesting. That's the exact same argument I made above with C and systems programming. Clojure has caught my eye, and I'm familiar with Java, but I'm not as familiar with the JVM itself. Any resources that are good overviews of the JVM?
Re:Ask HN: what language should I learn next? by meredydd on Thursday July 17, 2008 @02:28PM (#248856)
Well, if you want to carry the analogy further, to know Java is to know the basics of how the JVM looks at life. The JVM has concepts of class, inheritance, methods, instances, constructors, and garbage collection baked into it, and they have the same semantics as Java. Arguably, the only difference is one of coding: the JVM codes a Java method as a series of stack-based opcodes, and a class as a set of methods with attributes, but the basic operations are the same. JVM bytecode directly encodes all basic operations: "invoke method X on this class", "declare this method as public and static" - even "if an exception occurs between <this instruction> and <that instruction>, jump <here> to handle it".

By contrast, there's a level of indirection between Clojure and the underlying JVM. And so, for much the same reasons as it's a good idea to know some C when doing systems programming, you won't really understand what Clojure is doing (especially not the stack-traces!) unless you understand Java.

There's also the practical point that, if you're working on the JVM, you'll be wanting to make use of the massive class libraries available for it. They're all written for native Java, so you'll have to be familiar with Java semantics to use them effectively. (Although the Lispy macro goodness means you can then wrap them up inside a concise functional abstraction when you're using them).

If you still want to look at the JVM (for fun, or for implementation reasons), I'd say a good knowledge of Java is enough to just jump head-first into the specification: http://java.sun.com/docs/books/jvms/second_edition/html/VMSp...

Re:Ask HN: what language should I learn next? by jimbokun on Thursday July 17, 2008 @04:56PM (#249064)
Just want to second this. I just read much of the spec this summer, and was surprised how directly the byte codes corresponded to Java semantics.
Re:Ask HN: what language should I learn next? by asi on Thursday July 17, 2008 @01:42PM (#248787)
Lisp really is THE language to learn. You can ask Paul Graham about it...

See the following link for how to write new language constructs, which cannot be done in most of the other languages.

http://nostoc.stanford.edu/Docs/livetutorials/macros.html