There are a number of options available to you, of varying levels of
quality, efficiency, and ease of use.

The pipe/fifo option is not really GAP-specific, you can make a named FIFO
and then read and write it from most programs, including GAP. Go and read
a general guide on named pipes.

You could use this option with the the json package ( ), to give you a well-formed data
structure to send / receive.

Another alternative is SCSCP, which sends XML over network sockets. I have
used this, it does require using an XML parser, which is fairly heavy
duty, and is a little slow (this would only matter if you are sending many
very small requests, it is only the communication itself which is slow).

I have an example library for using SCSCP from C++ here:

This library is very minimal, but will hopefully give you guidance on how
to make SCSCP work.

The final option, which is by far the hardest (but I mention it as an
option) is to integrate your C++ code as a GAP kernel extension. If you
want more details about how to do this I'm happy to provide them, but I
warn you it is much harder than the other options!


On 19/04/2015 17:25, "Jonathan Gryak" <> wrote:

>According to the FAQ:
>> What you can do is to run GAP in a child process and communicate with it
>> using pipes, pseudo-ttys, UNIX FIFOs or some similar device. We have
>> this successfully in a number of projects, and you can contact the
>> list for more detailed advice if you want to go down this route.
>Unfortunately I can't seem to find any documentation or post in the Forum
>or elsewhere which shows this process. Any suggestions?
>Thanks in advance.
>Forum mailing list

Forum mailing list

Reply via email to