Brought to you by W. F. Wong
Simple. Pick up the file
then unzip and untar it in one go by:
$ gunzip -c linda.tar.gz | tar xvf -
You should have the following three files in a new sudirectory named linda:
$ cc -c -O linda.c
This will produce the file "linda.o". To compile the prime finder
$ cc -o primes -O primes.c linda.o -lpthread -lm
"-lm" links in the math library and you can do without
it if you don't need
math functions. But the "-lpthread" which brings in the Posix
thread library is compulsory.
out (format-string, arguments, ...);
where format string looks like a C printf format-string except that it can only take "%d" (integer), "%f" (float), "%c" (char) and "%s" (string). So for example,
out ("%s%d", "This is a test", j);
will put out a 2-tuple, the one field being a string and the second an
integer. The actual values for these fields are supplied in the arguments.
in ("%s?d", "This is a test", &j);
will wait and match for a 2-tuple in the tuple space in which the first
field is to be the string "This is a test" and the second integer field of
the corresponding out tuple is written into the location pointed to be the
integer pointer "&j". For output fields, you must supply a valid pointer
which points to a location of the type specified.
This stuff was written in less than a day - and under the influence of Kurt
Cobain and Nirvana, and a cup of strong Japanese green tea.
So I expect tons of bugs. Please send
the problematic program. You are free
to modify this poorly documented program anyway you see fit - just let me
know if you've done something interesting with it.
Last updated 31 January 1997 - wongwf