This is one of the coolest abuses of the Java environment I've seen in a long time. Words cannot describe the joy that is writing something like this:
import javax.servlet.http as http class FooBar(http.HttpServlet): def doGet(self, request, response): response.contentType = "text/html" print response.outputStream, "<h1>Foobar!</h1>"...rather than something like this:
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class FooBar extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { response.setContentType("text/html"); response.getOutputStream().println("<h1>Foobar!</h1>"); } }Overall, I'm impressed with how well most of the Python I've thrown at it runs; obviously, things like asyncore aren't implemented due to the pre-NIO lack of asynchronous stream management, and there are a few gotchas between CPython and Jython, but no real show-stoppers. Well, I take that back; SWIG extensions built for CPython won't work under Jython, which was originally what got me extremely excited about the idea; I was hoping to add a servlet handler to SubWiki to compliment the command line and CGI handlers, but being unable to import the Subversion SWIG bindings pretty much put an end to that idea. :-P Maybe once someone has a chance to revisit the JNI Subversion interface, this will be worth looking at again.
The biggest win I'm seeing is the smooth mapping of the Java APIs to Python; accessing a variable of a class instance directly is automatically mapped to Java getXXX/setXXX accessor functions, Java's strict typing is nowhere to be seen, and most Java types are mapped to their Python counterparts "correctly" (with a jarray module being added so you can manipulate Java arrays directly). While you'd never want to adopt this over CPython for day-to-day uses, using it under Tomcat for servlet development is a huge win over the clunkiness and poor performance of CGI, and the productivity gain (YMMV, of course) of writing servlets in Python instead of Java is immesurable. One missing piece is a Python replacement for JSPs, but honestly, I think I'd rather use something like gstein's ezt anyway.
What a good idea! It's a shame that it doesn't look like they've had much in the way of progress over the last few months (except for the addition of some Common Lisp code today). I'll have to scrape up some code for a few of the languages I'm familiar with and send it along.
Work
Finally heard back from a lead I'd spoken to a few weeks back about a lead Solaris administration position with a trading firm downtown, and it sounds like they still want to talk to me, but the hiring manager hadn't been able to free up his schedule for interviews. From the sounds of things, I ought to be doing a face-to-face with them sometime next week.
Voting
I had originally written a very lengthy rant about the uninformed voting (well, mainly non-voting) populace that I've come into contact with over the last little while, the disgustingly negative media circus that was put on by all of the major party candidates, the complete lack of acknowledgement of third-party candidates by the mainstream press (good or bad), and the general bad taste I have in my mouth after this whole thing. But instead, I just hit delete. Anyone reading this diary has already seen it before somewhere else, probably written more eloquently than I could. But hey, I've got this great little sticker that says I voted.
Car
Front tire is flat because of a gash on the sidewall, so I'm looking for a good deal on a couple of replacement tires (the other front one is pretty much bald). I also need to get out there and put the timing belt and spark plug wire covers back on before it gets too chilly outside (that's just what I need, snow and moisture collecting in the lower timing belt covers or in the valve cover around the spark plug wires).