Deutsch   English   Français   Italiano  
<uurnn5$8u9b$1@i2pn2.org>

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

Path: ...!feeds.phibee-telecom.net!weretis.net!feeder6.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: fir <fir@grunge.pl>
Newsgroups: comp.lang.c
Subject: matrix.exe
Date: Sat, 06 Apr 2024 16:54:34 +0200
Organization: i2pn2 (i2pn.org)
Message-ID: <uurnn5$8u9b$1@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 6 Apr 2024 14:54:29 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="293163"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="+ydHcGjgSeBt3Wz3WTfKefUptpAWaXduqfw5xdfsuS0";
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
X-Spam-Checker-Version: SpamAssassin 4.0.0
Bytes: 3227
Lines: 67



yesterday i got nice remark related to
teh idea of "call queue" i described before

i will maybe remember that idea of call queue is
like that

void foo()
{
    for(int i=0; i<10;i++)
     queued f(i);
}

f(i) here abowe is not fired but each "call"
just stores a pointer to thsi function and argument
in "queue call" array - and the queue is then run
after the foo ends (or eventually maybe in some other
moment if that would be good) - the queue can be
called in sequential order but also could be
run in parralel covering multithreading in neat
form imo

what i noticed yesterday was like that:

i liek agent systems - i mean as i said also recently
the coding in is in good extent a metter of good coposition
and i find agents potentially as a very nice method
of composition

and here it shows if you have agent system you in fact
need something like call queue but not a temporal like
in those previose examples but permament i mean if

    for(int i=0; i<10;i++)
     queued f(i);

setups queue for 10 entries (each entry holds
function all) and you will not just execute whole queue
once and remove pointers but just execute it in loop
its good base for agent system

note you got 10 entries (agent update points) here and
each agents eventually could kill itself by removing
its pointer from the queue , also could like spawn
itself (by adding another cpointer to queue, like
increasing queue form 10 to 11 entries and so on)

so it is basic environment for such things as born, die,
spawn etc... i find it interesting..it seem to confirm
that the call queue idea is good and important thing


i started to think how i would write basic agent
system using that..posiibly queue should hold not only
update points but maybe also "state variables" of
given agent? im not sure - this is related
to thing i once wrote on this - imagine some simple
agent like say something which is drawed as a white
pixel on 2d black bitmap screen.. such agents could
be described by some entities (variables) that it has full
right to write by its own code but it also will be
described by some variables that shouldnt be
given for it to freally changed - as agents must
be managed by some "ruler" - and this is a whole side
topic to consider.. (not strictly the topic of
permement queue but somewhat partially also related
if the wuestion is how to design it all)