I’ve spent a few evenings rummaging around the web, looking for interesting tools and code that is either coded in java or runs on the JVM. There is a lot of material out there. I had been discussing other programming languages with a friend a little while ago and lisp was mentioned. That got me thinking (and clojure as a functional programming oriented lisp dialect particularly got my attention) so this list is currently a bit lisp heavy.
- ANTLR is a java coded parser generator.
- Jython is a python compiler that generates JVM code.
- SISC is a compiler for the Scheme dialect of lisp that targets JVM code.
- JRuby implements the ruby language (which I don’t know much about, but sounds worth a look) and generates JVM code.
- Armed Bear Common Lisp was the first common lisp implementation that I came across that runs on the JVM. There seem to be others out there, but it appears that common lisp implementations are a bit old and ragged at this point (at least the references I could find).
- Kawa is another scheme implementation with JVM support.
- Groovy is in the same category for me as ruby. Sounds interesting, runs on the JVM and I don’t know much about it.
There’s much more out there and I’ll probably wind up wandering through it as time passes. I’ve grabbed snapshots of these projects to mess with. Depending on time and momentum I’m likely to poke at Clojure and perhaps a bit at some of the other lisp dialects. I haven’t messed with lisp in a long time (and most of what I have done was gnu emacs lisp) but it seems as if a few interesting things are going on there. A functional programming environment that can be used in conjunction with other methodologies is also very interesting. I can’t see doing a majority of the things I do in functional land, but having the option of doing tasks that are well suited to that approach using a functional environment is quite interesting.
I’ve been doing quite a bit of reading and some talking to folks who know the language and environment. I come into this process having a decent, abstract knowledge of the java language itself and some basic idea of how the runtime library is laid out. I started with very limited practical experience writing java code but lots of experience building large, threaded and distributed systems with C++ and C.
So far the books I’ve run through (or am in the process of reading) are
- Effective Java, Second Edition was another paper purchase. The C++ volumes in this series Effective C++, Third Edition and More Effective C++ provide excellent examples of how to make the best use of the C++ language. The java volume appears to provide good advice in the same vein but with a java focus. I have found it challenging at times to find books like these that provide advice that is useful to the experienced practitioner. Most programming books out there cover language basics and how to get things working. These volumes take that to the next level with advice about how to get the best results and warnings about subtle issues that aren’t immediately obvious.
- Java Concurrency, Second Edition I bought in paper form. It appears to give very good coverage to java’s concurrency and locking facilities.Reading this got me looking deeper into threading and interrupt exceptions and places where these were perhaps questionable. Dive further into Apache’s
CloseQuietly and its possible interactions with (windows of vulnerability in) thread interruption and I wound up in I/O land.
- Java I/O is the book I’m currently reading. This covers the basics of the core java I/O library and then gives reasonable (if a bit superficial in places) coverage of the new I/O classes that were added later in java’s life.I got started down this road when I realized that baseline java I/O seemed to have serious limitations when used in blocking mode in threaded servers (and it appears that in java, just about everything needs to be moderately threaded). This lead me to NIO as the focal point for dealing with such things and various digression into jvm exception handling and error management.
- Java NIO which is on my reading list and seems to go into more depth on the new I/O classes in java. It appears that any attempt to build scalable, interruptible server I/O code in java needs to take these facilities into account.Currently I haven’t started reading this one as I’m working through the second edition of Java I/O which covers NIO functionality, but in limited depth. In particular it looks as if it skips over the
SSLEngine class that allows NIO sockets to implement SLL and TLS encryption.