# A ftp-like client of GPhys directory services # # Usage # % irb --noinspect -r numru/gphys_connect_ftp-like # You will be prompted to type URI, which will be determined by the server. require "drb/drb" require "numru/gdir" require "numru/ggraph" include NumRu include GGraph # so you can use methods like "contour" without any prefix def help msg = < '`' DCL.glpset('lmiss',true) DCL.uzfact(uzfact) end class NArray def self._load(o); to_na(*Marshal::load(o)).ntoh; end def _dump(limit); Marshal::dump([hton.to_s, typecode, *shape]); end end # < start the client > DRb.start_service && nil print "** A GPhys service client. To conetct, type in server's URI(return)\n", " (format: druby://host:port). Type in help to see usage.\n","URI>> " uri = gets.strip if /^help/ =~ uri help print "\nMore info? (y or else)>> "; ans=gets help_more if /^y/ =~ ans print "\nNeed a connection first. Input the uri of the server:\nURI>> " uri = gets.chomp end rootdir = DRbObject.new(nil, uri) $cwd = rootdir # < greeting > print <