unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile Hoot v0.2.0 released!
@ 2023-11-30 20:08 Thompson, David
  2023-11-30 20:24 ` Mikael Djurfeldt
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Thompson, David @ 2023-11-30 20:08 UTC (permalink / raw)
  To: Guile User

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



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-11-30 20:08 Guile Hoot v0.2.0 released! Thompson, David
@ 2023-11-30 20:24 ` Mikael Djurfeldt
  2023-12-01  7:21 ` Nala Ginrut
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Mikael Djurfeldt @ 2023-11-30 20:24 UTC (permalink / raw)
  To: Thompson, David; +Cc: Guile User

Sounds great! Congratulations! :-)

On Thu, Nov 30, 2023 at 9:09 PM Thompson, David <dthompson2@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
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-11-30 20:08 Guile Hoot v0.2.0 released! Thompson, David
  2023-11-30 20:24 ` Mikael Djurfeldt
@ 2023-12-01  7:21 ` Nala Ginrut
  2023-12-03 15:04 ` Daniel Skinner
  2023-12-13 22:05 ` Daniel Skinner
  3 siblings, 0 replies; 13+ messages in thread
From: Nala Ginrut @ 2023-12-01  7:21 UTC (permalink / raw)
  To: Thompson, David; +Cc: Guile User

Neat! Congrats!

On Fri, Dec 1, 2023, 04:09 Thompson, David <dthompson2@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
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-11-30 20:08 Guile Hoot v0.2.0 released! Thompson, David
  2023-11-30 20:24 ` Mikael Djurfeldt
  2023-12-01  7:21 ` Nala Ginrut
@ 2023-12-03 15:04 ` Daniel Skinner
  2023-12-05 17:58   ` Christine Lemmer-Webber
  2023-12-13 22:05 ` Daniel Skinner
  3 siblings, 1 reply; 13+ messages in thread
From: Daniel Skinner @ 2023-12-03 15:04 UTC (permalink / raw)
  To: Thompson, David; +Cc: Guile User

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 <dthompson2@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
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-12-03 15:04 ` Daniel Skinner
@ 2023-12-05 17:58   ` Christine Lemmer-Webber
  2023-12-11  5:52     ` Daniel Skinner
  0 siblings, 1 reply; 13+ messages in thread
From: Christine Lemmer-Webber @ 2023-12-05 17:58 UTC (permalink / raw)
  To: Daniel Skinner; +Cc: Thompson, David, guile-user

If you make something, please let us know! :)

Daniel Skinner <daniel@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 <dthompson2@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
>>
>>




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-12-05 17:58   ` Christine Lemmer-Webber
@ 2023-12-11  5:52     ` Daniel Skinner
  2023-12-11 15:49       ` Thompson, David
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Skinner @ 2023-12-11  5:52 UTC (permalink / raw)
  To: Christine Lemmer-Webber; +Cc: Thompson, David, Guile User

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 <
cwebber@dustycloud.org> wrote:

> If you make something, please let us know! :)
>
> Daniel Skinner <daniel@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 <dthompson2@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
> >>
> >>
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-12-11  5:52     ` Daniel Skinner
@ 2023-12-11 15:49       ` Thompson, David
  2023-12-11 17:03         ` Daniel Skinner
  2023-12-11 17:36         ` Daniel Skinner
  0 siblings, 2 replies; 13+ messages in thread
From: Thompson, David @ 2023-12-11 15:49 UTC (permalink / raw)
  To: Daniel Skinner; +Cc: Christine Lemmer-Webber, Guile User

Hi Daniel,

On Mon, Dec 11, 2023 at 12:53 AM Daniel Skinner <daniel@dasa.cc> wrote:
>
> 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.

I don't think I quite understand what's going on. Are you passing over
WebAssembly.Instance objects as the event data to the AudioWorklet?
Could you just instantiate everything in the main "thread" and pass
over ready to use instances?

> 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.

I also noticed you are doing things with WebGL. You beat me to it. ;)

At some point, I will be porting Chickadee to the web using WebGL and
Web Audio so your exploration here will help make that happen.

Thanks for sharing your progress!

- Dave



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-12-11 15:49       ` Thompson, David
@ 2023-12-11 17:03         ` Daniel Skinner
  2023-12-11 17:39           ` Thompson, David
  2023-12-11 17:36         ` Daniel Skinner
  1 sibling, 1 reply; 13+ messages in thread
From: Daniel Skinner @ 2023-12-11 17:03 UTC (permalink / raw)
  To: Thompson, David; +Cc: Christine Lemmer-Webber, Guile User

> I don't think I quite understand what's going on. Are you passing over
WebAssembly.Instance objects as the event data to the AudioWorklet?

Not the instance, but rather WebAssembly.Module via compileStreaming as the
instance is not serializable.

> Could you just instantiate everything in the main "thread" and pass over
ready to use instances?

My understanding is no; modules on the other hand can be serialized and
passed to AudioWorklet via postMessage. Once there, they can be
instantiated in the worklet.

In my research, this is a pervasive issue for projects targeting wasm that
stems from limited api availability in AudioWorklet (e.g. no networking, no
fetch due to thread priority given, other little things). It also appears
the situation is made intentional and won't be changing.

see for example:
https://github.com/WebAudio/web-audio-api/issues/1439

https://github.com/rustwasm/wasm-pack/issues/689

or search "wasm audioworklet fetch"

The situation in hoot could be improved by accounting for this and basing
the Scheme.load* of reflect.js around modules too instead of only fetchable
paths. What I did was the smallest diff possible to confirm workable by
adjusting instantiate_streaming and adding a Scheme.set_module_map but I
dont necessarily recommend this.

iirc and specific to AudioWorklet, the situation could be further improved
by making the contents of reflect.js work with import, but (again, iirc)
the import statement for AudioWorklet only currently works in firefox and I
didn't get a chance to see if its planned for other browsers; in this way,
I wouldn't need to copy/paste the contents into realtime_worklet.js

> I also noticed you are doing things with WebGL. You beat me to it. ;)

it "just worked"! But I need to write up some helpers as I explore forms of
api design to do something more interesting.

> At some point, I will be porting Chickadee to the web using WebGL and
Web Audio so your exploration here will help make that happen.

I've only been writing scheme for like 5 weeks so it's my process for
learning. I read through Chickadee like 3 weeks back when researching
people's conventions and I appreciate you making that available.

What would be neat is to also get guile-fibers going (guile-fibers on
desktop platform is what got me to dive in to begin with).

On Mon, Dec 11, 2023, 9:49 AM Thompson, David <dthompson2@worcester.edu>
wrote:

> Hi Daniel,
>
> On Mon, Dec 11, 2023 at 12:53 AM Daniel Skinner <daniel@dasa.cc> wrote:
> >
> > 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.
>
> I don't think I quite understand what's going on. Are you passing over
> WebAssembly.Instance objects as the event data to the AudioWorklet?
> Could you just instantiate everything in the main "thread" and pass
> over ready to use instances?
>
> > 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.
>
> I also noticed you are doing things with WebGL. You beat me to it. ;)
>
> At some point, I will be porting Chickadee to the web using WebGL and
> Web Audio so your exploration here will help make that happen.
>
> Thanks for sharing your progress!
>
> - Dave
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-12-11 15:49       ` Thompson, David
  2023-12-11 17:03         ` Daniel Skinner
@ 2023-12-11 17:36         ` Daniel Skinner
  1 sibling, 0 replies; 13+ messages in thread
From: Daniel Skinner @ 2023-12-11 17:36 UTC (permalink / raw)
  To: Thompson, David; +Cc: Christine Lemmer-Webber, Guile User

> At some point, I will be porting Chickadee to the web using WebGL and Web
Audio

Also to add, you'd probably want to use AudioBuffer and not AudioWorklet
for the sound which will allow everything to be in the same module as well,
then you would not be seeing these complications.

But I've been doing Web Audio for even less time (4ish days) so my
knowledge in the area is lacking currently.

On Mon, Dec 11, 2023, 9:49 AM Thompson, David <dthompson2@worcester.edu>
wrote:

> Hi Daniel,
>
> On Mon, Dec 11, 2023 at 12:53 AM Daniel Skinner <daniel@dasa.cc> wrote:
> >
> > 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.
>
> I don't think I quite understand what's going on. Are you passing over
> WebAssembly.Instance objects as the event data to the AudioWorklet?
> Could you just instantiate everything in the main "thread" and pass
> over ready to use instances?
>
> > 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.
>
> I also noticed you are doing things with WebGL. You beat me to it. ;)
>
> At some point, I will be porting Chickadee to the web using WebGL and
> Web Audio so your exploration here will help make that happen.
>
> Thanks for sharing your progress!
>
> - Dave
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-12-11 17:03         ` Daniel Skinner
@ 2023-12-11 17:39           ` Thompson, David
  2023-12-11 18:35             ` Daniel Skinner
  0 siblings, 1 reply; 13+ messages in thread
From: Thompson, David @ 2023-12-11 17:39 UTC (permalink / raw)
  To: Daniel Skinner; +Cc: Christine Lemmer-Webber, Guile User

On Mon, Dec 11, 2023 at 12:03 PM Daniel Skinner <daniel@dasa.cc> wrote:
>
> > I don't think I quite understand what's going on. Are you passing over WebAssembly.Instance objects as the event data to the AudioWorklet?
>
> Not the instance, but rather WebAssembly.Module via compileStreaming as the instance is not serializable.
>
> > Could you just instantiate everything in the main "thread" and pass over ready to use instances?
>
> My understanding is no; modules on the other hand can be serialized and passed to AudioWorklet via postMessage. Once there, they can be instantiated in the worklet.

Ah, okay. That makes sense. I haven't used AudioWorklets before and
it's been awhile since I've used Web Workers which have similar
constraints.

> In my research, this is a pervasive issue for projects targeting wasm that stems from limited api availability in AudioWorklet (e.g. no networking, no fetch due to thread priority given, other little things). It also appears the situation is made intentional and won't be changing.
>
> see for example:
> https://github.com/WebAudio/web-audio-api/issues/1439
>
> https://github.com/rustwasm/wasm-pack/issues/689
>
> or search "wasm audioworklet fetch"
>
> The situation in hoot could be improved by accounting for this and basing the Scheme.load* of reflect.js around modules too instead of only fetchable paths. What I did was the smallest diff possible to confirm workable by adjusting instantiate_streaming and adding a Scheme.set_module_map but I dont necessarily recommend this.

Yeah, I think what we'd want is an alternate interface rather than
overloading what instantiate_streaming does, but the general pattern
of loading the module on the main thread and instantiating on the
worker sounds like the way to go.

> iirc and specific to AudioWorklet, the situation could be further improved by making the contents of reflect.js work with import, but (again, iirc) the import statement for AudioWorklet only currently works in firefox and I didn't get a chance to see if its planned for other browsers; in this way, I wouldn't need to copy/paste the contents into realtime_worklet.js

reflect.js is pretty rudimentary right now. import support would be
very nice. I'll file an issue on GitLab so we don't forget about it.

> > I also noticed you are doing things with WebGL. You beat me to it. ;)
>
> it "just worked"! But I need to write up some helpers as I explore forms of api design to do something more interesting.

Yeah, it takes quite a bit of helper code to make something useful with OpenGL.

> > At some point, I will be porting Chickadee to the web using WebGL and
> Web Audio so your exploration here will help make that happen.
>
> I've only been writing scheme for like 5 weeks so it's my process for learning. I read through Chickadee like 3 weeks back when researching people's conventions and I appreciate you making that available.

Oh neat, welcome to the world of Scheme, then! :)

> What would be neat is to also get guile-fibers going (guile-fibers on desktop platform is what got me to dive in to begin with).

Fibers is the highest priority library for us to get running with
Hoot. We're still working on how the module system is going to work
(very tricky!) but when it does we're going to figure out how we port
fibers.

- Dave



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-12-11 17:39           ` Thompson, David
@ 2023-12-11 18:35             ` Daniel Skinner
  0 siblings, 0 replies; 13+ messages in thread
From: Daniel Skinner @ 2023-12-11 18:35 UTC (permalink / raw)
  To: Thompson, David; +Cc: Christine Lemmer-Webber, Guile User

> Fibers is the highest priority library for us to get running with
Hoot.

well I'm very happy to hear that! There's very specific abstractions I want
to work with for exploring stuff and that makes it easier.

On Mon, Dec 11, 2023, 11:39 AM Thompson, David <dthompson2@worcester.edu>
wrote:

> On Mon, Dec 11, 2023 at 12:03 PM Daniel Skinner <daniel@dasa.cc> wrote:
> >
> > > I don't think I quite understand what's going on. Are you passing over
> WebAssembly.Instance objects as the event data to the AudioWorklet?
> >
> > Not the instance, but rather WebAssembly.Module via compileStreaming as
> the instance is not serializable.
> >
> > > Could you just instantiate everything in the main "thread" and pass
> over ready to use instances?
> >
> > My understanding is no; modules on the other hand can be serialized and
> passed to AudioWorklet via postMessage. Once there, they can be
> instantiated in the worklet.
>
> Ah, okay. That makes sense. I haven't used AudioWorklets before and
> it's been awhile since I've used Web Workers which have similar
> constraints.
>
> > In my research, this is a pervasive issue for projects targeting wasm
> that stems from limited api availability in AudioWorklet (e.g. no
> networking, no fetch due to thread priority given, other little things). It
> also appears the situation is made intentional and won't be changing.
> >
> > see for example:
> > https://github.com/WebAudio/web-audio-api/issues/1439
> >
> > https://github.com/rustwasm/wasm-pack/issues/689
> >
> > or search "wasm audioworklet fetch"
> >
> > The situation in hoot could be improved by accounting for this and
> basing the Scheme.load* of reflect.js around modules too instead of only
> fetchable paths. What I did was the smallest diff possible to confirm
> workable by adjusting instantiate_streaming and adding a
> Scheme.set_module_map but I dont necessarily recommend this.
>
> Yeah, I think what we'd want is an alternate interface rather than
> overloading what instantiate_streaming does, but the general pattern
> of loading the module on the main thread and instantiating on the
> worker sounds like the way to go.
>
> > iirc and specific to AudioWorklet, the situation could be further
> improved by making the contents of reflect.js work with import, but (again,
> iirc) the import statement for AudioWorklet only currently works in firefox
> and I didn't get a chance to see if its planned for other browsers; in this
> way, I wouldn't need to copy/paste the contents into realtime_worklet.js
>
> reflect.js is pretty rudimentary right now. import support would be
> very nice. I'll file an issue on GitLab so we don't forget about it.
>
> > > I also noticed you are doing things with WebGL. You beat me to it. ;)
> >
> > it "just worked"! But I need to write up some helpers as I explore forms
> of api design to do something more interesting.
>
> Yeah, it takes quite a bit of helper code to make something useful with
> OpenGL.
>
> > > At some point, I will be porting Chickadee to the web using WebGL and
> > Web Audio so your exploration here will help make that happen.
> >
> > I've only been writing scheme for like 5 weeks so it's my process for
> learning. I read through Chickadee like 3 weeks back when researching
> people's conventions and I appreciate you making that available.
>
> Oh neat, welcome to the world of Scheme, then! :)
>
> > What would be neat is to also get guile-fibers going (guile-fibers on
> desktop platform is what got me to dive in to begin with).
>
> Fibers is the highest priority library for us to get running with
> Hoot. We're still working on how the module system is going to work
> (very tricky!) but when it does we're going to figure out how we port
> fibers.
>
> - Dave
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-11-30 20:08 Guile Hoot v0.2.0 released! Thompson, David
                   ` (2 preceding siblings ...)
  2023-12-03 15:04 ` Daniel Skinner
@ 2023-12-13 22:05 ` Daniel Skinner
  2023-12-13 22:44   ` Daniel Skinner
  3 siblings, 1 reply; 13+ messages in thread
From: Daniel Skinner @ 2023-12-13 22:05 UTC (permalink / raw)
  To: Thompson, David; +Cc: Guile User

Given some inexact that I would eventually want to truncate and use as the
index arg of vector-ref, do I have any options for this in this release of
hoot?

Notably I didn't see a definition for inexact->exact and I dont really know
my way around scheme too well to know how to address otherwise.

On Thu, Nov 30, 2023, 2:09 PM Thompson, David <dthompson2@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
>
>


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Guile Hoot v0.2.0 released!
  2023-12-13 22:05 ` Daniel Skinner
@ 2023-12-13 22:44   ` Daniel Skinner
  0 siblings, 0 replies; 13+ messages in thread
From: Daniel Skinner @ 2023-12-13 22:44 UTC (permalink / raw)
  To: Thompson, David; +Cc: Guile User

whoops nvm, found the answer in r7rs spec and had apparently learned older
way

On Wed, Dec 13, 2023, 4:05 PM Daniel Skinner <daniel@dasa.cc> wrote:

> Given some inexact that I would eventually want to truncate and use as the
> index arg of vector-ref, do I have any options for this in this release of
> hoot?
>
> Notably I didn't see a definition for inexact->exact and I dont really
> know my way around scheme too well to know how to address otherwise.
>
> On Thu, Nov 30, 2023, 2:09 PM Thompson, David <dthompson2@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
>>
>>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-12-13 22:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 20:08 Guile Hoot v0.2.0 released! Thompson, David
2023-11-30 20:24 ` Mikael Djurfeldt
2023-12-01  7:21 ` Nala Ginrut
2023-12-03 15:04 ` Daniel Skinner
2023-12-05 17:58   ` Christine Lemmer-Webber
2023-12-11  5:52     ` Daniel Skinner
2023-12-11 15:49       ` Thompson, David
2023-12-11 17:03         ` Daniel Skinner
2023-12-11 17:39           ` Thompson, David
2023-12-11 18:35             ` Daniel Skinner
2023-12-11 17:36         ` Daniel Skinner
2023-12-13 22:05 ` Daniel Skinner
2023-12-13 22:44   ` Daniel Skinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).