static NRepl() { string socketReplNsName = "arcadia.internal.socket-repl"; Util.require(socketReplNsName); Util.getVar(ref errorStringVar, socketReplNsName, "error-string"); Util.require("arcadia.internal.editor-callbacks"); addCallbackVar = RT.var("arcadia.internal.editor-callbacks", "add-callback"); readStringVar = RT.var("clojure.core", "read-string"); evalVar = RT.var("clojure.core", "eval"); prStrVar = RT.var("clojure.core", "pr-str"); star1Var = RT.var("clojure.core", "*1"); star2Var = RT.var("clojure.core", "*2"); star3Var = RT.var("clojure.core", "*3"); starEVar = RT.var("clojure.core", "*e"); printLevelVar = RT.var("clojure.core", "*print-level*"); printLengthVar = RT.var("clojure.core", "*print-length*"); metaVar = RT.var("clojure.core", "meta"); nsResolveVar = RT.var("clojure.core", "ns-resolve"); findNsVar = RT.var("clojure.core", "find-ns"); symbolVar = RT.var("clojure.core", "symbol"); readStringOptions = PersistentHashMap.EMPTY.assoc(Keyword.intern("read-cond"), Keyword.intern("allow")); shimsNS = Namespace.findOrCreate(Symbol.intern("arcadia.nrepl.shims")); Var.intern(shimsNS, Symbol.intern("getProperty"), new GetPropertyShimFn()); Namespace.findOrCreate(Symbol.intern("user")).addAlias(Symbol.intern("System"), shimsNS); }
public static void SetClojureLoadPath() { Util.require("arcadia.internal.compiler"); string clojureDllFolder = BasicPaths.ClojureDllFolder; Environment.SetEnvironmentVariable("CLOJURE_LOAD_PATH", InitialClojureLoadPath() + Path.PathSeparator + RT.var("arcadia.internal.compiler", "loadpath-extension-string").invoke() + Path.PathSeparator + Path.GetFullPath(BasicPaths.PathCombine(clojureDllFolder, "..", "Libraries"))); }
// code is so durn orthogonal we have to explicitly call this // (necessary for package-sensitive loadpaths in presence of stuff like leiningen) // on the other hand, packages pulls in almost everything else public static void LoadPackages() { Debug.Log("Loading packages..."); Util.require("arcadia.packages"); if (((int)RT.var("arcadia.packages", "dependency-count").invoke()) > 0) { // may want to make this conditional on some config thing RT.var("arcadia.packages", "install-all-deps").invoke(); } }
public static void Init() { Util.require("arcadia.config"); RT.var("arcadia.config", "update!").invoke(); if (_clojureConfigurationObject == null) { _clojureConfigurationObject = ScriptableObject.CreateInstance <ConfigurationObject>(); } Selection.activeObject = _clojureConfigurationObject; }
static AssetPostprocessor() { Util.require("arcadia.internal.compiler"); // kill repl when exiting unity AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => { StopWatchingFiles(); }; if (cljFiles == null) { cljFiles = new HashSet <string>(); foreach (var file in Directory.GetFiles("Assets", "*.clj", SearchOption.AllDirectories)) { cljFiles.Add(file); } } }
void Start() { Util.require("arcadia.core"); Util.require("pjago.repl"); carret_return = false; replSocket = (UdpClient)RT.var("pjago.repl", "start-server").invoke(11211); log = RT.var("arcadia.core", "log"); repl_rfn = RT.var("pjago.repl", "repl-eval-print"); map = (IPersistentMap)RT.var("pjago.repl", "env-map").invoke(); result = Keyword.intern(Symbol.create("result")); env = Keyword.intern(Symbol.create("env")); if (ConsoleFont == null) { ConsoleFont = Font.CreateDynamicFontFromOSFont("Courier New", 16); Debug.LogWarning("Command Console Warning: Please assign a font."); } command_text = ""; cached_command_text = command_text; last_command_text = command_text; Assert.AreNotEqual(ToggleHotkey.ToLower(), "return", "Return is not a valid ToggleHotkey"); SetupWindow(); SetupInput(); SetupLabels(); Shell.RegisterCommands(); if (IssuedError) { Log(TerminalLogType.Error, "Error: {0}", Shell.IssuedErrorMessage); } foreach (var command in Shell.Commands) { Autocomplete.Register(command.Key); } if (replSocket != null) { Log("REPL is listening on " + replSocket.Client.LocalEndPoint); } Debug.Log("Arcadia Started!"); }
public static void LoadLiterals() { // this has to happen here becasue the repl // binds a thread local *data-readers* Util.require("arcadia.literals"); }
public static void StartEditorCallbacks() { Util.require("arcadia.internal.editor-callbacks"); EditorCallbacks.Initialize(); }
static void LoadSocketREPL() { Util.require("arcadia.socket-repl"); RT.var("arcadia.socket-repl", "server-reactive").invoke(); }
public static void StartNudge() { Util.require("arcadia.internal.nudge"); }
static Repl() { Util.require("arcadia.internal.repl"); }
static BuildPipeline() { Util.require("arcadia.internal.editor-interop"); EditorUtility.ClearProgressBar(); }
static Packages() { Util.require("arcadia.internal.packages"); }
static void LoadSocketREPL() { Util.require("arcadia.internal.socket-repl"); Util.require("arcadia.internal.editor-callbacks"); RT.var("arcadia.internal.socket-repl", "set-callback-and-start-server").invoke(RT.var("arcadia.internal.editor-callbacks", "add-callback")); }
public static void LoadConfig() { Util.require("arcadia.internal.config"); RT.var("arcadia.internal.config", "update!").invoke(); }
private static void InitializeLoadPathExtensions() { Util.require("arcadia.internal.leiningen"); }
public static void LoadConfig() { Debug.Log("Loading configuration..."); Util.require("arcadia.config"); RT.var("arcadia.config", "update!").invoke(); }
static Repl() { Util.require("arcadia.repl"); }