Category "Mac"

Mathpix is a great idea, executed well:

The Mathpix desktop app allows users to take screenshots of math equations and paste the extracted Latex, all with a single keyboard shortcut.

For example, I wrote this on a piece of paper and took a picture of it:

Handwritten math

And Mathpix put the following text on my clipboard:

\sum _ { i = 0} ^ { n } i = \frac { n ( n + 1) } { 2}

Which is exactly right:

$$\sum _ { i = 0} ^ { n } i = \frac { n ( n + 1) } { 2}$$

Mathpix can grab anything that is displayed on your screen.

The Mac app is free on the Mac App Store and there is a corresponding iOS app which is free with in-app purchase.

I updated OS X to 10.9 Mavericks yesterday. This isn’t a full review, but a few observations after using it for a day and trying to get things working.

After re-installing XQuartz (which is prompted for when you try to launch IDL), IDL seems to work fine. But I haven’t had to install IDL on Mavericks and that usually seems to be the worst problem.

The Xcode command line tools are installed in a bit different way than in Mountain Lion. Evidently you don’t have to install Xcode, you can just do:

xcode-select —install

I had to work a bit, but GPULib builds again with the new tools.

There are a couple things in general that I am looking forward to using more:

  • Better handling of multiple displays: you can have a different full screen application on each monitor, you can have a separate set of spaces for each monitor.
  • The skeuomorphic Contacts and Calendar applications have a cleaner design. Getting rid of the leather texture in Calendar was worth upgrading.
  • More efficient power management: I haven’t really noticed any differences, but I am really hoping for a bit better battery life. But I’m still having trouble using CUDA with the discrete graphics card on my laptop, which I’m thinking has something to do with the power management features.

In general, I think Mavericks is a lot of incremental improvements, which is exactly what I want.

UPDATE 10/30/13: I have noticed that X11 is always listed as using significant power. Updating to the development build for XQuartz 2.7.5 seems to fix the problem.

I have a decent draft of a TextMate 2 bundle (only useful if you are using the Mac OS X editor, TextMate 2). Some features over the old bundle:

  1. handles DLM files, i.e., highlighting, completion, etc.
  2. handles constants better
  3. updated for IDL 8.2.1
  4. IDL theme included (similar, but not identical, to IDL Workbench defaults)
  5. some IDLdoc support (hope to extend this in the future)
  6. comments prefixed with ;= are inserted into symbol list (see below)

I have really grown to like the ;= comments inserted into my symbol list. For instance,

;= helper routines

will appear in your symbol list as --- helper routines ---. This is a nice way to divide a file containing many routines into sections. I’m also thinking of adding this syntax into IDLdoc output as well.

To get the bundle, do the following from a system command line (requires git):

mkdir -p ~/Library/Application\ Support/Avian/Bundles
cd ~/Library/Application\ Support/Avian/Bundles
git clone

I have installed the most recent OS from Apple, OS X 10.8 “Mountain Lion”, on my desktop. I am delaying installing on my laptop until the reported battery problems are solved (supposedly with the upcoming 10.8.2 release).

The biggest change for IDL is that Mountain Lion does not include X11, instead you need to download X11 from the open source XQuartz project (launching IDL will direct you to an Apple webpage which gives the XQuartz link). Early Mountain Lion IDL users on the newsgroup suggested using that XQuartz 2.7.2 could cause problems for IDL, use 2.7.1 instead. In my cursory use of the current release, 2.7.3, graphics seem fine.

Some IDL users on the newsgroup also have reported problems with license files, but I didn’t experience issues with my floating network license.

I didn’t have to install IDL on my desktop, running the installer can actually be the biggest problem using IDL on an OS that comes out after the IDL release. But since Lion removed Rosetta support and IDL 8.2 was released after Lion came out, I am guessing that IDL 8.2 should install on Mountain Lion (but I wouldn’t remove my working IDL 8.2 install!).

By the way, don’t believe the installation time. I had the same issue I complained about when installing Lion, i.e., progress stopped for a long time (about 30 minutes this time), but continued on seemingly fine.

I have been using TextMate as my editor for local work on my Mac for several years now. I like TextMate (and contributed to the Ethan Gutmann’s IDL bundle for it); it is the most “Mac-like” editor I’ve found. But it definitely has some growing issues and has not been frequently updated over the years. MacroMates finally released the promised TextMate 2 alpha last December, but it lacked required features and development had been slow.

I thought last week’s announcement that TextMate 2 was being open sourced was the death knell for TextMate 2 and that I would need to look for a replacement editor like Chocolat or Sublime Text 2. But there have been many contributions to TextMate’s GitHub repo in the last two weeks – and new releases every day!

This is all to say that I have been working on an IDL bundle for TextMate 2, which I will put on GitHub shortly. It has very basic support for IDL syntax and there are plenty of bugs in it right now.

mathiasbynens has a great github repo of OS X commands to change various system defaults. Some of my favorites:

# Disable menu bar transparency
defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false

# Disable the warning when changing a file extension
defaults write FXEnableExtensionChangeWarning -bool false

# Show the ~/Library folder
chflags nohidden ~/Library

This is like a nerdy command line version of Secrets.

Instead of just listening to me complain about Xcode 4.3 in Lion, I thought you might like some backgrounds for your iPhone. I have both lock screen and home screen versions. The images are subsets of the first image described in my entry to the ITT VIS User Group Meeting a couple years ago (and now appears at the top of this blog):

These images show a line-integral convolution (LIC) representation of the global NASA wind velocity data. The first image shows the LIC output, while the second and third images combine the LIC output with the Earth image in the IDL distribution. The fourth image shows the combination texture mapped on a sphere representing the Earth’s surface. Dark colors represent low velocity winds, lighter colors higher velocity winds. All aspects of the creation of the images were done in IDL. The code to compute the LIC was written in C and integrated with IDL using a DLM. The data access was done from NASA’s DAP server using OPeNDAP’s client IDL bindings (another DLM).


Images are retina sized, i.e., iPhone 4/4S only.

The newest Mac OS, Mac OS X 10.7 Lion, was released last week. See John Siracusa’s review for a extremely detailed look at the new features in Lion. AstroBetter posted some thoughts on Mac OS X 10.7 Lion along with a comment thread from users about how it has affected specific astronomy packages.

My thoughts from using Lion for a few days on my home computer (I haven’t upgraded work computers yet):

  1. IDL seems to work fine, though I haven’t done much on my home computer besides a few sanity tests.
  2. Lion is the first Mac OS X update I have thought felt slower than its predecessor. I think it is mostly due to the new window creation animation. The extremely useful Secrets website says that the following should turn off the animation: “defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO”.
  3. Spaces have been changed a bit to work with the new Mission Control feature. I had a 2 x 3 grid of spaces previously, but Lion only supports a 1-dimensional array of spaces, so now I have a single row of six spaces. This is what I’m missing the most so far, since my 2-dimensional mental model of the purposes of the spaces allowed quick switching between tasks.
  4. Scrolling is, by default, backwards from the current direction, but there is a preference value to change it back to the Snow Leopard way. I suppose if I had a Magic Trackpad I would give the new way a try, but I use a regular mouse with a scroll wheel, so I stuck to the old way.
  5. Most people are reporting an easy installation from the Mac App Store, but I had some difficulty. After Lion was downloaded, my Mac rebooted and the installer hung. It reported that it had 33 minutes to go for several hours. I tried again and it appeared to hang again, but I left it going all day as I was at work. When I come back, it had installed. Not sure how long it took, but it was definitely way longer than 33 minutes.
  6. Rosetta support is gone, luckily all my applications are native now.
  7. The UI is generally more muted and fading into the background, which I really like. On the other hand, iCal and Address Book got the skeuomorphic treatment, which I really don’t like.
  8. For a few months, the new version of XCode cost $5. The new Lion version is free again.

Homebrew is a packaging system for Mac OS X, similar to Fink or MacPorts. I have used both Fink and MacPorts, but do not like having an entirely separate system of installs. Homebrew can install in /usr/local like a normal, well-behaved installation.

I installed Homebrew in /usr/local with the recommended commands, except I used sudo instead of changing the owner of /usr/local as shown in the Homebrew docs:

$ cd /usr/local
$ sudo git init
$ sudo git remote add origin git://
$ sudo git pull origin master

Then installing a new formula is as easy as:

$ brew search svn
$ sudo brew install svn

People can contribute new formulas; they are Ruby scripts that do the steps required to build the package.

I haven’t used this a lot yet, but this looks like a good solution to the problem. Any one using this yet?

AstroBetter has an article on on a FITS QuickLook plugin for Mac OS X by the author of the plugin. Looks incredibly useful if you use a Mac and FITS files. QuickLook plugins for more scientific data file formats would be really nice. Any one have an HDF 5 plugin?

older posts »