Replacement for GMP: Update

2006-08-09 Thread Peter Tanski
Simon PJ, Simon, Esa and John, Here is an update on what I have been doing so far in making a grand attempt to replace GMP. (1) evaluate replacement libraries LibTomMath: Pros- * has all the operators GMP offered Cons- *

Re: fork and ghc

2006-08-09 Thread skaller
On Wed, 2006-08-09 at 16:26 -0700, John Meacham wrote: > on another topic, I ran across this old paper online which gives an > exceedingly clever method of implementing a functional language compiler > doing real garbage collection and efficient tail calls in portable C > http://home.pipeline.com

Re: dependingOn in 6.6

2006-08-09 Thread John Meacham
On Wed, Aug 09, 2006 at 08:40:06AM +0100, Simon Peyton-Jones wrote: > What's the implementation you have in mind? It's sure to get in the way of > some optimisations; e.g. > ((\x.e) `dependingOn` y) arg > Maybe that doesn’t matter. I'm reluctant to build in optimisation rules for > depe

Re: fork and ghc

2006-08-09 Thread John Meacham
On Wed, Aug 09, 2006 at 10:15:45AM +0100, Simon Marlow wrote: > We provide System.Posix.forkProcess, which is a "controlled" version of > fork. It probably works ok in the single-threaded runtime, but I'd say it's > probably slightly dubious in the threaded runtime especially if you're > plannin

Foreign.Marshal.Alloc questions

2006-08-09 Thread Chris Kuklewicz
For the allocation functions in Foreign.Marshall.Alloc, are the function contracts that return new pointers such that the pointers are never nullPtr, or is it prudent to always check the new ptr? I can see on GHC than allocaBytes uses newPinnedByteArray# but I have not tracked down the source

Re: Announcing regex-tre-0.66 and benchmarks

2006-08-09 Thread Chris Kuklewicz
Simon Marlow wrote: On 09 August 2006 15:14, Chris Kuklewicz wrote: For 10^5 characters on String: PCRE 0.077s DFA0.131s TRE0.206s PosixRE0.445s Parsec 0.825s Old Posix 43.760s (Text.Regex using splitRegex) Old Text.Regex took 43.76 seconds on 10^5 characters to

class declaration in boot file

2006-08-09 Thread Gaal Yahas
I'm trying to solve a circularity problem with .hs-boot, but am getting the error: "Illegal class declaration in hs-boot file". The offending declaration is: class (Monad m, Functor m, Eq a, Data a, Typeable a) => ICoercible m a | a -> m I've tried with and without the fundeps. Data and Typeable

RE: Announcing regex-tre-0.66 and benchmarks

2006-08-09 Thread Simon Marlow
On 09 August 2006 15:14, Chris Kuklewicz wrote: > For 10^5 characters on String: > PCRE 0.077s > DFA0.131s > TRE0.206s > PosixRE0.445s > Parsec 0.825s > Old Posix 43.760s (Text.Regex using splitRegex) > > Old Text.Regex took 43.76 seconds on 10^5 characters to do a

RE: GHC 6.4.3 on FreeBSD (fwd)

2006-08-09 Thread Simon Marlow
Thanks Robert. I don't believe that particular bug is on our critical path, but I'm glad they have a fix. I haven't tried the patch myself, not having a FreeBSD build handy. The current status w.r.t. GHC is: - I merged a fix to the timeout program in our testsuite that fixes occasional ha

Announcing regex-tre-0.66 and benchmarks

2006-08-09 Thread Chris Kuklewicz
skaller wrote: On Mon, 2006-08-07 at 20:38 +0100, Chris Kuklewicz wrote: skaller wrote: Wouldn't it be nice to use Ville Laurikari's TRE package instead of PCRE? [It is also Posix compliant and drop in replacement for gnu regex .. as well as supporting nice extensions] It is possible to a

Re: fork and ghc

2006-08-09 Thread Simon Marlow
John Meacham wrote: I want to modify jhc to take advantage of mutiple CPUs to help mitigate its prodigious computational requirements and was curious how well ghc compiled programs deal with forking? my initial plan is that once jhc determines which modules need to be recompiled, it will fork(2)

Re: dependingOn in 6.6

2006-08-09 Thread Simon Marlow
John Meacham wrote: I was wondering if we could be sure to get dependingOn :: a -> b -> a dependingOn = in ghc 6.6? this has been discussed before, it is implemented in jhc and I have found all sorts of use for it as it can be used to control let floating and inlining in a nice general way

RE: dependingOn in 6.6

2006-08-09 Thread Simon Peyton-Jones
Hmm. It's pretty late in the day. What's the implementation you have in mind? It's sure to get in the way of some optimisations; e.g. ((\x.e) `dependingOn` y) arg Maybe that doesn’t matter. I'm reluctant to build in optimisation rules for dependingOn. Is the argument order right?

RE: Building GHC on OS X

2006-08-09 Thread Simon Peyton-Jones
You have to build the libraries before you build stage2. (the stage2 compiler relies on the libraries!) Just sit in the root directory of the tree (just above libraries/ and compiler/) and type 'make'. The library error message was a compiler bug, fixed yesterday. It should work now. Simon | -