IRC channel logs

2026-04-18.log

back to list of logs

<cow_2001>other than being very careful, how do you make sure types of values are what you expect? like if you have something like a variable that is either #f or some actual value, and you match over it, but you forget it can have an #f value and you lose a day to it?
<dthompson>there's really no secret: you have to validate that inputs are of the expected type
<dthompson>scheme is not statically typed and this is one of the trade-offs
<kestrelwx>dthompson: I'm afraid I already asked this, but `wasi-gfx` would let us avoid the overhead that comes from having to convert values for WebGL, right? So then we only would have this problem with the audio.
<kestrelwx>Well, at least for the Web.
<dthompson>kestrelwx: afaik, it wouldn't fix anything. wasi uses a linear memory model.
<kestrelwx>Oh, I assumed it's possible to rely on their interfaces.
<dthompson>we don't support wasi in general right now, but even if we did if the interface assumes linear memory it's not going to work for us
<dthompson>we represent scheme bytevectors as (ref (array i8)) which is a GC-managed reference type
<kestrelwx>I see, thanks.