Wednesday Nov 25, 2009

It is Autumn, and tail recursion is in the air. A JSR 292 colleague, Samuele Pedroni, just raised the question of how invokedynamic might interact with a tail call feature in the JVM. Here are a few thoughts on that subject, which I hope will provoke further discussion. The first few are (I think) not very controversial, but I try to get a little crazy toward the end. Where, do you suppose, is the boundary? [Read More]

Tuesday Nov 10, 2009

I have written a paper for VMIL '09 on invokedynamic, which my fellow JVM and JIT geeks may find interesting:
Bytecodes meet Combinators: invokedynamic on the JVM
John Rose, VMIL '09 Workshop at OOPSLA, Orlando, October 2009

The focus of the paper is on evaluating the architectural effect of adding invokedynamic to JVM bytecodes. The description of JSR 292 is partial and provisional but I expect the part I have described is mostly stable. There is a lot of overview of (a) current implementation techniques for JVM languages, (b) how these techniques adapt to invokedynamic, and (c) how a JVM might optimize invokedynamic. The treatment is not specific to HotSpot. I hope it is useful to JVM teams and to dynamic language implementors.

Thursday Sep 17, 2009

Start with one generously sized conference room. Fill it to capacity with language and VM implementors. Stir vigorously for three days, folding in talks and workshops in successive layers. Garnish with professional videography. Yield: One JVM Language Summit, about 80 servings.

It's been wonderful so far, and I'm looking forward to the final day tomorrow. You can see what we've been talking about by clicking on the talk links in the agenda; most of the slide decks are uploaded there...[Read More]

Monday Jul 27, 2009

If you (like me) are someone who actually enjoys contemplating the details of how languages turn into bytecodes and thence into wicked-fast machine code... If you lose sleep wondering about the joint future of programming languages and managed runtimes (especially the JVM)... If you think VM and language designers can save the world from a dystopian future of multi-core computers with no software to run on them... Please read the enclosed Call for Participation![Read More]

Thursday Jun 04, 2009

Christian Thalinger, Charlie Nutter, and I just finished a talk (my last of three!), called JSR 292 Cookbook. Thanks for your help, guys!

...I have posted the slides. The code examples are also on-line.[Read More]

Wednesday Jun 03, 2009

It has been a busy day, of course. For those interested, I have posted the talk Brian Goetz and I gave on the Da Vinci Machine Project. We divided our attention between a “grand vision” of what VMs are and where they are going, and the exciting particulars of how invokedynamic and method handles work...[Read More]

Tuesday Jun 02, 2009

Just about 24 hours ago, I was working on invokedynamic compilation in my hotel room with colleague Christian Thalinger. I have since learned that around that time, my dear grandmother, wise and loving to the end, slowly breathed her last and went to be with her Maker.

I suppose this is a strictly personal event, but as beautiful things deserve be shared, I would like to provide a glimpse of what this woman was like, in a photo of her and me taken 18 months ago. That picture shows Grandma Ev's authentic, habitual brightness of expression. It shone brightly even on days when the mortal machinery was breaking down. "Don't ever get old", she'd say then, with a gentle smile. In her life, hardship was met with integrity and grace, and deep-set habits of peacemaking and service were always at work building up what had been torn down. Her family and friends found her to be an earnest and perceptive encourager, ready to celebrate any of our well-doings.

As her systems slowed to a halt, she remained the woman she has been for 90-odd years, the woman who gave me some of my first lessons in kindness. Those at her bedside say that as breath for speech became scarce, she continued to bless her family with assurances of love, with smiles, kisses, and mouthed words of comfort.

Ev's signature motto, given as an answer to "how are you doing?" has long been a cheerful "I'm Happy on the Way", meaning specifically the way of Jesus. Grandma, your way has been a gift to many, and has brought you to earthly completion with the honor of family and friends. May such happiness be in our way also. Thanks for an example worth following.

Monday Jun 01, 2009

Today’s talk at CommunityOne (San Francisco) about the Da Vinci Machine Project surveyed the history and status of the project to date. In the same spirit, I have updated the project page to include more pointers to recent talks, including my three talks this week at JavaOne. See you there!

Wednesday Apr 15, 2009

I'm enjoying Microsoft's Lang.NET Symposium. Lars Bak just told us about the V8 JavaScript engine. As usual with his work, the virtues are overall simplicity, with a few careful choices about what to optimize. (The recipe is fixnums + stateful Self-like hidden classes + monomorphic inline caches + generational GC + simple JIT.) Here's the slide deck for my talk (up next) on new JVM features.

May 8 update: After the conference I enjoyed a video chat with Charles Torre of Microsoft Channel 9 about the Da Vinci Machine Project. Charles has posted a number of very good interviews from Lang.NET; check out those with Lars, Gilad, Anders, and Erik. Also, the Lang.NET organizers have posted synchronized slides and audio of the talks.

Saturday Mar 28, 2009

In order to work with dynamic types, method handles, and invokedynamic I have made some provisional changes to javac as part of the Da Vinci Machine Project. (There is a full description for Project COIN; it's almost ready for publication, and I'll blog about that when I push it.) It is most desirable, of course, to program invokedynamic call sites as Java expressions, not just ASM code, and that's what those langtools patches are for.[Read More]

Wednesday Mar 25, 2009

I was at the PyCon VM summit; it was great! There were about 20 talks (in the 10-20 minute range). Since "Sun" comes late in the alphabet, I had the pleasure of watching my fellow summiteers go first. When everybody was good and tired, I gave a presentation on the Da Vinci Machine Project. Here are some notes on a few of the other talks...[Read More]

Monday Feb 23, 2009

A Bloom filter is an array of M bits which is queried at K quasi-randomly selected positions pk (k < K). If all of the bits are set, then the query returns positive, indicating that someone has already visited the array, setting the bits at all the positions pk.

The filters are quite simple, but the math is a little slippery until you get the right grip on it. Here’s the way I like to grab it, presented in case it helps anyone else.

First of all, the bottom line: Size your Bloom filter to contain NK bits, plus an overhead of 44%. Put another way, for an error rate of ε, allocate lg(1/ε)·lg(e) bits for each key you intend your filter to hold.[Read More]

Monday Feb 16, 2009

JSR 292 is adding a fifth invocation instruction, invokedynamic. Like the other four invocation instructions, it is statically typed. What is new is that an invokedynamic instruction is dynamically linked under program control. In this blog, I will be giving “recipes” to demonstrate some of its applications. For today, here is a light aperitif showing how invokedynamic could be used to simulate the other invocation instructions. Caution: This blog post is for people who enjoy their bytecodes full strength and without mixers.[Read More]

Monday Dec 08, 2008

Christmas can be enjoyed as a much needed vacation day, a cheery cultural pageant, or a profound spiritual observation. For my part, I’ll take generous helpings of each. As it is a widely shared holiday, the first question is where to put it on the calendar. Thanks to Julius Caesar and his calendrical reforms, and to their enthusiastic adoption by the early Christian Church, we possess a clear date for Christmas.

But, why did the eventual consensus settle on December 25? Accounts vary, and it is a curious mystery. I think our date is equal parts historic reconstruction, arbitrary convention, and high art. [Read More]

Friday Nov 07, 2008

Today I was late for lunch. As I walked to the cafeteria, pondering my work, this haiku came to me:
It will take more time:
If you touch it, it will break...
Software is wily.
Relaxing the syllable count limit in favor of word count gives each epigram a fuller and more independent expression:
Somehow it always takes longer:
If you touch it, it will break...
Software is a wily opponent.
Those latter three lines express the way I feel about my chosen craft.

I think of the middle line as Kempf’s Law of Software. It was a favorite expression of Jim Kempf, who was on the Sun Common Lisp team with me, long ago.

The last line expresses a stance I call “defensive programming”, which is what we programmers do when we take Murphy’'s Law seriously.

This blog copyright 2009 by jrose