From 01159fbc50dbdcad55862ebe44bfdf80e77f6c13 Mon Sep 17 00:00:00 2001 From: MURANGWA Date: Thu, 13 Aug 2026 17:27:17 +0200 Subject: [PATCH 1/2] fix: print class, instance, and type-val values in playground Align web runtime matchType with Kin OOP/type-value printing so imiterere instances and ubwoko type values display correctly. Related to kin-lang/kin#258 --- lib/runtime.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lib/runtime.ts b/lib/runtime.ts index 88a74f8..72b9062 100644 --- a/lib/runtime.ts +++ b/lib/runtime.ts @@ -50,6 +50,29 @@ export function matchType(arg: RuntimeVal): any { internal: false, }; } + case "class": { + const c = arg as RuntimeVal & { name?: string }; + return c.name ?? "imiterere"; + } + case "instance": { + const inst = arg as RuntimeVal & { + klass?: { name?: string }; + fields?: Map; + }; + const fields: { [key: string]: unknown } = {}; + inst.fields?.forEach((value, key) => { + fields[key] = matchType(value); + }); + return `${inst.klass?.name ?? "instance"} ${JSON.stringify(fields)}`; + } + case "type-val": { + const t = arg as RuntimeVal & { name?: string }; + return t.name ?? "type-val"; + } + case "bound-method": { + const bm = arg as RuntimeVal & { method?: { name?: string } }; + return ``; + } default: return arg; } From 5c06ba0cd73943696d5ab664b3e64114bad4d979 Mon Sep 17 00:00:00 2001 From: MURANGWA Date: Thu, 13 Aug 2026 17:45:55 +0200 Subject: [PATCH 2/2] docs: note multi-file modules need the Kin CLI Playground is single-buffer; koresha/emerera_gukoresha require kin run on disk. Point to examples/importing and Modules docs. Related to kin-lang/kin#169 --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d98b6e..9b79d83 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ -editor -[Exprimental] Online IDE for kin-lang +# Kin online editor (experimental) + +Web playground for [Kin](https://github.com/kin-lang/kin). + +## Notes + +- The playground runs a **single buffer** in the browser. +- Multi-file modules (`koresha "…" nka alias` / `emerera_gukoresha`) need the **CLI** + (`kin run entry.kin`) so files can be loaded from disk. See `examples/importing/` + in the language repo and the [Modules](https://kinlang.vercel.app/docs/language-structure/Modules) docs. +- Typed samples and OOP/`ubwoko` printing are aligned with recent Kin releases when + `@kin-lang/kin` is updated in this package.