From: Thomas Walker Lynch
Date: Mon, 29 Jun 2026 10:45:51 +0000 (+0000)
Subject: updating documents for RT-Style v4
X-Git-Url: https://git.reasoningtechnology.com/RT-Manuscript_locator.js?a=commitdiff_plain;h=7130f7785cdcb749d4c0042bdf35194c65f0a482;p=Harmony
updating documents for RT-Style v4
---
diff --git a/administrator/document/RT-Manuscript_locator.js b/administrator/document/RT-Manuscript_locator.js
new file mode 100644
index 0000000..704752b
--- /dev/null
+++ b/administrator/document/RT-Manuscript_locator.js
@@ -0,0 +1,51 @@
+/*
+ indirect.js
+
+ We have four scenarios
+
+ immediate - used in the RT-Style distribution itself (authored, consumer, staged)
+ direct - used in the RT-Style project itself, but not in the distribution
+ indirect - the version all Harmony projects use
+ URL-only - always pulls style through a URL, a webserver must be present
+
+*/
+
+window.RT = window.RT || {};
+
+// --- Configuration ---
+// Define the consumer project name to allow dynamic local file:// calculation.
+window.RT.project_name = "Harmony";
+
+// Fallback URL when served over a network where the project root is not in the URI.
+window.RT.server_url = "http://localhost:8000/shared/linked-project/RT-Style/Manuscript";
+
+(function() {
+ let style_path = window.RT.server_url;
+
+ if (window.RT.project_name) {
+ const path = window.location.pathname;
+ const project_root_index = path.indexOf('/' + window.RT.project_name + '/');
+
+ if (project_root_index !== -1) {
+ // substring(0, stop) extracts up to the project name, leaving off the trailing slash.
+ // We append the explicit forward slash before navigating into the shared boundary.
+ const absolute_project_root = path.substring(0, project_root_index + window.RT.project_name.length + 1);
+
+ // The symlink 'RT-Style' already drops us inside the 'consumer/' directory,
+ // so we proceed directly to 'Manuscript'.
+ style_path = absolute_project_root + "/shared/linked-project/RT-Style/Manuscript";
+ } else {
+ console.warn("RT-Style: Cannot locate project root '/" + window.RT.project_name + "/' in URI. Falling back to server_url.");
+ }
+ }
+
+ window.RT.dirpr_library = style_path;
+
+ document.write(
+ '
+
-
+
+
+
- If a file represents a module or name space, follow the same naming conventions specified for classes and name spaces in the format_RT-code.html document.
+ If a file represents a module or name space, follow the same naming conventions specified for classes and name spaces in the format_RT·code.html document.
- Other program files follow the same naming conventions specified in the format_RT-code.html document for an identifier of the
+ Other program files follow the same naming conventions specified in the format_RT·code.html document for an identifier of the
contained or related language.
@@ -58,9 +64,9 @@
- Who uses each file with this property. Home directories are named like this.
- - The role of the people using the file. The developer and tester directories were named in this manner.
+ - The role of the people using the file. The developer and tester directories were named in this manner.
- What program are the files for.
- - The generic category of program said files are for. We prefer the names authored and made. authored files are those written by humans or AI, while made files are products of tools.
+ - The generic category of program said files are for. We prefer the names authored and made. authored files are those written by humans or AI, while made files are products of tools.
Property indicators on files
@@ -68,9 +74,9 @@
We add a second property to a file using dot extensions to the file's name. We can extend the dot suffix model by using multiple dot suffixes. File name extensions are used to signal to the build tools how the file is to be processed:
- - .cli.c : Compiler fodder made into a stand-alone executable.
- - .lib.c : Library code source, compiled as an object file and added to the project archive.
- - .mod.c : Kernel module sources.
+ - .cli.c : Compiler fodder made into a stand-alone executable.
+ - .lib.c : Library code source, compiled as an object file and added to the project archive.
+ - .mod.c : Kernel module sources.
Exercises
@@ -79,11 +85,11 @@
Rename the following poorly named files to strictly adhere to the RT naming conventions. Pay close attention to the language culture, the capitalization of acronyms, and the rule for spelling out abbreviations in outer scope identifiers.
- - A C-culture makefile that builds a target library and command line interface: target-lib-cli.mk
- - A Lisp-culture source file for an HTML parsing module: html_parser_mod.el
- - A C language source file that initializes an HTTP server: init-http-srv.c
+ - A C-culture makefile that builds a target library and command line interface: target-lib-cli.mk
+ - A Lisp-culture source file for an HTML parsing module: html_parser_mod.el
+ - A C language source file that initializes an HTTP server: init-http-srv.c
-
+