!7 sS PUBLIC = "uzbkhxkgharxzxgq"; // Something that is public (can be published anywhere) sS PRIVATE = "eijowimmhvhnoutw"; // Something that is PRIVATE (must NOT be published without asking) sS SINGLE_TEXT_FILE_PATH = "mtpwbshdjfkykrlx"; // The path of a text file on my disk sS beliefs = [[ // Path of the AI concepts file mtpwbshdjfkykrlx of oehbxzbxuoehxptv is "~/JavaX-Data/#1006463/concepts.structure". ]]; sS what; p { what = chooseConceptID("What should I back up?"); int pub = checkXFor(what, PUBLIC, PRIVATE); if (pub == 0) fail("I don't know whether " + what + " is public or private, aborting"); if (pub < 0) fail("Need to find a private server (COMPLICATED)"); // So X is public => we can possibly handle it print("Trying to upload " + what + " to TinyBrain."); S textFile = tryToCast(what, SINGLE_TEXT_FILE_PATH); if (textFile != null) { S contents = loadTextFile(textFile); if (contents == null) { print("Text file " + quote(textFile) + " not there, nothing to back up!"); ret; } print("Uploaded backup as: " + ntUpload(textFile, loadTextFile(textFile))); } fail("Don't know how to handle " + what); } sS chooseConceptID(S whatFor) { ret "oehbxzbxuoehxptv"; // The directory with the AI concepts } sS tryToCast(S x, S y) { fail("I don't know how to cast " + x + " to " + y); } static int checkXFor(S x, S is, S isnt) { fail("I need to know: Is " + x + " " + is + " or " + isnt + "?"); }