Breakfast at these things is always somewhat disheartening -- everyone in the conversations seems significantly more clever than I am. Granted, it may just be that everyone who's not, including me, just doesn't talk, but still... Anyway, interesting chats on some of the internals of the hotspot JVM, along with a bunch of other Java talk. (Everyone who got here early seems to be a Java guy)
One thing that's just occurred to me is that we're going about optimization all wrong. There are a lot of people putting a lot of work into optimizing code. That's cool, and I do that too. I think we've gotten about to the point where we can't go any further. Optimizers in general try to order and fiddle with code to make it run as fast as possible. Woohoo! But... At some point you just can't run code any faster, and the only way to go faster is to not run code. That's something that isn't well managed right now.
Sure, optimizers do what they can to find dead code, or find code that only needs to be run once rather than multiple times, but by the time most optimizers get code it's far too late to do this with any real effectiveness. What really needs to happen to make this work is to introduce more HLL constructs and annotations that allow for it. Lazy execution and memoization are two biggies, but there are others. This desperate lack of information (and it's not type information, really) makes things more difficult, which is a shame. It's a lot faster to not do something than it is to actually do something.
Interesting -- looks like there's a big blind spot in the JVM community about embedding and extending the VM with native code. Seems like a big problem, but I dunno, since it's something that Perl/Python/Ruby have been doing for ages, and doing well. Go figure. Blind spots are what this thing's mostly about, though.
One of the talks was basically "We're thinking about solving the problem that Inline solves" only without knowing about Inline. So my being here hasn't been completely one-sided -- the perl/python/ruby folks have definitely solved some of the problems the Java folks haven't thought of, or have only started to think about.
Paolo's talk on mono's interesting. One thing he just said was the reason for mono was so they could write one binding to GNOME, rather than one per language. The implication there is that it's easier to write a compiler for any language to mono than it is to write the GNOME bindings. I'm not sure if that's what he meant, or if it is if it's what he implied. Wonder what that says about the difficulty of binding to GNOME. (Or what it implies about the difficulty of writing language compilers) Not that having a common back end's a bad thing, I just find the implications amusing.
Now this is interesting. On the Need for Data Management Primitives in a VEE makes the point that SQL engines are really just bytecode engines. Specialized ones, but still... And this gives me another Evil Idea. I do like those. I really need to talk to the Postgres folks. (I think this comes after becoming independently wealthy so I have actual free time, but...)
As this goes on, one thing keeps coming to mind: Dammit, I want access to the MMU on the system! Even in a limited way! Because I do. Being able to put some memory blocks in place with catching code would make Parrot's life ever so much easier.
Oh, yeah, and IBM puts on a good spread. Which is a nice thing. :)
Posted by Dan at September 15, 2004 05:53 PM | TrackBack (0)Paul Graham makes a good point about optimisation in his article about Arc, a new version of Lisp he's working on. He takes to heart the two rules about optimisation (1. Don't do it. 2. Don't do it yet.) and says that the ideal method of optimising is to make profiling ubiquitous. So he suggests that programmer's editors should conspire with programming languages to profile code on the fly and colour the lines of code differently depending on how fast they are. I love it! I wish I had time to integrate the PHP profiler I use into the editor I use. Maybe if I used EMACS...
Posted by: Eric TF Bat at September 15, 2004 08:45 PMActually, if you look at the SQLite internals it actually has a tiny VM interpreter with many of the usual things plus some ops to access the BTree and whatnot. No reason those ops couldn't be parrot ops if your Evil Idea is what I think it is. ;-)
Posted by: Byron at September 15, 2004 10:11 PM"The implication there is that it's easier to write a compiler for any language to mono than it is to write the GNOME bindings."
I think Paulo is taking into account that someone, somewhere has probably already written a .NET compiler for a particular language rather than it being easier to write a compiler than the bindings.
Posted by: Dave at September 16, 2004 09:51 AMI'm not sure if it's what Paolo meant, but I'll defend the idea that writing N compilers is "easier" (at least, eventually) than writing N bindings for each of K languages.
Most large "libraries" aren't unitary; they're actually collections of modularized libraries. GNOME is very similar. Now, for both bindings and compilers, there are declarative tools that take away some of the grunt work, leaving you with some tweaking. Now, when you're targeting .NET with your compiler, you have an IL to generate and a runtime that's already written and well-defined, so it's really just a matter of spitting out IL code. This is only a little effort above what it takes to write a single binding, certainly not a big multiple. And once you write the language, you need only write the one binding per library and you're done.
Posted by: dak at September 16, 2004 04:15 PMdak is correct: it's not easier to write a compiler than a binding to the Gnome libraries per se. I'd prefer to write 2 bindings than just a new perl parser myself:-)
The issue is not specific to Gnome at all: that was an example. Think of all the bindings to database libraries: perl has them, python has them, php has them: everybody had to write a binding. Mono has already the binding to many databases: languages that compile to run on Mono don't need to write their own binding.
This has also interesting effects: new programming languages can be created focusing on new language features, without having to worry about the need to provide a large library that'd make the language actually useful.
The problem is that while you can add lots of exciting new language features to your new Mono-based language, the common-language database library will not use them. So the class library will always seem alien to your new language, and your new features will be less useful than they might have been. So yes, doing a Mono API would be less effort than tailored APIs for Python, Scheme, Perl, etc., but the API would be a less-good fit with the host languages.
Posted by: Damian Cugley at September 20, 2004 01:17 PM