Gas station without pumps

2019 December 19

Macos 10.15 Catalina vs PteroDAQ

I had a serious scare today.

First, I found out that the software for my Analog Discovery 2 was crashing on the MacBook Air that I will be using for lectures and lab next quarter.  It behaved normally at first and then crashed for no discernible reason after a couple of minutes.  I figured that the problem was probably related to the macos “upgrades” I had done recently, so I checked the Digilent website, and they had just posted a new version of the software last week, addressing the changes that Apple had made to their USB stack (which broke almost all 3rd-party software and a fair amount of Apple’s own software).  I downloaded the new version of Waveforms from the Digilent site and everything worked again.

But any changes to the USB stack are likely to break the code that PteroDAQ uses for finding what devices are connected, so I checked PteroDAQ with my usual setup.  The GUI for PteroDAQ did not list the Teensy board as it used to do, and PteroDAQ couldn’t run!  I spent a long time with ioreg trying to figure out how to modify macgetports.py to find the device again.  The Teensy board was visible as an AppleUSBDevice and AppleUSBInterface, but not as an IOSerialBSDClient as it used to be.  I could not figure out how to open it as a serial port!

Now my usual setup involves going through a USB 2.0 hub (in the Cerebrus cable), so I dug around in my drawer of parts until I found a plain USB-micro data cable.  Hooking up the Teensy board directly with that cable did show an IOSerialBSDClient interface, and PteroDAQ worked fine.  So the problem is just that connections through the USB 2.0 hub are not made the same way they used to be—the serial connection no longer is visible the way it used to be.

I’ll enter an issue for this on the PteroDAQ GitHub, but I won’t try to fix it unless it turns out that modern USB C-USB 3 docks exhibit the same problem.

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:

Dependencies:
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 https://www.xquartz.org/
  • Installing brew from http://brew.sh/ 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 http://brew.sh/ 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 January 22

The Very First Apple Movie | Rick’s Algeblog

Filed under: Uncategorized — gasstationwithoutpumps @ 09:19
Tags: , , , ,

I read a lot of math teacher blogs.  A new one that looks promising is http://www.algeblog.com/, written by Rick Harrington, a math teacher from CT.  I particularly liked his post including the first movie produced on an Apple Macintosh computer: The Very First Apple Movie.

%d bloggers like this: