Saturday, June 29, 2013

Upgrading from Snow Leopard to Mountain Lion: Not Bad

I upgraded my MacBook from Snow Leopard to Mountain Lion last night. So far there have only been a few minor hangups, which I've mostly been able to get around.
  • Fixing scrolling, hidden scrollbars etc in Mountain Lion
  •  Here's some other useful tips for Mountain Lion
  • X11 isn't supported, so if you run X11 / GTK apps like Mandelbulber use XQuartz
  • Quicksilver stopped working after the upgrade so I switched to Alfred (thanks to Ashe Dryden for the recommendation)
  • I used Spaces heavily on Snow Leopard (6 desktops, with apps assigned to workspaces for music, code, social media, graphics, sysadmin and writing), which became useless with 10.7 (one of the biggest reasons I didn't upgrade when 10.7 came out).  I'm using TotalSpaces to restore classic Spaces functionality.  I'll probably end up paying the $18 for the full version (almost as much as the OS upgrade itself) just because Spaces is so essential to how I work.
  • Getting the battery time remaining to show in the menu bar was a chore.  In Mountain Lion, you can no longer see the battery time next to the battery icon.  There are 2 apps that can fix this for you.  One is a simple one called "Battery Time" the other a more-advanced $1 app called "Battery Time Remaining".
  • Since 3rd-party menubar items cannot be re-arranged (come on already) I couldn't actually see the battery time remaining on my laptop since the icon was pushed all the way off to the side. There are a few apps that you can get to fix this for you.  "Bartender" at a pricey $15 or the more reasonably-priced "Menu Bar Rearranger" at $4.99.  But really, why do I have to pay to do something as basic as change the ordering of some icons on my menu?
So overall, it could have been much worse.  I didn't have to recompile all of my gems or rebuild virtual machines or re-install anything major to be productive again.  A little annoying though that the upgrade cost $20 (which is cheap for an upgrade) but then I had to pay another $20 or so to restore all of the things that Apple "innovated" between versions.

Sunday, June 23, 2013

New Album: Orbital Slingshot

A 70-minute drone piece, composed with SuperCollider. You can stream it here, or purchase a download on Bandcamp. This is part of a series of studies that may someday lead up to a full-length (195 hours) sonification of the Apollo 11 mission.

Thursday, June 20, 2013

How to Block the Sponsored Posts on your Tumblr Dashboard

I was surprised at how intrusive I found the sponsored posts that have started appearing in the stream on my Tumblr dashboard.  Luckily if you run the AdBlockplugin it's super easy to tweak your settings to block the sponsored posts:


First, open your AdBlock menu from the icon.  This should be in the upper-right corner of your browser window (I'm using Chrome on OSX in the example).  Select "Options" and you should see this menu towards the botton of your screen.


You'll want to paste this line of code to the bottom of the "Manually Edit Your Filters" window:
www.tumblr.com##DIV[class="sponsored_post"]
Click the "edit" button, add the line of code, and then click the "paste" button. This will block all sponsored posts that appear on Tumblr.com.

How to Probably get Pandoc Running on a Linux Server

(

Drink-by date: This post was written based based on work I did in June, 2013. The GHC, Haskell, Cabal and pandoc were all current versions installed in Ubuntu 10.04. If you're reading this documentation after June, 2015, consider it out of date.

This blog post was the original inspiration to use Pandoc

)

A few months ago I started putting my resumé on Github. As a freelance software dev it's quicker to send somebody to 1 spot to see both code for projects I work on and descriptive, bulleted-list of accomplishments (without all of the monetization noise of LinkedIn). Recently I spent 5 hours on one of those endlessly-recursive campaigns of compiling things from source code in order to save myself a few minutes of maintaining my online resumé in different formats (pdf and markdown) and since it deals with some bugs in some standard Ubuntu / Debian packages, I'll post instructions here for how I fixed them.

My goal was to be able to update my resumé in markdown, and have run a single deploy script that would commit changes, generate a pdf from the markdown and push the updated markdown and pdf to GitHub. There's a Linux utility called "pandoc" that does this and a whole lot more. It's written in Haskell, a powerful functional programming language that is beloved by academics and high-frequency stock traders and otherwise hasn't broken into mainstream software developement.

My first time around, I did a standard "sudo apt-get install pandoc" on my Ubuntu server and thought I was good to go. The syntax for a basic conversin is simple, and like ffmpeg, the input and output formats are inferred by file extension:

$ pandoc resume.md -o resume.pdf

Except that this yielded the following error:

pandoc: resume.md: hGetContents: invalid argument (Invalid or incomplete
multibyte or wide character)

A character-encoding bug. Removing curly quotes from the markdown file confirmed this since it worked fine if the input document was all ascii. But what's the point of a PDF if you have to limit yourself to ugly straight quotes and spelling "resumé" as "resume"? There was some chatter on google groups that this was an issue with setting the right LANG in your locale, but that in later version of pandoc this bug was fixed. Rather than fiddle with global settings, I opted to upgrade pandoc.

The version of pandoc, as well as Haskell and GHC (the Glasgow Haskell Compiler) are all years out of date in debian / ubuntu. (The computer I was working on was running Lucid 10.04 which is supported through 2015). So geting the latest pandoc woudln't be as simple as an apt-get upgrade, and would require upgrading the GHC, Haskell, the Haskell Package Manager (cabal) and finally pandoc. All of these are source-code installs except for the final upgrade of pandoc.

If you've already tried to install pandoc or Haskell via apt-get you'll need to remove the packages via the following command:

$ sudo apt-get autoremove ghc6

Now we're ready to start the installation process. First, install the dependencies via apt-get:

$ sudo apt-get install libgmp3c2 freeglut3 libedit2 libedit-dev freeglut3-dev libglu1-mesa-dev
pandoc uses LaTeX for formatting, so you'll need to get pdflatex on your system.
$ sudo apt-get install texlive-full

Now you'll want to get the source code to build the GHC and the Haskell Platform. First the GHC. This a standard configure / make install build.

Cabal, the Haskell Package manager, is included in the Haskell Platform

$ wget http://lambda.haskell.org/platform/download/2013.2.0.0/haskell-platform-2013.2.0.0.tar.gz
$ gunzip haskell-platform-2013.2.0.0.tar.gz 
$ tar -xvvf haskell-platform-2013.2.0.0.tar 
$ cd haskell-platform-2013.2.0.0
$ ./configure
$ ./make
$ ./sudo make install

You can also get the source for Cabal from GitHub.

Once you have Cabal up and running, first refresh the packages list:

$ cabal update
Now, you can install pandoc
$ cabal install pandoc
Cabal will install a bunch of dependencies. This will tak a few minutes. Cabal installs executables to ~/.cabal/bin/pandoc - you can symlink this to a directory that's already in your path:
sudo ln -s ~/.cabal/bin/pandoc /usr/local/bin/pandoc

Now you should be ready to go. For some pointers as to how I actually automated the generating of pdf's by committing changes to my resumé, check out this shell script: https://github.com/erstwhile/resume/blob/master/deploy

Friday, June 14, 2013

Constructing "Cloud City" - the Mandelbulber settings

I've gotten into playing with 3D fractal rendering this year, using a program called "Mandelbulber." There's a whole scene that's emerged in the last 4 years around rending animations exploring 3D fractals, since the discovery of the "Mandelbulb" (a 3D mapping of the Mandelbrot Set) in 2009. I was playing around with a hybrid fractal (combining several algorithms into 1 system) a few months ago when I discovered something that reminded me of the "Cloud City" gas-mining station from the final act of "The Empire Strikes Back". The color palette comes from a photo of the hallway runner in my house, hence the name "Rugs in the 4th Dimension" This is a closeup flythrough of one of the many "trees" that appear throughout the system: You can get the Mandelbulber settings for this algorithm and explore it via Github.

Saturday, June 8, 2013

James Tenney - Melody, Ergodicity, Indeterminacy

James Tenney (1934-2006) was probably the first composer to develop an aesthetic for computer music, realizing that electronic music almost forced the composer to accept noise as “music” and to abandon the idea of absolute control over a composition. He came to accept Cage's passion for randomness, but from a different angle: computer music can be “unpredictable” (rather than “random”).