> Well, trurly random value is hard to get, on Linux resonably good
> approximation is '/dev/uradom' ('/dev/random' may be better, but it
> blocks when it has too little randomness).
Oh, /dev/urandom would be sufficient for my purpose. I'm not doing
cryptography.
Pseudorandom numbers are otherwise also quite enough. But it should be
possible to seed them in a somewhat random way.
Since I have no idea how to read a SingleInteger from /dev/urandom, I
must wait until you find time to add it to FriCAS.
But it is not too urgent.
While looking for another solution to my problem, I noticed that
Matrix(X) has no hashUpdate! implemented.
> BTW. For somewhat unique file name it is usual to use process id
Yes, but how to get the process id in SPAD?
x: SingleInteger := processID() ???
> If somebody already has this file the utility loops. The point here
> is that with some amount of randomenss chance of clash is reasonably
> low and the way of opening means that file is unique. That would
> need Posix bindings -- I am thining of adding that (bypassing Lisp),
> but other things keep me busy.
No, I don't just want to create a file with random name. I need a
filename that is not in use. Together with a file random.mat I need to
create a file random.rhs with the same name but different extension.
So in some sense /dev/urandom would be the better solution to my problem
at hand.
Ralf
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/4707e228-1711-c6a2-9077-950df628a962%40hemmecke.org.
For more options, visit https://groups.google.com/d/optout.