IRC channel logs

2025-02-25.log

back to list of logs

<andreas-e>Hello, goblins!
<tsyesika>hello :)
<andreas-e>In my blog post, I am writing that "(all-of* promise)", where promise resolves to an empty list, never resolves, instead of also resolving to the empty list. Has this been fixed in 0.14 or 0.15? Now I do get the empty list.
<tsyesika> https://gitlab.com/spritely/guile-goblins/-/commit/953ce3dec2558b551df9a2270cfef8110cb90bef
<tsyesika>:)
<tsyesika>juli fixed it
<andreas-e>Excellent, thanks!
<andreas-e>I find code in my example that works, but I think it should not. Am I just lucky?
<andreas-e> ($ clients (cons (<- mycapn 'enliven (string->ocapn-id uri))
<andreas-e> ($ clients)))
<andreas-e>clients is a cell.
<andreas-e>I wonder why I do not need "on" to check for the promise coming out of "<-".
<andreas-e>Or am I in the car factory setting? The 'enliven returns a promise so that the list in the clients variable increases. And when I later send a message to one of the clients, it gets pipelined, and since I wait for its resolution, there is no problem?
<tsyesika>exactly. your code adds the promise to the list and then when you want to you can message the promise as if it's the enlivened refr
<andreas-e>Okay, thanks for the confirmation! Very nifty indeed.
<garbados>hey! could someone use hoot to produce a goblins.wasm they could send my way? i'm on day two of trying to get hoot to work locally and i'm three helpers deep with no success
<dthompson>garbados: hey, sorry you're still having trouble with guix. there's no single goblins.wasm to send, but maybe I send a build that is sufficient. you're still looking to use it from js right?
<garbados>yep
<garbados>ideally i just stick some files in a directory, serve them over http, and start hacking
<dthompson>you'll be limited to the very small amount of api surface I've exposed, but you could try starting with the files served here: https://files.spritely.institute/embeds/goblins-js-prototype/
<dthompson>that page is blank but it writes a message to the console. very minimal prototype of this sort of thing.
<dthompson>goblins.wasm is here: https://files.spritely.institute/embeds/goblins-js-prototype/goblins.wasm
<dthompson>garbados: are you a git-annex user by any chance?
<dthompson>reason I'm asking is because our files server is actually a git-annex repo that you can clone and get the files without having to download them individually, as mentioned here https://files.spritely.institute/
<garbados>nope
<dthompson>that's okay. no need to add another yak to shave.
<dthompson>just figured I'd mention it.
<dthompson>you're on the bleeding edge of the bleeding edge here lol
<garbados>great, i'll start messing around with those files
<garbados>i look forward to seeing a production build on a cdn someday
<dthompson>we made this prototype quickly to demostrate to a funder that we *could* do this sort of thing
<garbados>i'm not sure why i've had such consistent problems with guix. i've endeavored multiple times, across multiple clean systems, across different operating systems, and it has never ever been easy or straightforward
<dthompson>yeah idk I wish I could help troubleshoot more, fresh installations usually go smoothly for me. sometimes I just forget to 'hash guix' after my first 'guix pull' but that's usually it
<garbados>we are umpteen clean builds deep, two today alone
<dthompson>when you run 'guix --version', what do you see?
<dthompson>(if you feel like messing with it any more at all)
<garbados>`guix (GNU Guix) 8bc831325a905dbd9015739b58e3a5138d2217da`
<garbados>earlier it was 1.4.0
<dthompson>okay showing a commit is a good sign
<dthompson>that is indeed the latest commit in the guix repo
<dthompson>what does 'guix search guile-hoot' print?
<garbados>so, unlike last night, it does show up now
<garbados>name: guile-hoot // version: 0.6.0
<garbados>but it doesn't add `compile-wasm` to guild
<dthompson>ah! okay you are very close
<garbados>guild compile-wasm -o js/goblins.wasm js/goblins.scm => guild: unknown script "compile-wasm"
<dthompson>that sounds like a load path issue. happens all the time
<dthompson>are you in a guix shell?
<dthompson>like 'guix shell guile-next guile-hoot'?
<garbados>not currently
<garbados>entering a guix shell and running compile-wasm results in => module not found (goblins)
<dthompson>okay, good progress! that error is very much expected
<dthompson>so, because hoot is a cross-compiler it doesn't use guile's load path (GUILE_LOAD_PATH) to search for modules
<dthompson>we have plenty of tooling work to do still so what you need to run for now is not particularly pleasant, but here's what it is:
<dthompson>guild compile-wasm -L /path/to/guile/module -L /path/to/guile-goblins -o js/goblins.wasm js/goblins.scm
<dthompson>for the path to the guile modules, you can either use a local checkout of the guile git repo *or* use the module sources from guix. I'll paste a command for the latter in a sec
<dthompson>something like this when using 'guix shell' ought to work: guild compile-wasm -L $GUIX_ENVIRONMENT/share/guile/3.0/ -L /path/to/guile-goblins -o js/goblins.wasm js/goblins.scm
<garbados>`In procedure module-lookup: Unbound variable: vals`
<dthompson>oh no, that's not good
<dthompson>arghhhh I know what this is
<dthompson>someone updated guile-next in guix and it's not the version I tested on before we released and it broke something in hoot
<dthompson>something I have fixed in the main branch
<garbados>ahhh
<dthompson>so... the way forward is to build hoot from git. I am sorry.
<garbados>well, lucky you, i've been attempting to build hoot from source for a while
<garbados>and that has also run into interminable problems
<dthompson>alternatively you can use a little guix package snippet for a git build
<garbados>oh?
<dthompson>yeah one sec I think I can send you a little snippet
<dthompson>then I have to go afk for awhile
<garbados>for sure, thank you for your help
<dthompson> https://gist.github.com/davexunit/446cc0b715e3ad9b47e27b7ae825f20d
<dthompson>you can save this to a file, conventionally named 'manifest.scm'
<dthompson>and then run 'guix shell -m manifest.scm'
<dthompson>that will give you the latest from the hoot main branch so it ought to work (famous last words)
<dthompson>ACTION goes afk for a bit
<garbados>`wrote `js/goblins.wasm'` 🙌
<garbados>now i just have to remember this incantation the next time it updates
<dthompson>garbados: cool, glad you are finally compilin'
<dthompson>you can also use the environment variable HOOT_LOAD_PATH instead of the -L flags
<theruran>garbados: nice!