Path: csiph.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mild Shock Newsgroups: comp.lang.javascript Subject: Re: ANN: Dogelog Player 1.1.5 (HTTP Server) Date: Wed, 21 Feb 2024 00:56:55 +0100 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 20 Feb 2024 23:56:53 -0000 (UTC) Injection-Info: solani.org; logging-data="426234"; mail-complaints-to="abuse@news.solani.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.1 Cancel-Lock: sha1:V0m/0c0P2JeZPD11ShjEo3frFOM= In-Reply-To: X-User-ID: eJwNyskRACAIBLCWOBcsR0H6L0En37iCUWFwmM9XjQant9UFmfBSMYbK3HWPrzoaGPXc1PVDWI/uFNmnh+gBQAoVLA== Xref: csiph.com comp.lang.javascript:122829 Basically you can programm in so called "DIRECT STYLE" even if async I/O is involved, which might be even a shock for functional programming language users that are used to a lot of nonsense. See also: Async/Await for the Monadic Programmer https://www.youtube.com/watch?v=OH5cxLNTTPo DIRECT STYLE SCALA Scalar Conference 2023 https://www.youtube.com/watch?v=0Fm0y4K4YO8 Mild Shock schrieb: > > Well they have suspend/resume semantics. They > are not continuations. They aim is to provide > async/await and not only setTimeout(). > > As a result you don't need to write libraries > with a continuation parameters. This is very unlike > nonsense such as the express web framework. > > stackfulness > In contrast to a stackless coroutine a stackful > coroutine can be suspended from within a nested > stackframe. Execution resumes at exactly the same > point in the code where it was suspended before. > > stackless > With a stackless coroutine, only the top-level routine > may be suspended. Any routine called by that top-level > routine may not itself suspend. This prohibits > providing suspend/resume operations in routines within > a general-purpose library. > https://www.boost.org/doc/libs/1_57_0/libs/coroutine/doc/html/coroutine/intro.html#coroutine.intro.stackfulness > > > > Lawrence D'Oliveiro schrieb: >> On Tue, 20 Feb 2024 17:09:53 +0100, Mild Shock wrote: >> >>> The idea is that threads use a bouncer semaphore to get a permission to >>> execute and thus become “coroutines”. >> >> But they are still stackful coroutines, not stackless. >> >