Re: Replacement for GMP: Update

2006-08-11 Thread Florian Weimer
* Peter Tanski: > Quite right; my mistake: under the OpenSSL license a developer cannot > mention features of the software in advertising materials, so the > license grant of the GPL-OpenSSL program to the developer is void. > The reason I mentioned "users" only was that in the particular > proble

Re: Re[2]: Replacement for GMP: Update

2006-08-11 Thread skaller
On Fri, 2006-08-11 at 18:56 -0400, Peter Tanski wrote: > John, > > > After all on the average call where an object of that > > size is free already it is a single array lookup, we have: > > > > (a) fetch pointer (one read) > > (b) fetch next (one read) > > (c) store next as current (one write) >

Re: Replacement for GMP: Update

2006-08-11 Thread skaller
On Fri, 2006-08-11 at 21:08 +0100, Brian Hulley wrote: > Florian Weimer wrote: > > This is the offending part: > > > > * 3. All advertising materials mentioning features or use of this > > software > > *must display the following acknowledgement: > > *"This product includes cryptographic so

Re: Re[2]: Replacement for GMP: Update

2006-08-11 Thread Peter Tanski
John, After all on the average call where an object of that size is free already it is a single array lookup, we have: (a) fetch pointer (one read) (b) fetch next (one read) (c) store next as current (one write) This is true for memory access; it is not true for memory allocation. I do not

Re: Replacement for GMP: Update

2006-08-11 Thread Peter Tanski
Brian, Therefore I'd recommend that licenses for code used by GHC runtime should be either BSD or public domain. I agree. I was working on a rewrite of OpenSSL's BN from scratch-- maybe a rewrite of GMP would be better--but that is a huge undertaking for no other reason than these are big

Re: Re[2]: Replacement for GMP: Update

2006-08-11 Thread Peter Tanski
Simon PJ and Bulat, [the] ForeignPtr solution [has] gotten a lot cheaper in GHC 6.6 than it used to be, so it's worth trying. A merit of the approach is that is avoids fiddling with the bignum allocator at all. I actually did not know that until today; I have tried to keep up with the rapid

Re: Replacement for GMP: Update

2006-08-11 Thread Brian Hulley
Florian Weimer wrote: This is the offending part: * 3. All advertising materials mentioning features or use of this software *must display the following acknowledgement: *"This product includes cryptographic software written by * Eric Young ([EMAIL PROTECTED])" *The word 'cryptog

Re: Replacement for GMP: Update

2006-08-11 Thread Peter Tanski
Florian, This is the offending part: * 3. All advertising materials mentioning features or use of this software *must display the following acknowledgement: *"This product includes cryptographic software written by * Eric Young ([EMAIL PROTECTED])" *The word 'cryptograph

Re: class declaration in boot file

2006-08-11 Thread Gaal Yahas
(I forgot to say, this was with 6.4.2.) Another problem I'm having is that when I consume a datatype, its derived instances aren't available; and even in an hs-boot file, a 'deriving' clause is illegal on a type with no constructors. So I can't compile B in this case: module A where impo

Re: Replacement for GMP: Update

2006-08-11 Thread Florian Weimer
* Peter Tanski: > On the other hand, the OpenSSL FAQ at faq.html#LEGAL2> mentions that some "GPL" programs do not allow > binary combination (static linking) or interoperation (dynamic > linking) with OpenSSL. Honestly I have not seen any "GPL" licenses > like t

ANN: TextRegexLazy 0.70 (stable)

2006-08-11 Thread Chris Kuklewicz
What: "TextRegexLazy" version 0.70 Where: darcs get --partial http://evenmere.org/~chrisk/trl/stable/ (and darcs get --partial http://evenmere.org/~chrisk/trl/head/ ) The conversion to separate regex-* packages seems stable now. More changes will be done as part of interfacing with GHC. What

Re: dependingOn in 6.6

2006-08-11 Thread Adrian Hey
John Meacham wrote: data Dummy1 = Dummy1 intVar1 :: IORef Int intVar1 = unsafePerformIO (newIORef 0 `dependingOn` Dummy1) data Dummy2 = Dummy2 intVar2 :: IORef Int intVar2 = unsafePerformIO (newIORef 0 `dependingOn` Dummy2) normally, you would have to compile with -fno-cse to keep these two

Re: getMBlocks

2006-08-11 Thread Simon Marlow
Rich Fought wrote: Did you try GHC's heap profiler? Or simply running your program with +RTS -Sstderr will give you a clue about the shape of the heap usage - each line is a single GC, and it includes the amount of live data at that point. If your program has a flat heap profile and yet is

Re: Replacement for GMP: Update

2006-08-11 Thread Simon Marlow
Einar Karttunen wrote: On 10.08 11:16, Peter Tanski wrote: Paragraph 6 of the OpenSSL (1998-2005) license states that: * 6. Redistributions of any form whatsoever must retain the following *acknowledgment: *"This product includes software developed by the OpenSSL Project *for use i

Re: GHC 6.4.3 on FreeBSD

2006-08-11 Thread Simon Marlow
For the time being, I've committed a change that forces GHC to use -lthr on FreeBSD instead of whatever the default is (usually libpthread). This works around the hangs for me. If someone else on FreeBSD could verify this, I'd be grateful. You need to check out the 6.4 branch from CVS: $

RE: class declaration in boot file

2006-08-11 Thread Simon Peyton-Jones
Well this is odd. The manual (for 6.6 anyway) says that class decls are allowed in hs-boot files, but instance decls are not, whereas the code seems to say that class decls aren't but instance decls are! I will look into this. Meanwhile, I'm afraid you just can't put a class decl in the hs-boot

RE: Re[2]: Replacement for GMP: Update

2006-08-11 Thread Simon Peyton-Jones
The issue isn't that malloc is slow, but rather that we don't know when to call 'free'. To make sure that we do call free, we must make GHC's garbage collector remember when it drops the reference to the object, and then call free. That is what Peter refers to as the ForeignPtr solution. It's g

Re: Re[2]: Replacement for GMP: Update

2006-08-11 Thread skaller
On Fri, 2006-08-11 at 09:34 +0400, Bulat Ziganshin wrote: > why you say that ForeignPtr is slow? afaik, malloc/free is slow, but > starting from ghc 6.6 speed of _using_ ForeignPtr is the same as for Ptr Er, malloc/free is not slow .. its very fast. I implemented an arena based allocator (one whi