Skip to content →

Category: web

ASCII math

To
a large extent mathematics has to do with elaborate typography. Many
youngsters have been attracted over the centuries to maths because they
wanted to understand the meaning of these beautiful pages filled with
integrals, partial derivatives and other bizarre hieroglyphs. But now we
have come to the point that this obsession for symbols is working
against mathematics…
Have you ever wondered why there are so
few mathematics-pages on the net compared to computer-science pages
(apart from the fact that a lot more exiting things are happening in
web-technology these days than in mathematics), why forums dedicated to
math-problems never get off the ground (apart from boring housework
sites) or why it is so seldom that you discuss serious math with
colleagues or students via emails (apart from the fact that more and
more mathematicians seem to turn off their sharing mode) ???
One of the reasons might be that our default way of writing and
communicating math (LaTeX) is incompatible with either HTML or email
(and for those of you who think that LaTeX2HTML or
tth or similar programs offer an alternative, just
try to make an attractive looking website with them and prove me
wrong).
If we want mathematics to survive and flourish (and
whether you like it or not that may depend heavily on its
web-visibility) it is high time to develop some
ascii-math, that is, a way to write mathematical formulas in
plain typewriter symbols. This cannot be totally impossible as
programming languages are capable of defining a large number of
complicated objects with ascii and for those of you who discard the idea
on beauty-reasons, I never found a piece of code in a computer
book particularly ugly.
Of course I realise that not too many
people will be willing to make this paradigm-shift right now, but can we
at least ask of people introducing new symbols to add as an appendix to
their paper a suggestion for the transition to ascii-symbols for
those who value the net and/or sharing more than they do. Thank
you!

2 Comments

once more : synchronizing


Carbon Copy Cloner is a tool to make a full backup
of your hard-disk on an external firewire disk or iPod. Here’s
how it sells itself

Have you ever wanted a simple, complete,
bootable backup of your hard drive? Have you ever wanted to upgrade to
a larger hard drive with minimal hassle and without reinstalling your
OS and all of your applications? Have you ever wanted to move your
entire Mac OS X installation to a new computer? Then CCC is the tool
for you! CCC makes these tasks simple by harnessing the Unix power
built into Mac OS X. In addition to the features that CCC has provided
in the past, version 2 offers synchronization of the source and target
as well as scheduled backup tasks.

I didn’t try it out yet
but was interested in the final sentence and scrolling down the page I
discovered that the synchronisation is done using Dan Kogai’s psync program, which does not seem to work under
10.3 but has on the page a patch to this. Rather than using the
psync-page to install it, one can use the unoffical psync for Panther dmg-file from the
Carbon Copy Cloner-page. It installs without a problem and to
learn how to use it, there is a manual page. Here is what I do when I want to
synchronize my Documents-folder on iMacLieven to the
backup-machine tweedledee over the Airport-network

psync
/Network/iMacLieven/lieven/Documents /Users/lieven/docsLieven

Watching the packet-flow on the Activity Monitor it seems to be
slightly quicker than the rsync tool. But most of all : it seems
to do a much better job. When I compared the end-result of the
synchronising session with rsync to that of psync I was
surprised to find a 20 Mb difference (on an original .5 Gb Folder) in
psync‘s favour! But even psync seems to have dropped 0.6
Mb in the process…

Leave a Comment

nothing beats the command line

Over
the last couple of days I’ve been experimenting a bit with different
backup methods. To begin, I did try out ExecutiveSync and its
successor You Syncronize but they are very, very
slow. Not only did the first synchronizing of a 0.5 Gb Folder between
two computers over our Airport-network took over 2.5 hrs, but also on
subsequent syncs the checking of the database seems to last forever.

So I turned to the fink project
again and did find two interesting packages : wget . GNU Wget is a free network utility to
retrieve files from the World Wide Web using HTTP and FTP, so one way
to backup a folder would be to put it in the Sites folder and
mirror it over the network using wget. I did’t check this out in
great details (did a small test to see it working but I assume it will
be slow for large folders). The other one is rsync It uses the “rsync algorithm” which
provides a very fast method for remote files into sync. It does this by
sending just the differences in the files across the link, without
requiring that both sets of files are present at one of the ends of the
link beforehand. This seems to be precisely what I wanted to do and
after a google for ‘rsync OS X’ I arrived at the RsyncX package which is an implementation of rsync
with HFS support and configuration through a command line (Terminal) or
graphical user interface. I downloaded this package and the GUI seems to
be placed in the Applications/Utilities and tried it out by
filling out the Source and Local Folders and pressing the synchronize
button. Not much progress was reported but the Activity Monitor
showed that it was using up all of the CPU so I was patient for over an
hour and then looked for the Network Activity in the Activity
Monitor
and virtually no packets were going in or out, so I killed
RsyncX. I am sure I did something wrong but rather than trying to
get it working, I tried the command-line rsync-command I
downloaded from Fink. After a few false attempts I
typed

/sw/bin/rsync -a -e ssh
iMatrixLieven.local:/Users/lieven/Documents
/Users/lieven/docsLieven

and suddenly the packets were flying
happily over the network at 250 Kb/sec, so it took me only half an hour
to get a first synchronization done and subsequent changes are added in
no time! Afterwards I discovered that rsync is included in the
standard OS X Developers Tools as RsyncX seems to have replaced
it to rsync_orig and installed a new (quite large) rsync
in /usr/bin. Maybe my problems with RsyncX were caused
because I have /sw/bin earlier in my $PATH than
/usr/bin but verifying this will have to await another day. For
the moment, I’m happy to have a quick syncronizing tool available and
Real Madrid is playing on the TV…

Leave a Comment

tweedledee and tweedledum


Tweedledum is a first-generation iMac (233 MHz
slot-loading, 192Mb RAM, No Airport) whereas Tweedledee is
2nd-generation (350 MHz front-loading, 192Mb RAM, Airport card). A
couple of weeks ago I replaced their original hard-discs (4 Gb resp. 6
Gb) by fat 120 Gb discs and from this weekend they serve as our
backup-facility. Tweedledee is connected via Airport to our network and
is a fully functional 10.3 computer, everyone has a login on it and is
encouraged to dump important files onto it as a secondary copy.
Tweedledum. on the other hand, is invisible to the network but forms a
one-wire network with Tweedledee (they are connected by a crossed
ethernet cable which results in having a self-assigned IP address in the
169.254 range and hence they can see each other; moreover using the
Sharing-pane in the System Preferences I allowed
Tweedledee to share its internet connection to other computers,
connected to it via Ethernet, so Tweedledum can go online to get
system-updates when necessary).
A house-computer rule is that
all important files (which means those you don’t like to loose in a
crash) are kept in the Documents folder of your
Home-folder on your own computer. At regular intervals I make
sure that these folders are synchronized with backup-copies on both
Tweedledee & Tweedledum, so at any given time there are at least 3
computers containing the essential files (usually more as everyone has a
login at each of the 4 ‘work’-computers and can drop extra copies
around, but must clean-up when asked).
To synchronise I use
the shareware program ExecutiveSync. It is no longer possible to
obtain this from its original homepage as they seem to have been taken
over and invite you to buy You Sinc instead which costs more than
twice what ExecutiveSync costs (19.95$). Fortunately, for now you can
still download it from the Apple site. I have
ExecutiveSync running on Tweedledee (you are only allowed to run it on
one computer, you can install it on every computer but then the
synchronizing process is sometimes not possible which is why I came to
the following work-around). In ExecutiveSync you make several
Projects which involve choosing a Local folder and a
Remote folder somewhere on your network which you want to keep in
Sync. In my Home folder on Tweedledee I made several (originally
empty) folders such as docsGitte. Then my ExecutiveSync-project
syncGitte takes docsGitte as the local folder and the
/Users/gitte/Documents-folder on iBookGitte as the remote
folder. The first time you synchronise takes a lot of time (especially
over the wireless network, it may be better to do the first sync via
ethernet) but afterwards it works pleasantly.
Once I
synchronised all the local Documents-folders with the corresponding
folders in my home-folder on Tweedledee, I have another
ExecutiveSync-project BACKUP which takes as the Local-folder my
Home-folder and as the remote folder a folder BACKUP I did create
on Tweedledum. Fortunately, here the synchronising is done over Ethernet
or it would take forever.

Leave a Comment

Van Eck phreaking

This
week I reread with pleasure all 918 pages of Cryptonomicon by Neal Stephenson and found out
that last time I had been extremely choosy in subplots. There are 4
major plots : one contemporary (a couple of geeks trying to set up a data-haven) and three
WW2 stories : the Waterhouse-plot about cracking Enigma and other
crypto-systems featuring a.o. Alan Turing, the Shaftoe-plot about the
crazy division 2702 trying to cover-up that Enigma has been broken and
the Goto Dengo-plot about hiding the Japanese Gold reserve in the
jungle. Five years ago I was mostly interested in the first two subplots
and later on in the book I jumped chapters quite a bit, it seems.

During the first read I assumed that the Van Eck
phreaking-bit was just another paranoid misconception of the two present
day main players Randy&Avi, but this week I wasn\’t so sure anymore so
the first thing I did when we came home was Googling on Van Eck phreaking which really does
exist!

Van Eck phreaking is a form of eavesdropping in which
special equipment is used to pick up telecommunication signals or data
within a computer device by monitoring and picking up the
electromagnetic fields.
The U.S. government has been involved
with EM interpretation for many years under a top-secret program
code-named “TEMPEST”.

It seems that in 1985 the
Dutch scientist Wim Van Eck wrote a paper \’Electromagnetic Radiation from Video Display Units:
An Eavesdropping Risk?\’
He concluded: “If no preventive measures
are taken, eavesdropping on a video-display unit is possible at several
hundred meters distance, using only a normal black-and-white TV
receiver, a directional antenna, and an antenna amplifier.” He proved
it by taking a BBC crew around London in a van, showing them what was on
the computer screens at various companies.
To me it seems that
putting your computer inside a Faraday cage is a simpler counter-measure than
the cumbersome method of Randy in the novel (but I have to admit, he
was in prison at the time…). There is a more detailed manual on
phreaking
available, but the best text I found (sofar) on Van Eck
phreaking is Soft Tempest: Hidden Data Transmission Using
Electromagnetic Emanations
by Markus G. Kuhn and Ross J.
Anderson.

Leave a Comment

iHome phase 2 ended

More
than a month ago I started a long term project trying to make the best
of our little home network. The first couple of weeks I managed to get
iTunes, iPhoto and iMovie-files flowing from any computer to the living
room (the TV-set for photo and mpeg-files and squeezebox for audio files). The last couple of weeks I
have been making my hands dirty with some hard-ware upgrades. The key
problem being that some of our Macs have a too small hard disk for
present day needs. For example, PD2 could no longer play The Sims (and
their never ending extensions) on her 6 Gb iMac, so one day she simply
decided to get rid off most things in het Applications-folder, a
desperate cry for attention. Together with Jan I took our two 6 Gb
slot-loading iMacs apart and replaced them by a 120 Gb resp. 80 Gb hard
disk, giving the Sims ample virtual space to expand (I hope). Beginning
of this week I finished the slightly more daunting task of upgrading an
original 4 Gb front-loading iMac to a performing 120 Gb potential
Server. But I knew that the worst part was still to come : my old
(colored) iBook was making so much noise that I didn’t use it anymore
for anything demanding some kind of concentration (like writing papers).
So I wanted to replace the old 6 Gb noisy disk with a silent Hitachi
2.5 HDD 20GB 5400RPM ATA100 8Mb Cache
-hard disk. However I did read
the instructions and was a bit put off by this.
Luckily, I had to wait because I didn’t have the appropriate material.
Whereas any super-market sells Torx- 10 and 15 screwdrivers, I needed an
8 or 9. Eventually I found one in a good shop (they even have torx 6 and
7, it seems you need those to take your mobile apart), so no more
excuses. Tuesday afternoon I had a first try but already between stage 2
and 3 of the instructions I cut an essential connection (for the
trackpad)… and quickly assembled everything again (I could still use
my iBook with a USB-mouse…). This morning, when the rest of my family
left at 8 o’clock, I had another go (btw. never try to do this unless
you can afford to loose your iBook). The whole process is pretty scary :
you have to take out your keyboard, modem, CD-player, display and a few
minor ingredients before you get at the hard-disk. At the time you do,
the whole table is filled with parts and several cups containing some
screws which you will hopefully remember to put back in the correct
place. Still, in less than two hours I managed to replace the harddisk
and put everything back together (I lost some tome because at the end
one needs to remove some bolts and I didnt have a good tool available so
I had to improvise). I didn’t expect anything when I powered up the
iBook but somehow it reacted ok, I could start up from a System9 CD and
initialize the harddisk and even put System9 on it, but there was
something strange : all message-windows appeared at the lower right hand
side of the display… When I did restart from the HD, it became
apparent that I lost about 30% of my screen, including the part where
one normally sees the HD, CDs etc., so I had a small problem. But, after
my success of conquering my hard-ware phobia, I was not alarmed, I
cycled to the university and had a chat with Jan about it. He suggested
zapping the PRAM which I did in the afternoon, without any effect
on my partial display. So, perhaps it was a hard-ware thing after all
and I had to take my iBook apart again until I got at the connections
for the display (which is step 6 out of 8 of the instructions). Then,
the problem became clear : in reassembling the display-connectors I had
used a bit too much force so that some of the spikes were bend. But,
after repairing this and closing up the iBook again, the problem was
solved. So I have now a 20 Gb iBook with a nice quiet harddisk and I
“only” lost my trackpad and sound in the process… a good deal I
would say.

Leave a Comment

now I see you, now I don’t

For
someone as clumsy as me, it is no real surprise to loose one in three
hard disks, but what happened yesterday was a bit puzzling at first. I
tried to replace the original 4 Gb hard disk of an original iMac (a tray
loading iMac) following the instructions of the MacWorld : how to upgrade an iMac-page I used last
time together with Jan to replace two hard disks in slot-loading iMacs.
The whole process is a bit scary : unplug 4 connections, remove the
motherboard, remove the CD-driver in order to get at the hard disk, but
to my own surprise I managed to do all this fairly quickly and replaced
the hard disk by a 120 Gb Seagate Barracuda hard disk. I
put the iMac back together and started up from the OS 9 CD (last time I
forgot this and it is becoming fairly impossible to get a working
System9 defacto on 10.3). I opened DiskUtility and to my surprise the
utility found the new disk, so I managed to install everything properly.
I could even initialize and partition the disk (to run OS X on a first
generation iMac one needs to install it on a partition which is no
larger than 8 Gb) in two partitions (one 8Gb, the other the rest) and
installed System9 on the first partition. So far, so good but when I
restarted the iMac, a blinking question-mark appeared on the screen
indicating that it could not find the installed System9! Then I tried to
start-up from the 10.3-installation disk, started up the DiskUtility and
this time it found no hard disk at all. So I started up again from the
System9 CD and the two partitions appeared on my Desktop, seemingly in
perfect order. What was going on? There was an hard disk, I put System9
on one of its partitions but somehow it refused to find it, and starting
from the 10.3 CD it looked as if there was no hard disk whatsoever. If
you are knowledgeable, you know already where the problem was situated
but as I am more a software than a hardware guy I looked for similar
problems on the net and found an entry in which the solution was
obtained by installing System9 on the larger partition. So I tried this,
but again met the same problems.

So it must be a
hardware problem and I downloaded the product manual and began browsing through it until
I found one of these marvelous computer-terms : the master-slave
jumper settings
. Who invents this kind of terminology? The
master-slave jumper… Anyway, here are the possibilities for a
Barracuda
I
admit I didn’t look at the jumper-setting when I inserted the hard
disk. The previous two times it was not necessary and I assumed that the
default position would be the master-setting but wasn’t certain. Hence,
there was only one way to find out and that was redoing the whole
replacement-process… So, this morning I did this and found out that
the jumper-settings were set at Cable select which according to
Geert is the best setting for Windows-computers as
they then automatically decide whether to use the disk as master or
slave, so perhaps for Seagate there is some marketing logic in choosing
this as their default setting. Hence, I changed the setting to
master, quickly put back the iMac and in the end discovered that
I was left with two screws… As they must have been the screws
connecting the hard-disk cage to the motherboard I had little choice but
to redo the whole process a third time. Surprisingly, I began to like
the whole procedure, one should be forced as a computer-user to take
your computer apart a couple of time before working on it. Finally, I
tried to install OS X again, the DiskUtility recognized the two
partitions without any problem and the installation went smoothly.
Probably System9 can find a Cable-select connected hard disk, whereas OS
X cannot…

Leave a Comment

Singular via GAP on OSX

The
GAP-package is very good in working with finite
fields or Abelian extensions of the Rational numbers, but sooner or
later we will need to use the coordinate ring or function field of an
affine variety for which it is hopeless. On the other hand, there is an
excellent free package to do these calculations : Singular.
So, the ideal situation for us would be to be able to access Singular
from within GAP. Fortunately, Marco Costantini and Willem de
Graaf have written such an interface. Here is how to get in working
under OS X : One has to download two files from the Singular Mac OS X download page :
Singular-2-0-4-ppcMac-darwin.tar.gz
and
Singular-2-0-4-share.tar.gz. Once they are on your desktop you
can follow the instructions on the INSTALL.html file in the 2-0-4
Folder of the expanded Singular-2-0-4-ppcMac-darwin. Keep the
tarred version and open the INSTALL-file in your browser (to be
able to copy and paste) and open up the Terminal. Do the analog
thing to

cd /usr/local sudo tar -pxf
/Users/lieven/Desktop/Singular-2-0-4-ppcMac-darwin.tar sudo tar -pxf
/Users/lieven/Desktop/Singular-2-0-4-share.tar

Then
follow the instructions making the symbolic links and you have Singular
working. The next step is to go to the GAP Packages page and go to the
package Singular for full documentation.
To use Singular in a GAP-session, here is an example

gap>
LoadPackage("singular"); 
The GAP interface to Singular 
true 
gap> StartSingular();
I  Started Singular (version 2004) 
gap> SetInfoLevel( InfoSingular, 2 ); 
gap> G:= SymmetricGroup( 3 );; 
gap> R:= PolynomialRing( GF(2), 3 );; 
gap> GeneratorsOfInvariantRing( R, G ); 
[ x_1 x_2 x_3, x_1*x_2 x_1*x_3 x_2*x_3, x_1*x_2*x_3 ] 
gap> I:= Ideal( R, last );; 
gap>GroebnerBasis( I );
I  running GroebnerBasis... I  done
GroebnerBasis. [ x_1 x_2 x_3, x_2^2 x_2*x_3 x_3^2, x_3^3 ] 
gap>
 
Leave a Comment

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

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