MIT/GNU Scheme in OS X

0

ИконописikoniI’ve not mentioned this previously, but I bought a Macbook Air a few months back and it’s one of the greatest purchases I have ever made. I love this thing! It is so damned sexy (observing both its hardware and software), and so damned fast. I picked-up the baller, 13″ model with the Core i7 processor and 256 GB solid-state drive … it’s portable personal computing perfection! The more Apple products I buy (and, I’ve now accumulated quite a few), the fewer reasons I can produce to not dedicate future technology spend to Cupertino. </rant>

Macbook Air in-hand (or, more appropriately, surgically fused to my hands!) and pursuing Lisp (and Scheme) as a new programming language (dialect), I needed to install MIT/GNU Scheme on my constant companion — more specifically, I wanted to install it in such a way that I can run Scheme / Lisp programs from the shell without having to fire-up the X-Windows application that is installed by the package by default (“Edwin”). A relatively straightforward process, although not particularly well-documented.

Steps to complete are below:

  • Download the OS X binary for MIT/GNU Scheme from the GNU site here.
  • Mount the binary disk image and copy the appropriate files from the disk image to /usr/local/lib

It is worth pausing here to note that one may have to create this path, as I did.  Commands to create and then copy the files are below:

$ sudo mkdir /usr/local/lib/mit-scheme-x86-64
$ sudo cp -R /Volumes/MIT\:GNU\ Scheme/MIT\:GNU\ Scheme.app/Contents/Resources/ /usr/local/lib/mit-scheme-x86-64/
  • Create a symbolic link — scheme – to the newly installed mit-scheme binary
$ sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/bin/scheme

This last step is critical in fully integrating Scheme into the shell, as one would expect it to be after installing it in a Unix environment.

Onward to Lisp hacking greatness!

Postscript:  I’m using the Lisp-in-a-Box IDE distributed by the Common Lisp software repository in OS X as my platform for development in Common Lisp in parallel … learn both dialects simultaneously — seems prudent!

vim + Python

0

икони цениBelow are my current .vimrc settings which, I find, are particularly pleasant for hacking Python.

syntax on
filetype indent plugin on
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set autoindent
" a useful addition to Python source files is the following:
" vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
" this requires the 'set modeline' option in vimrc
" abbreviated commands -- :set ts=8 et sw=4 sts=4
"
" Python configuration below
" Thanks to http://www.vex.net/~x/python_and_vim.html
" Configure vim to smart indent based on the following Python keywords
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
" Configure vim to trim trailing white space
autocmd BufWritePre *.py normal m':%s/\s\+$//e''

Installing MySQL for Python in Ubuntu

0

иконографияКартинивик услугиWhilst on the grind this evening, hacking on some Python code in a newly-installed Ubuntu virtual machine, I needed to install MySQL for Python. Building the package, pre-installation, requires mysql_config — which I had some difficulty locating in the repositories. After flailing about a bit, the solution is to install the libmysqlclient-dev package.

$ sudo apt-get install libmysqlclient-dev

The package also requires setuptools, which is available here. Download it (I’m running Python 2.6.5, so I downloaded setuptools-0.6c11-py2.6.egg) and run it as a shell script.

$ sh ~/Downloads/setuptools-0.6c11-py2.6.egg 

A second error — i.e. gcc could not find python.h — was resolved by installing the Python development package.

$ sudo apt-get install python-dev

Back to it …

Installing RExcelXML from The Omega Project in R

1

A quick post to capture the resolution to the past 20 minutes I have spent in frustration trying to install RExcelXML from Omegahat (The Omega Project for Statistical Computing). As this is a source package, the dependencies need to be satisfied manually (which is a bit baffling, frankly — surely there is a workaround for this using a makefile-like facility in install.packages()). The package depends on ROOXML, Rcompression and XML. The solution is two-staged:

> install.packages(c('Rcompression', 'XML'))
> install.packages(c('ROOXML', 'RExcelXML'), repos = 'http://www.omegahat.org/R', type = 'source')

Back to the grind …

Netflix “Error N8156-6013″ Resolution

17

A seemingly pervasive problem purportedly caused by a recent update to Silverlight, the Netflix streaming player bombed-out on me this evening, whinging about “Error N8156-6013″ and complaining that it had issues both with playing DRM content and — for reasons which transcend reason — the date on my (virtual) computer. The solution was simple enough. Delete the following small file:

C:\Documents and Settings\All Users\Application Data\Microsoft\PlayReady\mspr.hds

I was back to cackling irreverently at Archer in no time.

Go to Top