[CoCoA
logo]
Home Page
CoCoA System
Computations in Commutative Algebra

Install and run CoCoA

If you install CoCoA, please send us an email at cocoa at dima.unige.it to be included in the CoCoA users list. All members of this list will be kept up to date about the progress of the system.

Macintosh - Unix/Linux - Windows - ARM


Macintosh

MacOS X

You may use the Textual Interface (within Terminal) or Emacs Interface (within Emacs) or the GraphicalUserInterface:

Textual interface

Download CoCoA and DRAG the CoCoA-4.7 folder into the Applications folder.

Double-click on the cocoa icon. This should automatically open the application Terminal and run CoCoA into it.

If you want to add cocoa to your Dock just drag the icon into the file area of your Dock (next to the Trash icon)

This way you will have NO EDITING facilities, so you might want to:

  • open the CoCoA files with your preferred editor
  • CUT and PASTE CoCoA commands from it to the CoCoA-Terminal window.
More instructions
 

Graphical interface

See below for running instructions.
 

Emacs interface

Download CoCoA and DRAG the CoCoA-4.7 folder into the Applications folder.

May 2006: Suggested Emacs application (a proper Emacs with a remarkable Macintosh "feel")
Carbon Emacs Package (for Mac OS X 10.4 or later)


Setting up Emacs

  • For Emacs experts: copy the settings you want from CoCoA-4.7/emacs/cocoa.emacs into your ~/.emacs.
  • For everyone else: go to the folder emacs in CoCoA-4.7 and double-click on one of
    new-prefs.command creates a brand new .emacs file
    (moving the old one, if you had one, into previous.emacs)

    update-prefs.command adds one line to your current .emacs file
    (creating it if necessary)
ALL SET!!
Now Emacs recognises files with a CoCoA extension (.coc, .cocoa, .cpkg): REMEMBER to add one to the name of your files!
If under Finder you cannot see the file extensions I suggest you check [Advanced] Show all file extensions in Finder - Preferences....

Open by dragging: You may open any file in Emacs by dragging it onto the Emacs icon or into an Emacs window.

Open by double-click: If you want all your cocoa files to open with Emacs when double-clicked, this is what you need to do:

  1. Select in Finder a file with a cocoa extension, say foo.cocoa and select File - Get Info, click the Open with: triangle and choose Other... to select Emacs.
  2. Now click on Change all... to "Use this application to open all documents like this" (i.e. with the extension .cocoa).

A few words for the Emacs beginners...


Older Emacs applications for MacOSX 10.2 and MacOSX 10.1: download and move into the Applications folder.

 

MacOS 9

The code will (should) automatically expand into a folder called "CoCoA 4.0".

When you are in the folder "CoCoA 4.0", double-click on "CoCoA 4" to run the program.

To enter a one-line command press the "Enter" key (not Return!) at such line. (e.g. 1+1;<Enter>)
To enter a multi-line command highlight the area with the mouse and press the "Enter" key.

The manual is called by typing Man( );<Enter>.
If you want to know about some topic, e.g. Hilbert-Poincare' Series, type a suitable substring, e.g. Man("hilb");<Enter>

To quit CoCoA select "Quit" from the "Edit" menu.

 
 

Unix/Linux

[If no binary exists for your platform, send us email at cocoa at dima.unige.it]

Download CoCoA and gunzip-tar your binary in the directory you want, e.g.

  cp cocoa-4.7-text-linux.tar.gz /usr/local/
  cd /usr/local/
  gunzip cocoa-4.7-text-linux.tar.gz
  tar xf cocoa-4.7-text-linux.tar
It will produce a directory called "cocoa-4.7".

For a personal installation

When you are in the directory "cocoa-4.7/", type ./cocoa_text to run the program.

For a system wide installation

To allow all users in a Unix system to share the same installation you should:
  • if your cocoa directory is NOT /usr/local/cocoa-4.7 then you need to edit the file called cocoa according to the instructions contained therein (you probably want to change only the value of the variable COCOA_PREFIX=/usr/local/cocoa-4.7).
  • link it to some publicly accessible directory of executables like this:
      cd /usr/local/bin
      ln -s /usr/local/cocoa-4.7/cocoa cocoa
    

    Any user may then type cocoa to run the program from any directory.
  • Graphical interface

    In the CoCoA directory you will find two executables cocoa and xcocoa. "cocoa" runs the CoCoA system with a standard textaul (or emacs) interface. "xcocoa" runs the CoCoA system with the new graphical interface based on the QT library: see below for running instructions.
     

    Textual interface

    After choosing for a personal or system wide installation, type cocoa in a shell and follow these instructions.
     

    Emacs Interface

    Open your .emacs file with any editor (it should be in your home, and it may not exist!):
    • If you are familiar about changing your .emacs, then copy the settings you want from cocoa-4.7/emacs/cocoa.emacs.

    • If you are not then just add this line at the end of your .emacs:
      (load-file "<path>/emacs/cocoa.emacs")
      for example:
      (load-file "/usr/local/cocoa-4.7/emacs/cocoa.emacs")
      If you did not install cocoa in /usr/local/ then you need to correct the path in the files:
      1. <path>/cocoa-4.7/emacs/cocoa.emacs
      2. <path>/cocoa-4.7/cocoa
    ALL SET!!
    Now Emacs recognises files with a CoCoA extension (.coc, .cocoa, .cpkg): REMEMBER to add one to the name of your files!

    A few words for the Emacs beginners...
     
     

    MS Windows

    Just unzip it and you are ready to use it.
    You may also want to create shortcuts to the files wincocoa.exe and CoCoAServer.exe on your desktop. Please remember to start the CoCoA server before starting WinCoCoA if you want to use CoCoA 5 functions such as GBasis5(...).

    The usage of the graphical user interface is explained below.
     
    Unzip it and follow the easy instructions in the README-emacs file in the directory emacs-win

    Here is a download for Emacs: choose emacs-NN.N-bin-i386.zip (with NN.N = 23.2 or higer)
    http://mirrors.usc.edu/pub/gnu/emacs/windows/
      For further installation instructions, we suggest you have a look at the CoCoA Forum and the CoCoA Wiki
     

    ARM

    Same as the Textual Interface, but it requires <Control><Enter> (and not just Enter) after each line, and <Control>-D to exit.
     

    Textual interface

    To enter a command type it in and press <Enter> or <Return> (e.g. 1+1;<Enter>)
    Don't forget the ";" at the end!

    The manual is called by typing Man( );<Enter>.
    If you want to know about some topic, e.g. Hilbert-Poincare' Series, type a suitable substring, e.g. Man("hilb");<Enter> or ?hilb<Enter> (starting from version 4.2)

    To quit CoCoA type Quit;<Enter> (or Ciao;<Enter> ;-)

     

    Graphical User Interface (MacOS, Linux/Unix, MSWindows)

    To enter commands from the interactive buffer click on the "cog" symbol in the top bar or type <Control><Enter>.

    To enter commands from an editing buffer (file): a one-line command from a file or a selected region, type <Control><Enter>.

    To quit enter Quit; or select Quit from the Edit menu.

    Manual: Click on Help. You get a Windows help system which is self-explanatory. You can search for all commands containing (in their name or description) a given string.

    The GUI help system is also available on-line and downloadable at http://cocoa.dima.unige.it/download/doc/