Skip to content

Commit d69f8fb

Browse files
committed
System Touch
1 parent 6b37a8d commit d69f8fb

2 files changed

Lines changed: 64 additions & 3 deletions

File tree

source/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public Main()
5454

5555
CommonRails.printStartRecipeSpinner();
5656

57-
System.out.println("[ Java National Finance Engine v.28.1.1 Software Processes Starting ]");
57+
System.out.println("\033[38;5;74m[ Java National Finance Engine v.28.1.1 Software Processes Starting ]\033[0m");
5858

5959
System.out.println(". Cryptography/Cryptology AES 2.0 National Cryptolograph Enabled DSS (DeepSonaGraphoSophons) 5.0 .");
6060

source/commons/CommonRails.java

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,62 @@ private static String resolveOidColor(final String SIMPLECLASSNAME)
133133
return OID_DEFAULT;
134134
}
135135

136+
/**
137+
* Maps a class name to a grayscale ANSI 256 shade based on its proximity to US law.
138+
* ANSI 256 grayscale ramp: 232 (near-black) → 255 (near-white).
139+
*
140+
* Theory of term:
141+
* - Classes that embody or enforce US law (security, national ID, auth, exceptions,
142+
* encryption, admin, signatory) are most lawful → darkest (toward black, 232).
143+
* - Classes that are pure infrastructure / utility with no legal character
144+
* (messaging, timing, sim, telnet I/O) → lightest (toward white, 255).
145+
* - All others fall in between proportionally.
146+
*
147+
* Scale (ANSI grayscale code):
148+
* 232 most lawful — security, national authority, authentication
149+
* 236 — encryption, admin, exceptions
150+
* 240 — database, finance, bitcoin
151+
* 245 — connections, server infrastructure
152+
* 250 — commons, output, printing
153+
* 255 least lawful — messaging, timing, sim, telnet I/O
154+
*/
155+
private static String resolveLawfulness(final String SIMPLECLASSNAME)
156+
{
157+
if (SIMPLECLASSNAME == null || !USE_COLORED_OUTPUT) return "";
158+
String low = SIMPLECLASSNAME.toLowerCase();
159+
160+
// Most lawful: direct US legal authority, security, national ID, auth, admin
161+
if (low.contains("security") || low.contains("national") || low.contains("auth")
162+
|| low.contains("admin") || low.contains("signatory") || low.contains("cia")
163+
|| low.contains("fbi") || low.contains("port") || low.contains("bodi"))
164+
return "\033[38;5;232m";
165+
166+
// Very lawful: encryption, exceptions, persistence
167+
if (low.contains("encrypt") || low.contains("exception") || low.contains("persistence")
168+
|| low.contains("listener") || low.contains("handler"))
169+
return "\033[38;5;236m";
170+
171+
// Moderately lawful: finance, database, bitcoin transactions
172+
if (low.contains("finance") || low.contains("store") || low.contains("datasource")
173+
|| low.contains("bitcoin") || low.contains("trader") || low.contains("wallet")
174+
|| low.contains("ascii") || low.contains("signature") || low.contains("module"))
175+
return "\033[38;5;240m";
176+
177+
// Infrastructure: connections, server, WebExpress
178+
if (low.contains("connection") || low.contains("server") || low.contains("express")
179+
|| low.contains("nitro") || low.contains("poller") || low.contains("installer")
180+
|| low.contains("driver") || low.contains("status") || low.contains("shutdown"))
181+
return "\033[38;5;245m";
182+
183+
// Commons / utilities
184+
if (low.contains("common") || low.contains("rail") || low.contains("iranian")
185+
|| low.contains("wedding") || low.contains("arith") || low.contains("english"))
186+
return "\033[38;5;250m";
187+
188+
// Least lawful: messaging, timing, simulation, raw I/O
189+
return "\033[38;5;255m";
190+
}
191+
136192
public static <T> Integer size(final ArrayList<T> LIST)
137193
{
138194
return LIST.size();
@@ -199,7 +255,9 @@ public static void printSystemComponent(final Object OBJECT, final Integer HASHC
199255
String classname = "[" + inner + " ".repeat(innerPad) + "]";
200256

201257
// classname is already the fixed-width bracketed field; use as-is
202-
String classnamePadded = classname;
258+
String classnamePadded = USE_COLORED_OUTPUT
259+
? resolveLawfulness(OBJECT.getClass().getSimpleName()) + classname + ANSI_RESET
260+
: classname;
203261

204262
String compliant_hashcode = String.format("%010d", HASHCODE);
205263

@@ -704,6 +762,9 @@ public static void printSystemComponent(final Object OBJECT, final Integer HASHC
704762
String inner = "Current: @" + OBJECT.getClass().getSimpleName();
705763
int innerPad = Math.max(0, CLASSNAME_TOTAL_WIDTH - inner.length());
706764
String classname = "[" + inner + " ".repeat(innerPad) + "]";
765+
String classnamePadded = USE_COLORED_OUTPUT
766+
? resolveLawfulness(OBJECT.getClass().getSimpleName()) + classname + ANSI_RESET
767+
: classname;
707768

708769
String compliant_hashcode = String.format("%010d", HASHCODE);
709770
String colored_hashcode = USE_COLORED_OUTPUT
@@ -741,7 +802,7 @@ public static void printSystemComponent(final Object OBJECT, final Integer HASHC
741802
catch (Throwable ignored) {}
742803
}
743804

744-
String reference = object_id + " " + date + " " + classname + " " + lineFixed;
805+
String reference = object_id + " " + date + " " + classnamePadded + " " + lineFixed;
745806

746807
try { NationalDriver.record(reference); } catch (Throwable ignored) {}
747808

0 commit comments

Comments
 (0)