CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
LoadPackage("scscp");
laptop   := "localhost";
demoserver := "chrystal.mcs.st-andrews.ac.uk";
port     := 26133;
SetInfoLevel( InfoSCSCP, 0 );
EvaluateBySCSCP( "ChangeInfoLevel", [4], laptop, port );

G := Group( (1,2,3), (2,3) );
IdGroup( G );
EvaluateBySCSCP( "WS_IdGroup", [ G ], demoserver, port ).object;
EvaluateBySCSCP( "GroupIdentificationService", [ [ (1,2,3), (2,3) ] ], 
                 demoserver, port ).object;
SetInfoLevel( InfoSCSCP, 3 );
EvaluateBySCSCP( "GroupIdentificationService", [ [ (1,2,3), (2,3) ] ], 
                 demoserver, port ).object;
ReadPackage("scscp", "example/id512.g");
G := DihedralGroup( IsPermGroup, 512 );
IdGroup512( G );
SetInfoLevel( InfoSCSCP, 0 );
IdGroup512( G );
M24 := EvaluateBySCSCP( "MathieuGroup", [ 24 ], 
                 laptop, port : output:="cookie" ).object;
EvaluateBySCSCP( "NrConjugacyClasses", [ M24 ], laptop, port );  
SetInfoLevel( InfoSCSCP, 3 );    
P2 := EvaluateBySCSCP( "SylowSubgroup", [ M24, 2 ], 
                 laptop, port : output:="cookie" ).object; 
SetInfoLevel( InfoSCSCP, 0 );       
RetrieveRemoteObject( P2 );
UnbindRemoteObject( M24 );

x:=SL(2,2);
StoreAsRemoteObject( x, laptop, port );
l:=OMString(x);
Length(l);
SetInfoLevel( InfoSCSCP, 4 ); 
IN_SCSCP_BINARY_MODE:=true;
x = EvaluateBySCSCP("Identity",[x],"localhost",port).object;
IN_SCSCP_BINARY_MODE:=false;
SetInfoLevel( InfoSCSCP, 0 ); 
EvaluateBySCSCP( "ChangeInfoLevel", [0], laptop, port );
s:=IO_PickleToString(x);
x = IO_UnpickleFromString( 
      EvaluateBySCSCP( "IO_UnpickleStringAndPickleItBack", [ s ], 
                 laptop, port ).object );

x := [ Z(3)^0, Z(3), 0*Z(3) ];
OMString(x);
for i in [ 4 .. 5000 ] do
  x[i] := i*Z(3)^0;
od;  
Length(x);

IN_SCSCP_BINARY_MODE:=false;
x = EvaluateBySCSCP("Identity",[x],"localhost",port).object;
time;

IN_SCSCP_BINARY_MODE:=true;
x = EvaluateBySCSCP("Identity",[x],"localhost",port).object;
time;

IN_SCSCP_BINARY_MODE:=false;
x = IO_UnpickleFromString( EvaluateBySCSCP( "IO_UnpickleStringAndPickleItBack",
    [ IO_PickleToString(x) ], "localhost", port ).object );
time;

IN_SCSCP_BINARY_MODE:=true;
x = IO_UnpickleFromString( EvaluateBySCSCP( "IO_UnpickleStringAndPickleItBack", 
    [ IO_PickleToString(x) ], "localhost", port ).object );
time;    

IN_SCSCP_BINARY_MODE:=false;
ReadPackage("scscp", "example/overload.g");
a := StoreAsRemoteObject( 6, laptop, port );
b := StoreAsRemoteObject( 7, laptop, port );
c := a*b;
RetrieveRemoteObject( c );
                
EvaluateBySCSCP( "ChangeInfoLevel", [4], laptop, port );