Deutsch   English   Français   Italiano  
<103dfs5$16t5l$1@solani.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!news.szaf.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: Mild Shock <janburse@fastmail.fm>
Newsgroups: comp.lang.prolog
Subject: OpenAPI Specification (OAS) goes full Monty [AsyncAPI] (Was: The
 magical "async" keyword again [Node.js v20.0.0])
Date: Tue, 24 Jun 2025 08:16:36 +0200
Message-ID: <103dfs5$16t5l$1@solani.org>
References: <1034bs9$1364p$1@solani.org> <1034c6f$136cd$1@solani.org>
 <1034dhp$1374f$1@solani.org> <103bcdl$15u3h$1@solani.org>
 <103bcmh$15ubr$1@solani.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 24 Jun 2025 06:16:37 -0000 (UTC)
Injection-Info: solani.org;
	logging-data="1275061"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101
 Firefox/128.0 SeaMonkey/2.53.21
Cancel-Lock: sha1:DYyy/C9V6G65WbYrNjpAH+yQ4k0=
In-Reply-To: <103bcmh$15ubr$1@solani.org>
X-User-ID: eJwNyMEBwzAIA8CVgkGiGQcw2n+E9J4Hp3EyCAYEWYPsPSb33Nu1w6v89cQVLdEWap15/zmlqO21RYWO1p8PhPEXQg==

Hi,

You see more and more frameworks try to get
flesh and blood async. I tell you, its a neglected
subject so far. There is a for example a whole

world of async streams already integrated
into the browser and node.js !

Für asynchrone API-Kommunikation mit unterschiedlichen 
Transportprotokollen ist AsyncAPI als Beschreibungsstandard
entstanden, der sich am OpenAPI-Konzept anlehnt
https://de.wikipedia.org/wiki/OpenAPI

Woa! This looks swagger:

Bringing Asynchronous APIs to the Forefront at APIDays Singapore
event, themed "Where APIs Meet AI: Building Tomorrow's Intelligent 
Ecosystems", providing an excellent platform to introduce AsyncAPI to 
the vibrant Asia-Pacific community.​
https://www.asyncapi.com/blog/2025-singapore-conf-summary

Bye


Mild Shock schrieb:
> Again JavaScript shines since the keyword "async"
> makes the difference. We have recently experienced
> its benefit, since we could remove all new Promise()
> calls in our code where we are juggling with tasks.
> 
> new Promise() is only needed for callbacks that
> then call resolve() or reject(), but task can
> just use await and try catch. Now without
> the keyword its a traditional test case:
> 
> test('synchronous failing test', (t) => {
>    // This test fails because it throws an exception.
>    assert.strictEqual(1, 2);
> });
> 
> With the keyword its a test case that
> can test timers and tasks:
> 
> test('asynchronous passing test', async (t) => {
>    // This test passes because the Promise returned by the async
>    // function is settled and not rejected.
>    assert.strictEqual(1, 1);
> });
> 
> Mild Shock schrieb:
>> A flesh an bood cooperative multitasking Prolog system
>> is sometimes tricky to do. We were agonizing over the
>> last days how we could test our timers and tasks.
>>
>> Our existing framework doesn't work, since it neither
>> waits for a timer callback to be fired and to complete,
>> nor for a task to complete. But its seems its just an
>> instance of a Promise again.
>>
>> Turn the test case itself into a Promise, and wait for
>> it. In Prolo terms, the test case is a success when the
>> .then() port gets reached with SUCCESS, or its a failure
>> if the .then() port gets reached with FAILURE or if the
>>
>> the .catch() port gets reached. Interesting framework
>> that does just that:, whereby the use assert, to turn
>> FAILURE into an exception:
>>
>> Node.js v20.0.0 - The test runner is now stable.
>> https://nodejs.org/api/test.html#describe-and-it-aliases
>>
>> BTW: Quite inventive vocabulary...
>>
>>
>>
>