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>don't have the source in front of me right now <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" <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) <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 <elb>yeah but ... distributed euchre <cwebber>most fun blogpost you'll read all year? maybe maybe maybe <cwebber>depends on what kinds of things you like ;) <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.