diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json
index 43ef92680..d51bfe472 100644
--- a/dev/.documenter-siteinfo.json
+++ b/dev/.documenter-siteinfo.json
@@ -1 +1 @@
-{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-06T15:55:11","documenter_version":"1.4.1"}}
\ No newline at end of file
+{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-13T21:46:35","documenter_version":"1.4.1"}}
\ No newline at end of file
diff --git a/dev/assets/html/JuliaInterface/chap2.html b/dev/assets/html/JuliaInterface/chap2.html
index a6c9fbc9a..82ba6cd79 100644
--- a/dev/assets/html/JuliaInterface/chap2.html
+++ b/dev/assets/html/JuliaInterface/chap2.html
@@ -176,7 +176,7 @@
2.2-2 JuliaIncludeFile
‣ JuliaIncludeFile( filename[, module_name] )
( function )
Returns: nothing.
-
calls Julia's Base.include with the strings filename (an absolute filename, as returned by Filename (Reference: Filename)) and module_name (the name of a Julia module, the default is "Main"). This means that the Julia code in the file with name filename gets executed in the current Julia session, in the context of the Julia module module_name.
+
calls Julia's Base.include with the strings filename (an absolute filename, as returned by Filename (Reference: Filename)) and module_name (the name of a Julia module, the default is "Main"). This means that the Julia code in the file with name filename gets executed in the current Julia session, in the context of the Julia module module_name.
@@ -429,19 +429,19 @@
2.4-1 Convenience methods for Juli
-
CallFuncList (Reference: CallFuncList), delegating to Julia.Core._apply (this yields the function call syntax in GAP, it is installed also for objects in IsJuliaWrapper (2.1-2),
+
CallFuncList (Reference: CallFuncList), delegating to Julia.Core._apply (this yields the function call syntax in GAP, it is installed also for objects in IsJuliaWrapper (2.1-2),
-
access to and assignment of entries of arrays, via \[\] (Reference: \[\]), \[\]\:\= (Reference: \[\]\:\=), and the (up to GAP 4.11 undocumented) operations MatElm and SetMatElm, delegating to Julia.Base.getindex and Julia.Base.setindex,
+
access to and assignment of entries of arrays, via \[\] (Reference: \[\]), \[\]\:\= (Reference: \[\]\:\=), and the (up to GAP 4.11 undocumented) operations MatElm and SetMatElm, delegating to Julia.Base.getindex and Julia.Base.setindex,
-
access to and assignment of fields and properties, via \. (Reference: \.) and \.\:\= (Reference: \.\:\=), delegating to Julia.Base.getproperty and Julia.Base.setproperty,
+
access to and assignment of fields and properties, via \. (Reference: \.) and \.\:\= (Reference: \.\:\=), delegating to Julia.Base.getproperty and Julia.Base.setproperty,
the binary arithmetic operations \+ (Reference: +), \- (Reference: -), \* (Reference: *), \/ (Reference: /), LeftQuotient (Reference: LeftQuotient), \^ (Reference: ^), \= (Reference: \=), \< (Reference: \<), delegating to Julia.Base.\+, Julia.Base.\-, Julia.Base.\*, Julia.Base.\/, Julia.Base.\\, Julia.Base.\^, Julia.Base.\=\=, and Julia.Base.\<; the same methods are installed also for the case that only one argument is in IsJuliaObject (2.1-1), and the other argument is an immediate integer.
+
the binary arithmetic operations \+ (Reference: +), \- (Reference: -), \* (Reference: *), \/ (Reference: /), LeftQuotient (Reference: LeftQuotient), \^ (Reference: ^), \= (Reference: \=), \< (Reference: \<), delegating to Julia.Base.\+, Julia.Base.\-, Julia.Base.\*, Julia.Base.\/, Julia.Base.\\, Julia.Base.\^, Julia.Base.\=\=, and Julia.Base.\<; the same methods are installed also for the case that only one argument is in IsJuliaObject (2.1-1), and the other argument is an immediate integer.
@@ -462,7 +462,7 @@
2.4-1 Convenience methods for Juli
2.5 Access Julia help from a GAP session
-
In a Julia session, one can ask for help about the object with the name obj (a function or a type) by entering ?obj, and Julia prints all matches to the screen. One can get the same output in a GAP session by entering ?Julia:obj, cf. Section Reference: Invoking the Help in the GAP Reference Manual. For example, ?Julia:sqrt shows the Julia help about the Julia function sqrt (which is available in GAP as Julia.sqrt).
+
In a Julia session, one can ask for help about the object with the name obj (a function or a type) by entering ?obj, and Julia prints all matches to the screen. One can get the same output in a GAP session by entering ?Julia:obj, cf. Section Reference: Invoking the Help in the GAP Reference Manual. For example, ?Julia:sqrt shows the Julia help about the Julia function sqrt (which is available in GAP as Julia.sqrt).
Note that this way to access the Julia help is different from the usual access to GAP help books, in the following sense.
@@ -480,7 +480,7 @@
2.5 Access Julia help fro
The Julia help system does currently not support menus in case of multiple matches, all matches are shown at once, and this happens also in a GAP session.
-
No PDF or HTML version of the Julia help is supported in GAP, only the text format can be shown on the screen. Thus it does not make sense to change the help viewer, cf. Section Reference: Changing the Help Viewer in the GAP Reference Manual.
+
No PDF or HTML version of the Julia help is supported in GAP, only the text format can be shown on the screen. Thus it does not make sense to change the help viewer, cf. Section Reference: Changing the Help Viewer in the GAP Reference Manual.
Julia functions belong to Julia modules. Many Julia functions can be accessed only relative to their modules, and then also the help requests work only for the qualified names. For example, ?Julia:GAP.julia_to_gap yields the description of the Julia function julia_to_gap that is defined in the Julia module GAP, whereas no match is found for the input ?Julia:julia_to_gap.
calls Julia's Base.include with the strings filename (an absolute filename, as returned by Filename (Reference: Filename)) and module_name (the name of a Julia module, the default is "Main"). This means that the Julia code in the file with name filename gets executed in the current Julia session, in the context of the Julia module module_name.
+
calls Julia's Base.include with the strings filename (an absolute filename, as returned by Filename (Reference: Filename)) and module_name (the name of a Julia module, the default is "Main"). This means that the Julia code in the file with name filename gets executed in the current Julia session, in the context of the Julia module module_name.
@@ -432,19 +432,19 @@
2.4-1 Convenience methods for Juli
-
CallFuncList (Reference: CallFuncList), delegating to Julia.Core._apply (this yields the function call syntax in GAP, it is installed also for objects in IsJuliaWrapper (2.1-2),
+
CallFuncList (Reference: CallFuncList), delegating to Julia.Core._apply (this yields the function call syntax in GAP, it is installed also for objects in IsJuliaWrapper (2.1-2),
-
access to and assignment of entries of arrays, via \[\] (Reference: \[\]), \[\]\:\= (Reference: \[\]\:\=), and the (up to GAP 4.11 undocumented) operations MatElm and SetMatElm, delegating to Julia.Base.getindex and Julia.Base.setindex,
+
access to and assignment of entries of arrays, via \[\] (Reference: \[\]), \[\]\:\= (Reference: \[\]\:\=), and the (up to GAP 4.11 undocumented) operations MatElm and SetMatElm, delegating to Julia.Base.getindex and Julia.Base.setindex,
-
access to and assignment of fields and properties, via \. (Reference: \.) and \.\:\= (Reference: \.\:\=), delegating to Julia.Base.getproperty and Julia.Base.setproperty,
+
access to and assignment of fields and properties, via \. (Reference: \.) and \.\:\= (Reference: \.\:\=), delegating to Julia.Base.getproperty and Julia.Base.setproperty,
the binary arithmetic operations \+ (Reference: +), \- (Reference: -), \* (Reference: *), \/ (Reference: /), LeftQuotient (Reference: LeftQuotient), \^ (Reference: ^), \= (Reference: \=), \< (Reference: \<), delegating to Julia.Base.\+, Julia.Base.\-, Julia.Base.\*, Julia.Base.\/, Julia.Base.\\, Julia.Base.\^, Julia.Base.\=\=, and Julia.Base.\<; the same methods are installed also for the case that only one argument is in IsJuliaObject (2.1-1), and the other argument is an immediate integer.
+
the binary arithmetic operations \+ (Reference: +), \- (Reference: -), \* (Reference: *), \/ (Reference: /), LeftQuotient (Reference: LeftQuotient), \^ (Reference: ^), \= (Reference: \=), \< (Reference: \<), delegating to Julia.Base.\+, Julia.Base.\-, Julia.Base.\*, Julia.Base.\/, Julia.Base.\\, Julia.Base.\^, Julia.Base.\=\=, and Julia.Base.\<; the same methods are installed also for the case that only one argument is in IsJuliaObject (2.1-1), and the other argument is an immediate integer.
@@ -465,7 +465,7 @@
2.4-1 Convenience methods for Juli
2.5 Access Julia help from a GAP session
-
In a Julia session, one can ask for help about the object with the name obj (a function or a type) by entering ?obj, and Julia prints all matches to the screen. One can get the same output in a GAP session by entering ?Julia:obj, cf. Section Reference: Invoking the Help in the GAP Reference Manual. For example, ?Julia:sqrt shows the Julia help about the Julia function sqrt (which is available in GAP as Julia.sqrt).
+
In a Julia session, one can ask for help about the object with the name obj (a function or a type) by entering ?obj, and Julia prints all matches to the screen. One can get the same output in a GAP session by entering ?Julia:obj, cf. Section Reference: Invoking the Help in the GAP Reference Manual. For example, ?Julia:sqrt shows the Julia help about the Julia function sqrt (which is available in GAP as Julia.sqrt).
Note that this way to access the Julia help is different from the usual access to GAP help books, in the following sense.
@@ -483,7 +483,7 @@
2.5 Access Julia help fro
The Julia help system does currently not support menus in case of multiple matches, all matches are shown at once, and this happens also in a GAP session.
-
No PDF or HTML version of the Julia help is supported in GAP, only the text format can be shown on the screen. Thus it does not make sense to change the help viewer, cf. Section Reference: Changing the Help Viewer in the GAP Reference Manual.
+
No PDF or HTML version of the Julia help is supported in GAP, only the text format can be shown on the screen. Thus it does not make sense to change the help viewer, cf. Section Reference: Changing the Help Viewer in the GAP Reference Manual.
Julia functions belong to Julia modules. Many Julia functions can be accessed only relative to their modules, and then also the help requests work only for the qualified names. For example, ?Julia:GAP.julia_to_gap yields the description of the Julia function julia_to_gap that is defined in the Julia module GAP, whereas no match is found for the input ?Julia:julia_to_gap.
GAP has a notion of immediate objects, whose values are stored inside the pointer referencing them. GAP uses this to store small integers and elements of small finite fields, see for example the beginning of Chapter Reference: Integers in the GAP Reference Manual. Since these are not valid pointers, Julia cannot treat them like other GAP objects, which are simply Julia objects of type GAP.GapObj. Instead, a conversion is unavoidable, at least when immediate objects are passed as stand-alone arguments to a function.
+
GAP has a notion of immediate objects, whose values are stored inside the pointer referencing them. GAP uses this to store small integers and elements of small finite fields, see for example the beginning of Chapter Reference: Integers in the GAP Reference Manual. Since these are not valid pointers, Julia cannot treat them like other GAP objects, which are simply Julia objects of type GAP.GapObj. Instead, a conversion is unavoidable, at least when immediate objects are passed as stand-alone arguments to a function.
To this end, the interface converts GAP immediate integers into JuliaInt64 objects, and vice versa. However, GAP immediate integers on a 64 bit system can only store 61 bits, so not all Int64objects can be converted into immediate integers; integers exceeding the 61 bits limit are therefore wrapped like any other Julia object. Other Julia integer types, like UInt64, Int32, are also wrapped by default, in order to ensure that conversion round trips do not arbitrary change object types.
This filter allows one to use Julia's random number generators in GAP, see Reference: Random Sources for the background. Calling RandomSource (Reference: RandomSource) with only argument IsRandomSourceJulia yields a GAP random source that uses a copy of Julia's default random number generator Julia.Random.default_rng(). Note that different calls with only argument IsRandomSourceJulia yield different random sources.
+
This filter allows one to use Julia's random number generators in GAP, see Reference: Random Sources for the background. Calling RandomSource (Reference: RandomSource) with only argument IsRandomSourceJulia yields a GAP random source that uses a copy of Julia's default random number generator Julia.Random.default_rng(). Note that different calls with only argument IsRandomSourceJulia yield different random sources.
-
Called with IsRandomSourceJulia and a positive integer, RandomSource (Reference: RandomSource) returns a random source that is based on a copy of Julia.Random.default_rng() but got initialized with the given integer as a seed.
+
Called with IsRandomSourceJulia and a positive integer, RandomSource (Reference: RandomSource) returns a random source that is based on a copy of Julia.Random.default_rng() but got initialized with the given integer as a seed.
-
Called with IsRandomSourceJulia and a Julia random number generator, RandomSource (Reference: RandomSource) returns a random source that uses this random number generator. Note that we do not make a copy of the second argument, in order to be able to use the given random number generator both on the GAP side and the Julia side.
+
Called with IsRandomSourceJulia and a Julia random number generator, RandomSource (Reference: RandomSource) returns a random source that uses this random number generator. Note that we do not make a copy of the second argument, in order to be able to use the given random number generator both on the GAP side and the Julia side.
-
State (Reference: State) for random sources in IsRandomSourceJulia returns a copy of the underlying Julia random number generator.
+
State (Reference: State) for random sources in IsRandomSourceJulia returns a copy of the underlying Julia random number generator.
GAP has a notion of immediate objects, whose values are stored inside the pointer referencing them. GAP uses this to store small integers and elements of small finite fields, see for example the beginning of Chapter Reference: Integers in the GAP Reference Manual. Since these are not valid pointers, Julia cannot treat them like other GAP objects, which are simply Julia objects of type GAP.GapObj. Instead, a conversion is unavoidable, at least when immediate objects are passed as stand-alone arguments to a function.
+
GAP has a notion of immediate objects, whose values are stored inside the pointer referencing them. GAP uses this to store small integers and elements of small finite fields, see for example the beginning of Chapter Reference: Integers in the GAP Reference Manual. Since these are not valid pointers, Julia cannot treat them like other GAP objects, which are simply Julia objects of type GAP.GapObj. Instead, a conversion is unavoidable, at least when immediate objects are passed as stand-alone arguments to a function.
To this end, the interface converts GAP immediate integers into JuliaInt64 objects, and vice versa. However, GAP immediate integers on a 64 bit system can only store 61 bits, so not all Int64objects can be converted into immediate integers; integers exceeding the 61 bits limit are therefore wrapped like any other Julia object. Other Julia integer types, like UInt64, Int32, are also wrapped by default, in order to ensure that conversion round trips do not arbitrary change object types.
This filter allows one to use Julia's random number generators in GAP, see Reference: Random Sources for the background. Calling RandomSource (Reference: RandomSource) with only argument IsRandomSourceJulia yields a GAP random source that uses a copy of Julia's default random number generator Julia.Random.default_rng(). Note that different calls with only argument IsRandomSourceJulia yield different random sources.
+
This filter allows one to use Julia's random number generators in GAP, see Reference: Random Sources for the background. Calling RandomSource (Reference: RandomSource) with only argument IsRandomSourceJulia yields a GAP random source that uses a copy of Julia's default random number generator Julia.Random.default_rng(). Note that different calls with only argument IsRandomSourceJulia yield different random sources.
-
Called with IsRandomSourceJulia and a positive integer, RandomSource (Reference: RandomSource) returns a random source that is based on a copy of Julia.Random.default_rng() but got initialized with the given integer as a seed.
+
Called with IsRandomSourceJulia and a positive integer, RandomSource (Reference: RandomSource) returns a random source that is based on a copy of Julia.Random.default_rng() but got initialized with the given integer as a seed.
-
Called with IsRandomSourceJulia and a Julia random number generator, RandomSource (Reference: RandomSource) returns a random source that uses this random number generator. Note that we do not make a copy of the second argument, in order to be able to use the given random number generator both on the GAP side and the Julia side.
+
Called with IsRandomSourceJulia and a Julia random number generator, RandomSource (Reference: RandomSource) returns a random source that uses this random number generator. Note that we do not make a copy of the second argument, in order to be able to use the given random number generator both on the GAP side and the Julia side.
-
State (Reference: State) for random sources in IsRandomSourceJulia returns a copy of the underlying Julia random number generator.
+
State (Reference: State) for random sources in IsRandomSourceJulia returns a copy of the underlying Julia random number generator.
diff --git a/dev/basics/index.html b/dev/basics/index.html
index fffee59c9..38126aca7 100644
--- a/dev/basics/index.html
+++ b/dev/basics/index.html
@@ -21,7 +21,7 @@
julia> GAP.Globals.Julia # Julia objects can be values of GAP variables
Main
-
Let GAP execute the command(s) given by cmd; if an error occurs then report this error, otherwise if the last command has a result then return it, otherwise return nothing.
Let GAP execute the command(s) given by cmd; if an error occurs then report this error, otherwise if the last command has a result then return it, otherwise return nothing.
Note that screen outputs caused by evaluating cmd are not shown by evalstr; use evalstr_ex for accessing both the outputs and the return values of the command(s).
In general we recommend to avoid using evalstr, but it sometimes can be a useful escape hatch to access GAP functionality that is otherwise impossible to difficult to reach. But in most typical scenarios it should not be necessary to use it at all.
Instead, use GAP.GapObj or GAP.Obj for constructing GAP objects that correspond to given Julia objects, and call GAP functions directly in the Julia session. For example, executing GAP.evalstr( "x:= []; Add( x, 2 )" ) can be replaced by the Julia code x = GAP.GapObj([]); GAP.Globals.Add(x, 2). Note that the variable x in the former example lives in the GAP session, i.e., it can be accessed as GAP.Globals.x after the call of GAP.evalstr, whereas x in the latter example lives in the Julia session.
Assume that cmd consists of $n$ GAP statements, each terminated by ; or ;;. Let GAP execute these statements and return a GAP list of length $n$ that describes their results. Each entry of the return value is a GAP list of length 5, with the following meaning.
The first entry is true if the statement was executed successfully, and false otherwise.
If the first entry is true, then the second entry is bound to the result of the statement if there was one, and unbound otherwise.
The third entry is unbound if an error occured, true if the statement ends in a double semicolon, and false otherwise.
The fourth entry currently is always unbound.
The fifth entry contains the captured output of the statement as a string. If there was no double semicolon then also the output of GAP.Globals.ViewObj applied to the result value in the second entry, if any, is part of that string.
Examples
julia> GAP.evalstr_ex( "1+2" ) # error due to missing semicolon
+julia> GAP.evalstr( "Print( x )" )
Note that screen outputs caused by evaluating cmd are not shown by evalstr; use evalstr_ex for accessing both the outputs and the return values of the command(s).
In general we recommend to avoid using evalstr, but it sometimes can be a useful escape hatch to access GAP functionality that is otherwise impossible to difficult to reach. But in most typical scenarios it should not be necessary to use it at all.
Instead, use GAP.GapObj or GAP.Obj for constructing GAP objects that correspond to given Julia objects, and call GAP functions directly in the Julia session. For example, executing GAP.evalstr( "x:= []; Add( x, 2 )" ) can be replaced by the Julia code x = GAP.GapObj([]); GAP.Globals.Add(x, 2). Note that the variable x in the former example lives in the GAP session, i.e., it can be accessed as GAP.Globals.x after the call of GAP.evalstr, whereas x in the latter example lives in the Julia session.
Assume that cmd consists of $n$ GAP statements, each terminated by ; or ;;. Let GAP execute these statements and return a GAP list of length $n$ that describes their results. Each entry of the return value is a GAP list of length 5, with the following meaning.
The first entry is true if the statement was executed successfully, and false otherwise.
If the first entry is true, then the second entry is bound to the result of the statement if there was one, and unbound otherwise.
The third entry is unbound if an error occured, true if the statement ends in a double semicolon, and false otherwise.
The fourth entry currently is always unbound.
The fifth entry contains the captured output of the statement as a string. If there was no double semicolon then also the output of GAP.Globals.ViewObj applied to the result value in the second entry, if any, is part of that string.
Examples
julia> GAP.evalstr_ex( "1+2" ) # error due to missing semicolon
GAP: [ [ false,,,, "" ] ]
julia> GAP.evalstr_ex( "1+2;" ) # one statement with return value
@@ -51,11 +51,11 @@
GAP: [ [ true,, false,, "1" ] ]
julia> GAP.evalstr_ex( "" ) # empty input
-GAP: [ ]
Start a GAP prompt where you can enter GAP commands as in a regular GAP session. This prompt can be left as any GAP prompt by either entering quit; or pressing ctrl-D, which returns to the Julia prompt.
This GAP prompt allows to quickly switch between writing Julia and GAP code in a session where all data is shared.
Given a directory path, create three files in that directory:
a shell script named gap.sh which acts like the gap.sh shipped with a regular GAP installation, but which behind the scenes launches GAP via Julia.
two TOML files, Manifest.toml and Project.toml, which are required by gap.sh to function (they record the precise versions of GAP.jl and other Julia packages involved)
The GAP-Julia interface is fully bidirectional, so it is also possible to access all Julia functionality from GAP. To learn more about this, please consult the manual of the GAP package JuliaInterface.
Start a GAP prompt where you can enter GAP commands as in a regular GAP session. This prompt can be left as any GAP prompt by either entering quit; or pressing ctrl-D, which returns to the Julia prompt.
This GAP prompt allows to quickly switch between writing Julia and GAP code in a session where all data is shared.
Given a directory path, create three files in that directory:
a shell script named gap.sh which acts like the gap.sh shipped with a regular GAP installation, but which behind the scenes launches GAP via Julia.
two TOML files, Manifest.toml and Project.toml, which are required by gap.sh to function (they record the precise versions of GAP.jl and other Julia packages involved)
The GAP-Julia interface is fully bidirectional, so it is also possible to access all Julia functionality from GAP. To learn more about this, please consult the manual of the GAP package JuliaInterface.
This is the Julia type of all those GAP objects that are not "immediate" (booleans, small integers, FFEs).
Examples
julia> typeof(GapObj([1, 2])) # a GAP list
GapObj
julia> typeof(GapObj(Dict(:a => 1))) # a GAP record
@@ -94,7 +94,7 @@
GAP: [ [ 1, 2 ], [ 3, 4 ] ]
julia> GapObj(42)
-ERROR: TypeError: in typeassert, expected GapObj, got a value of type Int64
This is an alias for Union{GapObj,FFE,Int64,Bool}. This type union covers all types a "native" GAP object may have from Julia's viewpoint.
Moreover, it can be used as a constructor, in order to convert Julia objects to GAP objects, whenever a suitable conversion has been defined.
Recursive conversion of nested Julia objects (arrays, tuples, dictionaries) can be forced either by a second argument true or by the keyword argument recursive with value true.
Examples
julia> GAP.Obj(1//3)
+ERROR: TypeError: in typeassert, expected GapObj, got a value of type Int64
This is an alias for Union{GapObj,FFE,Int64,Bool}. This type union covers all types a "native" GAP object may have from Julia's viewpoint.
Moreover, it can be used as a constructor, in order to convert Julia objects to GAP objects, whenever a suitable conversion has been defined.
Recursive conversion of nested Julia objects (arrays, tuples, dictionaries) can be forced either by a second argument true or by the keyword argument recursive with value true.
Any GAP integer object is represented in Julia as either a GapObj (if it is a "large" integer) or as an Int (if it is a "small" integer). This type union can be used to express this conveniently, e.g. when one wants to help type stability.
Note that also GAP's infinity and -infinity fit under this type (as do many other objects which are not numbers).