A fully client-side playground for the cognate programming language.
MIT License
Canonical instance: https://cognate-playground.hedy.dev/
An interactive playground for Cognate that uses a JavaScript implementation of Cognate.
It currently supports about 90% of all builtins from the C prelude, and all
types except IO. Discrepancies of this implementation that can be illustrated by
tests can be found with XFAIL
markers in the tests directory.
Files of interest
editor/*
-- code relating to the editor componentpublic/tree-sitter.{js,wasm}
-- from tree-sitter releasespublic/tree-sitter-cognate.wasm
-- built frompublic/prelude.cog
-- definitions of various built-in functions. copied from theThe runtime and cognate implementation
Set
(temporarily) to update values from outer scopeList
Print
; Add Show
Stack
Box
and a proper Set
The Playground
Run
buttonPrint
) that allows exploring data structuresShow