From: rgl@antares-labs.eu
To: 9front@9front.org
Subject: Re: [9front] new game: battleship (aka sink the fleet)
Date: Wed, 06 Sep 2023 12:38:49 +0200 [thread overview]
Message-ID: <D56494126DC6D1C875E99FB24FA810EF@antares-labs.eu> (raw)
In-Reply-To: <CAGOW0YPDX_iVLirj8Es4tM1beTOdN_wt-Qe+pUDUJjBVkx8N+A@mail.gmail.com>
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
next prev parent reply other threads:[~2023-09-06 10:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-02 15:19 rgl
2023-09-05 0:17 ` qwx
2023-09-05 10:34 ` rgl
2023-09-06 1:45 ` Amavect
2023-09-06 1:47 ` Stanley Lieber
2023-09-06 10:47 ` rgl
2023-09-06 11:37 ` sirjofri
2023-09-06 12:31 ` Sigrid Solveig Haflínudóttir
2023-09-06 10:38 ` rgl [this message]
2023-09-07 2:43 ` Amavect
2023-09-07 6:55 ` rgl
2023-09-10 11:56 ` rgl
2023-09-12 3:09 ` Amavect
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D56494126DC6D1C875E99FB24FA810EF@antares-labs.eu \
--to=rgl@antares-labs.eu \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).