Skip to content →

neverendingbooks Posts

GAP on OS X


GAP the Groups, Algorithms, and Programming-tool
(developed by two groups, one in St. Andrews, the other in Aachen) is
the package if you want to work with (finite or finitely
presented) groups, but it has also some routines for algebras, fields,
division algebras, Lie algebras and the like. For years now it is
available on MacClassic but since the last clean install of my
computer I removed it as I was waiting for a Mac OS X-port to be
distributed soon. From time to time I checked the webpage at gap-system.org
but it seems that no one cared for OS X. For my “The book of
points”
-project I need a system to make lots of examples so perhaps
one could just as well install the UNIX-version. Fortunately, I did a
last desperate Google on GAP OS X which brought me to the
Aachen-pages of the GAP-group where one seems to be more Macintosh
minded. The relevant page is the further notes for OS X on the
GAP-installation for UNIX-page. Here is what I did to get GAP running
under OS X. First go to the download page (btw. this page has
version 4.4 whereas St-Andrews is still distributing 4.3) and download
the
files

gap4r4.tar.gz,packages-2004_01_27-11_37_UTC.tar.gz,xtom1r1.tar
.gz

This will give you three tar-files on your Desktop. Fire
up the Terminal and make a new directory /usr/local/lib if
it doesn’t exist yet. Then, go to your Desktop folder and do

sudo
cp gap4r4.tar /usr/local/lib sudo cp xtom1r1.tar /usr/local/lib cd
/usr/local/lib sudo tar xvf gap4r4.tar sudo tar xvf
xtom1r1.tar

Then return to your Desktop Folder and copy the
remaining tar-file in the /usr/local/lib/gap4r4/pkg-folder which
is created by untarring the former two files and untar it as above.
Then, it is time to compile everything (assuming you have installed the
Developer’s tools) and there is one magic OS X-command which will
speedup GAP by 20%. Here is what to do

cd
/usr/local/lib/gap4r4 sudo ./configure sudo make COPTS="-fast
-mcpu=7450"

and everything will compile nicely. If you
are so lucky as to have a G5-system, you should replace the last command
by sudo make COPTS=”-03″. Finally, get everything in the right
place

cd /usr/local/lib/gap4r4/bin sudo cp gap.sh
/usr/local/bin/gap

and if /usr/local/bin is in
your $PATH then typing gap at the command line will give
you the opening GAP-banner :

Leave a Comment

COLgo

COL is a map-coloring game invented by Colin Vout.
Two players Left (bLack) and Right (white) take turns in coloring the
map subject to the rule that no two neighboring regions may be colored
the same. The last player to be able to move wins the game. For my talk
on combinatorial game theory in two weeks, I choose for a simplified
version of COL, namely COLgo which is played with go-stoned on a
(partial) go-board. Each spot has 4 neighbors (North, East, South and
West). For example, the picture on the left is a legal COLgo-position on
a 5×5 board. COL is a simple game to illustrate some of the key features
of game theory. In sharp contrast to other games, one has a general
result on the possible values of a COL-position : each position has
value $z$ or $z+\\bigstar$ where $z$ is a (Conway)-number (that is, a
dyadic integer) and where $\\bigstar$ is the fuzzy game {0|0}. In
the talk I will give a proof of this result (there are not so many
results in combinatorial game theory one can prove from scratch in 50
minutes but this is one of them). Of course, to illustrate the result I
had to find positions which have counter-intuitive values such as 1/2.
The picture on the left is an example of such a position on a 5×5 board
but surely one must be able to find 1/2-positions on a 4×4 board
(perhaps even on a 3×3?). If you have an example, please tell me.

On a slightly different matter : I used the psgo.sty package in LaTeX to print the (partial)
go-boards and positions. If I ever write out the notes I’ll post them
here but they will be in Dutch.

Leave a Comment

the iTunes hack

If you
are interested in getting thousands of mp3-files on your computer
using only 128 Kb of ROM, read on! Yesterday I made my hands dirty and
with Jan’s help upgraded two 6 Gb colored iMacs (a blue and a
pink one) to potential servers for our home-network having a 80 Gb resp.
a 120 Gb hard disk. If you do the installation yourself such an upgrade
costs you roughly 1 Euro/Gigabyte which seems to me like a good
investment. Clearly, you need to know how to do this and be less
hardware-phobic than I am. Fortunately, the first problem is easily
solved. There is plenty of good advice on the net : for the colored
iMacs we used the upgrade an iMac-page of MacWorld. For possible
later use, there is also a page for replacing the hard disk in an old iBook
(which seems already more challenging) and in a flat screen iMac (which seems to be impossible
without proper tools). Anyway, we followed the page and in no time
replaced the hard disks (along the way we made all possible mistakes
like not connecting the new hard disk and then being surprised that the
Disk Utility cannot find it or not putting back the RAM-chips and
panicking when the normal start-up chime was replaced by an aggressive
beep). An unexpected pleasant surprise was that the blue iMac, which I
thought to be dead, revived when we replaced the hard disk.

Back home, I dumped a good part of our CD-collection on the blue
iMac (1440 songs, good for 4.3 days of music and taking up 7.11 Gb of
the vast 120 Gb hard disk) to test the iTunes Central hack
explained by Alan Graham in his six
great tips for homemade dot mac servers
. Would I manage to get the
entire collection on my old iBook which had only (after installing all
this WarWalking-software) 800 Mb of free disk space? Here is what
I did :

1. On the iBook (or any machine you want to
play this trick on) go to your Home/Music/iTunes-folder and drag
the two files and one directory it contains to the Trash. Do the
same for the two files com.apple.iTunes.eq.plist and
com.apple.iTunes.plist which are in the
Home/Library/Preferences-folder.

2. On the
iBook, use the Finder/Network-icon to connect to the server
(iMacServer in my case) and browse to the iTunes-folder where you placed
all the music (still, on the iBook in the Finder-window opened when you
connect to iMacServer). Make an Alias of the two files and the
directory in it (click on one of them once, go to the
File-submenu of the Finder and choose Make Alias) which
results in three new entries in the iTunes directory : iTunes 4 Music
Library alias
, iTunes 4 Music Library.xml alias and iTunes
4 Music Library alias
. Drag these 3 aliases to the
Home/Music/iTunes-folder on the iBook and rename them by removing
the alias-addendum.

3. In the Finder-window on
the iBook corresponding to the iMacServer browse to the
Home/Library/Preferences-folder and drag the two files
com.apple.iTunes.eq.plist and com.apple.iTunes.plist to
the Home/Library/Preferences-folder of the iBook. Launch
iTunes and it will give you access to the whole iTunes-collection
of iMacServer! In all, the three aliases and the 2 copied files take up
128 Kb…

Leave a Comment