[ ghc-Bugs-699225 ] GHCi segfaults on expression evaluation

2003-03-06 Thread SourceForge.net
Bugs item #699225, was opened at 2003-03-07 03:21 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=699225group_id=8032 Category: None Group: 5.04.2 Status: Open Resolution: None Priority: 5 Submitted By: Carlos Eduardo Scheidegger (carlossch) Assigned to:

[ ghc-Bugs-699225 ] GHCi segfaults on expression evaluation

2003-03-06 Thread SourceForge.net
Bugs item #699225, was opened at 2003-03-07 03:21 You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=108032aid=699225group_id=8032 Category: None Group: 5.04.2 Status: Open Resolution: None Priority: 5 Submitted By: Carlos Eduardo Scheidegger (carlossch) Assigned to:

RE: How Make a executable file in Glasgow

2003-03-06 Thread Simon Marlow
Hello, i am beginner in Glasgow and Haskell, And I would like to know How I do to create a executable file in Glasgow (*.exe) See the GHC user's guide, here: http://www.haskell.org/ghc/docs/latest/html/users_guide/users-guide.html Cheers, Simon

Re: Effect of large binaries on garbage collection

2003-03-06 Thread Adrian Hey
On Tuesday 04 March 2003 12:36, Simon Peyton-Jones wrote: GHC does not copy big objects, so don't worry about the copying cost. (Instead of copying, it allocates big objects to (a contiguous series of) heap blocks, with no other objects in those blocks. Then the object can move simply by

Re: Stack profiling

2003-03-06 Thread Stephen Pitts
In the CVS version there's a -xt RTS flag that enables inclusion of thread stacks in a heap profile. It's crude, because thread stacks grow by doubling their size every time they run out of space, but it should be enough to show the difference between O(n) stack usage and O(1). Hmm. That sounds

RE: Stack profiling

2003-03-06 Thread Simon Marlow
In the CVS version there's a -xt RTS flag that enables inclusion of thread stacks in a heap profile. It's crude, because thread stacks grow by doubling their size every time they run out of space, but it should be enough to show the difference between O(n) stack usage and O(1).

Random Permutations

2003-03-06 Thread Markus . Schnell
Is there a library routine for random permutations? I didn't find any and did a quick hack, which works fine for my application (length of list 100), but what would be a more elegant way? permute :: StdGen - [a] - [a] permute gen [] = [] permute gen xs = (head tl) : permute gen' (hd ++

Re: Random Permutations

2003-03-06 Thread Jerzy Karczmarczuk
[EMAIL PROTECTED] wrote: Is there a library routine for random permutations? I didn't find any and did a quick hack... There are many algorithms. One, quite natural and quite fast (n log n; slower than linear, though...) consists in: 1. Generate N random numbers r_k, say, uniform between 0 and 1.

Re: URI handling code in Haskell available

2003-03-06 Thread Graham Klyne
At 08:25 06/03/2003 +0100, Johannes Waldmann wrote: On Wed, 5 Mar 2003, Graham Klyne wrote: I've released a first version of some URI parsing and handling code at: http://www.ninebynine.org./Software/HaskellURI.zip but this library is already in ghc:

source layout

2003-03-06 Thread Per Larsson
Hi all, I'm looking for some kind of style-guide for layout and indentation of haskell source code, can anyone help me? Thanks, Per ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: Random Permutations

2003-03-06 Thread Ralf Hinze
Is there a library routine for random permutations? I didn't find any and did a quick hack, which works fine for my application (length of list 100), but what would be a more elegant way? permute :: StdGen - [a] - [a] permute gen [] = [] permute gen xs = (head tl) : permute gen' (hd

RE: URI handling code in Haskell available

2003-03-06 Thread Simon Marlow
Oops. I didn't find that. Thanks for the pointer. (Thinks: does it work with HUGS?) It works with the latest hugs, November 2002 (use hugs +N to get the hierarchical libraries). A significant amount of my work went into the test cases and matching the parsing code against the

RE: Persistant (as in on disk) data

2003-03-06 Thread Simon Marlow
a recent post reminded me of a feature i'd like. for all i know it is already implemenetd in GHC so pointers are welcome. i'd like to be able to dump data structures to disk, and later load them. A Binary library was discussed recently on the libraries list. The thread starts here:

Re: Random Permutations

2003-03-06 Thread Andreas Abel
Is there a library routine for random permutations? I didn't find any and did a quick hack, which works fine for my application (length of list 100), but what would be a more elegant way? Well, sorting is a special case of permuting, so my idea was to use the library routine List.sortBy ::

Re: source layout

2003-03-06 Thread shae
Per Larsson [EMAIL PROTECTED] writes: I'm looking for some kind of style-guide for layout and indentation of haskell source code, can anyone help me? There are various pretty-printing libraries for Haskell, for example:

Re: Random Permutations

2003-03-06 Thread Janis Voigtlaender
Andreas Abel wrote: Well, sorting is a special case of permuting, so my idea was to use the library routine List.sortBy :: (a - a - Ordering) - [a] - [a] passing it a comparison function which ignores its arguments and simply returns a random bit when invoked, e.g. permute =

RE: source layout

2003-03-06 Thread Bayley, Alistair
There are various pretty-printing libraries for Haskell, for example: Yeah, but that's only half the job. You have to combine these with a Haskell parser in order to get a program with the functionality of (say) 'indent' (or have I misunderstood what the libraries do?) I though this was quite

ANNOUNCE: hmake-3.07

2003-03-06 Thread Malcolm Wallace
hmake-3.07 -- http://www.haskell.org/hmake We announce a new release, 3.07, of hmake, the automatic compilation manager for Haskell programs. This fresh version has the following improved configuration features over previous

Re: random permutations

2003-03-06 Thread George Russell
Andreas wrote Well, sorting is a special case of permuting, so my idea was to use the library routine List.sortBy :: (a - a - Ordering) - [a] - [a] passing it a comparison function which ignores its arguments and simply returns a random bit when invoked, e.g. permute = sortBy $ \_ _ -

Re: speedup help

2003-03-06 Thread oleg
| comb is only called from here: | sumbn n = sum [ bernoulli i * fromIntegral(comb (n+1) i) | i | - [0 .. n-1] ] Probably I misunderstand what bernoulli i stands for. If it is meant Bernoulli number B_i, http://mathworld.wolfram.com/BernoulliNumber.html then the above expression is

instance declaration troubles

2003-03-06 Thread Nick Name
I want to declare the following: class Get a where ls :: a b - IO [b] mk :: IO [b] - a b instance (Get a) = Functor a where fmap f x = mk (ls x = return . map f) But to have ghc type everything, I have to turn on -fglasgow-exts -fallow-undecidable-instances

Re: speedup help

2003-03-06 Thread Bill Wood
Oleg has a very interesting approach; in particular, he avoids explicit recursion and (most) computing with rationals, while also replacing the factorials in binary coefficients by using successive rows of Pascal's triangle. He also skips over the B_{2k+1}, k 0, which are all 0. I slogged

Re: speedup help

2003-03-06 Thread Bill Wood
. . . This code seems to compute 'bernoulli 82' in less then a second, in Hugs (on a 2GHz Pentium IV). Just a note: I compiled and ran Oleg's and mine for comparison. The two seem to be of the same complexity, with Oleg's a little faster (modulo my using wall time; see previous msg.)