From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14494 invoked from network); 6 Sep 2023 10:40:28 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 6 Sep 2023 10:40:28 -0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by 9front; Wed Sep 6 06:38:53 -0400 2023 Received: by mail.gandi.net (Postfix) with ESMTPSA id D4FD660008 for <9front@9front.org>; Wed, 6 Sep 2023 10:38:51 +0000 (UTC) Message-ID: Date: Wed, 06 Sep 2023 12:38:49 +0200 From: rgl@antares-labs.eu To: 9front@9front.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-GND-Sasl: rgl@antares-labs.eu List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: basic scripting high-performance session standard property backend Subject: Re: [9front] new game: battleship (aka sink the fleet) Reply-To: 9front@9front.org Precedence: bulk hey amavect! long time no see :) > It is not a stack overflow. > Hint: add a print("I exit now :)\n") after the yield in threadmain. oh man, i keep committing this crime. for some reason i burnt in my brain that whenever you yield(), the thread doesn't die, it just idles doing nothing while the other threads get scheduled, until the entire proc dies. i really have to read libthread again, or nemo's 9intro section on the matter, which was very concise. > For example, the draw thread is controlling the board reset. > Instead, that should be sequenced by the game logic. > I would move the input and draw threads into main. i agree, but implementing it with the conclusion struct seemed like the simplest idea atm. in the end it's the same process, so it will have to wait (blocking) those five seconds after printing the banner, no matter the thread. but it can be done better for sure. > Expect some patches soon :) cool, i look forward to that. thank you very much! -rodri