Skip to content →

Tag: OSX

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

combinatorial game software


As I am going to give a talk on Combinatorial Game Theory early
next month I have to update my rusty knowledge of canonical forms of
two-person game positions, their temperature theory and the like. As
most of the concepts in this field are recursive they are hard to work
out by humans but easy for computers. So it is nice to have a good
program to use. I remember that David Wolfe wrote a couple of years ago the Gamesman Toolkit but it seems he has taken it off
his website. Still, you can get it from the Software released by Michael Ernst page. So,
download the games.tar.gz-file and uncompress it on your Desktop.
Then do the following

cd Desktop/games sudo make sudo cp
games /usr/bin/ /usr/bin/games

to get it up and
running (for documentation of how to use it see the Gamesman
Toolkit-paper above. But, it seems that as of July 2003 there is a much
better alternative around : the Combinatorial Game Suite of Aaron Siegel. It is an open source Java-program so it
runs on many platforms (including Mac OSX). Here is the way to get it
going : first download it and you will get a
cgsuite-0.4-folder on your desktop. Then type

cd
Desktop/cgsuite-0.4 java -jar cgsuite.jar

and after a few
questions (including whether you want to be on the mailing list of the
project) the program starts up. It is very well documented with an
on-line manual which I have to read over the coming
days…

Leave a Comment

SSL on Mac OSX

A
longer term project is to get the web-server www.matrix.ua.ac.be integrated in our home-network
as an external WebDAV-server (similar to the .Mac-service
offered by Apple). But as this server runs all information about the
master-class on non-comutative geometry connecting to it via HTTP to use
WebDAV is too great of a security risk as all username/password
combinations will be send without encryption. Hence the natural question
whether this server can be set up to run SSL (Secure Sockets
Layer) such that one can connect via HTTPS and all exchanged information
will be encrypted. As the server is an Apache it comes down to get
mod-ssl running. A Google on mod_ssl OS X gives the
ADC-document Using mod-ssl on Mac OS X which seems to be just
what I want. This page is very well documented giving detailed
instructions of using the openssl command. However, the
end-result is rather weak : it only makes the localhost running
HTTPS, that is, one can connect to your own computer safely… which is
pretty ridiculous (other computers in the same network cannot even
connect safely).

So, back to the Google-list on which
one link raises my interest Configuring mod-ssl on Mac OS X which looks like
the previous link but has one essential difference : the page is written
by Marc Liyanage. If you ever tried to get PHP and/or MySQL
running under OS X you will have noticed that his pages are by far the
most reliable on the subject, hence maybe he has also something
interesting to say on mod-ssl. However, the bottom line of the
document is not very promising :

You
should now be able to access the content with https://127.0.0.1 from
the same machine.

which is again the
localhost. So perhaps it is just impossible to run mod-ssl
without having an X-server. Anyway, let us try out his procedure.
Begin by issuing the following commands in the Terminal

sudo -s cd /etc/httpd mkdir ssl chmod 700 ssl cd
ssl gzip -c --best /var/log/system.log > random.dat openssl rand
-rand file:random.dat 0

Next, we need a server certificate. If you
want to do it properly you need a certificate from a certification
authority
such as Thawte but this costs at least $200 a year which I
am not willing to pay. The alternative is to use a self-signed
certificate
which will force the browser to display an error-message
but if the user dismisses it all traffic exchanged with the server will
still be encrypted which is just what I want. So, type the command

openssl req -keyout privkey-2001.pem -newkey rsa:1024
 -nodes -x509 -days 365 -out cert-2001.pem

(all on one line).
You will be asked a couple of questions (the only important one is the
Common Name (eg, YOUR name). Here you should take care to enter
the host name of your web server exactly as it will be used later in the
common name field. In my test-case, if I want to get my server
used by other computers in the network this name will be
imaclieven.local. (note the trailing .). Now issue the following
commands

chmod 600 privkey-2001.pem chown root
privkey-2001.pem apxs -e -a -n ssl /usr/libexec/httpd/libssl.so

which will activate the SSL-module (if at a later state you want
to de-activate it you have to change -a by -A in the last command).
Finally, we have to change the /etc/httpd/httpd.conf file so
first save a backup-version and then add the following lines at the end
of the file :

(IfModule mod-ssl.c)     Listen 80    
Listen 443     SSLCertificateFile /etc/httpd/ssl/cert-2001.pem    
SSLCertificateKeyFile /etc/httpd/ssl/privkey-2001.pem    
SSLRandomSeed startup builtin     SSLRandomSeed connect builtin   
 (VirtualHost -default- :443)         SSLEngine on    
(/VirtualHost) (/IfModule)

Observe that round brackets ()
should be replaced by <>. Finally, we do

apachectl
stop apachectl start

and we are done! Going to another computer
in the network and typing in Safari https://imaclieven.local./
will result in an error message


Just click Continue and you will have a secure connection
to the server. Thanks Marc Liyanage!

(Added january
11th) Whereas the above allows one to make a HTTPS connection it is not
enough for my intended purposes. In order to get a secure connection to
a WebDAV server, this server must have the mod-auth-digest module
running which seems to be impossible for the standard Apache server of
10.3. You need an X-server to have this facility. So I think I have to
scale down my ambitions a bit.

Leave a Comment