ArkScript-lang / ArkScript-lang/Ark

Improve the ArkEmscripten playground

Open
#631 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
728
Forks
54
Avg merge
4h 8m
Merged PRs (30d)
2

Description

### Is your feature request related to a problem?

The current playground is pretty bare, and the current method of capturing what's printed is not that good (though I have no clue how to make it better):

```js
log = console.log;
var can_capture = false;

window.console.log = (message) => {
log(message);
if (can_capture)
document.getElementById("output").value += message + "\n";
};

var Module = {
onRuntimeInitialized: function () {
document.getElementById("run").addEventListener("click", () => {
document.getElementById("output").value = "";
const code = document.getElementById("code").value;
try {
can_capture = true;
Module.run(code);
} catch (e) {
document.getElementById("output").value = e;
}
can_capture = false;
});
}
};
```

Playground:
Wasm Playground

### Describe the solution you would like

1. Improve the UI/UX of the playground (without having to add Vue, React or other huge libraries)
2. Add more utils / builtins to ArkEmscripten to play with DOM and JavaScript values / functions
3. Find a better way to get ArkScript output
4. Add more tests (currently not tested in the CI, only the compilation is tested)

### Is it a big modification to the language? Leave it if you don't know

- [ ] Breaking change
- [ ] Compiler/syntax modifications
- [ ] Runtime modifications (standard library, modules, packages...)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.