[BACK]Return to oxmath.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Doc

Annotation of OpenXM/src/kan96xx/Doc/oxmath.sm1, Revision 1.3

1.1       takayama    1: %  oxmath.sm1  : An interface to Open Mathematica Server. (ox_math)
1.3     ! takayama    2: %  $OpenXM: OpenXM/src/kan96xx/Doc/oxmath.sm1,v 1.2 1999/11/04 12:08:44 takayama Exp $
1.1       takayama    3: %% This package requires ox.sm1
                      4: [(parse) (ox.sm1) pushfile] extension
1.2       takayama    5: (oxmathconnectr-ssh ) message
1.1       takayama    6: %%%%%%%%%%%%%  Configure path for ox and ox_math on your remote machine.
                      7: /oxpath.oxlog.xterm-ssh  (/home/taka/OpenXM/bin/oxlog /usr/X11R6/bin/xterm -icon -e ) def
                      8: /oxpath.oxmath-ssh (/home/taka/OpenXM/src/ox_math/ox_math) def
                      9: /oxpath.ox-ssh    (/home/taka/OpenXM/bin/ox) def
                     10: /myhostname-ssh   (dc1.math.kobe-u.ac.jp) def
                     11:
                     12: /oxmathconnectr-ssh {
                     13:  /arg1 set
                     14:  [/in-oxmathconnectr /pass /peer /data /control /name /machine
                     15:   /your-peer /comm
                     16:  ] pushVariables
                     17:  [
                     18:  /machine arg1 0 get def
                     19:  /name arg1 1 get def
                     20:
                     21:  /pass [(oxGenPass)] extension def
                     22:  /peer [(oxGetPort) myhostname-ssh] extension def
                     23:  /data peer 1 get toString def
                     24:  /control peer 3 get toString def
                     25:  peer message
                     26:  [(ssh -f ) machine ( -l ) name ( ")
                     27:   oxpath.oxlog.xterm-ssh  oxpath.ox-ssh ( -reverse -ox ) oxpath.oxmath-ssh
                     28:   ( -host ) myhostname-ssh
                     29:   ( -data ) data ( -control ) control  ( -pass ) pass
                     30:   oxpath.null
                     31:   ( ")
                     32:  ] cat /comm set
                     33:  (Executing the command : ) messagen comm message message
                     34:   comm system
                     35:  (sleep 5) system
                     36:  [(oxCreateClient2) peer 1 pass] extension /your-peer set
                     37: %% /@@@.oxmath your-peer def
                     38: %% (ox_math is set to @@@.oxmath) message
                     39:  /arg1 your-peer def
                     40:  ] pop
                     41:  popVariables
                     42:  arg1
                     43: } def
                     44: [(oxmathconnectr-ssh)
                     45: [([hostname login-name] oxmathconnectr-ssh client)
                     46:  (Starting oxpath.oxmath-ssh by the launcher oxpath.ox-ssh on the "hostname".)
                     47:  (Set the following varialbes at the beginning of oxmath.sm1 )
                     48:  (to appropriate values:)
                     49:  (oxpath.oxlog.xterm-ssh  oxpath.oxmath-ssh  oxpath.ox-ssh myhostname-ssh )
                     50:  $Example 1: $
                     51:  $  *** Path names on the remote machine tau.math.kobe-u.ac.jp $
                     52:  $    /oxpath.oxlog.xterm-ssh (/home/taka/OpenXM/bin/oxlog /usr/X11R6/bin/xterm -icon -e ) def $
                     53:  $    /oxpath.oxmath-ssh (/home/taka/OpenXM/src/ox_math/ox_math) def $
                     54:  $    /oxpath.ox-ssh    (/home/taka/OpenXM/bin/ox) def $
                     55:  $  *** The machine name on which you are running sm1. $
                     56:  $    /myhostname-ssh   (dc1.math.kobe-u.ac.jp) def $
                     57:  $         [(tau.math.kobe-u.ac.jp) (taka)] oxmathconnectr-ssh /@@@.oxmath set  $
                     58: ]] putUsages
1.3     ! takayama   59:
        !            60:
        !            61: /o_aux {
        !            62:   /arg1 set
        !            63:   [/in-t_aux /ob /r /r2] pushVariables
        !            64:   [
        !            65:      /ob arg1 def
        !            66:      (_______________________________________) message
        !            67:      (tag = ) messagen ob tag messagen (, ) messagen
        !            68:      (Sending object :) messagen ob message
        !            69:      @@@.oxmath ob oxpushcmo
        !            70:      @@@.oxmath oxpopcmo /r set
        !            71:      (Returned expression is:) messagen
        !            72:      (tag = ) messagen r tag messagen (, ) messagen
        !            73:      r message
        !            74:      (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) message
        !            75:   ] pop
        !            76:   popVariables
        !            77: } def
        !            78:
        !            79: /o_aux2 {
        !            80:   /arg1 set
        !            81:   [/in-t_aux /ob /r /r2] pushVariables
        !            82:   [
        !            83:      /ob arg1 def
        !            84:      (_______________________________________) message
        !            85:      (Evaluating object :) messagen ob message
        !            86:      @@@.oxmath ob oxexecutestring
        !            87:      @@@.oxmath oxpopcmo /r set
        !            88:      (Returned cmo expression is:) messagen
        !            89:      (tag = ) messagen r tag messagen (, ) messagen
        !            90:      r message
        !            91:      (Evaluating object :) messagen ob message
        !            92:      @@@.oxmath ob oxexecutestring
        !            93:      @@@.oxmath oxpopstring /r set
        !            94:      (popstring of the result is:) messagen
        !            95:      (tag = ) messagen r tag messagen (, ) messagen
        !            96:      r message
        !            97:      (~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) message
        !            98:   ] pop
        !            99:   popVariables
        !           100: } def
        !           101:
        !           102: %% Just type in oxmath-testsuits1
        !           103: /oxmath-testsuits1 {
        !           104: %% Configure below.
        !           105:   /oxpath.oxlog.xterm-ssh (/home/taka/OpenXM/bin/oxlog /usr/X11R6/bin/xterm -icon -e ) def
        !           106:   /oxpath.oxmath-ssh (/home/taka/OpenXM/src/ox_math/ox_math) def
        !           107:   /oxpath.ox-ssh    (/home/taka/OpenXM/bin/ox) def
        !           108: %%  *** The machine name on which you are running sm1.
        !           109:   /myhostname-ssh   (dc4.math.kobe-u.ac.jp) def
        !           110:  [(tau.math.kobe-u.ac.jp) (taka)] oxmathconnectr-ssh /@@@.oxmath set
        !           111: %% End of configuration.
        !           112:
        !           113: %%  @@@.oxmath oxmathcap
        !           114: %%  (Mathcap is ) messagen @@@.oxmath message
        !           115:
        !           116:   null o_aux
        !           117:   123  o_aux
        !           118:   (Hello World) o_aux
        !           119:   [1 2 3] o_aux
        !           120:   (123123).. o_aux
        !           121: %  (-12).. (12345).. div o_aux  %% not supported in sm1.
        !           122: %  (x^2-1). o_aux  %% It cause a hang of the communication line.
        !           123:
        !           124:   (------------ test of oxExecuteString and oxpopcmo ----------------)
        !           125:   (1+2) o_aux2
        !           126:   (Eigenvalues[{{1,2},{3,4}}]) o_aux2
        !           127:   (Factor[x^10-1]) o_aux2
        !           128:   (Eigenvalues[{{1,2},"Hello"}]) o_aux2
        !           129:
        !           130:   (End) message
        !           131: } def
        !           132:
1.1       takayama  133:

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