[BACK]Return to oxclient.m2 CVS log [TXT][DIR] Up to [local] / OpenXM / src / Macaulay2 / m2

Diff for /OpenXM/src/Macaulay2/m2/oxclient.m2 between version 1.4 and 1.6

version 1.4, 2000/12/17 08:31:39 version 1.6, 2006/12/07 00:07:06
Line 1 
Line 1 
 ID=" $OpenXM: OpenXM/src/Macaulay2/m2/oxclient.m2,v 1.3 2000/12/14 05:28:05 takayama Exp $ "  ID=" $OpenXM: OpenXM/src/Macaulay2/m2/oxclient.m2,v 1.5 2006/10/27 01:38:17 takayama Exp $ "
   
   -- This is configured for Macaulay2 0.9.95
 load "oxcommon.m2"  load "oxcommon.m2"
   
 oxSession = method()  oxSession = method()
Line 58  oxStartSession = (s) -> (
Line 59  oxStartSession = (s) -> (
      comm = toString "xterm -geometry 80x25-0-0 -e  ox -ox " | s | " -data " |       comm = toString "xterm -geometry 80x25-0-0 -e  ox -ox " | s | " -data " |
                       dPort | " -control " | cPort |                        dPort | " -control " | cPort |
                       " -reverse -host localhost" | " -pass " | PASS | " &" ;                        " -reverse -host localhost" | " -pass " | PASS | " &" ;
      comm = makeLaunchCommand(true,"localhost",getenv("USER"),"localhost",       comm = makeLaunchCommand(false,"localhost",getenv("USER"),"localhost",
                               s,dPort,cPort,PASS);                                s,dPort,cPort,PASS);
        -- true : connection by ssh, false: only for the local host.
      print comm;       print comm;
      if (run (comm) != 0)       if (run (comm) != 0)
        then error "Couldn't start the ox server " | s;         then error "Couldn't start the ox server " | s;
Line 207  oxPopMathcap(OXSESSION) := (F) ->(
Line 209  oxPopMathcap(OXSESSION) := (F) ->(
 oxPrimDecomp = method()  oxPrimDecomp = method()
 oxPrimDecomp(OXSESSION, Ideal) := (F, I) -> (  oxPrimDecomp(OXSESSION, Ideal) := (F, I) -> (
      -- translate to asir notation       -- translate to asir notation
      s := toString I;       s := toString flatten entries gens I;
      s = "[" | substring(s,6,#s-7) | "]";       s = replace("\\{","[",s);   -- substring(2,5,s)
        s = replace ("\\}","]",s);
      v = toString gens ring I;       v = toString gens ring I;
      v = "[" | substring(v,1,#v-2) | "]";       v = replace("\\{","[",v);
        v = replace("\\}","]",v);
      s = "primadec(" | s | "," | v | ");";       s = "primadec(" | s | "," | v | ");";
      << "sending" << s << endl;       << "sending" << s << endl;
      oxData(F, s);       oxData(F, s);
      oxExecuteStringByLocalParser(F);       oxExecuteStringByLocalParser(F);
      str = oxPopString(F);       str = oxPopString(F);
        -- BUG: oxPopCMO(F) is still buggy.
      toList apply(value str, i -> {ideal(toList(i#0)), ideal(toList(i#1))})       toList apply(value str, i -> {ideal(toList(i#0)), ideal(toList(i#1))})
      )  
 oxPrimDecomp(OXSESSION, Ideal) := (F, I) -> (  
      -- translate to asir notation  
      s := toString I;  
      s = "[" | substring(s,6,#s-7) | "]";  
      v = toString gens ring I;  
      v = "[" | substring(v,1,#v-2) | "]";  
      s = "primadec(" | s | "," | v | ");";  
      << "sending" << s << endl;  
      oxData(F, s);  
      oxExecuteStringByLocalParser(F);  
      --str = oxPopString(F);  
      --toList apply(value str, i -> {ideal(toList(i#0)), ideal(toList(i#1))})  
      )       )
   
 -- makeLaunchCommand generates an argument of run.  -- makeLaunchCommand generates an argument of run.

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>