IRC channel logs

2023-06-12.log

back to list of logs

<cow_2001>i understand why one would like to put Guile on a browser, but i don't understand Goblins.
<elb>Hi all. I'm doodling with goblins, and I have a situation where I'd kind of like to force synchronous fulfillment (or failure) of a promise. I don't see a way to do that within the goblins framework, is that correct? (Basically, I have code where I am eagerly requesting some information, and then when it gets to the point that I just need that information to continue, I'd like to synchronously wait for
<elb>its completion if it isn't yet complete.)
<elb>(And I'm willing to wrap this up in something that does what I'm looking for, but before I do that, I'm trying to figure out if goblins already provides this)
<fr33domlover>elb: Can you say more about why you need the synchronous fulfillment?
<elb>because I'm essentially interacting with a remote goblins object in a script, and at that point in the script I cannot make progress without the value returned by the promise
<elb>I can build an async framework that eventually resolves it, with a chain of async operations to follow and close out the script, but in terms of _straightforward implementation_, I'd like to gather the value and proceed synchronously from there on out
<dthompson>so what you're looking for here is a coroutine that makes an async process *look* synchronous. there's some unadvertised 'await' coroutine stuff in goblins. there's some internal debate around if it's something to recommend because of the potential for re-entrancy attacks when using continuations. I'm fully up to speed on all the particulars though
<elb>yeah, essentially, and that's how I'll implement it if I need to implement it; interact with a coroutine via fibers (or whatever, I'll need to dig deeper) in a synchronous fashion, such that the (on ...) resolves and notifies a blocking function of its completion
<elb>but honestly I anticipate that this synchronous interaction will _go away_ in the future, it's more for testing and bootstrapping than a final implementation, so I hate to go out of my way to accomplish this if there's an easy way
<dthompson>look for the await stuff
<dthompson>I think the opeator might be <<-
<dthompson>don't have the source in front of me right now
<juliana[m]>would listen-to facilitate writing this code?
<elb>thanks, that's enough to dig into
<elb>yeah I looked at listen-to, but it wasn't clear to me that it actually synchronized things, I think it just puts an intermediate step in the asynchronous resolution (but I haven't consulted the code)
<dthompson>er earlier I meant to say "I'm *NOT* fully up to speed on all the particulars"
<dthompson>woops
<elb>I understood :-)
<dthompson>:)
<elb>I am, by the way, on my way to building a MUD, as I believe you just did for hte lisp game jam, and Christine has done several times in demos :-)
<elb>(as an exercise, more than as a product, but if a product arises then more's the better)
<dthompson>oh cool :)
<dthompson>have fun with that!
<elb>it was specifically chosen to be a project that could not avoid being fun ;-)
<elb>I was originally going to make a card game, but GUI stuff is tedious for me
<dthompson>it's tedious for almost everyone :)
<elb>yeah but ... distributed euchre
<elb>some day
<cwebber>check THIS out!!! https://spritely.institute/news/hoot-wireworld-live-in-browser.html
<cwebber>most fun blogpost you'll read all year? maybe maybe maybe
<cwebber>depends on what kinds of things you like ;)
<RandyFarmer[m]>... So happy to see our toolchain surface in web browsers ...
<civodul>the WireWorld demo is a lot of fun!
<sneek>civodul, you have 1 message!
<sneek>civodul, attila_lendvai says: re disabled Shepherd services that are being respawn: once i have a reproducer, i'll send a bug report. until then a hint: `guix system reconfigure` is probably involved in triggering the situation.
<civodul>congrats
<civodul>oops
<dthompson>heh I wish sneek was channel-aware
<civodul>yeah