diku-dk / futhark

:boom::computer::boom: A data-parallel functional programming language
http://futhark-lang.org
ISC License
2.37k stars 164 forks source link

Allow interpreter to invoke compiled code #2164

Open athas opened 2 months ago

athas commented 2 months ago

It would be lovely if the interpreter could (semi-)transparently invoke compiled Futhark code, through the server protocol. This would allow a (somewhat) interactive style of programming while still providing high performance, and even allow us to get rid of FutharkScript.

The interpreter is already structured in a way that allows "external calls" that are handled by the outside world (currently used for traces and breakpoints). The main challenge is adding a whole bunch of glue to bridge the gap between the interpreter and the fundamentally opaque value model of a compiled Futhark program (with various affordances through the server protocol for inspecting value).

potatoboiler commented 1 month ago

Hi, commenting here to mark my interest. Will hopefully update with a PR when I have the time.