[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: guile-scheme bindings to GNU Mach and the Hurd
From: |
Ludovic Courtès |
Subject: |
Re: FYI: guile-scheme bindings to GNU Mach and the Hurd |
Date: |
Tue, 11 May 2021 22:29:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi!
Maxime Devos <maximedevos@telenet.be> skribis:
> Ludovic Courtès schreef op do 06-05-2021 om 18:30 [+0200]:
>> BTW, a dream of mine was to implement RPCs in Scheme. That is, you’d
>> have a macro that would essentially do the same work as MiG (the Mach
>> Interface Generator), and then we’d pass the bytes directly to
>> ‘mach_msg’.
>
> The lisp bindings have a binding to ‘mach_msg’ (not yet schemified).
> Note that the lisp hurd bindings never use "send-message", instead they
> bind the C bindings generated by MiG.
>
> Also, ‘implementing RPCs in Scheme’ is something I would like to see
> as well.
>
> One thing I have in mind, is that MiG RPCs can block, but mach_msg
> itself seems to be perfectly usable in a non-blocking way (maybe using
> port notifications?). If we use something like guile-fibers, and integrate
> guile-hurd with fibers, then we may be able to do crazy things like:
>
> * asynchronuously opening files, for free!
> * asynchronuous 'accept', for free!
> * asynchronuous disk I/O, for free!
> * asynchronuous ... practically anything, for free!
Oh yes, it has great potential.
And it cannot be That Hard (famous last words).
Food for thought!
> Another possibility is debugging the translator responsible for IP
> and at the same time running a web browser (or IRC client, or ...)
> based on guile-fibers+guile-hurd. The web browser wouldn't be overly
> bothered by the network translator temporarily being paused (for debugging)
> and therefore not responsing to the RPCs for 'connect' et al.
>
> Loading webpages will be delayed of course, but the browser itself won't
> hang (so you can still scroll, copy & paste, perhaps browse the file system
> ...).
This is already possible I believe, but mostly because browsers avoid
blocking on networking I/O.
Ludo’.