Gas station without pumps

2012 April 3

Asymptote drawing program—hard to install

Filed under: Software — gasstationwithoutpumps @ 13:43
Tags: , , , , ,

My son has been using Asymptote, a drawing program for geometric drawings, with the Art of Problem-Solving classes that he has been taking.  He’s been running it on their website through the TeXer interface with [asy] tags, which is a little awkward, as error messages are not returned—you just get success or failure.  Asymptote has a lot of powerful features and seems pretty easy to use for a compiled language, and I thought it might be worth my trouble to learn for those diagrams that are not the sorts of graphing that gnuplot is good for.

We wanted to install it on our Macs, but like with our troubles with gnuplot, the developers of Asymptote have made it damn near impossible to install on Macs. We did find something that looked promising: precompiled binaries for the Mac: HMUG: /pub/MacOS_X/X/Applications/Publishing/asymptote.

Unfortunately, these binaries are not complete.  In a separate file, they tell you about all the libraries you need to install first:

ImageMagick 6.7.3-3
gv 3.7.2
gsl 1.15
MacTeX 2010
gc 7.1
readline 6.2

That is not a trivial set of dependencies!

The default sourceforge download is no better. It does not have sources either, and has (apparently) the same dynamic library dependencies.  You have to go all way to getting a branch from the SVN repository if you want to compile it yourself, which is more trouble than Asymptote was worth.

Are proper Mac OS X installers so difficult to build that the open-source projects never build them?

2012 January 2

Installing gnuplot—a nightmare

Filed under: Software — gasstationwithoutpumps @ 14:19
Tags: , , , , , , ,

My son and I use gnuplotfor all our graph plotting, because it is free, it has good curve-fitting tools, it can produce graphs in many standard graphical formats (both vector and raster formats), and it has good scripting capabilities.

Example of a simple gnuplot graph, click for full-size image.

I sure wish that it came already installed on Macintosh computers, though, as it is huge pain to install.  We had to install it for my son to do his latest physics lab writeup, as the old version we had on the household computer was from the old G5 iMac, and could not run under Lion, which no longer supports emulation of the PowerPC processors.

Probably the easiest way to install gnuplot is using MacPorts, so first we had to install MacPorts.  Downloading it went fine, but it wouldn’t install, because the Xcode that came with the Mac was not suitably configured.  So we had to install a new Xcode, which meant setting up an AppStore  account.  The Xcode download is almost 2 Gbytes and took an hour.  What the h*** is in Xcode that it is so bloated?  So far as I can see, Xcode contains a low-quality editor (about as powerful as Textedit), some compilers, and a build system that is about as featureful as make. The download is about 100× bigger than is reasonable—is it full of porn videos or what?

After the hour-long download of Xcode, MacPorts installed ok, but to run it we had to add /opt/local/bin and /opt/local/sbin to the path in the .cshrc file (and /opt/local/man to the MANPATH), since MacPorts puts its programs in a totally separate place form where everything else gets installed.

Because my son wanted to use the latest features of gnuplot (the pdfcairo output option), we started by using

sudo port install cairo
sudo port install pango

This triggered a huge pile of downloads and installations, as MacPorts built an entire ecosystem duplicating most of the compilation and building capabilities of Xcode (so why does it need Xcode to get started). After about an hour of downloads and building, we were finally ready to install gnuplot.

Due to lack of documentation for Mac installation on the gnuplot site, we downloaded and installed gd-libgd, which probably was not necessary, because

sudo port install gnuplot

installed a different version of gd anyway.  The total time to do the installation was over 2 hours (mostly due to the massive downloads).  It also took up a huge amount of disk space (1.9Gbytes for Xcode, 769Mbytes in /opt).  All that for a tiny program that is only about 2Mbytes. I just wanted one small graphing program, not two huge ecosystems for developing code!

There are two groups of people who could fix this problem:

  1. Apple could include gnuplot in their standard Unix utilities.  This would be the simplest and best solution.
  2. The gnuplot developers could release Macintosh binaries (like they already do for Windows) that install like other Macintosh programs.

I’m not going to hold my breath waiting for either of these things to happen.  Apple has no interest whatsoever in the scientific market (though I see more and more MacBooks at conferences) and the gnuplot developers see nothing wrong in taking 2 hours and 2.7Gbytes to install a 2Mbyte program—they do it all the time.

I used to recommend gnuplot to my students all the time, but now that most of them have Macs, I can’t honestly recommend it anymore.  No one should have to go through that much hassle to install a simple program.

[Added 2013 March 15: Read through all the comments.  Gnuplot installation on Macs has gotten somewhat easier since I wrote this post, and people have written about better approaches in the comments.  Installation is still not as easy as it should be, but it is not quite the nightmare it was.]

[Update 2016 Nov 20: I installed gnuplot on a MacBook Air by

  • Installing Xquartz from
  • Installing brew from The command given on their homepage has to be run from bash, not tcsh.
  • brew install gnuplot --with-cairo --with-x11 --with-qt5

Note that this set of commands provides pdf  output with the “pdfcairo” terminal, but not the “pdf” terminal.  The default is the qt5 terminal, though I think I prefer the classic x11 terminal, because of my familiarity with it.  (Switching with “set term x11” is easy enough.)


[Update 2019 Jan 21: The homebrew system no long supports options for their formulæ, so it is no longer possible to install gnuplot with x11 through their system (at least, until someone writes a new brew formula for it.  The “qt” terminal has gotten better over the past few years and is now installed by default, so installing gnuplot on the Mac is now a two-step process:

  • Installing brew from The command given on their homepage still has to be run from bash, not tcsh, but macOS users who haven’t changed their shell deliberately will have bash as the default.
  • brew install gnuplot


2011 November 20

Breaking every application on Mac OS X

Filed under: Uncategorized — gasstationwithoutpumps @ 00:34
Tags: , , , ,

John Burk, in his blog post Designing a new type of tech PD-feedback wanted, said

“There is almost nothing you can do from the keyboard to harm or permanently damage your computer.”

Ah, if only that were true. It took several days of debugging to get my son’s account working on our new Mac again, after he did something seems innocuous: changed “Sharing and Permissions” on his home directory and did “apply to enclosed items”. He had done it because he’d created a new crippled account for himself with parental controls that prohibited his favorite time wasters, but he wanted that account to have access to all his files on his regular account.  He gave the crippled account read and write access to his home directory and clicked the button to propagate that recursively.

We spent days trying to figure out why almost every application program (TextEdit, Pages, Photoshop Elements) was broken and how to fix it. The programs all worked on the other accounts, so it was clear that the problem was specific to his account. Just figuring out that it was changing the permissions on the home directory that broke everything took a while, though we pretty quickly saw that the permissions were messed up on his files (with “everyone” appearing twice and the owner not having access, for example).

It turns out that Apple did one of the worst possible implementations of Access Control Lists (ACLs), so that changing the permissions on your home directory messes everything up. The secret fix is to remove all the ACLs with

chmod -R -N ~

You won’t find that advice from Apple, but from disgruntled users trying to figure out why their user-friendly Mac no longer does anything right.

This is not a new Lion bug, but one that has been around for a while. I’m amazed that they have left something so damaging in the system for so long.

2011 October 5

Steve Jobs died today

Filed under: Uncategorized — gasstationwithoutpumps @ 19:42
Tags: , ,
Steve Jobs at the WWDC 07

Image via Wikipedia

The big news today is the death of Steve Jobs, the primary force behind Apple’s success.  He was a couple of months younger than I am, so his obits raise my awareness of mortality more than most do.

I only met Steve Jobs once, back in 1976 when he was first founding Apple with Wozniak (back when Wozniak was the skinnier of the two).  The two of them were trying to recruit Stanford grad students to join them. They had a good pitch, but I was too risk-averse to join them (seriously, the odds of a new startup lasting 5 years in those days was about 0.5%). I’ve often wondered what would have happened if I had joined them (or a few years later, joined Sun when they were starting up).

I’ve been a loyal Apple customer for a long time though, starting with the first of the Macintosh computers, and going through the “fat Mac” (with 512k bytes of RAM!), the Mac Plus, the Centris 660AV, a Titanium laptop, a G4 tower, a G5 iMac, a 17″ MacBookPro laptop, and (most recently) an Intel iMac. All along I’ve been impressed with Apple’s packaging and marketing.  I think that their biggest mistake was delaying about 10 years too long the switch to a Unix kernel (OS X came out in 2001, and should have come out in the early 90s, but that mistake was clearly Sculley’s and Jobs’s).

I have heard the Steve Jobs was a demanding taskmaster and would not accept second-best from his co-workers.  I wonder whether this drive for excellence is now ingrained in Apple corporate culture, or whether Apple will start a slide into mediocrity (as they did under Sculley).  Will Apple now be subject to the loss of vision and merger frenzy that has destroyed so many once-great computer companies?  I’m not betting either way on that.

I do hope that they continue the Macintosh series, though, and not throw it away to concentrate on the mobile market.

%d bloggers like this: