JohnEarnest / ok

An open-source interpreter for the K5 programming language.
MIT License
585 stars 73 forks source link

integration in the browser a la fengari #101

Open effbiae opened 2 years ago

effbiae commented 2 years ago

It'd be brilliant to have browser integration like fengari. Have you considered it? I might have a crack at it myself. http://fengari.io

JohnEarnest commented 2 years ago

I think this would be difficult. oK's tree-walker interpreter would need to be deeply rewritten to avoid blocking the main JS thread and achieve fengari-like coroutine support. Better JS interop is possible; I haven't explored it much in the past because oK is already quite slow and a DOM interaction API which allowed a programmer to take advantage of the vector-oriented nature of the language seemed like a challenging design problem.

You're welcome to have a go, of course.