Discussion:
Inefficient BlackBox 1.5 Obx example
(too old to reply)
Nameless
2005-12-27 19:37:37 UTC
Permalink
The action performed by the Obx/Primes... menuitem seems to
be incredibly inefficient, taking over 30 seconds to find
the 168 primes given an upper limit of 1000. This is with a
fresh computer start, no user activities otherwise. A most
disappointing performance if the purpose of this example is
to attract programmers to BlackBox, ie besides illustrating
background processing in BlackBox.

By comparison, a Prolog implementation of the Erastothenes
algorithm takes just 0 secs (rounded). FWIW, Prolog is not
known to be a number cruncher!

Has anyone implemented an efficient Erastothenes algorithm
in BlackBox that they wouldn't mind sharing here?
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
Chris Burrows
2005-12-27 23:43:26 UTC
Permalink
Post by Nameless
The action performed by the Obx/Primes... menuitem seems to
be incredibly inefficient, taking over 30 seconds to find
the 168 primes given an upper limit of 1000. This is with a
fresh computer start, no user activities otherwise. A most
disappointing performance if the purpose of this example is
to attract programmers to BlackBox, ie besides illustrating
background processing in BlackBox.
Remember the principle write the code to run first and then write it to run
fast. A tutorial example should show code that is easy to read and
understand. The more code is optimised for performance, the less
comprehensible it usually becomes.
Post by Nameless
Has anyone implemented an efficient Erastothenes algorithm
in BlackBox that they wouldn't mind sharing here?
I have three different BlackBox versions - two that use simple arrays, and
one that is much more memory efficient using an array of sets. I just timed
the one that uses an array of BOOLEAN and it took less than 10 seconds to
generate all primes up to 32,000,000. The prime-generating part only takes
about 20-30 lines of code - you should have more fun trying to do it
yourself, and will learn more about BlackBox in the process than if I was
just to show it to you.

If you want to try running a GPCP web-based version that uses a similar, if
not the same, Component Pascal algorithm, click on:

http://www.cfbsoftware.com.au/prime.aspx

This application finds the factors and closest prime of the number entered.
It takes a few seconds the first time it is run but after that you can enter
numbers up to 13 digits and you'll get an almost instantaneous response. It
does start to slow down significantly after 14-15+ digits.

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
j***@yahoo.com
2005-12-29 17:52:36 UTC
Permalink
Also one needs to bear in mind that the point of
the "Primes" exercise in BlackBox isn't to show
how fast you can calculate primes, but to
show how things can be processed in the
background. The algorithm used is the
"slow" primes. If you implemented the
Sieve of Erathomes it would be much faster,
but then that wouldn't highly the background
processing which is the point of the example.

That doesn't seem like much
today when most modern OS's are
multithreaded, but back in 1994 when Oberon/F
was first released most of the world was
using Windows 3.1 which only had
cooperative multitasking.

Oberon/F uses cooperative multitasking
also, but it's a scheme known as
"single process multitasking". Basically
you take the routine you want processed
in the background and break it down to
a single repeated "step". Then this step
is put on a queue and gets called
repeatedly along with other steps or
"actions". (Oberon System 3 and V4
call them "tasks").

The beauty of SPM is that you never
have to worry about saving the "state"
of the task as you do in preemptive
multitasking and in MOST cooperative
multitasking schemes.

Active Oberon (BlueBottle) uses a
preemptive multitasking scheme.

I suppose BlackBox could use
something more "exciting" for it's
background processing example,
such as a "Mandeblot" viewer or
a raytraycer. Oberon V4 has a
raytraycer that uses a background
task. BlueBottle has a Mandelblot
viewer.

Regards,

John M. Drake
Chris Burrows
2005-12-29 23:36:13 UTC
Permalink
Post by j***@yahoo.com
Also one needs to bear in mind that the point of
the "Primes" exercise in BlackBox isn't to show
how fast you can calculate primes, but to
show how things can be processed in the
background.
Good point - I should have had a closer look at the example before
responding!

Thanks for the additional useful info. Newcomers should note that Oberon/F
was the original name of BlackBox.

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
Nameless
2005-12-30 00:24:06 UTC
Permalink
Post by Chris Burrows
Post by j***@yahoo.com
Also one needs to bear in mind that the point of
the "Primes" exercise in BlackBox isn't to show
how fast you can calculate primes, but to
show how things can be processed in the
background.
Good point - I should have had a closer look at the example before
responding!
Precisely the point that was mentioned in the original
message. Please do read the message carefully before
responding, Chris--your reply was both destructive and
self-serving.
Post by Chris Burrows
Thanks for the additional useful info. Newcomers should note
that Oberon/F was the original name of BlackBox.
Thanks, that is useful information.
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
Chris Burrows
2005-12-30 02:01:29 UTC
Permalink
Post by Nameless
Post by Chris Burrows
Good point - I should have had a closer look at the example before
responding!
Precisely the point that was mentioned in the original
message. Please do read the message carefully before
responding, Chris--your reply was both destructive and
self-serving.
My apologies - that certainly was not the intention.

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
Nameless
2005-12-30 00:28:43 UTC
Permalink
Post by j***@yahoo.com
Also one needs to bear in mind that the point of
the "Primes" exercise in BlackBox isn't to show
how fast you can calculate primes, but to
show how things can be processed in the
background. The algorithm used is the
"slow" primes. If you implemented the
Sieve of Erathomes it would be much faster,
but then that wouldn't highly the background
processing which is the point of the example.
Sure it would, just input a large enough upper limit.

[snipped]
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
Chris Burrows
2005-12-30 04:41:30 UTC
Permalink
Post by Nameless
Has anyone implemented an efficient Erastothenes algorithm
in BlackBox that they wouldn't mind sharing here?
Here is one that generates primes up to 20,000 based on Wirth's Oberon-0
example:

http://www.modulaware.com/mdlt64.htm


MODULE sieve;
(* Eratosthenes Sieve prime number generation program *)

IMPORT StdLog;

CONST size = 10000;
VAR
flags: ARRAY size + 1 OF BOOLEAN;
i, prime, k: INTEGER;

PROCEDURE Generate*;
BEGIN
FOR i := 0 TO size DO flags[i] := TRUE END;
FOR i := 0 TO size DO
IF flags[i] THEN
prime := i * 2 + 3;
k := i + prime;
WHILE k <= size DO
flags[k] := FALSE;
k := k + prime
END;
StdLog.Int(prime);
StdLog.Ln
END
END
END Generate;

END sieve.

It is reasonably efficient but it is not an optimal solution.

Most of the execution time is taken writing to the log. e.g. without the
write statements it takes a second or two on a 1.6Ghz Pentium to generate
primes up to 2,000,000.

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
Nameless
2006-01-03 15:56:22 UTC
Permalink
Post by Chris Burrows
Post by Nameless
Has anyone implemented an efficient Erastothenes algorithm
in BlackBox that they wouldn't mind sharing here?
Here is one that generates primes up to 20,000 based on Wirth's Oberon-0
http://www.modulaware.com/mdlt64.htm
MODULE sieve;
(* Eratosthenes Sieve prime number generation program *)
IMPORT StdLog;
CONST size = 10000;
VAR
flags: ARRAY size + 1 OF BOOLEAN;
i, prime, k: INTEGER;
PROCEDURE Generate*;
BEGIN
FOR i := 0 TO size DO flags[i] := TRUE END;
FOR i := 0 TO size DO
IF flags[i] THEN
prime := i * 2 + 3;
k := i + prime;
WHILE k <= size DO
flags[k] := FALSE;
k := k + prime
END;
StdLog.Int(prime);
StdLog.Ln
END
END
END Generate;
END sieve.
Interesting, I haven't seen this algorithm before (in any
programming language). Of course, one might want to add the
line 'StdLog.Int(2); StdLog.Ln;' immediately after 'BEGIN'.
Post by Chris Burrows
It is reasonably efficient but it is not an optimal solution.
Hmmm, this rather begs the question: 'What then is an
optimal solution?' Feel free to answer. ;)
Post by Chris Burrows
Most of the execution time is taken writing to the log. e.g.
without the write statements it takes a second or two on a 1.6Ghz Pentium
to generate primes up to 2,000,000.
I concur.

Many thanks, Chris--you're in my good books again. :)
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
j***@yahoo.com
2006-01-04 16:47:10 UTC
Permalink
Post by Chris Burrows
Post by Nameless
Has anyone implemented an efficient Erastothenes algorithm
in BlackBox that they wouldn't mind sharing here?
Here is one that generates primes up to 20,000 based on Wirth's Oberon-0
http://www.modulaware.com/mdlt64.htm
MODULE sieve;
(* Eratosthenes Sieve prime number generation program *)
IMPORT StdLog;
CONST size = 10000;
VAR
flags: ARRAY size + 1 OF BOOLEAN;
i, prime, k: INTEGER;
PROCEDURE Generate*;
BEGIN
FOR i := 0 TO size DO flags[i] := TRUE END;
FOR i := 0 TO size DO
IF flags[i] THEN
prime := i * 2 + 3;
k := i + prime;
WHILE k <= size DO
flags[k] := FALSE;
k := k + prime
END;
StdLog.Int(prime);
StdLog.Ln
END
END
END Generate;
END sieve.
It is reasonably efficient but it is not an optimal solution.
Most of the execution time is taken writing to the log. e.g. without the
write statements it takes a second or two on a 1.6Ghz Pentium to generate
primes up to 2,000,000.
--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
I took your code and turned it into a background "action".

MODULE ObxSieve;
(* Eratosthenes Sieve prime number generation program *)

IMPORT Services, Views, TextModels, TextMappers, TextViews;

CONST stepSize = 1000; size = 100000;
TYPE
PrimeAction = POINTER TO RECORD (Services.Action)
to, i, prime: INTEGER;
flags: ARRAY size + 1 OF BOOLEAN;
f: TextMappers.Formatter
END;

VAR
primeDlg*: RECORD
to*: INTEGER;
END;

PROCEDURE (a : PrimeAction) Do;
VAR
step, k : INTEGER;

BEGIN
step := 0;
WHILE (step < stepSize) & (a.i <= a.to) DO;
INC(step);
IF a.flags[a.i] THEN
a.prime := a.i * 2 + 3;
k := a.i + a.prime;
WHILE k <= a.to DO
a.flags[k] := FALSE;
k := k + a.prime;
END;
a.f.WriteInt(a.prime); a.f.WriteLn;
END;
INC(a.i);
END;
IF a.i <= a.to THEN
Services.DoLater(a, Services.now);
ELSE
Views.OpenView(TextViews.dir.New(a.f.rider.Base()))
END;
END Do;

PROCEDURE StartPrimes*;
VAR a: PrimeAction;
i : INTEGER;
BEGIN
NEW(a);
a.to := primeDlg.to;
a.i := 0;
FOR i := 0 TO a.to DO a.flags[i] := TRUE END;
a.f.ConnectTo(TextModels.dir.New());
a.f.WriteInt(2); a.f.WriteLn;
Services.DoLater(a, Services.now);
END StartPrimes;
END ObxSieve.

On a 2 Ghz Pentium it takes about 4 seconds to calculate
primes up to 99,999. You can adjust the stepsize variable
for different speed results.

Something else to think about. While this algorithm is
much faster, it also takes a lot more memory. A lot
depends on what you are trying to accomplish and
what your contraints are.

Regards,

John M. Drake
Chris Burrows
2006-01-05 05:02:14 UTC
Permalink
Post by j***@yahoo.com
Something else to think about. While this algorithm is
much faster, it also takes a lot more memory. A lot
depends on what you are trying to accomplish and
what your contraints are.
True. An alternative algorithm for generating Primes that gives a good
balance between performance and memory usage can be found on Page 26 of
Wirth's 'Programming in Oberon (2004) - A derivative of Programming in
Modula-2 (1982)' .

This book can be downloaded in PDF form from:

http://www.oberon.ethz.ch/books.html

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
Nameless
2006-01-06 08:57:20 UTC
Permalink
Post by Chris Burrows
Post by j***@yahoo.com
Something else to think about. While this algorithm is
much faster, it also takes a lot more memory. A lot
depends on what you are trying to accomplish and
what your contraints are.
True. An alternative algorithm for generating Primes that gives a good
balance between performance and memory usage can be found on Page 26 of
Wirth's 'Programming in Oberon (2004) - A derivative of Programming in
Modula-2 (1982)' .
http://www.oberon.ethz.ch/books.html
Note, however, that this algorithm finds a predefined number
of primes, 250 in the book (defined by the constant N). This
is different than asking for all primes up to a given limit,
which is much more interesting.
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
Chris Burrows
2006-01-06 11:57:35 UTC
Permalink
Post by Nameless
Note, however, that this algorithm finds a predefined number
of primes, 250 in the book (defined by the constant N). This
is different than asking for all primes up to a given limit,
which is much more interesting.
... but not much more difficult - replace the static arrays with dynamic
ones and assign their length at runtime.

e.g.

Replace the declarations of M, N, P & V with

VAR
M, N: INTEGER;
P, V: POINTER TO ARRAY OF INTEGER;

When initialising the variables,

1. Prompt the user for either M or N and calculate the other (M is approx
sqrt(N))

2. Create the dynamic arrays:

NEW(P, M+1);
NEW(V, M+1);

then proceed as before.

--
Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp
Nameless
2006-01-06 15:58:16 UTC
Permalink
Post by Chris Burrows
Post by Nameless
Note, however, that this algorithm finds a predefined number
of primes, 250 in the book (defined by the constant N). This
is different than asking for all primes up to a given limit,
which is much more interesting.
... but not much more difficult - replace the static arrays with dynamic
ones and assign their length at runtime.
e.g.
Replace the declarations of M, N, P & V with
VAR
M, N: INTEGER;
P, V: POINTER TO ARRAY OF INTEGER;
When initialising the variables,
1. Prompt the user for either M or N and calculate the other (M is approx
sqrt(N))
NEW(P, M+1);
NEW(V, M+1);
then proceed as before.
:)
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
Josef Templ
2006-01-10 10:40:59 UTC
Permalink
Please note that the CPU utilization is at 0% all the time.
This means that therre must be some delay
between calling the individual action.DO steps.
I guess this results from BlackBox releasing
CPU control if there is nothing to do and
getting an event from Windows some time later
in order to resume execution at the time an action has been
registered for.
So the inefficiency of this example is, besides the algorithm,
also due to the way Windows handles timer events.

- Josef
Post by Nameless
The action performed by the Obx/Primes... menuitem seems to
be incredibly inefficient, taking over 30 seconds to find
the 168 primes given an upper limit of 1000. This is with a
fresh computer start, no user activities otherwise. A most
disappointing performance if the purpose of this example is
to attract programmers to BlackBox, ie besides illustrating
background processing in BlackBox.
By comparison, a Prolog implementation of the Erastothenes
algorithm takes just 0 secs (rounded). FWIW, Prolog is not
known to be a number cruncher!
Has anyone implemented an efficient Erastothenes algorithm
in BlackBox that they wouldn't mind sharing here?
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
Nameless
2006-01-10 15:26:28 UTC
Permalink
Post by Josef Templ
Post by Nameless
The action performed by the Obx/Primes... menuitem seems to
be incredibly inefficient, taking over 30 seconds to find
the 168 primes given an upper limit of 1000. This is with a
fresh computer start, no user activities otherwise. A most
disappointing performance if the purpose of this example is
to attract programmers to BlackBox, ie besides illustrating
background processing in BlackBox.
By comparison, a Prolog implementation of the Erastothenes
algorithm takes just 0 secs (rounded). FWIW, Prolog is not
known to be a number cruncher!
Has anyone implemented an efficient Erastothenes algorithm
in BlackBox that they wouldn't mind sharing here?
Please note that the CPU utilization is at 0% all the time.
This means that therre must be some delay
between calling the individual action.DO steps.
I guess this results from BlackBox releasing
CPU control if there is nothing to do and
getting an event from Windows some time later
in order to resume execution at the time an action has been
registered for.
So the inefficiency of this example is, besides the algorithm,
also due to the way Windows handles timer events.
Whatever the reason something needs to be done. The only
consequence of this example program that I can think of is
that programmers will be driven away from BlackBox/Oberon
even before they've got started. :(
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
Josef Templ
2006-01-10 15:52:26 UTC
Permalink
I do agree that this is not a very convincing example
and there are at least two rather simple changes that I
could imagine.

1. Open the text view right at the beginning,
not at the end, in order to make it visible that some
background activity is going on.

2. Add an additional parameter to the dialog for
the number of steps per action.Do(), which currently is
always 1.

I guess you will be surprised how fast it is despite
not usinig the best prime number algorithm on earth.

- Josef
Post by Nameless
Post by Josef Templ
Post by Nameless
The action performed by the Obx/Primes... menuitem seems to
be incredibly inefficient, taking over 30 seconds to find
the 168 primes given an upper limit of 1000. This is with a
fresh computer start, no user activities otherwise. A most
disappointing performance if the purpose of this example is
to attract programmers to BlackBox, ie besides illustrating
background processing in BlackBox.
By comparison, a Prolog implementation of the Erastothenes
algorithm takes just 0 secs (rounded). FWIW, Prolog is not
known to be a number cruncher!
Has anyone implemented an efficient Erastothenes algorithm
in BlackBox that they wouldn't mind sharing here?
Please note that the CPU utilization is at 0% all the time.
This means that therre must be some delay
between calling the individual action.DO steps.
I guess this results from BlackBox releasing
CPU control if there is nothing to do and
getting an event from Windows some time later
in order to resume execution at the time an action has been
registered for.
So the inefficiency of this example is, besides the algorithm,
also due to the way Windows handles timer events.
Whatever the reason something needs to be done. The only
consequence of this example program that I can think of is
that programmers will be driven away from BlackBox/Oberon
even before they've got started. :(
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
Nameless
2006-01-11 14:34:32 UTC
Permalink
Post by Josef Templ
I do agree that this is not a very convincing example
and there are at least two rather simple changes that I
could imagine.
1. Open the text view right at the beginning,
not at the end, in order to make it visible that some
background activity is going on.
Yes, I concur with this assessment.

PROCEDURE (a: PrimeAction) Do;
BEGIN
IF a.current = 3 THEN
Views.OpenView(TextViews.dir.New(a.f.rider.Base()))
END;
Step(a.current, a.divisor, a.f);
IF a.current <= a.to THEN
Services.DoLater(a, Services.now)
END
END Do;
Post by Josef Templ
2. Add an additional parameter to the dialog for
the number of steps per action.Do(), which currently is
always 1.
Isn't this governed by the constant stepSize, which is
currently set to 1000? If not, why don't you display your
community spirit by posting your proposed code changes
(thus alleviating us of the burden of doing exactly the
same thing)?
Post by Josef Templ
I guess you will be surprised how fast it is despite
not usinig the best prime number algorithm on earth.
I doubt it. Still, everything is relative... and wonders
have happened before. ;)
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
Josef Templ
2006-01-13 08:23:12 UTC
Permalink
Post by Nameless
Isn't this governed by the constant stepSize, which is
currently set to 1000? If not, why don't you display your
community spirit by posting your proposed code changes
(thus alleviating us of the burden of doing exactly the
same thing)?
No, this is not. There is at most one prime number found per step
no matter how big stepSize is.
Post by Nameless
Post by Josef Templ
I guess you will be surprised how fast it is despite
not usinig the best prime number algorithm on earth.
I doubt it. Still, everything is relative... and wonders
have happened before. ;)
It is very fast ... and the wonder is in the enclosed files below.

- Josef


StdCoder.Decode ..,1 ..d.....TfMlv9PvP7v91uMdPOTfPbf9T9N5nr8KwIinJiXxZ,Rgo,
.mu....
1Ak...v1,...58FTuPE,5TWyqlKrqKKrGrtumdGLmGorCquU2hgnRAXDFTvMUn7FTvMf1G2sET
fPdPMHfP9fQbf9hOO9vR7ONbvMoedhgrRiioedFWUkTeoxhmhgnpZHZijJC7ONbvM0.,.S.WL6
E.QklbcjRAktgdjZgZZh2hgnlsDor.kay4.qorGqmQiig76FUHZijJCbnWmqmqKWKqtcw7.,.B
y1A,orDE.0E.cUGpmWLuOpoKqvCbHZiYpedhA704TeKKw.bHfEWUmL.6..D.Fv16.,sUGpmWbB
xhYhAbndMHT9NY6Mw.sQq2Y6cwB.0.5T1w,QvBE.0E.kHP.86.QC18RdfQHfMf9R9vQ7ONb17.
,.D,,6.I12U.U,.JFyuv.U.2m,.b.1cUZT1E.sA6.,UO.,.16.c8U,UE0,6,M.E.emuKld4N,I
klTeoZg6hgVZgZJinpZK,6.C.2.C32.u12U0EHQ5BFnE2PP,EHYABlREsE2FJEyuv..V20k..E
.e0d8mBE,5TeEdKLqKKtCLLCJuIepZBGomCrl0ks,ktuGdKLqKa2V.ISE.Mls,se6.,k,,UnpZ
HldGrwmqmGomCb.AS.c9Ajg,0EtT.2.U6UWV.2.86.c918R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KBhZtQCJuGKfaqmSLWUlrcjJCkto8Y6cw3.0.k10.Xx.6.,sUOor8bB
xhYltQ8qorGqmY6Mw.sQq2Y6cwB.0.Bi.I,or0E.0E.E,RcjpBZvPNvQRtE19QdPOTfP7ONbvM
4zV.kruKuEWKqtcw5.0.70,.N,,E0MJ0bkNN8bUcEyapdPG40..1.,6.,Td1EkLu.oUwb,9f57
E,9z4U.ESE.EGE.Y.CZkNNKaYNR0b.6..A.6.,5lSP9E1mDvetDE,5zV.Cb4BhZZhYZcZRCo,6
.I96.I6,U.YUDdMWb,tMGbdtPuand90bmNOqaZ7Fmabd9Gbj,,..1.0EUWI52cNA.awCYnYZ.3
gwT.0.71,.N0,E0...Uk,..Cbk,G4U...1.0EUEQ4S0MmvE8nG2Ikl1UEhin3h0hioZijph2hA
U.E.6N6.6H6.G....RldYC1HtYCVGt.QCQ8d1E.2..4.2U.Td1MHBi00yGuU3RcCcUZD22U.UU
V.U6V.6,bGuYA5mqYAbHLQ6NnrQC9HWAB1HqwBDH.0kV0kkoB5nmYB,E..k.UUxUFMHBi00skj
V3RcC6U2.E,p6QcjpB6P9fQbf9b8RCoruKu.GomCb.Ay4,.sQRtET1U2V.sEMM.Et...ktu0.Y
62Umb.2..k2U.c.E.8k.0LX7cNY8.,k.mEw71lbUIrU6Rzc28ssH2.C2..C,0E..U6U..UIidn
74Ltc,6Utj00MyfUIAec7aR7a.YR1...
--- end of encoding ---
Nameless
2006-01-13 22:43:44 UTC
Permalink
Post by Josef Templ
Post by Nameless
Isn't this governed by the constant stepSize, which is
currently set to 1000? If not, why don't you display your
community spirit by posting your proposed code changes
(thus alleviating us of the burden of doing exactly the
same thing)?
No, this is not. There is at most one prime number found per
step no matter how big stepSize is.
Post by Nameless
Post by Josef Templ
I guess you will be surprised how fast it is despite
not usinig the best prime number algorithm on earth.
I doubt it. Still, everything is relative... and wonders
have happened before. ;)
It is very fast ... and the wonder is in the enclosed files
below.
As I said, everything is relative. ;) But, yes, very
convincing -- well done! Now all you need to do is to
persuade Oberon microsystems to use your version instead of
the current one.
--
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup.
Loading...