Re: When is it safe to cheat?

2000-05-09 Thread Fergus Henderson
On 10-May-2000, Sverker Nilsson <[EMAIL PROTECTED]> wrote: > > Relevance for Haskell would be that you wouldnt be able to fork a > program written in C into a protected environment (functional > sandbox?) and know that its result would depend only on its input > arguments. So you couldnt safely d

Re: When is it safe to cheat?

2000-05-09 Thread Sverker Nilsson
Michael Hobbs wrote: > I believe that the P3 chips come with a noisy diode built-in, > specifically for the purpose of generating random numbers. You might try > to find a way to access that little gizmo. (Assuming that you're running > on a P3.) Interesting! Do you have any reference for this?

Re: When is it safe to cheat?

2000-05-09 Thread Michael Hobbs
Jan Skibinski wrote: > Any good idea? First prize: a bottle of something good. :-) In C, I've sometimes added in the memory location of an arbitrary variable, just for good measure. But that's not quite as secure in an open source environment. (Maybe not even that secure in a closed sourc

Re: Converting float to double.

2000-05-09 Thread Marcin 'Qrczak' Kowalczyk
Mon, 8 May 2000 20:42:10 -0700 (PDT), Ronald J. Legere <[EMAIL PROTECTED]> pisze: > I have a very simple question. What is the best way to > convert a float to a double? > I use fromRational.toRational, and the notes in the prelude > seem to imply that this is optimized into something sensible

RE: Showing tuples

2000-05-09 Thread Mike Jones
Sven, That explains it. My tuples are of size 20. Thanks, Mike Deriving works, but GHC currently only contains instance declarations for tuples up to 5 elements, so you have to write you own boring instances for larger ones. *yawn* Cheers, Sven -- Sven Panne

RE: Showing tuples

2000-05-09 Thread grust
Do you derive Show for MyData? > -Original Message- > From: Mike Jones [mailto:[EMAIL PROTECTED]] > Sent: 09 May 2000 05:58 > To: [EMAIL PROTECTED] > Subject: Showing tuples > > > Hi, > > I am having trouble with Show and tuples. > > I have a data structure, say: > > data MyData = ...

Showing tuples

2000-05-09 Thread grust
Hi, I am having trouble with Show and tuples. I have a data structure, say: data MyData = ... And a value, say: value = (MyData..., MyData..., MyData) Then try to: show value I get a compiler message from ghc 4.05 that says: No instance for `Show (MyData, MyData, MyData)... What is th

RE: Showing tuples

2000-05-09 Thread Chris Angus
Mike ... try this ...extend it to however long tuples you have data MyData = Foo | Bar deriving Show main = print (Foo,Foo,Foo,Foo,Foo,Foo) instance (Show tv1, Show tv2, Show tv3, Show tv4, Show tv5 , Show tv6) => Show (tv1,tv2,tv3,tv4, tv5,tv6) where showsPrec p (v1,v2,v3,v4,v5,v6) =

Re: Showing tuples

2000-05-09 Thread Sven Panne
Mike Jones wrote: > Yes, I do derive Show for MyData. I was surprised it did not work. Deriving works, but GHC currently only contains instance declarations for tuples up to 5 elements, so you have to write you own boring instances for larger ones. *yawn* Cheers, Sven -- Sven Panne

RE: Showing tuples

2000-05-09 Thread Mike Jones
Chris, Yes, I do derive Show for MyData. I was surprised it did not work. Mike -Original Message- From: Chris Angus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 09, 2000 12:57 AM To: 'Mike Jones'; [EMAIL PROTECTED] Subject: RE: Showing tuples Do you derive Show for MyData? > -Or

Re: When is it safe to cheat?

2000-05-09 Thread Jan Skibinski
On Tue, 9 May 2000, Frank Atanassow wrote: > Jan Skibinski writes: > >Any good idea? First prize: a bottle of something good. :-) > > There is a thing known as an Entropy Gathering Demon (EGD). > > >From http://www.lothar.com/tech/crypto/ : You have been nominated for the first

Re: When is it safe to cheat?

2000-05-09 Thread Ketil Malde
Jan Skibinski <[EMAIL PROTECTED]> writes: > Any good idea? First prize: a bottle of something good. :-) The easiest ought to simply have enough granularity in the gettimeofday() or equivalent. Sure you can guess the approximate time in hours or seconds, but can you guess it in micro- or nanose

Re: When is it safe to cheat?

2000-05-09 Thread Frank Atanassow
Jan Skibinski writes: > Good point. Short of reading some truly random device > (perhaps ambient temperature fluctuation) this can be always > theoretically defeated. I can only make life more difficult > to the attacker by trying to outsmart him algoritmically > (Or

Re: When is it safe to cheat?

2000-05-09 Thread Jan Skibinski
On Tue, 2 May 2000, Keith Wansbrough wrote: > Off-topic, I know, but even if this worked as I think you intend, > it would hardly be random and would certainly be unsuitable for use as a > nonce. Applying `mkStdGen' to the current time doesn't make it any more > random! You might as well use

RE: Showing tuples

2000-05-09 Thread Chris Angus
Do you derive Show for MyData? > -Original Message- > From: Mike Jones [mailto:[EMAIL PROTECTED]] > Sent: 09 May 2000 05:58 > To: [EMAIL PROTECTED] > Subject: Showing tuples > > > Hi, > > I am having trouble with Show and tuples. > > I have a data structure, say: > > data MyData = ..