Skip to main content

(node) development on OSX

I love my Macbook Pro, for development and general computing use. Before I purchased it I was a die hard linux user (apart from gaming which is still dominated by windows unfortunately.) My work involves linux1 and I am a committed vim user.

My work colleagues tend to laugh when I say that I want to use my mouse as little as possible, and that I am quite experienced in command line use. It pains me every time I see my office mates reach over to the mouse to click the save button.

This workflow does not translate too well to the Mac; as far as I understand it Apple2 were one of the first companies to introduce guis for their operating systems.

LuaLaTex

Using LuaLaTeX seems like a great idea, inserting the excellent embedded programming language Lua into LaTeX1 code (not really code, a very good mathematical markup language) to help with some of the inconveniences of the language.

For those of you who’ve never worked with LaTeX, imagine a simple markup language like markdown for example. The text looks clean and simple, font style changing and the like is handled pretty seamlessly and does not distract from the experience of writing the text itself.

LaTeX is not like this.

Embedding Python in LaTeX

Combining Python with LaTeX is a powerful combination. It allows for arbitrary code to be executed which either gives the results of expressions, or can be used to embed programatically certain things e.g. the paths of files or images. By downloading python.sty and including it in a usepackage block, python code can be run. I was having trouble getting this to work as it seems I was using an invalid version of python.

Mac keyboard keys with Synergy

Synergy is a great program to control multiple computers from a single keyboard or mouse even without them being plugged in. The only requirement is that theyre on the same local network. Im sharing my configuration which has my windows desktop as the server, and my macbook as the client. Using a windows keyboard creates some issues with the macbook, so here are the settings I use to map the keys correctly:

Vim is even more amazing than I first thought!

Just today thanks to this answer on SO, I realised that vim can automatically pipe text through a shell command. Just think about that for a second For a simple example you can write python code into a text file, and execute it which replaces the code with the result. for i in xrange(10): print i Selecting this text with in visual mode (you should all know how to do this) and typing

OS X 10.7 Lion: my thoughts

My first OSX upgrade went well I think. My MacBook Pro is a Mid 2009 model, as the nice new About This Mac (not sure why this is capitalised but never mind) tells me.

New about this mac window

Ive never upgraded a Mac before since my pride and joy came with Snow Leopard installed, the as-of-then most up to date operating system so I had no idea what to expect. Ive been using my Mac for nearly two years now but before that I was a pretty heavy Windows user. My other tipple is Linux, so whatever it was like I was going to be tense and anxious. 

Afloat for Mac OS X

After years of using Linux as my main system both at work and home, I got used to being able to drag windows by holding a keyboard combination and dragging with the left mouse button. The one disadvantage of the otherwise fantastic OS X is that despite being unix based, it did not have this feature. Having to drag a window by the very top bar got a little tedious, and resizing with the lower right handle was sometimes difficult.

Plotting unevenly gridded contour plots

Quite often at work I have to generate colour maps of certain things, which are generally not sampled evenly in coordinate space. I am also a huge fan of Python, so I thought to myself: can I combine these things? Well until now I didnt think you could. Matplotlibs contour plots require evenly spaced x and y points with z points to match. This is until I found a way