Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
Fri, 31 Jan 2003
.NET and the CLR
I find myself thinking more and more about doing some work in the CLR environment. Notice that I said CLR, not necessarily .NET. Near the end of my grad school days in the early 90's, some friends of mine asked me to sit in on a programming languages seminar that they were running. We talked about Oak/Java, Dylan, and a bunch of other languages. A that time I was not particularly impressed with Java as a language. Compared to the Lisp family of languages, Java was just barely catching up. Now that Java is a success, some folks would like you to believe that Java invented dynamic languages, and that the only thing left to do is expand the libraries until they bloat up and consume the world -- which they're well on they way to doing.

I have a slightly different perspective. The adotption of managed environments (the combination of JIT VM's and automatic memory management) is a long overdue development in the evolution of software development, but we haven't arrived. There is a lot of room for improvement in the languages that we are using to today. The JVM and the ecosystem around it are focused on Java. Yes, there are implementations of lots of other languages on the JVM. Yes, some of them talk to Java. But for non-technical reasons, the JVM is going to be focused on Java, and for reasons of compatibility Sun is going to continue to evolve the JVM very slowly.

I'm interested in a managed environment that can still evolve and grow. Microsoft is claiming that this is what they want. I'm not sure that I believe that they will continue to evolve it. But it doesn't matter. Mono provides a managed environment that can evolve. It has compatibility with the current ECMA CLR and will continue to. Compatibility to the MS CLR is nice, but Miguel says that they have Mono running on Windows as well. So here we have an open source, potentially evolvable managed environment. If the Mono guys can get just the ECMA specified portions of the CLR running well, I think that this is very interesting. I'm interested in seeing continued innovation at the runtime level, and that's not really happening with the JVM. What is happening is improvements in the quality of implementation. I'd like to see the Mono ECMA CLR, with a switch that can be flipped to go into Microsoft compatible mode, however compatible that turns out to be, for whoever cares to be compatible. But I'm just as happy to see an open source CLR based runtime evolve starting from what is Mono today, and if it forks from the Microsoft one (due either to Microsoft changing theirs or the open source one changing), I'm not bothered by that.

So, am I a heretic yet?

Then we go on to build managed libraries that provide Windowing API's, etc. Then Haskell.CLR can actually talk to the rest of the computer, and we get to a place where everytime we want to innovate in the language space, we don't have to throw away the ability to do useful stuff. That's been the single biggest problem with adoption of "advanced languages" is that they can't talk to the rest of the computer, and they can't leverage any existing library code. I think that a scheme such as the one I'm proposing might actually work.

People will suggest that open sourcing the JVM would solve the problem just as well. Possibly, but I've given up hope that Sun will decide to open-source Java and the JVM. Even if they do, they'll encumber it with something like the JCP. Unfortunately, in my opinion, the JCP is not in the innovation business. It is in the keep things under control business. If you look at the number of Jakarta projects that are used in all kinds of software projects, you realize that things don't have to be standardized by the JCP in order for them to be adopted broadly. I want to see something that can grow and evolve and where the best code can win.

Maybe I really am a heretic.

[22:27] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Prototyping / refactoring
I've noticed something since I've started using Eclipse -- I tend to refactor my code a lot as I understand it. Eclipse's refactoring tools take out a fair amount of the pain associated with using a language like Java for prototyping.

As I've started to play with Python, I find myself reliving some of my Lisp experience at MIT. I find the Python code to be very succint and easy to read -- I find that I don't mind the use of space / indentation as syntax. Since I indented my lisp code all over, so I find that I am not noticing this at all. The notation that python provides for lists and maps is one of the things that is making me very productive. The combination of list comprehensions and slice notation is very powerful and makes programs shorter. These two notions are things that Java could benefit from, but there's almost no chance that we'll see them, because Sun is so committed to not evolving Java the language. If Java had macros, we could implement some of this stuff nicely.

One thing I haven't yet gotten used to is the Python object system, which requires each method to have an explicit self parameter. Having used Lisp generic functions, this should be no big deal for me, but having worked mostly in in C++ and Java for the last 7 or 8 years has kind of braindamaged me. It'll probably take a little time to shake that out. Interestingly enough, David Mertz has implemented multimethod dispatch for Python. I haven't played with this, but it does provide another proof point for the saying that all languages are destined to reinvent Lisp badly.

Anyway, back to Eclipse and prototyping. I think that if the refactoring tools are taken far enough, and Java had a kind of macro language, I would be pretty happy. I'm back to using Emacs to edit python, which is fine. The only things I miss are integrated help / code completion and refactoring tools. Oh, and a reasonable interface to the debugger.

[22:27] | [computers/programming] | # | TB | F | G | 0 Comments | Other blogs commenting on this post
Thoughts from the Bloggers dinner
I'm writing this on an airplane without connectivity. Try that with movable type...

Crossroad rocks for an event like this. It has a food court, a big open space and public access 802.11. The only thing I could think of that was missing was a bunch of power strips.

I love how you can find an unexpected blessing at an event like this. A bunch of us were sitting around talking XML geek talk. Don Box and Miguel de Icaza were talking about RelaxNG / XML Schema. Miguel was doing the standard "RelaxNG is so much simpler" bit. Don pointed out that James Clark has a tool, trang, that will convert RelaxNG schemas into W3C XML Schema. He went on to point out that if all you wanted RelaxNG for was a simple syntax, then why not just write RelaxNG and then use those tools to convert them to Schema. At that point, the lights went on for me. At the last ApacheCon, Andy Clark and I talked about how much work it would be to adapt Jing to use the Xerces XNI instead of SAX, with the goal of being able to plug the adapted Jing into Xerces so that Xerces would have support for RelaxNG. We thought that this would be a way to help more people use RelaxNG. I actually had started to do this a few weeks ago, before working for food took priority. After Don's comments, I decide that using James Clark's trang solves the problem that I wanted to solve, without importing another large code base into Xerces. RelaxNG advocates will go on to tell about the schemas that RelaxNG can express that Schema can't, but I don't care about those cases. Saved me a few weeks work that can go towards other efforts. That alone made it worth the trip.

Miguel was giving demos of the latest Mono drops, including a Mono base photo browser. He also showed a compiler bootstrap -- something only a geek could love. I noticed that many of the Microsoft folks were paying very close attention to what Miguel was showing and seemed very impressed and complimentary towards it. Joshua Allen has already commented to this effect. I have a few more thoughts on Mono/.Net/CLR that I'll save for another post.

Sam and I talked about blosxom hacking, python and pybloxsom hacking. I think it would be awesome if Sam decided to switch to using pyblosxom. The other thing that we talked about was doing a version of the Weblog/Metaweblog APIs using SOAP instead of XML-RPC. There's a technical reason for doing this, which is that there's no way to multiply categorize an entry using an XML-RPC based API. As I've posted before, I think that this is an important feature for blogging software to have. This would also be a wonderful API to use to consolidate comments and the various kinds of *Backs s that have been proposed.

Two other notorious bloggers that I met were Dare Obasanjo and Josh Allen from the XML core technology team at Microsoft. I was especially pleased to hear Dare say, many of the people using XML would be just as happy with s-expressions, something that I've been saying for a while now. I know, we ex-lisp hacker whine alot.

[22:19] | [computers/internet/weblogs] | # | TB | F | G | 0 Comments | Other blogs commenting on this post


twl JPG

About

Ted Leung FOAF Explorer

I work at the Open Source Applications Foundation (OSAF).
The opinions expressed here are entirely my own, not those of my employer.

Creative Commons License
This work is licensed under a Creative Commons License.

Now available!
Professional XML Development with Apache Tools : Xerces, Xalan, FOP, Cocoon, Axis, Xindice
Technorati Profile
PGP Key Fingerprint
My del.icio.us Bookmarks
My Flickr Photos


Syndicate
RSS 2.0 xml GIF
Comments (RSS 2.0) xml GIF
Atom 0.3 feed
Feedburner'ed RSS feed

January 2003 >
SuMoTuWeThFrSa
    1 2 3 4
5 6 7 8 91011
12131415161718
19202122232425
262728293031 

Archives
2006
2005
2004
2003

Articles
Macintosh Tips and Tricks

Search
Lucene
Blogs nearby
geourl PNG

Categories
/ (1567)
  books/ (33)
  computers/ (62)
    hardware/ (15)
    internet/ (58)
      mail/ (11)
      microcontent/ (58)
      weblogs/ (174)
        pyblosxom/ (36)
      www/ (25)
    open_source/ (145)
      asf/ (53)
      osaf/ (32)
        chandler/ (35)
        cosmo/ (1)
    operating_systems/ (16)
      linux/ (9)
        debian/ (15)
        ubuntu/ (2)
      macosx/ (101)
        tips/ (25)
      windows_xp/ (4)
    programming/ (156)
      clr/ (1)
      dotnet/ (13)
      java/ (71)
        eclipse/ (22)
      lisp/ (34)
      python/ (86)
      smalltalk/ (4)
      xml/ (18)
    research/ (1)
    security/ (4)
    wireless/ (1)
  culture/ (10)
    film/ (8)
    music/ (6)
  education/ (13)
  family/ (17)
  gadgets/ (24)
  misc/ (47)
  people/ (18)
  photography/ (25)
    pictures/ (12)
  places/ (3)
    us/ (0)
      wa/ (2)
        bainbridge_island/ (17)
        seattle/ (13)
  skating/ (6)
  society/ (20)



[Valid RSS]

del.icio.us linkblog

www.flickr.com

Blogroll

java.blogs
Listed on BlogShares

Locations of visitors to this page
Where are visitors to this page?


pyblosxom GIF