I dislike Java.

Dear lazy web,

It would be nice if you could tell me a non-hacky way to do progress dialogs from within the event-dispatch thread in Swing, where all of our application logic happens to reside.

This doesn’t work:
display modal dialog
start worker thread
(won’t run because event thread is blocked)

Nor does this:
start worker thread
display modal dialog
(race condition hiding the dialog)

Joining in the event thread won’t work because it blocks updates. Using a non-modal dialog and passing the bottom-half of the rest of the event thread to the worker thread to execute at completion will work, but is obscenely messy. Or, one can spin in the beginning of the thread waiting for the modal dialog to appear to avoid the race condition, but that is still gross. One could subclass Dialog and have it also signal a condition variable once it blocks… ugh.

Fusion

As the ticket says, last night we went to the State to catch Al Di Meola, who is touring in support of his new CD Consequences of Chaos. Amazing show replete with Di Meola’s signature blazing-fast yet incredibly clean lines. The Project led off with a few selections from the new CD, then went into Azzura, Fugata, and from there into a rousing rendition of the Santana-like single from the new CD, “Red Moon.” The band took a break and came back with Al playing a few Piazzolla pieces solo on his nylon string guitar, the last teaming up with pianist Mario Parmisano who unfortunately loaded up the bandoneon patch on his keyboard (can’t we pretend those instruments never existed?). After that, Al picked up the PRS again, launched into “Turquoise” off of the new album, then the Chick Corea tune “Senor Mouse.” I can’t remember what finished up the set, but the encores were ambitious: “Race With the Devil” followed by “Egyptian Danza.” The only flaws in the performance lie at the feet of the sound engineers who had problems with feedback in the middle of the show, poor mixes, and a speaker that was picking up a radio station as if it was right out of Spinal Tap.

Denied

I just finished reading Woodward’s new book, State of Denial, a very provocative and damning look at the Bush administration’s handling of the war in Iraq. My take-aways are: Rumsfeld is a jerk, a bunch of PhDs can bollocks things up quite nicely merely by lying, and Colin Powell is an AOLer. Worth a read.

No idea what to be for Halloween this year. I suppose that is okay since I don’t have any plans either. Perhaps I should make another rock-icon-o-lantern?

LX

I’ve been sick the last few days. Meh.

I went down to Georgia last weekend, looking for a soul to steal, as usual. My grandparents have attained their sixtieth year of marriage this year, so I spent 20 hours in the Atlanta suburb in which I once resided.

The lady at the check-in counter told me to have a nice flight, and I said “you too.” I used to enjoy flying, but the soviet checkpoints we must navigate now have really killed it for me. Wearing my EFF shirt, I was surprised to not get the magic SSSes on my boarding pass. The trek through the screening area still sucked, though, even without the special treatment. I expect that for Thanksgiving I’ll be driving my car instead. Thanks, 4th amendment haters.

My grandparents are doing well. My grandfather congratulated me on the engagement news and wished us our own 60 years of bliss. We grandchildren presented them with a scrapbook of various detritus of our lives and toasted their health. Teary tributes were made, and so on. It was a nice visit, if too brief.

Dead literati

Fun fact: F Scott Fitzgerald and family are buried next to the chapel where Ange & I are to be married. Neat.

BTW, if any of my few readers happen to be job hunting, let me know, as our company needs programmers badly.

Date saved

Well, some progress has been made in the wedding planning, including the tentative selection of date: 15 Sept 2007. First, though, we have to talk to the priest this weekend and consequently do a bit of acting as to the degree of our collective piousness. Here’s hoping we’re judged to be adequate.

Not much else going on this weekend, other than the Battle of Techs on the gridiron. May the worst team lose!

keelhaul handlin’ of OEM flags

Most of the pirate stuff annoys the heck out of me on talk like a pirate day (that was yesterday by the way, yarr and so forth). But Linus’ kernel announcement yesterday was priceless, though he could stand to work on his piratese.

My next kernel contribution should ship with 2.6.19, w00t.

People are dumb

I saw a guy with a sticker on his backpack today that said “Rideing Durty.” Now, I know this has something to do with some song, and that it is also cool/trademarkable in some circles to spell things wrong (see Fabolous), but seriously, rideing? If you were the printer making said sticker, how could you let that one get through?

Also, Oscar Mayer is now making cooking hot dogs easier. Is this the state of culinary despair to which our society has sunk, that cooking hot dogs is too onerus? I love the write-up in the press release: “Preparation is easy, and there’s no cook top mess or boiling water!” Oh, heavens, that my prayers have been answered so fully! I fear I’ll be telling my future children how I remember it taking almost a minute to make a hot dog, and we had to open the buns ourselves! And grilled cheese, boy was that a sisyphean task…

Hello, java!

I was messing around with Java bytecode today for no particular reason. It’s a fairly simple assembly language — stack based so it takes a little getting used to but not hard for anyone who has used an HP calculator. I installed a copy of jasmin from my apt repository and got to work.

I wanted to make a “Hello, world!” that wasn’t completely obvious at first blush, so the plan of attack was to just push all the ascii codes on the stack in reverse order then call System.out.print() on them in a loop. Each iteration checks the loop count, if ok then pop the next code and print it. Here is where the bytecode verifier is a pain in the ass: apparently, the instructions must be executed each time through a loop with the same stacksize, or else you are branded an evil hacker. Very annoying. I could’ve used an array instead but that also takes a bunch of pushes and stores, so I just unrolled the loop. It works, I guess. Code after the jump.
Continue reading “Hello, java!”

Bug

Philly didn’t happen, again because of rain. I saw on their website that the game went on anyway. Bah.

My ubuntu install is doing a bit better after a week of various customizations. Now the Fn key and all of the special laptop keys do things (more than I ever had working on my Dell), and tap-to-click is going on the touchpad. I’m still having a strange problem with HAL, however, and negotiating its maze of XML config files isn’t the best. While looking for help, I saw this: Ubuntu bug #1. Silly, but I like the feedback, especially the “it’s a feature!” post.