Package idea
This package contains 3 source unit(s) defining 3 class(es) / struct(s). Each unit below lists its fields (the values it stores) and methods (the actions it performs), with a plain explanation of each.
IdeaCanvas #sleela 2.5 (lib/idea/IdeaCanvas.sleela)
IdeaCanvas class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
PRESENT_HZ | static final double PRESENT_HZ = 60.0 | ---- Canvas Hz (the answer: 60 present / 120 simulate) --------------- |
SIM_HZ | static final double SIM_HZ = 120.0 | No description in source. |
W | static final int W = 720 | ---- geometry -------------------------------------------------------- |
H | static final int H = 480 | No description in source. |
CHAT_H | static final int CHAT_H = 150 | height of the bottom chat pane |
PAD | static final double PAD = 16.0 | No description in source. |
RADIUS | static final double RADIUS = 18.0 | careful curvature on every card |
simSteps | int simSteps = 0 | ---- shared State (the State IS the System) -------------------------- 120 Hz steps taken (forward Time) |
seconds | double seconds = 0.0 | simulated seconds of the Series elapsed |
totalSecs | int totalSecs = 82800 | 23h, as the Author payload encodes |
decisions | int decisions = 0 | No description in source. |
maxDec | int maxDec = 6 | No description in source. |
presented | String presented = "LOADING" | No description in source. |
clock | SLFrameClock clock | frame clock: paces the 120 Hz fixed-step simulation across 60 Hz frames |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
buildTheme | void buildTheme() | No description in source. |
simStep | void simStep() | ---- one 120 Hz simulation step (forward, linear; Time is ultimate) -- |
drawFrame | void drawFrame(SLDrawContext dc) | ---- the per-frame draw routine (presented at 60 Hz) ----------------- dc is bound by the VM to this Canvas View's double-buffered surface each frame (the proven draw-handler signature: a single SLDrawContext). |
drawChatPane | void drawChatPane(SLDrawContext dc, int x, int y, int w, int h) | A rounded chat card: soft fill, a hairline accent border for curvature definition, a message area, and a rounded input affordance. |
main | void main() | ---- entry point ----------------------------------------------------- |
IdeaSystem #sleela 2.5 (lib/idea/IdeaSystem.sleela)
IdeaSystem class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
sourceUrl | String sourceUrl = "https://github.com/mearvk/Senior.Senate.Attorney.E44Hrs/wiki/US-Title-Brands" | ---- shared State (thread-safe globals) ---------------------------- The System is prevaricated upon its State; these fields ARE the System. |
maxHours | int maxHours = 30 | design goal: <= 30 hours of content |
maxDecisions | int maxDecisions = 9 | design goal: <= 9 seemly, important decisions |
elapsed | int elapsed = 0 | forward Time, in simulated hours |
decisions | int decisions = 0 | seemly decisions reached so far |
state | String state = "LOADING" | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
present | void present() | ---- organization: present what is present/capable in the State ---- |
chooseResource | int chooseResource() | ---- 2. choose the part of the internet to receive the signal from -- The signal is an Author-controlled hex code from github.com. best-of* weighs data/decisions/costs/versions/architecture and picks the route. |
declareModel | void declareModel() | ---- 3. declare the AI-driven solution Series ---------------------- The native AI VM bridge (ai* built-ins) is a separate API layer and is NOT part of the verified core semantic set in this compiler build, so the runnable models the AI objectives with core-verified constructs: conducted-method catalog lookups and the Constitution limits. The native /idea C/C++ core carries the actual AI objective structures. |
advance | void advance() | ---- 4. let Time progress; present the State at each hour ----------- Time is ultimate and company to the Series. It may SEEM to loop/retry but it is consistent in Time -- a forward, linear Series. |
main | void main() | No description in source. |
SLIdeaCanvas #sleela 2.5 (lib/idea/SLIdeaCanvas.sleela)
SLIdeaCanvas class
Defines SLIdeaCanvas — the SLeeLa binding of the Idea System(TM)
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OK | static final int OK = 0 | ---- status ordinals (mirror idea_canvas_status) ---- |
INVALID | static final int INVALID = -1 | No description in source. |
OOM | static final int OOM = -2 | No description in source. |
NO_RENDERER | static final int NO_RENDERER = -3 | No description in source. |
GL_ERROR | static final int GL_ERROR = -4 | No description in source. |
PRESENT_HZ | static final double PRESENT_HZ = 60.0 | ---- Hz contract (mirror idea_canvas.h) ---- |
SIM_HZ | static final double SIM_HZ = 120.0 | No description in source. |
canvas | int canvas | VM-local canvas handle (-1 = none) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
create | boolean create(int cols, int rows) | Create a cols x rows grid of vertices (allocates the contiguous block on the native side). Does NOT open a window. Returns true on success. |
handle | int handle() | No description in source. |
valid | boolean valid() | No description in source. |
destroy | void destroy() | No description in source. |
cols | int cols() | No description in source. |
rows | int rows() | No description in source. |
count | int count() | No description in source. |
setParams | void setParams(double decay, double flowGain, double hueBase, double coupling) | Set the water-like flow parameters: multiplicative decay per second, flow gain for the colour-predictive hue, base hue (205 ~ water), and the per-step neighbour diffusion coefficient (small, e.g. 0.06). |
excite | int excite(int col, int row, double amount) | Inject energy at a grid cell (where a signal "importance" lands) so a ripple propagates on subsequent steps. |
step | int step(double dt) | Advance the simulation by ONE fixed timestep (dt seconds, normally 1/SIM_HZ). Parallelised across the native CPU; returns a status ordinal. |
advance | int advance(double frameDtSeconds) | Drain a fixed-step accumulator: pass the real per-frame delta and the number of due 120 Hz steps are run on the native CPU. Returns the step count. The accumulator is held on the native side for this canvas. |
timestep | double timestep() | The fixed simulation timestep in seconds (1 / SIM_HZ). |
intensityAt | double intensityAt(int col, int row) | Read one vertex's intensity (0..1) — e.g. to drive a SLeeLa-side readout without owning the native block. |
hasRenderer | boolean hasRenderer() | True if the module was built with the OpenGL render layer. |
openWindow | int openWindow(int width, int height, String title) | Open a window + GL renderer sized width x height. Returns a status ordinal; NO_RENDERER if the module was built without GL (then run headless via step). |
shouldClose | boolean shouldClose() | True once the window has been asked to close. |
present | int present() | Present one frame (copy the block to the mapped buffer, draw, swap, poll). Call at the present rate (60 Hz). NO_RENDERER when the GL layer is absent. |
run | int run(int width, int height, String title) | The full native loop: open a window, then advance at 120 Hz and present at ~60 Hz until the window closes. A program that just wants "run the canvas on the native CPU/GPU" calls this. NO_RENDERER if GL is absent. |