IRC channel logs
2024-05-25.log
back to list of logs
<takev>Any idea why a timeout proceedure call in hoot would result in an arity violation? I am passing timeout a thunk wrapped in a procedure->external as a callback, along with a dt, and it seems to be crashing when trying to invoke the callback. <takev>I know it is specifically failing when trying to invoke that callback, as I was able to narrow it down via logging. <takev>Also, I like the ffi interface. My compliments to the chef, lol. <daviwil>takev: how many parameters does your callback accept <daviwil>Hmmm, that pattern is working for me, I'm using dthompson's game jam template and it calls timeout with a thunk wrapped in procedure->external <takev>Yeah. I just modified the template as needed as well. <takev>juli was able to assist me. Bug in the logging code, found the issue pretty quickly after that was fixed. :D <old>Can hoot be used for compiling to WASM where the VM is not JS based, thus outside the browser? <old>also, anyway to make thread local storage? <dthompson>old: hoot already runs on one non-js platform: the guile vm :) <dthompson>hoot's toolchain can be used to make wasm binaries for whatever, not just scheme. and hoot can theoretically be run on whatever wasm runtime that can provide the necessary host functions. currently that's browsers, v8, and the guile vm. <old>dthompson: what are the necessary hosts functions? <old>the wasm spec seems .. sparse <takev>Why would a hoot external call only work in a single file? I am calling a particular external, and it only seems to be working in the main init file. Everywhere else I keep getting an error at compile time: "target-only primitive". <dthompson>an ffi call? you can't make ffi calls in the top-level of a module as they will be evaluated at compile-time and thus throw that error <takev>So such calls cannot be made within a module? <takev>The specific example I have is the "make-image" in the game template. It seems to only work in game.scm. <dthompson>takev: the top-level of the main program is not eval'd at compile time like a module is. you just need to not *call* them at the module top-level. you can call them from within a procedure, so long as that procedure is not called at compile time too.