November 2007 Archives

Well, I've got a new problem now. My math fonts for LaTeX are all kinds of screwed up, as described here and many other places. Sometimes if I view a PDF with LaTeX generated equations in it in Preview everything looks fine, but if I just change focus away from Preview and go back it could get screwed up. Here's a video of what happens:

Googling told me I should try wiping out ATS databases with the following commands:

atsutil databases -removeUser
sudo atsutil databases -remove

(Gotta log out after running just the removeUser option, and reboot if you do the full on remove as root). This seems to provide temporary reprieve, but I start experiencing font breakage again after not too long of messing around with generating PDFs from LaTeX.

So annoying! I really hope this is just a display bug and my PDFs are actually fine when I email them to people or print them. It would be nice if this somehow gets fixed soon.

Update: I reinstalled Leopard, creating a new home directory and everything from scratch, and this problem magically disappeared. Go figure.

Some thoughts about Leopard

|

I bought the newest release of Mac OS X a little while back and installed it on my Macbook. I have mixed feelings about it.

First some things I like. Overall the way it looks is nice. A lot of people hate the new dock and transparent menubar, but they don't really bug me. I really like the rounded corners on contextual menus. All apps looking the same is awesome too. No more mix of brushed metal and pinstripes.

Spaces is awesome. I didn't really expect I'd like it as much as I did. I have not really used virtual desktops much in recent years of using X11 on unix systems, so I didn't think I'd be as stoked about Spaces as I am.

New iChat is cool. Lots of little things have been added that I was like "oh man I wanted this but didn't even really know it." Actually that can be said about a number of other applications too. iCal, Preview, Terminal, and others have a lot of these little changes that overall have a big improving effect.

The improvements to the Finder are also quite excellent. I haven't used Cover Flow much but it's cool. I really like Quick Look. The auto-discovery of network shares in the sidebar is handy, as are smart folders.

Now some things that make me both happy and disappointed. One of the biggest things I was looking forward to were improvements to Mail. Having RSS feeds in my mail reader makes me happy. Even better are how they sync up the read status with RSS feeds you have in Safari. Interestingly, I'd never used Safari for RSS feeds until now. I like that I can seamlessly switch between Mail and Safari for reading feeds now, depending on which one I'm in the mood to read with. I was a little bummed that my feeds all showed up as plain text in Mail, though, because I'd previously used defaults write com.apple.mail PreferPlainText -bool TRUE to force my email to always be plain text if possible (I do not like HTML email). I had to unset this in order to have HTML in my RSS feeds, which makes them look much nicer, but now I get HTML email too. It would be cool if we could get a separate PreferPlainTextMail and PreferPlainTextFeeds or something. It was also annoying how Safari and Mail can't import feeds from an OPML file.

Notes and to dos in Mail are cool, and I was relieved that you can change the default font away from being Marker Felt in the Mail preferences. I'm glad that to dos are shared between Mail and iCal, because sometimes I'd rather edit them in iCal yet still want them synched with my IMAP server by Mail. However, I was annoyed to discover just today that to dos I have synched with IMAP do not get synched to my iPod! You can apparently only sync to dos on local calendars with iPods. This is less annoying to me than it would be if I regularly used more than one Mac, but since I don't really need to use IMAP to synch to dos for now I just moved them all back to a local calendar, fixing iPod synching. I wish notes would sync to my iPod though, rather than me having to continue to manually drag files into its Notes folder.

Time Machine was another feature I was greatly looking forward to. I'm really glad to have backups I don't have to think about now. But, I was disappointed that you cannot choose to only have it back up, say, your home directory. I thought this would be possible. You can specifically exclude folders to back up, thankfully, but I really only care about backing up my own personal files. I try to keep everything I can in my home directory. Oh well, I have an external hard drive that is big enough that I can afford to back up pretty much the whole disk. I also wish Time Machine made block differential snapshots rather than file based, so you wouldn't need a fresh copy of a huge file every time just a few bits were changed, but I knew I wasn't going to get this.

The worst thing, though, is that Time Machine and FileVault don't play well together. Since this is a laptop, I have been using FileVault to keep my personal files encrypted in case someone jacks my computer. I'm somewhat paranoid. But if you use FileVault with Time Machine, it will back up your home directory as just the single encrypted sparse dmg that FileVault uses as its backing store. And it says it only backs it up when you're logged out. Presumably every time you change a file in your home directory, the whole huge dmg will get backed up anew. What I was hoping for was that I could have Time Machine back up only my home directory, and then do so only when I was logged in and the files were decrypted (that's the only time files are going to change in it anyway). This way I'd get nice incremental snapshot backups as usual, but could still keep the files all encrypted on my laptop's internal disk. Boo. For now I've just turned FileVault off because having easy backups with Time Machine is more important than my paranoia.

Now for things that totally suck. I did a fresh clean install, wiping my disk and just copying back my old home directory, because I wanted to clear off old crap. Despite this, I'm seeing more instability than I used to. Applications seem to crash more often, especially Mail.app. I also have been annoyed to find that with Python 2.4.4 installed from MacPorts I can't use pdb (Python debugger). Every time I just do pdb.set_trace(), python immediately crashes. This is likely not Apple's fault and the OS provided Python works fine, but I use MacPorts to easily install some other Python modules that Apple doesn't ship so it is annoying. Then, earlier tonight my Macbook just rebooted itself randomly. This might be a hardware problem (which of course sucks, but isn't Leopard's fault), but if its the OS that is real bad.

Then there's the new firewall. Many people have talked about how much it sucks. I agree. The idea of being able to allow incoming network access to only use specified applications isn't bad, but having that be the only control is lame. Having signed apps or those running as root be automatically trusted so the firewall opens up for them is also shitty. I think these kinds of things should be allowed for users to set their firewall policy with, but I want to be able to filter explicitly by port too. I want to be able to filter out traffic that is trying to connect to local services running as root. And I want to be able to do this without having to use ipfw from the command line. I could do these things in Tiger, so why remove the functionality? It would be better if Apple had let you switch to the old way of configuring the packet filter if desired, or at least given some more options for tweaking the new one. Even better than that is if they'd made a firewall that you could set up to notify you any time an application (regardless of its signature or uid) that hadn't been allowed to do so before tried to start listening on a local socket, and ask the user if he or she wanted to open a hole in the firewall for that app on that port. Outgoing filtering would be incredibly useful too. I'd love if the OS supported asking your permission any time an application wanted to connect to some remote socket you hadn't already explicitly allowed, like Little Snitch does.

I'm altogether not too impressed with security features in Leopard. Aside from the firewall, I guess they're better than Tiger, but I wish Apple had made bigger improvements. These posts and others about Leopard security features seem to show that Apple had some good ideas for security enhancements but didn't really take them too far. The application signing stuff is pretty lame since all it apparently does is warn you if an app that was signed and has been modified wants to get to your keychain or poke a hole in the ineffectual firewall. The sandbox business looks like it has a ton of potential, but I guess nothing actually uses it yet and it's totally undocumented. I'm not surprised that the security features aren't dazzling though. Software security is something that always bums me out when I think about it.

All this being said, overall I'm pretty happy with the upgrade. I hope some of the nastier problems I've encountered get ironed out soon in software updates.

For the last week and a half or so I had visiting me here in Stockholm. She came all the way from Seattle. We had lots of fun. We went ice skating in Kungstragården, then met up with Heydar for bowling in Friedhemsplan and had food and drinks at Garlic and Shots, a place I'd been meaning to check out for months (and now can say I highly recommend).

Heather ice skating at Kungstragården Garlic and Shots

Then we took a weekend trip to Helsinki. That was also pretty awesome. The Viking Line ferries are quite nice, even better than the boat that I took to Poland. It was a 16 hour trip each way but there was plenty of entertainment available on the ship, including some quite decent restaurants. We only spent a day in Helsinki itself, but had a good time just wandering around looking at various sites.

My ship Sad statue Faces on the side of a building Three Smiths statue

As usual, if you click on any of these photos you can see several more on Flickr. The following week we did more chilling in Stockholm. I had to do some not terribly exciting things like go to class, do homework, and work. Heather decided we should have Thanksgiving dinner though, and tracked down a number of Thanskgiving-ish foods. We had turkey, mashed potatoes, and apple pie, not to mention some delicious Bordeaux. Stuffing, cranberries, and pumpkin pie could not be located, but it was an excellent feast nonetheless.

Heather headed back home on Saturday and I've returned to my attempts at working and studying. Who wants to visit me next?!

P.S. I've got a few short video clips I've taken on my camera I've been kind of wanting to post somewhere. Anyone have recommendations for good video sharing sites to upload to? I want something like Flickr for video, but dunno if there's anything closer to that than Youtube.

Attention North America

|

I decided to come home for my winter break. I will be in Seattle, or at least somewhere in the US, from approximately December 23rd until January 14th. I found a sweet deal on a flight from London, so now I just have to secure plane tix between Stockholm and London, which should be possible for cheap thanks to Ryan Air.

Pretty math graphics

|

Even if you don't care about math, check out this pretty graph I made. I made the surface plot with Matlab, saved as an eps (encapsulated Postscript) file, then converted to a pdf with Preview.app on Mac OS X. In Matlab the figures never look this good, but when viewing it in Preview there's nice anti-aliasing and some awesome alpha transparency! Well, maybe it's only cool if you're a total nerd.

For those curious about what this is: I just did this homework assignment where I'm solving a simple parabolic partial differential equation in one spatial dimension, uτ = uξξ. We used the Method of Lines to discretize the spatial dimension, turning the problem into a system of ordinary differential equations. We tried solving that system using some different ODE solvers, and this plot was made using the simple, inaccurate, and non-stiff Explicit Euler method. It turns out that if you don't make your time time steps smaller than about ½ (Δ ξ)-2, where Δ ξ is the spatial step size, the solution is numerically unstable. This is why the u values are oscillating and blowing up to huge values near τ = 1 in this plot, making the actual solution impossible to see. If you're really curious, here is the assignment this is from.

Wow I'm amazed I could actually write that math just using HTML. Too bad everyone's browsers don't support some easy way of embedding LaTeX directly in HTML. Well, aside from jsMath, anyway, which I don't think I can use on LiveJournal since I'd have to embed JavaScript in my post.

Poland trip

|

Earlier this week I took a quick trip to Gdynia and Gdansk, Poland, via ferry from Karlskrona, Sweden. This trip was organized by ESN Sweden, so there were a few hundred other international/exchange students attending universities in Sweden that I went along with.

The start and end of the trip were rather long, boring bus rides across Sweden (Karlskrona is far in the south). I learned that the Swedish countryside is really quite rural, which makes sense given that there are only nine million people in this country. The more fun part of the journey itself was the ferry. We took a Stena Line ferry, which is this massive ship that looked to me more like a cruise ship than the kind of ferries there are in America, but it took cars on board too. The passage was about twelve hours long, overnight, so we had cabins on the boat and there was plenty of eating, drinking, and gambling available to pass the time. I did not find the food impressive. The booze was cheaper than in Sweden though (but not as cheap as actually in Poland), so that was pretty awesome.

Ferry that took us to Poland and back My cabin Night club on board the Stena Baltica

We arrived in Gdynia early in the morning. As Poland hasn't implemented Schengen yet, we got to wait for a long time in a queue for passport control. At least I got some more stamps in my passport. After completing the border crossing we took a bus to Gdansk and were given a tour from some ESN people from Poland. It was great to learn a little about Polish history, because I knew almost nothing besides it had been invaded by the Germans early in WWII and then got to live under the unpleasant rule of the Soviets until the recent past.

Solidarity Square Doorway to St. Mary's Building contrasts Fall leaves Neptune statue

After the sightseeing and lunch, we took buses back to Gdynia for a little shopping before boarding the ferry for the return trip. Poland is a cheap place to shop. I didn't buy much though, as I didn't really have an easy way to carry a lot of stuff, nor do I have a lot of excess cash I felt the need to blow.

The return ferry trip was similar to the journey over, but it seemed like people were partying even harder on the way back. Many people had bought large quantities of cheap Polish booze (like suitcases full, or hand trucks with stacked up cases of beer), so there was a lot of drinking all over the boat. We'd been told that we're not allowed to drink outside of the bars, and then only drinks bought in the bar, but there were hundreds of students scattered about everywhere drinking the cases of beer, boxes of wine, and bottles of vodka they'd bought anyway. I think I was the only one in my cabin who got some real sleep that night. I was woken up at 6 or 7 in the morning to one of the guys who I'd shared it with packing up since we were about to dock, and he was still incredibly drunk. It must have sucked for a lot of people to have to go sit on a bus for hours after that, but then the other students on the trip were probably mostly all younger than me so can probably still take that sort of abuse.

There were a few couple of rather surprising things about the trip. First of all, there were a ton of Americans. Way more than I'd seen any other time in Sweden. A lot of them seemed to be exchange students at Linköping University. Somehow they have attracted a lot more Americans there than KTH has I guess. The majority of the students on the trip were from Europe though, especially Spain, with a few more from various other places in the world. The other surprise was that Poland seems to be a less impoverished place than I'd feared it might be. Sure it's not as wealthy as most Western European countries, but they seem to have a rapidly growing economy. I saw a lot of new construction and clearing away of the depressing remnants of the Soviet era. The ugly old gray apartment buildings remaining appeared mostly abandoned, with a lot of new looking more cheerful buildings to replace them.

The trip was rather short but quite good, and I would be happy to go back some time.

Archives