[metapost] Re: a "randomseed" workaround
Karl Berry
karl at freefriends.org
Sun Mar 6 18:39:21 CET 2005
Hello Laurent and all,
> Setting seeds is system-dependant (because all portable
> solutions depend on the current time)
Taco, if it's allowed to be system-dependent, then how about using
/dev/random on systems that support it? That would be much, much, more
random than just using the current time. (There might be better things
than /dev/random these days, for that matter; a lot of work has gone
into this topic, since ssh and other crypto applications need
randomness.)
It would be helpful to add to mp documentation a fairly complete
table of primitives that are common to mf and mp.
No question. It would also be helpful to write a completely new MP
manual so that it does not depend on knowing MF at all. I can't tackle
projects of this magnitude, though -- I just volunteered (more or less
by accident) to make the minor doc fixes that were in the queue, and
updates as things go along.
If someone else would like to volunteer to work on bigger doc projects,
or take over the minor doc updates for that matter, I would be greatly
appreciative.
The current doc is available from sarovar (Larry, you asked me about
this separately). You can get it through CVS
(http://sarovar.org/projects/metapost/), or directly from the web:
http://cvs.sarovar.org/cgi-bin/cvsweb.cgi/doc/?cvsroot=metapost
It took me quite a while to locate the conversion
from string to numeric by "scantokens" (see below).
I'm not sure what I'm supposed to see below? Sorry, I guess I don't
know mp well enough to extract the meaning here. No problem to add more
info on the conversion, once I know what I'm supposed to be adding :).
%% Default for metafont is (in effect)
%% randomseed:= day + time*epsilon
This in itself is a useful thing to put in the manual, so I'll do that.
Thanks,
karl
More information about the metapost
mailing list