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>Oh, thanks sneek.
<jmes>sneek: botsnack
<sneek>:)
<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*
<dthompson>jmes: one function per arity
<dthompson>wasm doesn't have varargs
<jmes>Okay, thanks! I thought that might be so.
<dthompson>goooood morning fellow goblins
<dthompson>the autumn lisp game jam has begun! https://itch.io/jam/autumn-lisp-game-jam-2025
<dthompson>and we have 4 threads in the jam community section about hoot!
<dthompson>the one I made https://itch.io/jam/autumn-lisp-game-jam-2025/topic/5380632/hoot-example-project
<dthompson>and 3 community threads!
<dthompson>this one is about webgl https://itch.io/jam/autumn-lisp-game-jam-2025/topic/5481224/template-for-a-webgl-guile-hoot-game
<dthompson>this one is about animations and the canvas api https://itch.io/jam/autumn-lisp-game-jam-2025/topic/5479879/more-hoot
<dthompson>and this one seems to be about mimicking the chickadee api but on hoot https://itch.io/jam/autumn-lisp-game-jam-2025/topic/5483497/looking-for-cooperation-with-newbies-for-hoot-chickadee-toolkit
<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
<ekaitz>:)
<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
<cow_2001>false alarm. not even in js
<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