Monday, May 29, 2006

Back in Göteborg

It's late spring, or perhaps early summer here in Göteborg. The flowers are in full bloom with their scent hanging in the moist air. I got back from Iceland yesterday and slept for about 12 hours. Friday and most of Saturday was heavily sprint oriented. The effbot and I finished up the string module. According to stringbench (a new benchmark program I wrote) the result is about 3 times faster. It's a biased benchmark as it only times the things I found interesting, and is weighted towards the functions we worked on, like string search and replace. On Sunday afternoon I experimented with improving PyArg_ParseTuple, using the assumptions that 1) most calls have 3 or fewer parameters and 2) nearly all calls will have a correct format string. First go (after some help from Georg) netted about 5% boost in pybench. Whoot! Need to flesh it out some before sending in the patch to pydev.

On Saturday we stopped at 5pm. It was gymnasium graduation weekend and the room was booked for a party. We had a closing dinner at the hotel. Decent meal but the kitchen door squeaked something fierce in the high high frequencies, like the squeal of the flyback transformer in an old CRT. Few others heard it. At the end Steve handed out a few fun awards. Fredrick and I got a ball of twine, because we've been slinging strings about. Georg got Asimov's "I, Robot" as he's now known as the "georgbot" or the "gbot". Uncle Tim got tupperware containers to store snot (he's been optimizing the snot out of things, or perhaps it's because he's as smart as snot). I think that was it for the awards.

EWT paid for the dinner then CCP took us out for a night on the town. We started at one club with drinks of .. I forgot the first one. It was like a tequila sunrise but with vodka. The second was a shot of akvavit, the third an "ass" (kicks like a donkey) which was vodka and ginger ale. It comes from the days before beer. Beer was prohibited until May 1 of 1989 so they ended up with drinks like that. Our host for the evening was Kristján from CCP games, who did a great job.

Kristján likes the 1970s, and dresses that way too. At 10pm we were a bit early but by 11:30 or so the club dancing started. There were perhaps a dozen on the floor, and it was normal club dancing which is something I don't do often. I feel awkward because I don't know what to do with my arms. On the other hand (other appendenages?) my feet move about twice as fast as most others, and more complicated. Kristján also danced and pulled out a large number of disco moves. I got the footwork down quickly, but it's the hands. I feel awkward doing what he did, but for him it worked well.

After a while we headed to a a couple other clubs. The first was rather crowded and the second had a long line so we went to the Intercultural House for a bit. By then it was about 2:30am so I decided to head back to the hotel. On the way out a couple of guys started dancing with me, but I said "det är inte för mig" ("this is not for me"), in a nice way. Walked back along the sea wall there at sunrise. I was hoping to at least touch the water but the 10 ft high rock slope, cold water, and nobody else there in case of problems changed my mind.

Got back to the hotel, slept for an hour, showered, packed and went downstairs for the 5am bus to the airport. Bus? Did I say bus? Turns out the bus needs to be called beforehand. Phoned up Steve (he was to take the same bus) and he said he did that the day before. The staff people looked again and said "you must have made a mistake because you booked it for tomorrow, the 28th". "Oh, today is the 28th." The called and paid for taxis for us and the other group to get to the bus station. The bus leaves there at 5:15. We made it.

The airport was a mad house. It looks like the first flights are all scheduled at the same time. There were long lines for everywhere except business and e-ticket electronic checkin. Because of the lateness of the purchase (I guess), Georg, Christian, his lovely wife Andrea and I had business tickets so we checked in quickly, but still had to wait in line for security. That wasn't bad as I talked some with Georg. Bought some items at the airport, hung around in the business class lounge, and made it to the airplane without falling asleep. Even made it through breakfast.

I asked for a direct flight to/from Göteborg but they routed me through Frankfurt on the way to Iceland and Copenhagen on the way back. Christian and Andrea were on the same flight as I so we chatted a bit more. My flight to Gbg was about 35 minutes on a puddle jumper. Even on a small plane SAS serves complimentary drinks, including beer and wine. Most of the rest of the day and night I slept. Here it does get dark at night still, at least for a few hours.

Today I tried to get some work done but the DAS work isn't that satisfying. The optimization work was more fun. I caught up with email and read some more of Hamilton's "Judas Unchained." It's a fun read, though it was 5 or so months since I read the first of the two novels ("Pandora's Star") I'm having problems remembering who all the characters are.

I checked for local salsa and last Monday the weekly summer salsa dancing at Liseberg started. It's a local amusement park, quite big but still managable. Not like Disney where it needs its own mass transit system. The mascot there is a green rabbit. I bought the summer & Christmas pass. Only $20, and a day pass is about $8. (The rides cost tickets, unlike Disney where it's free once you get in.)

It was the first time I danced salsa here since December, except for one night at Oceanen on the way from South Africa back to Santa Fe. It was good to see the people I had met last fall and started making friends with. I had a fun time. Afterwards I talked with Christian and a few others about what's going on with dance. There are no salsa classes during summer. There is swing dancing on Sundays. I need to check out Westcoast Jitterbugs.

Friday, May 26, 2006

Sprinters at the Blue Lagoon

I didn't read the schedule yesterday so didn't realize that this morning we were going to the Blue Lagoon. That's a rather famous spa here in Iceland. It's not a natural spring. The water is part of the nearby geothermal plant which mixes freshwater and saltwater (in a 1:2 ratio) about 2km underground, using the resulting 200C+ mixture for power. We didn't leave until 9:30 which means I could have stayed until the end of tango last night. Oh well.

You can read their home page for details. It was pretty fun. There are two big reasons for me to get contacts or eye surgery in order to not need glasses. One is playing in water, and the other is in-close dancing (especially bad when both are wearing glasses). It is a do it once thing. I don't think it's a do it regularly thing. The place is rather far outside of town.

For pictures of what we've been up to, see flikr, keyword is "pyneedforspeed". For Andrew spotting try here, there, or yon. I took this picture. I'm not a real picture taker though. Got annoyed trying to register with flikr now that yahoo has them.

My string replace case was committed to the code base. I worked on a few more minor changes, and added various tests. Good thing I did since it caught a subtle bug we introduced. Georg Brandl pointed out the basic problem. I worked on some ideas for speeding up string.split for whitespace. Looks like we're memory bandwidth limited because my improvement wasn't. A couple of months ago I looked into the problem. For small splits the problem is the resize algorithm. There are 2 or 3 reallocs to get up to 10 splits. When I prealloc the list to size 10 with a post-facto fixup it goes from 5.2 to 3.9 seconds, which is nice for much of what I do. Tomorrow I'll work on that more and port it to the other cases.

It may also be worthwhile to special case splits with a maxlimit of 1 and 2. Those are the most frequent uses of split in the standard library.

We worked late into the night because we didn't get started until 2pm. There's still a bunch of us here in the sprint room at 23:30. Dusk. I don't think it's sunset yet, except there's a mountain in the way.

Thursday, May 25, 2006

Tango in Reykjavík

Dancing is a lot like language, at least for the pair dancing that I do.
Different places have different styles and accents, stressing certain
steps and ways of communicating in the dance. There are different
teaching styles. Some focus on steps, like memorizing sentences from
a quick Berlitz guide. Others on movements, perhaps akin to learning
to read by phonics. Learning either one has the problem of learning
with other people who aren't good, so you don't know what's right.

I went tango dancing here in Reykjavík this evening. It was at the
Intercultural Centre about 30 minutes walk from the hotel. I didn't
think it was quite that far away and asked for clarification from some
guy walking out of a grocery store. Like Sweden, nearly everyone here
speaks English.

The man/woman ratio at the event was about 6/15, which I think is
worse than Santa Fe. Good for me though. It usually took a few
dances for them to understand my tango accent. Some of the women were
quite good. I might even meet a couple of them again at an upcoming
tango event. There's one in Copenhagen and another in Sweden near
Gothenborg. I'll be at the one at the end of next week.

The Swedish tango site tangoportalen is much more popular, and more featureful, than I thought. A few of the women have pages on the site. Perhaps I should register there too.

I went dancing tonight instead of participating in the group event.
The rest of the people went to a "Viking feast" and got to try some of
the traditional foods. As well as a bunch of drinking. I had a
viking-ish meal at the Tivoli in Copenhagen and I'm not much into
fish, so I think I made the right decision.

Yesterday was a long work day. I did a code review of Python's
stringobject.c. The "replace" function was the worst. It made an
intermediate string before making the actual Python string, so every
replace called for two string copies. It didn't handle various
special cases that I thought were important. Today I rewrote the code
and added support for those cases. Some 600+ lines later and the
results in stringbench timings range from 17% to 65% faster. The
biggest improvement is in replace where the 'from' and 'to' strings
are the same size.

There are still improvements to make as I only looked at a single
function. Fredrick worked on the unicode module and managed almost
4-fold performance boost there, in part by using a smarter string
search. Tomorrow we'll migrate some of those to 8-bit strings. I
wrote some test cases which found a few bugs. Guido decreed a
solution to one, and the others were overflow/segfault errors.

Yesterday we all got a gift from EWT, the sponsers of this conference.
It's a Nokia 770, which is a cross between a PDA and a palmtop. Now I
need to figure out if I'll use the thing. I've had 2 Palm devices
(okay, "Palm Pilot", before they got sued by the maker of Pilot pens)
and managed to loose both within a month or two. The Nokia isn't a
PDA. It's does have a decent web browser and connects to bluetooth
and wireless. I'll see if it proves useful. I can't belive it
doesn't have an alarm clock on it.

By the end of yesterday I was so tired I slept for about 10 hours, 5
hours at a time. This room is only so-so. It's a big room, but the
bed is a bit saggy and the tub clogs up so while I'm taking a shower I
end up with several inches of bath. The towels are skimpy thin too.

Off to bed. Workshop starts at 9am promptly. I'll post this in the
morning. Not that it's more than medium dusk at 1:15 am here.
There's still a month until the summer solstice here at 64 or so
degrees north.

Tuesday, May 23, 2006

First day of the NeedForSpeed sprint

I woke up early, about 6am. It was light out. Sun sets at 11:45pm or so and rises at 2:15. "Or so" because it changes by 8 minutes a day. I was prepared. I brought my night mask picked up on some plane trip or other. Alarm went off at 7 but I didn't get up until 7:30 when the construction started next door.

Went down for breakfast. The normal Nordic smörgåsbord, with a few things I hadn't seen before. Talked with Steve and a few others who were up early. Most weren't as they partyed late with the CCP folks. (I left at 10:30 the previous night. Others ended up going to a bar.)

The sprint started at 9 but many didn't get in for another 45 minutes or so, and a few went back for naps. Also in part because of jet lag. We discussed what we'll work on. I decided to help the effbot with string performance. I started working on a set of comparison tests between the byte string and the unicode string implementations. We found a couple places where the algorithms of one were faster than the other.

Once done there are a few things I want for string processing. A "chomp" function or equivalent for the special case of "remove a terminal newline if it exists." Needed when processing lines from a file. I've found that string.split is slow for my GFF3 parser because it reallocs the list 3 times to store 9 elements. I can make that faster several ways. I'll work on those tomorrow, perhaps as well with gzip's readline performance.

I didn't get as much done as I thought because I got a bid on my house. It was nearly 17% below asking. The offer was strictly based on sq. ft. and much lower than reasonable, for reasons I won't get into here. I declined the offer. Writing the response took a long time. That's usual for me.

Steve Holden treated us to lunch today but we were on our own for dinner. I asked the hotel desk and they pointed out a place a few blocks from here. It was quite windy and cold. It snowed some on and off throughout the day. Unusually cold, the locals said. I was prepared. Others less so, so the 8 minute walk was far enough. It was a steak and burger place. A burger and water cost 1200 ISK, which I think is about US$20. The 2nd St. Brewery back home makes a much better, bigger, and cheaper burger. With green chilies too.

Sean and I headed to a local store afterwards to pick up some groceries. Junk food more like it. It had chips and salsa so i'll probably pick some up Thursday or Friday for the gang.

Came back, talked with Christian and Andrea. Got the two of them to repeat some German tongue-twisters. Had fun talking with them. Tried practicing some of my nearly non-existent German. I'm liking these Germanic languages.

Reykjavík and CCP

Woke up this morning at 5am when Bea woke up to go to the UK. Tried to sleep longer but it didn't work. I get a bit anxious when I have to wake up in time for travel. I called Sara to make sure things were okay with the house and Craig to chat for a bit. Did a load of laundry (I don't have enough trousers). Packed.

Transport timing to the airport was spot on perfect. Walked to Vasa Viktoriagatan, looked at the time for the next tram. While doing that the tram turned the corner. Got to Gotaplatsen, waited 3 minutes and took the airport bus. Which meant I was at the airport for a while.

Met Christian, Andrea and Georg at Frankfurt. EWT sponsored us flying business class on Icelandair. Yippee for us! Tried Brennivín, an Icelandic schnapps. Reminded me of aquavit.

Christian and Andrea (husband and wife) had plans to rent a car because she would not be part of the sprint. They offered to drive the other two of us to the hotel. Turns out the small rental care could hold four people and only two suitcases. But that was fine because the airline misplaced their luggage, so only Georg and I had a suitcase.

None of us were really prepared for finding the hotel on our own. Christian had a small map printed out, with no street names. I could puzzle out some of the signs (like "Reykavik A" means "East Reykavik") and we knew it was near the water. When it felt like too far we asked a couple guys. They didn't know but did point us back to the center of town. We drove past a map and while looking at it stopped another two people. They didn't even know where they were on the map. We had the address with us and found the street. It was only about 5 blocks away.

Got in, registered, said hi to people, put on a sweater and met for the bus to CCP, a games company based here. They develop the MMPORG "Eve." It uses Python for a lot of the internals. We got a tour of the office and a small talk on the company. They have an amazing view of the waterfront. Sean's been taking pictures, see his blog.

I had a fun time talking with Nathan Richardsson at CCP. I've picked up various bits of trivia about Iceland over the years so I got to ask about them. I also tried learning some of the Icelandic language. It's related to Swedish, but further than Danish or Norwegian so I have to concentrate a lot to guess what something it. Still, I'm pleased that I can do it.

I've noticed that the Icelandic men I've talked to (I've not yet talked to Icelandic women, outside of hotel staff) are more likely to pat someone on the back or otherwise touch others than Swedes or Americans. Still not as much as salseros.

An observation with 3 data points isn't that good though.

Sunday, May 21, 2006

Chalmers Dance Society

I'm almost back to my normal sleep schedule. That is, go to sleep at 2am or so. It's rather easier to get over jet lag when I don't have to be up to be at my client's site early in the morning.

A few months ago my house in Santa Fe was robbed. Sara's DVDs and player were taken along with some of her jewelry and a camera (or was it the camera media?). The only thing of mine taken was my mobile phone. I had two; this was the one for Europe and South Africa, or any other place with SIM cards. It also had my Swedish SIM card in it. I had a pay-as-you-go card, which means I no longer have that number.

Today I bought a new one. A low-end Nokia along with a starter pack. SEK 699 or just under US$100. I don't like the phone as much as my old Nokia. The flash light was a surprisingly useful item, and the color screens don't do well in even middling strong light so I can't tell if I has messages. I would like to have my own ringtone (MP3), recorded by the mic, but it doesn't seem to support that. I wonder if there's a way to do that...

At 5:30pm Bea and I were at the Chalmers Dance Society event. It started with a short course in ballroom cha-cha and rhumba. The ballroom dances always seem strange to me. I learned club style, or social style. The cuban motion is different, emphasizing the legs instead of the hips, and the poise seems too contrived. That aside, they dance on-2 while I dance cha-cha on-1. I modify my salsa on-1 to work with the cha-cha step.

There were people visiting from another ballroom club in town, with people who compete in national and international tournaments. I danced with a couple of them. One corrected my style in a way that I found pretty annoying. I dance a *different* style, not a *wrong* style. I danced with another but even when I was dancing on-2, the moves I do are different from what she expected so it didn't work out that well.

According to David (who taught the course) and Bea, rhumba is a cha-cha but without the cha-cha-cha part of the step. I ran into that before here in Sweden. I learned a different rhumba style in the US. Mine is based on a box square. It's been a while since I did rhumba though. I only remember a few things. I find myself switching into tango instead.

More of the people there did Argentine tango and not international tango. The tango music though was mostly international, with a strong march tune to it. I'll bring some of my music over next time.

They also did some gamladans (Swedish folk dancing). I still don't have the turns right, but it's not that hard a dance to pick up. I tried to do some waltz but the three lessons I got from Sara before leaving didn't sink in enough. Oh, and for the class I tried hard to keep ballroom poise and position. Including the arms swinging out.

Saturday, May 20, 2006

jet lag and gaming

Today jet lag hit. It's a bit different than usual. I started coming to Sweden for work. A client of mine is in Mölndal, which is just south of Göteborg. I would leave on Saturday, arrive on Sunday, and work on Monday. At that pace it takes 4 or 5 days until I no longer feel the pushback from my time-tossed body. Yesterday I went to bed at 3am and woke up around 10:30. But around noon I slept again for a few hours. Didn't do much during the day. Unpacked my bags, helped clean up, talked with Bea when she took a break.

I did some more food shopping. I love Swedish bread and butter. Many foreigners don't care for the bread. The bread is sweet by European standards, I'm told. I have a sweet tooth. But the butter. I've tried to find butter in Santa Fe as good as here, with no success. Danyelle, a German salsera living in Santa Fe who is almost always smiling, has the same complaint about the quality of US butter. We don't know the reason for the difference.

Then around 6 or 6:30 I headed over to the House of a Thousand Wows. That's Laura and Jacob's place. It's amazing, and perhaps I'll describe it some time. I and 7 others were over for dinner and gaming, and conversation of course. The game I played - I've forgotten the name - was a 4 player game. The rules weren't that hard but we finished only after some 3+ hours of play. We declared Jacob the winner even though we hadn't technically finished. The problem was the game's complexity wasn't challenging after the first hour or so of play.

Still, it was a fun night. We all left between 1 and 1:30 in the morning. The weather had cleared up a bit so I walked in the cool spring (early summer?) night. It resumed raining about 10 minutes ago.

Friday, May 19, 2006

leaving Santa Fe, arriving Gothenburg

Even after 5 years and a dozen or more trips, I still get giddy when I land in a foreign airport. It's pretty amazing that me, raised in the Little Havana part of Miami, is walking in Schiphol airport or landing in Cape Town. Growing up these were exotic places, and now I have some familiarity with both.

From 1998 until yesterday morning I lived in Santa Fe, New Mexico. For the last 5 years I lived in a wonderful house in the Casa Solana neighborhood. It fit me well. But for various reasons I decided that Santa Fe was no longer for me. It was a hard decision. Instead I'll be homeless for a while, staying mosly in Sweden and South Africa, with side trips to other places.

I left yesterday (Wednesday) morning. I invited people over the evening before for a "take our stuff party." My roommate coincidentally is also leaving the country the same week. It was nice to see friends for one last time and to do a bit of dancing and talking. I enjoyed it so much - thanks Dana :) - and didn't pack anywhere near as much as I planned so I woke up at 4am to continue packing and cleaning.

I thought I was doing well but ended up with a lot of things to take to the dump. I borrowed Dave's truck again to take two loads over. With this extra 1000 pounds I ended up hauling well over a ton of trash. The extra load cut into my safety factor. Thanfully Sara could do the mailings I couldn't quite manage, though there are some text books in the shed and a couple of propane canisters that I didn't get around to taking care of. Hmmm...

A quick shower, zip up the luggage, rush over to the auto consignment place so they have my car and title, then off to the airport. Via Santa Domingo Pueblo for car and people fuel. Cut it kinda close with the flight but no problem, and I got bumped up to first class because I've given them enough money and joined their frequent flier program.

The ABQ to MSP flight was uneventful. Actually, the only eventful thing was the tire which needed replacing for the MSP to AMS leg. They jacked up the plane's nose while we were in it.

Because of the lack of sleep the night before I slept decently well. I'm a belly sleeper and don't sleep well sitting up, but managed to contort myself just right. Managed to catnap some during the 4.5 hour layover at Schiphol.

Got to GOT, which is Gothenburg Sweden's Landvetter airport and to Bea's place in the Haga district. It was good to see her again after so many months away. We got money and groceries, I cleaned up, and off for tango at Oceanen.

I saw several familiar faces, remembered a few names, and was remembered by some others. When I last danced in mid-December I thought my Swedish was starting to get decent. Sadly, 4 months away with little practice didn't help. Things started coming back, though I know there's still a ways to go even to get back to where I was.

Tango finished at 11:30pm and I helped clean up, forgetting that the last tram before night service was just shy of midnight, so I instead walked back to the apartment. Checked mail, and decided to go ahead and start this blog. Hopefully I'll keep it up. Several friends of mine in Santa Fe want to know how I'm doing, and I so enjoy reading Heikki's blog of his family's life in Cape Town. We'll see.