Linguistic Engineering

A recent posting from _The Humanist_ noted the following:

> The MPhil Linguistics at the VU University Amsterdam now offers a two-years specialization in Linguistic Engineering. Linguistic Engineering is a young research field that holds a unique position between linguistics and computer science. The program is offered by the Computational Lexicology and Terminology Lab (CLTL), a leading research group in computational linguistics.
> Bachelors in linguistics, computer science, artificial intelligence or a comparable bachelor’s programme are encouraged to apply. Programming skills are not required, but candidates do need a clear motivation and a firm linguistic background.
> Take a look at the website of the CLTL for information about the program and the CLTL research group: for details.
> For more information on the MPhil Linguistics, admission and application, visit the VU University at:

Somewhere some part of me wants to respond “I do not think that means what you think it means” but another part of me recognizes that I am just fascinated by how these things are playing out.

Jupyter Notebook Runtime Error

This is the first time I’ve run into this error. After entering:

% ipython notebook

I got the following error:

PermissionError: [Errno 13] 
Permission denied: '/Users/john/Library/Jupyter/runtime'

At the top, I should’ve noticed this as well:

Traceback (most recent call last):

“/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/traitlets/”, line 432, in get
value = obj._trait_values[]
KeyError: ‘runtime_dir’

It took me a while to figure out how to fix this, but eventually I figured out I had to do the following:

sudo -i
cd /Users/john/Library
chmod -R a+rX Jupyter/

I don’t know why this worked and regular sudo did not, but that’s what it took to get it done. Also, Jupyter keeps telling me that ipython notebook is a deprecated command, but jupyter notebook doesn’t yet work. A few more kinks in need of working out.

Complete Python for Scientific Computing Cheatsheet

Here’s everything you need to do, in the order you need to do it, using MacPorts as your basis. Please note this assumes that everything you need to do is in the most recent version of Python, which as of this date is Python 3.4.

First, install Xcode. (Workaround in the offing.)

Second, install Xcode command-line tools. First, this:

xcode-select –install

And, then, you’ll need to do this:

sudo xcodebuild -license

Third, download and install the MacPorts base package.

Fourth, once the base package is installed, run:

sudo port selfupdate

Now, we need to install Python and the various libraries. The basic setup is:

sudo port install python34
sudo port install py34-numpy
sudo port install py34-scipy
sudo port install py34-matplotlib
sudo port install py34-pandas
sudo port select –set python python34

If you would like the option of using *Jupyter* notebooks:

sudo port install py34-ipython
sudo port select –set ipython py34-ipython
sudo port install py34-jupyter

If you’re interested in doing text analytics, then you’ll probably find the following libraries useful. (Please note that the first line below is a workaround to keep NLTK from installing Python 2.)

sudo port install xorg-xcb-proto +python34
sudo port install py34-nltk

If you would like to add R to your arsenal of weapons and to have it work within Jupyter notebook:

sudo port install R
sudo port install py34-zmq

Then, in R, using sudo:

repos = c(‘’,


MacPorts Weirdness: NLTK for Python 3 Depends on Python 2

File under NLTK dependency depends on Python 2 but there is a workaround to keep everything Python 3.

This is probably one of those things that leads my colleague [Jonathan Goodwin][] to roll his eyes when treating in Pythonic waters: while re-installing MacPorts, after upgrading to Mac OS X El Capitan, I was going through [my Python roll call][] — `numpy`, `scipy`, `nltk`, `pandas`, etc — when I noticed that `py34-nltk` was installing Python 2. Here’s what I saw scroll by:

—> Installing python2_select @0.0_1
—> Activating python2_select @0.0_1
—> Cleaning python2_select
—> Fetching archive for python27

That didn’t seem right, so I looked into the list of dependencies (which is a long list but I’ll repeat it here):

Dependencies to be installed: py34-matplotlib freetype libpng pkgconfig
py34-cairo cairo fontconfig glib2 libpixman xorg-libXext autoconf automake
libtool xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau
xorg-xproto xorg-libXdmcp xorg-libxcb python27 db48 python2_select
xorg-libpthread-stubs xorg-xcb-proto libxml2 xorg-util-macros xorg-xcmiscproto
xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-xcb-util xrender
xorg-renderproto py34-cycler py34-six py34-dateutil py34-tz py34-parsing
py34-pyobjc-cocoa py34-pyobjc py34-py2app py34-macholib py34-modulegraph
py34-altgraph py34-tkinter tk Xft2 tcl xorg-libXScrnSaver xorg-scrnsaverproto
py34-tornado py34-backports_abc py34-certifi qhull cmake curl curl-ca-bundle
perl5 perl5.16 gdbm libarchive lzo2 py34-yaml libyaml

Buried in there are:

xorg-libxcb python27 db48 python2_select

I submitted this as a [bug at MacPorts][], and I got the following really interesting reply:

> py34-tkinter which depends on tk which depends on Xft2 which depends on xrender which depends on xorg-libX11 which depends on xorg-libxcb which depends on xorg-xcb-proto which depends on python27 which depends on python2_select. This is not a bug. If you want xorg-xcb-proto to use python34 instead, install it with its +python34 variant:

sudo port install xorg-xcb-proto +python34

> More generally, if you always want to use a +python34 in any port, if available, put “+python34” into your variants.conf file.
> Not all ports that use python offer a +python34 variant. If you find one that doesn’t, you can request one be added by filing a ticket.

Thanks, ryandesign.

[Jonathan Goodwin]:
[my Python roll call]:
[bug at MacPorts]:

More Thoughts on Notes Infrastructure

I continued to think about the kind of notes infrastructure I wanted after I dropped my daughter at her bus stop. To my mind, DevonThink continues not to have a reasonable syncing solution just yet between its Mac and iOS apps. What I want is an app that syncs for me without me remembering to, and syncs quickly so I can jot an idea down on one device and it is available fairly quickly to all devices.

I also realized that there is a tension here that I had not previously identified: I do like my text to look like something more than text. The same thing that befuddles me about ebooks, every page looking like any other page because there is no pagination, is also what keeps me from embracing an all-text setup like Ulysses. Pagination, design, matter to me.

Evernote wins on both the above, but it loses on structure within a document and it loses on being able to own the infrastructure.

What I really want is a sync-able OmniOutliner, I think.

Learn Git

So I’ve been using various GUIs to interact with Git repositories, both my own as well as repos like those used by _ProfHacker_. Mostly, I use [SourceTree][]. It has a lot of functionality packed within a very simple UI. Kudos to Atlassian for getting that so right.

But it was time, past time some might say, to learn how to use Git at the command line. And this isn’t simply a principled stance: it’s also the case that when you have to type in the words for the actions you want to accomplish, you also come to understand the actions a bit better.

Learning Git at the command line was made easier by these two resources:

* [Codecademy’s lesson on Git][]
* [Atlassian’s Tutorials][]

[Codecademy’s lesson on Git]:
[Atlassian’s Tutorials]: