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:
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:
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
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
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
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).
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 ++
[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.
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:
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
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
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
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:
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 ::
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:
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 =
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
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
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 $ \_ _ -
| 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
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
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
. . .
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.)
23 matches
Mail list logo