Hi,
Suppose I have installed a number of libraries and have written a
program using them. Now, I want to profile my program. What is the
best way to get the profiling versions of the libraries installed?
Thanks,
David
___
Haskell-Cafe mailing list
On Jan 20, 7:27 pm, Don Stewart d...@galois.com wrote:
http://apfelmus.nfshost.com/monoid-fingertree.html
Thanks Apfelmus for this inspiring contribution!
For additional reading material on a use of Monoids may I suggest my
article in the Monad.Reader issue 11 How to Refold a Map.
If you have a giant unboxed array that will never become garbage, it
would be nice to put it somewhere where the GC won't bother with it.
Since Data.Array.Storable arrays are allocated in the C heap, I thought
it would be a good choice.
However, I am getting very poor performance due to the GC
On Tue, 2008-11-25 at 16:51 +0300, Bulat Ziganshin wrote:
Hello David,
Hello Bulat,
Tuesday, November 25, 2008, 4:45:28 PM, you wrote:
However, I am getting very poor performance due to the GC copying 6G in
each run. The only explanation that I can think of is that it is
copying my
On Tue, 2008-11-25 at 17:32 +0300, Bulat Ziganshin wrote:
Hello David,
Tuesday, November 25, 2008, 5:27:51 PM, you wrote:
When I was researching how to do this, I was really hoping for something
like static areas from the Lisp Machine operating system. You could
allocate any normal
On Sat, 2008-11-22 at 11:33 +, Thomas Schilling wrote:
Be careful, though. This only works if there's a single constructor
for your exception type. If there are multiple, you should write it
like this:
thing_to_try `catch` \(e :: MyErrorType) - case e of MyError1 _ -
..; MyError2 _ -
On Sat, 2008-11-22 at 15:27 +, Thomas Schilling wrote:
*Main tryJust errorCalls $ print $ [] !! 23
tryJust errorCalls $ print $ [] !! 23^JLeft Prelude.(!!):
index
too large
*Main tryJust errorCalls $ print $ throw NonTermination
tryJust
Hi, All.
I am trying to understand the new exceptions package in base-4
Control.Exceptions. The documentation for catchJust is the same as in
Control.OldException including this example:
result - catchJust errorCalls thing_to_try handler
Control.OldException provides the predicate errorCalls,
the tagsoup parser for parsing.
Then HXT really does lazy input.
_
David F. Place
[EMAIL PROTECTED]
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
.
_
David F. Place
[EMAIL PROTECTED]
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
Hi, All.
I needed to make a batch of edits to some input files after a big change
in my program. Normally, one would choose some scripting language, but
I can't bear to program in them. The nasty thing about using Haskell
is that giving regexes as string constants sometime requires two levels
On Wed, 2008-09-10 at 16:57 -0500, John Goerzen wrote:
Whoa, that is sneaky and clever. But it will fail the minute you try
to run this on a compiled program, because then getProgName will give
you the binary executable.
So, I won't do that. In addition to getProgName getting the binary,
Hi, all.
Say I have a function solve which is a constraint solver. It
reconfigures its input to be a solution. If there is no solution, it
returns the input.
solve :: a - Either a a
solve input output = maybe (Left input) Right $ solve' input
If there is a solution, it finds it in a few
On Sat, 2008-09-06 at 11:10 -0400, Brandon S. Allbery KF8NH wrote:
On 2008 Sep 6, at 7:30, David F. Place wrote:
Say I have a function solve which is a constraint solver. It
reconfigures its input to be a solution. If there is no solution,
it returns the input.
solve :: a - Either
Hi,
I am not able to build collections-0.3 because on an error. I hope
someone can give me a hint. Below, please find a short transcript with
various version information.
Cheers, David
[EMAIL PROTECTED] ~]$ cd Desktop/collections-0.3
[EMAIL PROTECTED] collections-0.3]$ runghc Setup.hs
---o-o-o---o-o-o(
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Oct 22, 2007, at 10:56 AM, Henning Thielemann wrote:
On Mon, 22 Oct 2007, David F. Place wrote:
BTW, the problem I am working on is an automated approach to lifting
pieces of Renaissance polyphony from 3-limit to 5-limit Just
Intonation.
I don't understand this sentence
is already done. (I'm not
surprised.)
___
(---o---o-o-o---o-o-o(
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
to hackage
Of course, that is all the non-fun parts :)
j.
ps. I have most of the code extracted into a .hs file already, if that
helps.
Thanks. I'll certainly take a look at it. Maybe I can find a way to
make the non-fun parts more fun.
___
(---o---o-o-o---o-o-o(
David F
://hackage.haskell.org/cgi-bin/hackage-scripts/package/
EdisonCore-1.2.1
in the Data.Edison.Coll.EnumSet module.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
and non-standard, but the users of the application have
taken it to a cult status even though it's purposefully kind of ugly.
http://puredata.info/
___
(---o---o-o-o---o-o-o(
David F. Place
mailto:[EMAIL PROTECTED
-o-o(
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
://www.haskell.org/mailman/listinfo/haskell-cafe
___
(---o---o-o-o---o-o-o(
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
. (map tails) .
inits
___
(---o---o-o-o---o-o-o(
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
).
___
(---o---o-o-o---o-o-o(
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
want:
*Main :t let untilM p f x = if p x then return x else untilM p f
= f x in untilM
let untilM p f x = if p x then return x else untilM p f = f x in
untilM :: (Monad m) = (a - Bool) - (a - m a) - a - m a
___
(---o---o-o-o---o-o-o(
David F. Place
mailto:[EMAIL
So, the next question is: Why isn't this already in Control.Monad?
On Mar 21, 2007, at 8:27 AM, Jules Bean wrote:
David F. Place wrote:
Interesting, but what if 'p' is also a monadic action? For
instance, it might access the state of the State monad which 'f'
is updating.
Then I'd stop
a else
return ()
I always wonder, when I have to do such things, if I just haven't
studied the libraries well enough.
___
(---o---o-o-o---o-o-o(
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi:
I'm having trouble compiling wxhaskell 0.9.4 under both ghc 6.4.2 and
ghc 6.5. Does anyone know where I should direct my queries?
Thanks.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
could write imperative code in Haskell to update the array in place
non-persistently. So, the decision not to use Haskell for that part
may be a case of premature optimization.
Cheers, David
David F. Place
mailto:[EMAIL PROTECTED
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
omputer. It is much slower on my 32 bit PPC powerbook for
obvious reasons. If you'd like to try it, I'll include an updated
BitTwiddle.hs .
Usage:
time ./bits 200 300 64
BitTwiddle.hs
Description: Binary data
David F. Place
mailto:[EMAIL PROTECTED
The Marriage of Heaven and
Hell.) I didn't make any changes to ones32 according to diff.
Cheers, David
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
| Quux deriving (Enum, Bounded)
sizeTest1 :: (Set Test1) - Int
sizeTest1 = sizeB Foo
Cheers, David
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
wonder what you think of
this. Also, I wonder what would be a good test to demonstrate this
possible interaction with the cache.
Cheers, David
ps. Thanks for the tip about UArray.
David F. Place
mailto:[EMAIL PROTECTED
as set
Or:
bitcount :: Word - Int
bitcount 0 = 0
bitcount x = 1 + bitcount (x .. (x-1))
-- | /O(1)/. The number of elements in the set.
size :: Set a - Int
size (Set w) = bitcount w
David F. Place
mailto:[EMAIL PROTECTED
| i `seq` bs `seq` z `seq` False = undefined
Indeed, I had tried this. It is slower for reasons that are
mysterious to me.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe
obvious edits; repeat until 0 errors
I had it running in a few minutes. I can't imagine doing that in any
other programming environment!
Cheers, David
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing
Please feel free
to port it.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
it a whirl, I'd love to know the result.
incrsud.hs
Description: Binary data
David F. Place mailto:[EMAIL PROTECTED] ___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi All,
Since there is some interest in my EnumSet module, I am reposting it
here with a BSD license in anticipation of its rebirth as Data.Set.Enum.
Cheers, David
EnumSet.hs
Description: Binary data
David F. Place
mailto:[EMAIL PROTECTED
example program (a
sudoku solver) runs several times faster.
I'll be grateful for any feedback on this. Perhaps something like it
would be useful included in the standard libraries.
Cheers, David
EnumSet.hs
Description: Binary data
David F. Place
mailto
.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
compare (LCA a) (LCA b)
| a == b = EQ
| a b = LT
| a b = GT
Perverted, but possible.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
flawlessly.
I do quality work.
I'm thinking of removing the UniverseSet class though. It seems to me
that Bounded serves the purpose just right.
Does that mean we lose the unary `complement` function? I am rather
fond of that.
David F. Place
mailto:[EMAIL
Thanks for your helpful suggestions. I took them to heart and
incorporated many of them in a new version.
sudoku.hs
Description: Binary data
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing
and say if any unidiomatic usages pop out. It solves
sudoku puzzles. (What pleasure do people get by doing these in their
heads?!?)
Cheers, David
sudoku.hs
Description: Binary data
David F. Place
mailto:[EMAIL PROTECTED
request your help in noticing obvious NO-NOs and
stupid
mistakes that we might have made.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
)
and a precompiled binary which I downloaded from
http://cbis.anu.edu.au/misc/darcs/
/usr/local/bin/darcs --version
1.0.6 (stable branch)
I am using MAC OS X 10.4
David F. Place
mailto:[EMAIL PROTECTED]
___
Glasgow-haskell
idn't find that implementation. Perhaps, as you suggest in your code, it's time for Data.Trie. -------- David F. Place mailto:[EMAIL PROTECTED] ___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listin
. :-) Your suggestion cleans up the
code quite nicely.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
use whatever emacs suggests. Is that not a good
strategy?
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
:x9:x1:xs
rotate 10 (x1:x2:x3:x4:x5:x:6:x7:x8:x9:x10:xs) = x2:x3:x4:x5:x:
6:x7:x8:x9:x10:x1:xs
rotate n (x:xs) = rot' n xs
where rot' 1 xs = x:xs
rot' n (x:xs) = x:rot' (n-1) xs
Cheers, David
David F. Place
mailto:[EMAIL PROTECTED
( 0.00s elapsed)
Total time4.54s ( 5.88s elapsed)
%GC time 49.3% (53.6% elapsed)
Alloc rate106,180,977 bytes per MUT second
Productivity 50.7% of total user, 39.1% of total elapsed
David F. Place
mailto:[EMAIL PROTECTED
.
Cheers, David
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
with Haskell is that the let
p =
creates source code *shorthand*.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
involve variables at all.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
of it in the
DFP reference document. Thanks.
i attached here two letters from july's dicussion on topic Confused
about Cyclic struture. hope this will help
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
elapsed
--
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
of
optimizations that hurt clarity, but in this case don't seem to help
performance.
Cheers, David
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
= arr (f1 . fst) arr (f2 . snd)
= (arr fst arr f1) (arr snd arr f2)
I can't find any reference to the syntax where the function left hand
side is just space. I'd greatly appreciate any insight.
David F. Place
mailto:[EMAIL PROTECTED
that I can depend on compilers to tail-
merge.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
the extremely contrived example of a
metacircular interpreter, what are some examples of the benefits of
this feature of lisp? What are some examples of language features
that are easy to add?
David F. Place
mailto:[EMAIL PROTECTED
(and without having to write your own monadic versions
of existing functions).
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
can do anything. Lisp has no advantage there.
On Sep 20, 2005, at 5:45 PM, Bill Wood wrote:
All of these made non-trivial extensions to Lisp, and all were of
arguably great utility.
David F. Place
mailto:[EMAIL PROTECTED
.
David F. Place
mailto:[EMAIL PROTECTED]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Yes, it does seem that it has just run out of memory. In that case,
the bug is the error message that instructs me to make a bug report.
On Sep 13, 2005, at 5:02 AM, Simon Marlow wrote:
On 09 September 2005 15:40, David F. Place wrote:
My program terminated with the following message
68 matches
Mail list logo