Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@
<div class="dropdown-item" data-lang="kap">
<img src="assets/kap.png" alt="Kap">
<span class="lang-name">Kap</span>
<span class="lang-version">2026-06-16</span>
<span class="lang-version">2026-06-17</span>
</div>
<div class="dropdown-item" data-lang="tinyapl">
<img src="assets/tinyapl.svg" alt="TinyAPL">
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-og-languages.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const LANGS = [
{ name: 'Uiua', version: '0.19.0-dev.4', file: 'uiua.png' },
// Row 2
{ name: 'J', version: 'J9.8.0-beta3', file: 'j_logo.svg' },
{ name: 'Kap', version: '2026-06-16', file: 'kap.png' },
{ name: 'Kap', version: '2026-06-17', file: 'kap.png' },
{ name: 'TinyAPL', version: '0.13-beta', file: 'tinyapl.svg' },
];

Expand Down
2 changes: 1 addition & 1 deletion scripts/known-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"cbqn": "v0.11.0",
"uiua": "0.19.0-dev.4",
"j": "9.8.0-beta3",
"kap": "20260616-1",
"kap": "20260617-1",
"tinyapl": "0.12.0"
}
2 changes: 1 addition & 1 deletion wasm/kap/standalonejs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wasm/kap/standard-lib/graph.kap
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ declare(:export jsonGraphToMatrix)

jsonGraphToRenderLinks ⇐ {
edges ← {⍵["source" "target" "relation"]}¨ ⍵.edges
names ← ({⊂(⊃⍵[0]) ⍵[1].label}⍤1) map:entries .nodes
names ← ({⊂(⊃⍵[0]) ⍵[1].label}⍤1) map:entries .nodes
names edges
}

Expand Down
81 changes: 44 additions & 37 deletions wasm/kap/standard-lib/output3.kap
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ renderArray ⇐ {
} else {
(header f d) ← if (~hasColLabels and isChars) {
trimmed0 ← (1 trimHoriz) trimVert ⍵
fRes0 ← (⊂⍤2) ((¯1,¯2↑1,⍴trimmed0) ⍴ trimmed0) , @│
fRes0 ← (⊂⍤2) (¯1,¯2↑1,⍴trimmed0) ⍴ trimmed0
⍬ fRes0 (⍴trimmed0)
} else {
trimmed1 ← (2 trimHoriz) trimVert ⍵
Expand All @@ -146,49 +146,56 @@ renderArray ⇐ {
(headerRes aligned) ← (1↑)«,⍥⊂»(1 0↓) alignCells colLabels ⍪ ¯1 (↑⌽d) ⍴ v0

⍝ Concatenate the cells, add the right border and drop the leading space
fRes1 ← (⍪/,/(¯1,(¯2↑1,d)) ⍴ aligned) (0 1↓,)¨ @│
fRes1 ← (0 1↓)¨ (⍪/,/(¯1,(¯2↑1,d)) ⍴ aligned) (0 1↓,)¨ @│

headerRes fRes1 (⍴trimmed1)
}

w ← ↑↓⍴↑f

top ← if (hasColLabels) {
headerTop ← (¯1↓ ↑ ,/ {((¯1+↑↓⍴⍵) ⍴ @─) , @┬}¨ header) , @┐
headerCentre ← ↑ ,/ {(0 1 ↓ ⍵) , @│}¨ header
headerBottom ← ("→" , 1↓ ¯1↓ ↑ ,/ {((¯1+↑↓⍴⍵) ⍴ @─) , @┴}¨ header) , @┤
q ← headerTop ⍪ headerCentre ⍪ headerBottom
⍝ Check if we can use compressed form
if (sysparam 'kap:altVectorOutput and 1=≢f and 1=≢↑f and ~hasColLabels) {
< "⟨",(>↑f),"⟩"
} else {
< "→" , ((w-2) ⍴ @─) ,"┐"
}
bottom ← < ((w-1) ⍴ @─) ,"┘"
separator ← < "→" , ((w-2) ⍴ @─) , "┤"
res ← {top⍪⍵⍪bottom} ↑ ⍪⌿⍪ ¯1↓ , f ,[0.5] ⊂separator

⍝ To draw the layers to the left, first determine the number of layers and their sizes.
ds ← ¯2↓d

⍝ Compute the number of layer indicators for each layer
layerPos ← ⌽1,×\ds

makeVerticalLayer ⇐ {
⍝ Split content in groups of size ⍵, and compute height of each group
sizes ← +/≢¨ ¯1 ⍵ ⍴ f
⍝ Create a sequence of vertical bars according to the sizes,
⍝ and end with a split symbol. Finally remove the last instance.
coverage ← ⍵-1
vertArrow ← ⍺ ⌷ "│↓"
centre ← ¯1↓,/ {( vertArrow , (⍵+coverage-1) ⍴ @│) , @├}¨ sizes
⍪ ,/ @┌ , centre , @└
}

verticalAxisIndicator ← ((0⌈¯1+≢layerPos) ⍴ 0) , (1 ≠ ≢d)
cornerContent ← if (hasColLabels) {
((¯1+≢top) (¯1+≢layerPos) ⍴ @\s) , ⍪ @┌,(¯2+≢top) ⍴ @│
} else {
0 (≢layerPos) ⍴ @\s
f ← (@│,⍨)¨ f
w ← ↑↓⍴↑f

top ← if (hasColLabels) {
headerTop ← (¯1↓ ↑ ,/ {((¯1+↑↓⍴⍵) ⍴ @─) , @┬}¨ header) , @┐
headerCentre ← ↑ ,/ {(0 1 ↓ ⍵) , @│}¨ header
headerBottom ← ("→" , 1↓ ¯1↓ ↑ ,/ {((¯1+↑↓⍴⍵) ⍴ @─) , @┴}¨ header) , @┤
q ← headerTop ⍪ headerCentre ⍪ headerBottom
} else {
< "→" , ((w-2) ⍴ @─) ,"┐"
}
bottom ← < ((w-1) ⍴ @─) ,"┘"
separator ← < "→" , ((w-2) ⍴ @─) , "┤"
res ← {top⍪⍵⍪bottom} ↑ ⍪⌿⍪ ¯1↓ , f ,[0.5] ⊂separator

⍝ To draw the layers to the left, first determine the number of layers and their sizes.
ds ← ¯2↓d

⍝ Compute the number of layer indicators for each layer
layerPos ← ⌽1,×\ds

makeVerticalLayer ⇐ {
⍝ Split content in groups of size ⍵, and compute height of each group
sizes ← +/≢¨ ¯1 ⍵ ⍴ f
⍝ Create a sequence of vertical bars according to the sizes,
⍝ and end with a split symbol. Finally remove the last instance.
coverage ← ⍵-1
vertArrow ← ⍺ ⌷ "│↓"
centre ← ¯1↓,/ {( vertArrow , (⍵+coverage-1) ⍴ @│) , @├}¨ sizes
⍪ ,/ @┌ , centre , @└
}

verticalAxisIndicator ← ((0⌈¯1+≢layerPos) ⍴ 0) , (1 ≠ ≢d)
cornerContent ← if (hasColLabels) {
((¯1+≢top) (¯1+≢layerPos) ⍴ @\s) , ⍪ @┌,(¯2+≢top) ⍴ @│
} else {
0 (≢layerPos) ⍴ @\s
}
(cornerContent ⍪ {<<hasColLabels⌷"┌├"}⍢(1 ¯1↑) (,/ verticalAxisIndicator makeVerticalLayer¨ layerPos)) , res
}
(cornerContent ⍪ {<<hasColLabels⌷"┌├"}⍢(1 ¯1↑) (,/ verticalAxisIndicator makeVerticalLayer¨ layerPos)) , res
}
}

Expand Down
Loading