72.14 Features of GAP for MacOS

This sections describes the features of GAP for MacOS that differ from those described in Chapter Running GAP.

Before you use GAP, you should set up GAP's memory allocation, by setting appropriate values by selecting the GAP application and Get Info... in the Finder's File menu (in order to be able to modify the values there, you have to do this before you launch GAP).

The maximum amount of workspace GAP can use depends on the amount of memory the Finder allocates to GAP when it is launched. The maximum amount of GAP workspace is this value, minus a certain amount used internally by the GAP application (for the PPC version, currently around 1.7 Megabytes, plus the size of the GAP application if you do not use virtual memory,, and 2.9 Megabytes for the 68K version), minus any additional amount set with the -a, -P or -W command line options (see below).

You can find information about the amount of free GAP workspace, the total amount of available workspace, and the remaining free memory, in the by choosing About GAP in the Apple menu.

To ensure efficient operation, you should not allocate more memory to GAP than the size of your physical memory. If you are not using virtual memory, the amount will have to be considerably less (depending on your system and the number of other applications which you may want to run at the same time).

If you notice heavy disk use during garbage collections, this is a clear indication that you have allocated too much memory to GAP.

Since you cannot enter command line options directly when you launch the GAP application on a Macintosh , another mechanism is being used: Hold down the Command (Apple) key when launching the GAP application. A dialog box will open, into which you can enter the desired GAP command line options exactly as you would enter the command line options under UNIX. (Note that the dialog box will already contain settings which you have previously saved settings). The OK button accepts the command line for the current GAP session, and the Save button can be used to save these options for subsequent GAP sessions. The command line options will be saved in a text file called GAP options in the Preferences folder in the system folder. You may also modify the file GAP options directly; note that changes only take effect the next time you launch GAP.

The file called .gaprc on Unix systems (see The .gaprc file) is called gap.rc on the Mac; it must be in the same folder as the GAP application.

There are three additional command line option on the Mac.

-z n sets the time between checks for events (keystrokes, mouse clicks etc.) to n/60 second. Lower values make GAP more responsive but computations are somewhat slower. A value greater than 60 is not recommended, the default value for n is 6.

-P m sets the amount of memory required for printing. The reason is that printer drivers may require quite a bit of memory, and may even crash if not enough is found. To prevent this, GAP will not print unless at least the specified amount of memory is available. The default value is 64 Kilobytes, which is enough for the Apple LaserWriter printer driver. Setting the printing memory to 0 disables printing altogether.

-W m sets the size of the log window to m bytes. This means that if the text in the log window exceeds this amount, then lines at the beginning of the log are deleted. The default value is 32 Kilobytes.

The following command line options work differently on the Mac.

On the Mac, the -a option has a different meaning from the one described in Advanced Features of GAP. On the Mac, it must be used to reserve memory for loading dynamic libraries into GAP. See The Compiler for details about dynamic libraries (and note that the PPC version of GAP for MacOS can use dynamic libraries).

The -f and -n command line options do not have any effect on the Mac.

The '-e' command line option enables ctr-D.

The -o command line option should not normally be used on the Mac. The value set by the -o option is only used if it is lower than the size of the workspace that would normally be available for GAP.

All interaction between GAP and you takes place via the GAP log window: this is where GAP prints its messages and waits for your input. The amount of text in this window is limited (see the -W command line option above), so don't be surprised if old GAP messages are deleted from the beginning of the text when this limit is reached. The reason for deleting old lines is that otherwise GAP may run out of memory just because of the messages it has printed.

Unlike previous versions, GAP for the Mac now remembers the font and text size as well as the window position of the GAP log window from one session to the next.

Almost all of the GAP editing keys described in Line Editing work on the Mac. In addition, GAP for MacOS also supports the usual editing keys on the Mac, such as Copy and Paste, Undo, arrow keys (also with shift, option and command. Note that you can also move forward and backward in the command line history by pressing ctrl-arrow down and ctrl-arrow up.

Note that Quit in GAP's file menu works differently from the quit GAP command (see quit): Quit in the file menu always quits the GAP application, it cannot be used to quit from a break loop.

GAP for MacOS also contains a simple built-in text editor, which is mainly intended to create GAP files. New, Open..., Save and  Close' from the File menu work in the usual way.

The Read... and LogTo commands in the File menu work basically like the corresponding GAP commands (see File Operations). The only difference is that GAP will prompt you for the file with a standard Mac file opening dialog, so you do not have to enter the path name yourself. (You will see the file's path name in the log window afterwards). Note that if a file you want to read is open in GAP's built-in editor, then GAP will read the file from the edit window, not from the disk.

The Read... command in the File menu changes to Read if the front window belongs to a file in GAP's built-in editor -- choosing Read then makes GAP read that file -- and while the file is being read, the File menu item changes to Abort Read. You cannot close the file's window while it is being read by GAP -- choose Abort Read first.

Garbage collection messages, which are switched on and off by the -g command line option (see Command Line Options) can also be switched on and off by choosing Show garbage collections and Show partial collections from the Window menu.

If Always scroll to printout is selected in the Window menu, GAP will always scroll the GAP log window so that you can see what GAP is currently printing. Otherwise, the GAP log window is only scrolled to the current print position when GAP prints its prompt and waits for you to enter a command. Note that you may see text lines disappear even if Always scroll to printout is off -- this happens if you are viewing the text at the beginning of the log window and some lines are just being deleted from the log because it has exceeded its 32000 character limit.

The contents of the Help menu should be quite self-explanatory. Note that, unlike in GAP 3 for the Mac, the online help is not displayed in a separate window, nor is the online help available while GAP is computing.

Holding down the command (apple) key while selecting text does the same as selecting the text and choosing Find selection in table of contents from the Help menu, holding down both command and option keys while selecting tries to find the selection in the index.

If you have Internet Config and a web browser, such as Netscape, Internet Explorer, or MacLynx installed on your Mac, you can also view the manual with one of these viewers. Internet Config is available free of charge from every InfoMac ftp archive, and also comes with most internet applications. Open the Internet Config application and make sure that the Helper application for file is set to the web browser which you want to use. Then type the GAP command

  • SetHelpViewer("Internet Config");

    (See Changing the Way the Help Pages are Displayed for other options). Note that you will have to have the GAP documentation in html format on your Mac. If you have internet access and want to read the help pages from one of the GAP servers directly, you may bind the variable HELP_EXTERNAL_URL to the base URL of the manual, e.g. if you set

    HELP_EXTERNAL_URL := "http://www-gap.dcs.st-and.ac.uk/~gap/Manual4";
    

    then the GAP manual will be read from the GAP server in St. Andrews. Note that you may have to increase the amount of memory allocated to your browser in order to display some of the larger html pages, or to display them reasonably quickly.

    If you want to use your web browser as the default viewer, it may be a good idea to include the above lines in your gap.rc file.

    When you want to refer to files or folders in GAP (for example in the Read, PrintTo, AppendTo, LogTo commands), or have to specify files or folders for a command line option, these files must be identified by UNIX style path names. (Presently, GAP for MacOS also supports Mac path names, but this may change in the future.)

    Those users who are familiar with UNIX path names may skip rest of this section, noting that the working directory is the one in which the GAP application resides, and that file names on the Mac are not case sensitive.

    Paths are strings used to describe where a file is stored on a hard disk. There are two ways for specifying Unix path names: absolute and relative paths. An absolute path starts with a /, then the name of the disk where the file is located, another /, then a list of folders, each containing the next one, separated by /, and finally the name of the file, which resides in the last folder in the list. For instance, if your hard disk is called My HD, and your file program.g resides (or should be created) in the folder programs in the folder documents on My HD, the absolute path name to that file is

    /My HD/documents/programs/program.g
    

    Relative path names work similarly, except that the starting point is not a disk but the folder in which the GAP application program resides. Relative path names are formed like absolute ones, except that they do not start with a /. Thus, if you want to access the file temp.g in the folder tmp in the GAP folder, you may use the following path name: tmp/temp.g It is also possible to move upward to a parent folder: suppose that the folder containing GAP is called applications, which contains a folder editor which in turn contains the file 'program.g', then you could access this file by the path ../editor/program.g. The path ./ refers to the GAP folder itself.

    Note also that GAP for the Mac follows (resolves) aliases to folders and files.

    [Top] [Previous] [Up] [Next] [Index]

    GAP 4 manual
    February 2000