Carl Mäsak
Carl Mäsak
[This blog post](https://mikelevins.github.io/posts/2020-12-18-repl-driven/): > Try this in your favorite repl: > > Define a function, `foo`, that calls some other function, `bar`, that is not yet defined. Now call `foo`....
> I think the option to _edit the expression that failed_ (usually a call) would go a long way. Visual Studio [has this](https://learn.microsoft.com/en-us/visualstudio/debugger/edit-and-continue-visual-csharp?view=vs-2022), for C# and a number of other...
> The fastfunc, however, ignores this. Might be worth an extra check to see if similar fastfuncs (that also loop down a list in the same way) are similarly susceptible....
Ok, for some reason the _error handler_ ends up in a loop where it gets called repeatedly.
Ok, I bisected the hang, and the culprit is 7932c720a5bdd3d6fe6f3edcca62fac467193faa, "Introduce an 'async call' mechanism" from about this time last year. I kind of suspected it would be that one....
I have another short example/symptom of this problem: ``` > (set x '(a . b)) (a . b) > (list x) ((a . b)) > (append x nil) Error: car-on-atom...
Here's the thing. The `err` function creates an async call: ``` return make_async_call( $err, [$message_symbol], sub { my ($result) = @_; return $result; }, ); ``` That `err` function is...
> [...] but then I realized that this can probably be expressed in pure Bel, using threads and a modicum of cleverness. Stay tuned. Here's the general principle, nicely formatted...
``` > (do (set aborted nil) (thread (do (repeat 20) (set aborted t))) ; meanwhile, in the main thread (catch (let n 0 (while (< (++ n) 1000) (if aborted...
I just got a better idea — which I added to the (private) bel-masak-prelude repo as `bind-fn/call-limit` and `bind-fn/timeout`. It would be sweet to be able to use those functions...