IRC channel logs

2026-04-19.log

back to list of logs

<cow_2001>so if a value's a Maybe, call it a *-maybe? that's all?
<cow_2001>err, the variable, that is
<cow_2001>variable / record field / whatever
<cow_2001>how do very big codebases deal with that?
<janneke>latest hoot gives me:
<janneke>$ ./pre-inst-env hoot --version
<janneke>Backtrace:
<janneke>ice-9/eval.scm:619:8: Wrong type to apply: #f
<janneke>any ideas?
<janneke>hmm, this works: ./pre-inst-env hoot help --version
<ArneBab>cow_2001: can you try again? The link should work …
<ArneBab>n|Phreak: there’s a short dection about deploying for hoot in https://www.draketo.de/software/programming-scheme#deploy-hoot-wasm
<ArneBab>s/dection/section/
<cow_2001>immona buy a webassembly book because i am very dumb and it's all very confusing
<cow_2001>it's like crafting interpreters but specifically for webassembly
<janneke>in hoot there's define-foreign, but can global javascript variables also be defined, or do i need to create a getter function (the latter works fine)?
<kestrelwx>I think you can duplicate constants in Scheme or set up a getter, yeah.
<cow_2001>janneke: getters is the way
<cow_2001>what i did, but didn't use (yet?), was to create a bunch of global variables, each a map of string to one specific type of value
<cow_2001>might be a bad idea?
<cow_2001>oh, and define getters and setters in define-foreigns
<janneke>cow_2001: ok
<cow_2001>ko
<janneke>ACTION is a bit puzzled by hoot/lib/web/socket.scm
<janneke>is it mandatory to send some kind of bytevector?
<janneke>guile-websocket examples just have (websocket-send ws "hello" #:mask? #f), but it seems that hoot's websocket crashes when receiving that?
<n|Phreak>ACTION cow_2001 you really don't need to learn wasm per se, just the hoot ffi here https://files.spritely.institute/docs/guile-hoot/latest/Foreign-function-interface.html and look at dthompsons examples here https://codeberg.org/spritely/hoot-ffi-demo/src/branch/main
<janneke>hmm, sending a bytevector seems to work -- weird
<n|Phreak>ACTION cow_2001 also I look at the dom and the data types , which match what the ffi is referencing https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Anatomy_of_the_DOM
<cow_2001>hello
<cow_2001>i'm a bit out of it now. will have to come back later
<n|Phreak>Its a learning curve but , just take your time going over it and use the MDN a lot because you can find all explanations there. At least this is what is helping me.