I hit a snag trying to use in an AudioWorklet so was resolving that instead of making something more interesting. I worked it out which required a change to the reflect.js instatiate_streaming to allow referencing already-compiled modules keyed by given path as that's the only practical way it seems to provide to an AudioWorklet.
Put here for reference (see everything prefixed realtime.*): https://gitlab.com/daniel126/guile-hoot-ffi-demo The realtime_worklet.js has a copy of reflect.js at top that includes the changes mentioned and also a TODO of a potential issue within same function. Tested in firefox. The example uses AudioWorklet as a sink only; the raw audio data is generated in the guile wasm module by writing into a constant bytevector, then in AudioWorklet that data is copied-projected-copied out; maybe there's a cleaner way to do that copy out. With things spiked out now, I can maybe do something a little more interesting when I can find the time. On Tue, Dec 5, 2023, 11:58 AM Christine Lemmer-Webber < cweb...@dustycloud.org> wrote: > If you make something, please let us know! :) > > Daniel Skinner <dan...@dasa.cc> writes: > > > Have been watching hoot to play around with webgl and miniaudio for some > > audio/visual fun, thanks for the release! > > > > On Thu, Nov 30, 2023, 2:09 PM Thompson, David <dthomps...@worcester.edu> > > wrote: > > > >> Hey Guilers! > >> > >> On behalf of the Spritely Institute, I'm happy to announce that Guile > >> Hoot v0.2.0 has been released! Hoot is a Scheme to WebAssembly > >> compiler backend for Guile, which means you can now run Scheme in the > >> browser for real, tail calls and all. > >> > >> The highlights of this release are: > >> > >> * Nearly all of R7RS-small is now implemented! Hoot 0.2.0 is now > >> capable of running many more standard Scheme programs than 0.1.0. > >> > >> * A foreign function interface (FFI) has been added to make it easy to > >> declare imported host functions and call them from Scheme. > >> > >> * User-defined record types, sorely missing from 0.1.0, have been added. > >> > >> Read the full release notes here: > >> https://spritely.institute/news/guile-hoot-v020-released.html > >> > >> If you use Guix then it's easy to try out Hoot: > >> > >> guix pull > >> guix shell guile-next guile-hoot > >> > >> But wait, there's more! I've been busy writing up a tutorial for using > >> Hoot to make React-like web pages, and that is also available now: > >> > >> > >> > https://spritely.institute/news/building-interactive-web-pages-with-guile-hoot.html > >> > >> If you're curious what it looks like to integrate Scheme with > >> JavaScript browser APIs then definitely check out that post. > >> > >> Okay, that's all for now. Happy hooting! > >> > >> - Dave > >> > >> > >