IRC channel logs
2025-10-30.log
back to list of logs
<mwette>I remember also. I thought civodul had done something. <kestrelwx>What should I do for dictionary type binding for Hoot? Is this what `define-foreign-type` is for? <dthompson>kestrelwx: dictionary type binding? like a js object? what are you trying to specifically? <dthompson>define-foreign-type introduces a record type wrapper around a (ref extern) <dthompson>so that you can distinguish between types of foreign objects without leaving scheme <kestrelwx>I guess I should just produce pairs of getters/setters for each entry and a constructor, since these are objects. <dthompson>kestrelwx: that's the return value of WebGLRenderContext.getContextAttributes() right? <dthompson>so yeah, getters and setters for each value makes sense to me. <kestrelwx>I should then define foreign types for all the classes and these dictionaries. <dthompson>if you want. it can help provide clarity in your code but it introduces a wrapper object. <kestrelwx>And then I only have to write wrappers for overloaded functions I think. <dthompson>what are the overloaded functions in this case? <dthompson>typically for overloads you need a binding per signature <dthompson>like if the same function could take an int or a string, you'd need to define two foreign functions <kestrelwx>There's for example `readPixels` with 4 signatures. <dthompson>but yes, you'll need 4 foreign functions if you want to support each variant <kestrelwx>I guess I'll just append -1, -2, -3, -4 and then if there's actually a need for it, the user(me) would write the dispatch code. <dthompson>yeah you can put a nice scheme interface around it if necessary <dthompson>often I find I only need one or two variants and don't bother with the rest <dthompson>or some of the variants are just conveniences that my wrapper code can handle just as well and then I can just a single foreign function <kestrelwx>Oh, I must've lower-cased it in visual mode when copying, it's fine after I regenerated the bindings. <dthompson>this is the kind of thing I haven't been able to work on but I'm glad other people are making progress <kestrelwx>I'm not too happy with what I wrote so far, but maybe I'll work on it after the jam. <dthompson>the long term plan for hoot is to introduce a higher-level ffi for js bindings. it will make both manually written bindings and bindings generated from webidl easier to deal with. <kestrelwx>I'll publish everything later today, I'm hoping still to port the breakout to these, but maybe I won't make it in time. <dthompson>whatever happens, you're taking some important steps forward :) <sneek>jralls, ArneBab says: my concern with scm_from_unsigned_integer is just that I donโt know enough about the details, so Iโm left asking about stuff that isnโt obvious to me to be correct. Please get in contact with Jonas to get to the heart of those issues. <kestrelwx>I'm seeing permission denied with `compile-wasm --bundle` on Guix. <euouae>Hello does anyone know why when I import r6rs libraries I get: WARNING: (guile-user): imported module (rnrs) overrides core binding `error' WARNING: (guile-user): imported module (rnrs) overrides core binding `map' <euouae>E.g. warnings about error and map. Why not other core bindings? <old>kestrelwx: yup first limitation I've encounreted <old>basically you need to define _everything_ in advance, I don't recall how exactly <old>Maybe there is a way with module reflection to automatically change the binding names (or duplicate them) but changing `-' for `_' <kestrelwx>In Scheme I can have ๐๐๐ identifier just fine... <kestrelwx>Gecko and V8 also gave totally unhelpful error messages, so I had no for a while of what's going on.