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 scripts/generate-og-languages.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const LANGS = [
// Row 1
{ name: 'APL', version: 'Dyalog v21.0', file: 'apl.png' },
{ name: 'BQN', version: 'CBQN 0.12', file: 'bqn.svg' },
{ name: 'Uiua', version: '0.20.0-dev.1', file: 'uiua.png' },
{ name: 'Uiua', version: '0.20.0-dev.2', file: 'uiua.png' },
// Row 2
{ name: 'J', version: 'J9.8.0-beta11', file: 'j_logo.svg' },
{ name: 'Kap', version: '2026-11-30', file: 'kap.png' },
Expand Down
2 changes: 1 addition & 1 deletion scripts/known-versions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"cbqn": "v0.12.0",
"uiua": "0.20.0-dev.1",
"uiua": "0.20.0-dev.2",
"j": "9.8.0-beta11",
"kap": "20261130-2",
"tinyapl": "0.12.0"
Expand Down
7 changes: 4 additions & 3 deletions src/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -855,17 +855,14 @@ export const uiuaGlyphNames = {
'⤸': 'orient',
'▽': 'keep',
'⌕': 'find',
'⦷': 'mask',
'∊': 'memberof',
'⊗': 'indexin',
'⊥': 'base',

// Mapping Modifiers
'≡': 'rows',
'⍚': 'inventory',
'⊞': 'table',
'⧅': 'tuples',
'⧈': 'stencil',
'⊕': 'group',
'⊜': 'partition',
'⍩': 'case',
Expand Down Expand Up @@ -957,6 +954,10 @@ export const uiuaGlyphNames = {
'⨱': 'outer product',
'⍡': 'pattern',
'⊨': 'validate',
// Added from upstream documentation; review placement and labels.
'⋉': 'indexin',
'⚇': 'mask',
'◫': 'stencil',
};

// Default keyboard layout (US QWERTY)
Expand Down
10 changes: 6 additions & 4 deletions src/keymap.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,16 +349,18 @@ export const uiuaGlyphs = {
],
// Dyadic Array - Operate on two arrays
dyadicArray: [
'≍', '⊟', '⊂', '⊏', '⊡', '↯', '↙', '↘', '↻', '⤸', '▽', '⌕', '⦷', '∊', '⊗', '⊥',
'⨰', '⨱', '⊨'
'≍', '⊟', '⊂', '⊏', '⊡', '↯', '↙', '↘', '↻', '⤸', '▽', '⌕', '∊', '⊥',
'⨰', '⨱', '⊨',
'⋉', '⚇'
],
// 1-Modifiers (monadic modifiers) - Take 1 function argument
monadicModifiers: [
'˙', '˜', '⊙', '⋅', '⟜', '⊸', '⤙', '⤚', '◠', '◡', '∩',
'≡', '⍚', '⊞', '⧅', '⧈', '⊕', '⊜',
'≡', '⍚', '⊞', '⧅', '⊕', '⊜',
'/', '∧', '\\', '⍥',
'⌅', '°', '⌝',
'⧋', '◇', '∪', '⍩'
'⧋', '◇', '∪', '⍩',
'◫'
],
// 2-Modifiers (dyadic modifiers) - Take 2+ function arguments
dyadicModifiers: [
Expand Down
12 changes: 7 additions & 5 deletions src/syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,20 @@ export const syntaxRules = {
functions: [
'+', '-', '×', '÷', '◿', 'ⁿ', '=', '≠', '<', '>', '≤', '≥',
'↧', '↥', '∠', '∨', 'ℂ', '⊂', '⊏', '⊡', '↯',
'↙', '↘', '↻', '⊗', '∊', '⊟', '▽', '⤸',
'≍', '⌕', '⦷', '⊥',
'⨰', '⨱', '⊨'
'↙', '↘', '↻', '∊', '⊟', '▽', '⤸',
'≍', '⌕', '⊥',
'⨰', '⨱', '⊨',
'⋉', '⚇'
],
// 1-modifiers (pink) - take 1 function argument
// Matches uiuaGlyphs.monadicModifiers from keymap.js (popup source of truth)
dyadic: [
'∘', '◌', '˙', '˜', '⊙', '⋅', '⟜', '⊸', '⤙', '⤚', '◠', '◡', '∩',
'≡', '⍚', '⊞', '⧅', '⧈', '⊕', '⊜',
'≡', '⍚', '⊞', '⧅', '⊕', '⊜',
'/', '∧', '\\', '⍥',
'⌅', '°', '⌝',
'⧋', '◇', '∪', '⍩'
'⧋', '◇', '∪', '⍩',
'◫'
],
// 2-modifiers (yellow) - take 2+ function arguments
// Matches uiuaGlyphs.dyadicModifiers from keymap.js (popup source of truth)
Expand Down
12 changes: 6 additions & 6 deletions src/uiua-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ export const uiuaGlyphDocs = {
"signature": "1 → 1",
"docUrl": "https://www.uiua.org/docs/identity"
},
"⊗": {
"glyph": "⊗",
"⋉": {
"glyph": "⋉",
"type": "dyadic function",
"name": "indexin",
"description": "Find the first index in an array of each row of another array",
Expand Down Expand Up @@ -469,8 +469,8 @@ export const uiuaGlyphDocs = {
"signature": "2 → 1",
"docUrl": "https://www.uiua.org/docs/less%20than"
},
"⦷": {
"glyph": "⦷",
"⚇": {
"glyph": "⚇",
"type": "dyadic function",
"name": "mask",
"description": "Mask the occurrences of one array in another",
Expand Down Expand Up @@ -829,8 +829,8 @@ export const uiuaGlyphDocs = {
"signature": "1 → 1",
"docUrl": "https://www.uiua.org/docs/sqrt"
},
"⧈": {
"glyph": "⧈",
"◫": {
"glyph": "◫",
"type": "modifier",
"name": "stencil",
"description": "Call a function on windows of an array",
Expand Down
118 changes: 2 additions & 116 deletions wasm/uiua_wasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,50 +93,14 @@ export function uiua_version() {
function __wbg_get_imports() {
const import0 = {
__proto__: null,
__wbg___wbindgen_debug_string_a57024b9c6e4a48b: function(arg0, arg1) {
const ret = debugString(arg1);
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
},
__wbg___wbindgen_is_undefined_6cff064c44e0d823: function(arg0) {
const ret = arg0 === undefined;
return ret;
},
__wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
throw new Error(getStringFromWasm0(arg0, arg1));
},
__wbg_getRandomValues_436a51d0629d84e1: function() { return handleError(function (arg0, arg1) {
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
}, arguments); },
__wbg_get_971a0c45d172643f: function() { return handleError(function (arg0, arg1) {
const ret = Reflect.get(arg0, arg1);
return ret;
}, arguments); },
__wbg_now_2283802bfbda617e: function(arg0) {
const ret = arg0.now();
return ret;
},
__wbg_static_accessor_GLOBAL_THIS_466428f93b4eaa76: function() {
const ret = typeof globalThis === 'undefined' ? null : globalThis;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_static_accessor_GLOBAL_c7aea38d4de089bc: function() {
const ret = typeof global === 'undefined' ? null : global;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_static_accessor_SELF_42d4fae05e59267a: function() {
const ret = typeof self === 'undefined' ? null : self;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbg_static_accessor_WINDOW_e0db14a0eba6a812: function() {
const ret = typeof window === 'undefined' ? null : window;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
},
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
// Cast intrinsic for `Ref(String) -> Externref`.
const ret = getStringFromWasm0(arg0, arg1);
__wbg_now_7a643646c66543d9: function() {
const ret = performance.now();
return ret;
},
__wbindgen_init_externref_table: function() {
Expand All @@ -161,84 +125,11 @@ function addToExternrefTable0(obj) {
return idx;
}

function debugString(val) {
// primitive types
const type = typeof val;
if (type == 'number' || type == 'boolean' || val == null) {
return `${val}`;
}
if (type == 'string') {
return `"${val}"`;
}
if (type == 'symbol') {
const description = val.description;
if (description == null) {
return 'Symbol';
} else {
return `Symbol(${description})`;
}
}
if (type == 'function') {
const name = val.name;
if (typeof name == 'string' && name.length > 0) {
return `Function(${name})`;
} else {
return 'Function';
}
}
// objects
if (Array.isArray(val)) {
const length = val.length;
let debug = '[';
if (length > 0) {
debug += debugString(val[0]);
}
for(let i = 1; i < length; i++) {
debug += ', ' + debugString(val[i]);
}
debug += ']';
return debug;
}
// Test for built-in
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
let className;
if (builtInMatches && builtInMatches.length > 1) {
className = builtInMatches[1];
} else {
// Failed to match the standard '[object ClassName]'
return toString.call(val);
}
if (className == 'Object') {
// we're a user defined class or Object
// JSON.stringify avoids problems with cycles, and is generally much
// easier than looping through ownProperties of `val`.
try {
return 'Object(' + JSON.stringify(val) + ')';
} catch (_) {
return 'Object';
}
}
// errors
if (val instanceof Error) {
return `${val.name}: ${val.message}\n${val.stack}`;
}
// TODO we could test for more things here, like `Set`s and `Map`s.
return className;
}

function getArrayU8FromWasm0(ptr, len) {
ptr = ptr >>> 0;
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
}

let cachedDataViewMemory0 = null;
function getDataViewMemory0() {
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
}
return cachedDataViewMemory0;
}

function getStringFromWasm0(ptr, len) {
return decodeText(ptr >>> 0, len);
}
Expand All @@ -260,10 +151,6 @@ function handleError(f, args) {
}
}

function isLikeNone(x) {
return x === undefined || x === null;
}

function passStringToWasm0(arg, malloc, realloc) {
if (realloc === undefined) {
const buf = cachedTextEncoder.encode(arg);
Expand Down Expand Up @@ -335,7 +222,6 @@ function __wbg_finalize_init(instance, module) {
wasmInstance = instance;
wasm = instance.exports;
wasmModule = module;
cachedDataViewMemory0 = null;
cachedUint8ArrayMemory0 = null;
wasm.__wbindgen_start();
return wasm;
Expand Down
Binary file modified wasm/uiua_wasm_bg.wasm
Binary file not shown.
Loading