IRC channel logs
2025-10-31.log
back to list of logs
<jmes>Hey, I asked a hoot question last night but went to bed and got disconnected. Now I have even more questions :P <sneek>Welcome back jmes, you have 1 message! <sneek>jmes, dthompson says: there is nothing built-in to work with js objects or arrays currently.  hoot's ffi operates at the wasm type level and doesn't have awareness of that stuff. <jmes>Okay so basically I have to define JS functions that return appropriate objects to pass to other stuff. <jmes>And then import those of course <jmes>Now, is there a nice way to use JS functions with optional arguments? Do I have to define a foreign import for each arity I want to use? <jmes>I guess that's more of a wasm question *shrugs* <jmes>Okay, thanks! I thought that might be so. <dthompson>and we have 4 threads in the jam community section about hoot! <ekaitz>dthompson: thank you for sharign those! i'm seriously considering hoot for this one! <ekaitz>(i didn't finish inktober and I'm already in the next thing... I need to rest!) <dthompson>ekaitz: oh cool! let us know how it goes, if you do <cow_2001>i have an svg file with a bunch of sub elements.  how do i use these sub elements as separate images? <cow_2001>i've managed to do that using javascript in canvas, but not in hoot <dthompson>cow_2001: if you've done it in js then to do it in hoot is a matter of writing the necessary bindings to do it in scheme <jmes>Hey goblins, enjoy the game jam! I'm not partaking but the jam is what got me inspired to try and get WebGPU running with hoot... <jmes>Still working on that. Getting backtraces where reflect.js doesn't think my imported function is a procedure, but I'll keep bashing my head into the wall :P <jmes>Maybe dumb question: do the import table namespace names matter (in the user_imports of Scheme.load_main)? e.g. can I make a namespace called "my-test-namespace" and throw a bunch of random imports in there, or does the name need to reflect something meaningful? <dthompson>jmes: the names matter in the sense that if the wasm module has an input named "foo" "bar" that on the js side you provide a { foo: { bar(...) => { ...} } } binding for it <jmes>dthompson: Right, yeah, I'm abiding by that. It's good to know there isn't any other special meaning :) <dthompson>yeah, you can have extraneous stuff and it will be ignored