Inspect locally
Do not run the notebook before reviewing it. If you already hold the files, these two calls verify the archive and open KaimonSlate's inactive view, which starts no worker and evaluates no cell. The full download-to-run workflow is below.
using DocumenterSlate
verify_slate_bundle("custom_controls.tar.gz")
using KaimonSlate
KaimonSlate.serve_notebook("custom_controls.jl"; inactive = true)
This notebook is arbitrary code. Instantiating its environment may run package build scripts, and live opening may execute cells. There is deliberately no one-click launch: each step below is an act you perform after reading the previous one.
1. Download
One call downloads the archive, checks every artifact against SHA256SUMS, cross-checks PROVENANCE.toml, and extracts the result. It evaluates no cell and instantiates no environment.
Copy the Download notebook link above — it is downloads/custom_controls/custom_controls.tar.gz on this site — and fetch it:
using DocumenterSlate
bundle = fetch_slate_bundle("https://<this site>/downloads/custom_controls/custom_controls.tar.gz")2. Verify
Step 1 raises rather than returning an unverified bundle, so reaching this step means the bytes are intact. If you took the download directory instead, check it with the checksums it carries:
sha256sum -c SHA256SUMSWhat checksums cannot establish, either way, is origin:
bundle.provenance["repository"]
bundle.provenance["git_sha"]
bundle.provenance["ci_produced"]Compare repository and git_sha against the repository you actually trust, and treat ci_produced = false as a locally built bundle. Provenance is build metadata, not a signature — anyone can serve a well-formed bundle.
3. Read
A KaimonSlate notebook is plain Julia source, and reading custom_controls.jl is the only step that tells you what the code would actually do. KaimonSlate can also serve a static view that starts no worker and evaluates no cell:
using KaimonSlate
KaimonSlate.serve_notebook(bundle.source; inactive = true)4. Run deliberately
Only after steps 2 and 3. Instantiating the environment may run package build scripts, and opening the notebook in live mode may execute anything. The three routes below are ordered by how much of your host they expose.
Isolated container (recommended) — keeps package installation and notebook inspection off the host. The image opens the notebook in inactive mode; it evaluates no cell:
podman build -t custom_controls-inspect . && podman run --rm -it -p 8765:8765 custom_controls-inspectAlternatively, open devcontainer.json in a compatible editor.
Pinned host environment — uses the published project and manifest, but runs package build scripts and notebook code with your host account's permissions:
julia --project=. -e 'using Pkg; Pkg.instantiate()'
julia --project=. -e 'using KaimonSlate; KaimonSlate.serve_notebook("custom_controls.jl")'Native application — installing and opening the application executes code with your host account's permissions:
julia -e 'using Pkg; Pkg.Registry.add(Pkg.Registry.RegistrySpec(url="https://github.com/kahliburke/SlateRegistry")); Pkg.Apps.add("KaimonSlate")'
slate --own custom_controls.jlA container reduces access to the host; it does not make untrusted code harmless. Review the mount and network permissions too.
Download source · Checksums · Provenance · Local instructions
| Artifact | SHA-256 |
|---|---|
Dockerfile | d8a01104d6bb3c487b542fc6e00d94c1ba8ccd0eddce53b19383c89ef8768a13 |
Manifest.toml | f2810a9c1f516c881f51e12fab61cc4585349cfe850622943394aa8a08efc065 |
PROVENANCE.toml | 71d54994c729283efb663f5698575c6e79c551dab9878405133607d4233942dc |
Project.toml | 47810962ec0e39b7dd20de00dcef692ba653519f69bb872450bf0eaa67688d07 |
README.md | 3f39957bf89da19fbdb128dfaa22bf7665e804a403914e8403267d1070965bf7 |
custom_controls.jl | 402f8276b9fa2fee6e29f937c757a39d0c16679efd06e3c6e3c7637c4d6ead61 |
custom_controls.tar.gz | f1fed090bb4844076b8eb36cf12832cc440aafa6b073df8014aa778ffbf27568 |
devcontainer.json | 8ce45784a0d2bfa78d7078ae35df6c0431a4e369259eb77939bbfcce1a1cbcf2 |
Custom Controls Playground
Experimenting with Slate widget plugins + the math keyboard
A scratchpad for the slateRegisterWidget extension point: the MathLive math field, and whether GIAC commands can run inside it.
using Giac
using Giac.Commands: expand, factor, simplify, diff, integrate, limit, solve, partfrac
using GiacSlate
using Markdown
@giac_var x
@giac_var y
@giac_var s
@giac_var a
"ready — Giac, GiacSlate, commands loaded; variables x, y, s, a"ready — Giac, GiacSlate, commands loaded; variables x, y, s, aGiac math variables inside markdown
A math variable defined in a code cell can be dropped into prose and typeset — gmath(x) renders it inline, gdisplay(x) as a display block. Put the call inside Slate's double-curly-brace interpolation; it runs through the giac→LaTeX conversion and re-renders when the variable changes. The sentence below is a live example.
Hs = giac"1/(s^2 + 2*s + 5)" # a transfer function
yt = giac"((-(((1)/(10)*sin((2*t))*(exp(1))^((-(t))))))+(-(((1)/(5)*cos((2*t))*(exp(1))^((-(t))))))+(1)/(5))" # its step response
(string(Hs), string(yt))("1/(s^2+2*s+5)", "-1/10*sin(2*t)*exp(-t)-1/5*cos(2*t)*exp(-t)+1/5")The system has transfer function <span class="slate-interpolation">$\frac1{s^{2}+2 s+5}$</span>, a second-order response. Its unit-step response, computed by Giac's inverse Laplace transform, is
<span class="slate-interpolation">
\[-\frac{1}{10} \sin \left(2 t\right) \mathrm{e}^{-t}-\frac{1}{5} \cos \left(2 t\right) \mathrm{e}^{-t}+\frac{1}{5}\]
</span>
which settles to <span class="slate-interpolation">$\frac{1}{5}$</span> as $t \to \infty$.
🎯 The real thing — giac"…" live in a code cell
No sandbox. The boot cell below registers an editor extension (via the new slateRegisterEditorExtension hook) + two giac↔LaTeX bridge handlers. After a reload, any giac"…" literal in a real code cell renders as a live math field — and the cell still runs natively (@giac_str). Ctrl/Cmd-M inserts one.
@bind num Slider(1:5)Giac.det(giac"matrix([[x,y,4],[5,6,x],[4,6,1]])")\[-6 x^{2}+4 x y+6 x-5 y+24\]
# After reload, the giac"…" below renders as a live math field — and this cell runs.
H = giac"(x+19)"
ex = expand(1 / H^num)
ex2 = expand((x+num)^3)
ex3=giac"(5+111)" + factor(giac"((x)^(4)+-1)") - Giac.det(giac"matrix([[x,y,4],[5,6,1],[4,6,1]])")
expand(giac"((x+6))^(5)")
@show ex3ex3 = 116+(x-1)*(x+1)*(x^2+1)+y-24
\[116+\left(x-1\right) \left(x+1\right) \left(x^{2}+1\right)+y-24\]
Here is some inline math $\frac1{x+19}$ and some display math
\[\frac1{x+19}\]
and ex2:
\[x^{3}+3 x^{2}+3 x+1\]
ex3:
- Bullet
- Math $116+\left(x-1\right) \left(x+1\right) \left(x^{2}+1\right)+y-24$