eyeling 1.22.11 → 1.22.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/HANDBOOK.md +115 -3
  2. package/README.md +8 -0
  3. package/package.json +1 -1
package/HANDBOOK.md CHANGED
@@ -33,6 +33,7 @@
33
33
  - [Appendix F — The ARC approach: Answer • Reason Why • Check](#app-f)
34
34
  - [Appendix G — Eyeling and the W3C CG Notation3 Semantics](#app-g)
35
35
  - [Appendix H — Applied Constructor-Theory and the N3 ARC examples](#app-h)
36
+ - [Appendix I — The Eyeling Playground](#app-i)
36
37
 
37
38
  ---
38
39
 
@@ -3421,8 +3422,7 @@ The better ACT examples are heavily commented. The comments should say not just
3421
3422
 
3422
3423
  #### H.5.6 Editorial conventions for ACT files
3423
3424
 
3424
- For this repository, the ACT examples should stay visibly **Eyeling-native**.
3425
- They should read as compact N3 task-logic models rather than as a second language layer.
3425
+ For this repository, the ACT examples should stay visibly **Eyeling-native**. They should read as compact N3 task-logic models rather than as a second language layer.
3426
3426
 
3427
3427
  A good default order is:
3428
3428
 
@@ -3434,7 +3434,6 @@ A good default order is:
3434
3434
 
3435
3435
  The ARC report should make the decisive contrast explicit: what task is possible, what task is impossible, and which missing ingredient or witness explains the contrast.
3436
3436
 
3437
-
3438
3437
  - interoperability
3439
3438
  - locality
3440
3439
  - no-cloning
@@ -3521,3 +3520,116 @@ That is valuable even for readers who do not plan to work on constructor theory
3521
3520
  > some scientific explanations are best understood not as “what happened once,” but as “what could be made to happen, what could not, and what structural features make the difference.”
3522
3521
 
3523
3522
  That is exactly the sort of explanation that N3, and Eyeling in particular, can make unusually clear.
3523
+
3524
+ <a id="app-i"></a>
3525
+
3526
+ ## Appendix I — The Eyeling Playground
3527
+
3528
+ The **Eyeling Playground** is the browser-based front end for experimenting with Eyeling without a local install or command-line workflow. It is meant for teaching, quick debugging, live demos, and shareable reasoning examples. Rather than treating reasoning as an offline batch process, the playground makes it interactive: users can edit N3 directly in the browser, load remote N3 from a URL, run reasoning, inspect streamed output, and share the current state through a link.
3529
+
3530
+ This appendix explains what the playground is for, how it is structured, and why it matters in practice.
3531
+
3532
+ ### I.1 Why the playground exists
3533
+
3534
+ Notation3 is expressive, compact, and unusually good at mixing RDF-style data with rules, but the first contact experience can still be awkward for many users. Command-line tools are powerful, but they are not always the best entry point for small experiments, teaching sessions, or public demonstrations.
3535
+
3536
+ The playground exists to lower that initial friction. It lets a user:
3537
+
3538
+ - open a page,
3539
+ - edit or paste a small N3 program,
3540
+ - run reasoning immediately,
3541
+ - inspect output and errors in place,
3542
+ - and share the exact setup with a URL.
3543
+
3544
+ That makes the playground useful not only for newcomers, but also for experienced users who want a fast feedback loop for small examples.
3545
+
3546
+ ### I.2 Core interaction model
3547
+
3548
+ At the center of the playground is an **editable N3 program**. This is the main authoring area for facts, rules, and output-oriented directives.
3549
+
3550
+ Alongside that editor is a **Load from URL** field. A remote N3 document can be fetched directly into the playground, which makes it easy to reuse examples stored in a repository or a raw hosted file.
3551
+
3552
+ A key recent addition is **background knowledge mode**. When enabled, the N3 loaded from a URL is not written into the editor. Instead, it is stored separately as background knowledge and merged with the editable program only when reasoning runs. This supports a very common workflow:
3553
+
3554
+ - keep a stable imported dataset or rule base,
3555
+ - keep the local editor small and focused,
3556
+ - iterate on local rules, queries, or reporting logic without repeatedly copying the larger imported source.
3557
+
3558
+ That separation is helpful both pedagogically and practically. It mirrors real reasoning work, where a user often reasons _over_ a fixed body of data rather than constantly rewriting it.
3559
+
3560
+ ### I.3 Execution behavior
3561
+
3562
+ The playground is designed to feel responsive even when reasoning is not trivial. To do that, it uses a browser execution model that can run inference in a worker rather than blocking the main UI thread. Output is then surfaced back into the page.
3563
+
3564
+ The user-facing controls support three main actions:
3565
+
3566
+ - **Run reasoning**,
3567
+ - **Pause/Resume**,
3568
+ - **Stop**.
3569
+
3570
+ This matters because the playground is not just a text box plus a submit button. It treats reasoning as a process that can be observed while it happens.
3571
+
3572
+ The output behavior also adapts to the kind of N3 program being run. In some cases the natural result is a streamed list of derived triples. In others, such as programs using output-oriented constructs like `log:outputString`, a rendered text result is more appropriate. The playground supports both styles.
3573
+
3574
+ ### I.4 Error handling and explainability
3575
+
3576
+ For an interactive reasoning environment, error behavior matters almost as much as successful output. The playground therefore gives particular attention to syntax and runtime feedback.
3577
+
3578
+ When an N3 syntax error occurs, the output pane shows the error with line and column information, and the editor highlights the offending line. This shortens the distance between the parser’s complaint and the place where the user needs to fix the program.
3579
+
3580
+ The playground also exposes two configuration toggles that are especially useful for explanation and browser safety:
3581
+
3582
+ - **proof comments**, which make reasoning output more explanatory,
3583
+ - **HTTPS dereferencing enforcement**, which helps avoid mixed-content problems when dereferencing from the browser.
3584
+
3585
+ Together these choices make the playground better suited to live explanation, teaching, and debugging than a minimal browser wrapper would be.
3586
+
3587
+ ### I.5 Shareable state through URLs
3588
+
3589
+ One of the most practical features of the playground is that its state can be encoded in the page URL.
3590
+
3591
+ The canonical query parameters are:
3592
+
3593
+ - `edit` — sets the editor content,
3594
+ - `url` — fills the URL field,
3595
+ - `loadbg` — determines whether the URL should be loaded as background knowledge,
3596
+ - `proofcomments` — initializes the proof-comments checkbox,
3597
+ - `httpsderef` — initializes the HTTPS dereferencing checkbox.
3598
+
3599
+ This makes the playground particularly strong for tutorials and demos. A link can specify not just a program, but a whole configuration: an imported resource, whether it belongs in background knowledge, a small editable overlay, and the relevant runtime toggles.
3600
+
3601
+ Older hash-based links are still accepted as a fallback, but new state updates are written using query parameters because they scale better as the UI grows beyond a single editor field.
3602
+
3603
+ ### I.6 What the playground is good for
3604
+
3605
+ The playground is especially valuable in four settings.
3606
+
3607
+ #### I.6.1 Teaching
3608
+
3609
+ Students can begin with a small example and see what changes immediately when they edit a fact or rule. This is a much more direct way to learn N3 than starting from installation instructions.
3610
+
3611
+ #### I.6.2 Live demos
3612
+
3613
+ A presenter can preload a scenario, show a compact local rule set, run inference, and then share a reproducible link afterward. Background knowledge mode is particularly helpful here because it keeps the visible editor small while still grounding the run in a richer imported source.
3614
+
3615
+ #### I.6.3 Debugging small programs
3616
+
3617
+ For short reasoning tasks, the playground can be a faster debugging surface than a command-line loop. It is well suited to checking syntax, validating a rule pattern, or inspecting a small proof-oriented run.
3618
+
3619
+ #### I.6.4 Sharing examples
3620
+
3621
+ A single link can capture enough context for another person to reproduce an example quickly. This is valuable in issue reports, discussions, teaching material, and public-facing demonstrations.
3622
+
3623
+ ### I.7 Limits of the playground
3624
+
3625
+ The playground is intentionally lightweight, and it should be understood in that role.
3626
+
3627
+ It is not meant to replace the command line for large-scale workloads, benchmarking, or repository-scale automation. Browser memory and execution limits still matter. Likewise, loading remote resources depends on ordinary web constraints such as network access and cross-origin availability.
3628
+
3629
+ In short: the playground is best thought of as a compact interactive front end for exploration, communication, and small-to-medium experiments.
3630
+
3631
+ ### I.8 Why it matters
3632
+
3633
+ The Eyeling Playground shows that N3 reasoning can be made substantially more approachable without flattening the underlying logic into a toy interface. A relatively small set of features — an editor, a URL loader, background knowledge mode, responsive execution, proof toggles, and shareable query parameters — is enough to support serious educational and exploratory work.
3634
+
3635
+ That is the main value of the playground. It gives Eyeling a public-facing, browser-native environment where reasoning is not hidden behind setup overhead, and where examples can move easily between author, teacher, student, and reviewer.
package/README.md CHANGED
@@ -17,3 +17,11 @@ echo '@prefix : <http://example.org/> .
17
17
  - **Handbook:** [eyereasoner.github.io/eyeling/HANDBOOK](https://eyereasoner.github.io/eyeling/HANDBOOK)
18
18
  - **Playground:** [eyereasoner.github.io/eyeling/demo](https://eyereasoner.github.io/eyeling/demo)
19
19
  - **Conformance report:** [codeberg.org/phochste/notation3tests/.../report.md](https://codeberg.org/phochste/notation3tests/src/branch/main/reports/report.md)
20
+
21
+ ## Playground URL parameters
22
+
23
+ - `edit` sets the editor content.
24
+ - `url` fills the URL field.
25
+ - `url` auto-loads when `loadbg=true`, or when no explicit `edit` was provided.
26
+ - `proofcomments` and `httpsderef` initialize the two checkboxes.
27
+ - Existing hash-based links are still read as a fallback, but new state updates write query parameters.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eyeling",
3
- "version": "1.22.11",
3
+ "version": "1.22.12",
4
4
  "description": "A minimal Notation3 (N3) reasoner in JavaScript.",
5
5
  "main": "./index.js",
6
6
  "keywords": [