Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Highlights of the Lang.NET Symposium, Day One

 

Thought I'd offer a highly-biased interpretation of the goings-on here at the Lang.NET
Symposium. Quite an interesting crowd gathered here; I don't have a full attendee
roster, but it includes Erik Meijer, Brian Goetz, Anders Hjelsberg, Jim Hugunin, John
Lam, Miguel de Icaza, Charlie Nutter, John Rose, Gilad Braha, Paul Vick, Karl Prosser,
Wayne Kelly, Jim Hogg, among a crowd in total of about 40. Great opportunities to
do those wonderful hallway chats that seem to be the far more interesting part of
conferences.

Jason Zander: Jason basically introduces the Symposium, and the intent
of the talk was mostly to welcome everybody (including the > 50% non-Microsoft
crowd here) and offer up some interesting history of the CLR and .NET, dating all
the way back to a memo/email sent by Chris Brumme in 1998 about garbage collection
and the "two heaps", one around COM+ objects, and the other for malloc-allocated data.
Fun stuff; hardly intellectually challenging, mind you, but interesting.

Anders Hjelsberg: Anders walks us through the various C# 3.0 features
and how they combine to create the subtle power that is LINQ (it's for a lot more
than just relational databases, folks), but if you've seen his presentation on C#
3 at TechEd or PDC or any of the other conferences he's been to, you know how that
story goes. The most interesting part of his presentation was a statement he made
that I think has some interesting ramifications for the industry:

I think that the taxonomies of programming languages are breaking down. I think that
languages are fast becoming amalgam. ... I think that in 10 years, there won't be
any way to categorize languages as dynamic, static, procedural, object, and so on.

(I'm paraphrasing here--I wasn't typing when he said it, so I may have it wrong in
the exact wording.)

I think, first of all, he's absolutely right. Looking at both languages like F# and
Scala, for example, we see a definite hybridization of both functional and object
languages, and it doesn't take much exploration of C#'s and VB's expression trees
facility to realize that they're already a half-step shy of a full (semantic or syntactic)
macro system, something that traditionally has been associated with dynamic languages.

Which then brings up a new question: if languages are slowly "bleeding" out of their
traditional taxonomies, how will the vast myriad hordes of developers categorize themselves?
We can't call ourselves "object-oriented" developers if the taxonomy doesn't exist,
and this will have one of two effects: either the urge to distinguish ourselves in
such a radical fashion will disappear and we'll all "just get along", or else the
distinguishing factor will be the language itself and the zealotry will only get worse.
Any takers?

Jim Hugunin: Jim talks about the DLR... and IronPython... by way
of a Lego Mindstorms robot and balloon animals. (You kinda had to be there. Or watch
the videos--they taped it all, I don't know if they're going to make them publicly
available, but if they do, it's highly recommended to watch them.) He uses a combination
of Microsoft Robotics Studio, the XNA libraries, his Lego mindstorms robot, and IronPython
to create an XBox-controller-driven program to drive the robot in a circle around
him. (Seriously, try to get the video.)

(Note to self: go grab the XNA libraries and experiment. The idea of using an Xbox
controller to drive Excel or a Web browser just appeals at such a deep level, it's
probably a sign of serious dementia.)

Jim talks about the benefits of multiple languages running on one platform, something
that a large number of the folks here can definitely agree with. As an aside, he shows
the amount of code required to build a C-Python extension in C, and the amount of
code required to build an IronPython extension in C#. Two or three orders of magnitude
difference, seriously. Plus now the Python code can run on top of a "real" garbage
collector, not a reference-counted GC such as the one C-Python uses (which was news
to me).

Personally, I continue to dislike Python's use of significant whitespace, but I'm
sure glad he came to Microsoft and put it there, because his work begat IronRuby,
and that work in turn begat the DLR, which will in turn beget a ton more languages.

Thought: What would be truly interesting would be to create a compiler for
the DLR--take a DLR AST, combine it with the Phoenix toolkit, and generate assemblies
out of it. They may have something like that already in the DLR, but if it's not there,
it should be.

Martin Maly: Martin talks about the DLR in more depth, about the
expression trees/AST trees, and the advantages of writing a language on top of the
DLR instead of building your own custom platform for it. He shows implementation of
the Add operation in ToyScript, the language that ships "with" the DLR (which is found,
by the way, in the source for the IronPython and IronRuby languages), and how it manages
the reflection (if you will) of operations within the DLR to find the appropriate
operation.

Martin is also the one responsible for LOLcode-DLR, and pulls it out in the final
five minutes because he just had to give it one final hurrah (or GIMMEH, as you wish).
The best part is writing "HAI VISIBLE "Howdy" KTHXBYE" at the DLR console, and just
to get even more twisted, he uses the DLR console to define a function in ToyScript,
then call it from LOLCODE (using his "COL ... WIT ... AN ..." syntax, which is just
too precious for words) directly.

I now have a new goal in life: to create a WCF service in LOLCode that calls into
a Windows Workflow instance, also written in LOLcode. I don't know why, but I must
do this. And create a UI that's driven by an XBox-360 controller, while I'm at it.

I need a life.

Charlie Nutter/John Rose: Charlie (whom I know from a few No Fluff
Just Stuff shows) and John (whom I know from a Scala get-together outside of JavaOne
last year) give an overview of some of the elements of the JVM and JRuby, some of
the implementational details, and some of the things they want to correct in future
versions. John spent much time talking about the "parallel universe" he felt he'd
walked into, because he kept saying, "Well, in the JVM we have <something>...
which is just like what you [referring to the Microsoft CLR folk who'd gone before
him]
call <something else>...." It was both refreshing (to see Microsoft
and Sun folks talking about implementations without firing nasty white papers back
and forth at one another) and disappointing (because there really were more parallels
there than I'd thought there'd be, meaning there's less interesting bits for each
side to learn from the other) at the same time.

In the end, I'm left with the impression that the JVM really needs something akin
to the DLR, because I'm not convinced that just modifying the JVM itself (the recently-named Da
Vinci Machine
) will be the best road to take--if it's implemented inside the VM,
then modifications and enhancements will take orders of magnitude longer to work their
way into production use, since there will be so much legacy (Java) code that will
have to be regression-tested against those proposed changes. Doing it in a layer-on-top
will make it easier and more agile, I believe.

That said, though, I'm glad they (Sun) are (finally) taking the steps necessary to
put more dynamic hooks inside the JVM. One thing that John said that really has me
on tenterhooks is that Java really does need a lightweight method handle, similar
(sort of, kind of, well OK exactly just like) .NET delegates (but we'll never admit
it out loud). Once they have that, lots of interesting things become possible, but
I have no idea if it would be done in time for Java 7. (It would be nice, but first
the Mercurial repositories and other OpenJDK transition work needs to be finished;
in the meantime, though, John's been posting patches on his personal website, available
as a link off of the Da Vinci Machine/mlvm project page.)

Dan Ingalls: Dan shows us the Lively Kernel project from Sun Labs,
which appears to be trying to build the same kind of "naked object" model on top of
the Browser/JavaScript world that the Naked Objects framework did on top of the CLR/WinForms
and JVM/AWT, both of which trying essentially to recapture the view of objects as
Alan Kay originally intended them (entities directly manipulable by the user). For
example, there's a "JavaScript CodeBrowser" which looks eerily reminiscent of the
Object Browser from Smalltalk environments, except that the code inside of it is all
{Java/ECMA}Script. A bit strange to see if you're used to seeing ST code there.

I can't help but wonder, how many people are watching this, thinking, "Great, we're
back to where we were 30 years ago?" Granted, there's a fair amount of that going
on anyway, given how many concepts that are hot today were invented back in the 50's
and 60's, but still, reinventing the Smalltalk environment on top of the browser space
just... seems... *sigh*...

It's here if you want
to play with it, though when I tried just now it presented me with authentication
credentials that I don't have; you may have better luck choosing the 0.8b1 version
from here, and the official home page
(with explanatory text and a tutorial) for it is here.

Pratap Lakshman: Pratap starts with a brief overview of {Java/ECMA}Script,
focusing initially on prototype-based construction. Then he moves into how the DLR
should associate various DLR Expression and DLR Rule nodes to the language constructs.
Interesting, but a tad on the slow/redundant side, and perhaps a little bit more low-level
than I would have liked. That said, though, Charlie spotted what he thought would
be a race condition in the definition of types in the code demonstrated, and he and
Jim had an interesting discussion around lock-free class definition and modification,
which was interesting, if just somewhat slightly off-topic.

Roman Ivantsov: Roman's built the Irony parser, which is a non-code-gen
C# parser language reminiscent of the growing collection of parser combinators running
around, and he had some thoughts on an ERP language with some interesting linguistic
features. I'm going to check out Irony (already pulled it down, in fact), but I'm
also very interested to see what comes out of Harry's talk on F# Parsing tomorrow.

Dinner: Pizza. Mmmmm, pizza.

More tomorrow, assuming I don't get stuck here on campus due to the City of Redmond
shutting almost completely down due to 2 inches (yes, 2 inches) of snow on
the ground from last night. (If you're from Boston, New York, Chicago, Vermont, Montana,
North Dakota, or anyplace that gets snow, please don't comment--I already
know damn well how ludicrous it is to shut down after just 2 frickin' inches.)





Enterprise consulting, mentoring or instruction. Java, C++, .NET or XML services.
1-day or multi-day workshops available. Contact
me for details
.