On Sun, 18 Apr 2010, wren ng thornton wrote:
lift ma = morph (\k - join (fmap (k . return) ma))
Monad laws simplify that to
lift ma = morph (\k - ma = k . return)
The type of morph requires us to Church-encode things needlessly; what
we mean to say is: morph (fmap return ma).
Hmm.
On 04/19/10 02:15, Anders Kaseorg wrote:
I would be very happy to get the simpler interface to work, because it’s
Haskell 98. However, if I write
joinIO m = morphIO (\w - m= w)
morphIO' f = joinIO (f return)
and define catch using morphIO' instead of morphIO:
m `catch` h =
liamoc:
On 19 April 2010 05:29, Don Stewart d...@galois.com wrote:
That's great info -- we do have an unregisterised ARM port of GHC in
Debian, iirc. (And the LLVM backend can generate ARM code too)
Sounds good. With regards to LLVM, what dependencies does LLVM ARM
code have? Android
Hi Ozgur,
At least template-haskell-2.4.0.0 (which comes with GHC 6.12) has syntax for
type equality constraints [1], so I'm guessing it should support GADTs (I
haven't actually tested it). It also has syntax for type families.
Cheers,
Pedro
[1]
It seems like a reasonable and not-too-painful solution, thanks!
Concerning Haskell typesystem, I know it to be beautiful, but also kind of
complex. One of the great Haskell assets is genericity, but this complexity
sometimes encumbers this genericity.
But still, Haskell is -- in terms of
On Mon, 19 Apr 2010, Isaac Dupree wrote:
Do you see the difference?
Yes; my question is more whether Wren has a more clever way to get an
isomorphism (forall b. (m a - IO b) - IO b) - IO (m a) that would make
the simpler interface work out. (Or maybe I misunderstood what he was
getting at.)
Hello haskellers!
I'm trying to process an xml file with as little footprint as possible.
SAX is alright for my case, and I think that's the lightest way
possible. So, I'm looking at HaXml.SAX
I'm surprised to see that it takes about 56-60 MB of ram. This seems
constant relative to xml file
Arnoldo Muller wrote:
I want to generate some hamming distance statistics about a set of strings.
filter (\x - x /= 0) $
map (uncurry hammingX) [(xs, ys) | xs - exampl, ys - exampl]
[...]
-- function posted in this mailing list
hamming2 :: String - String - Int
hamming2 xs ys =
Am Montag 19 April 2010 14:13:53 schrieb Heinrich Apfelmus:
Arnoldo Muller wrote:
I want to generate some hamming distance statistics about a set of
strings.
filter (\x - x /= 0) $
map (uncurry hammingX) [(xs, ys) | xs - exampl, ys - exampl]
[...]
-- function posted in
Subject: Re: [Haskell-cafe] hamming distance allocation
Am Montag 19 April 2010 01:03:14 schrieb Arnoldo Muller:
Hello all:
I want to generate some hamming distance statistics about a set of
strings. As explained in another e-mail in this list, I used the
following code to call the
For future reference, the procedure for changes like this is to follow
the Library Submissions guidelines at
http://www.haskell.org/haskellwiki/Library_submissions.
In this case you've already made a patch and a detailed proposal, so I
don't see any reason why we shouldn't consider it anyway.
Heinrich Apfelmus wrote:
Limestraël wrote:
Okay, I start to understand better...
Just, Heinrich, how would implement the mapMonad function in terms of the
operational package?
You just shown the signature.
Ah, that has to be implemented by the library, the user cannot implement
this.
Am Montag 19 April 2010 14:37:33 schrieb John Lato:
Is it really necessary to use Strings? I think a packed type, e.g.
Vector or ByteString, would be much more efficient here.
Not very much if the strings are fairly short (and the list isn't too long,
so there's not a big difference in
Dear Haskell friends,
I like to announce a Haskell style scanner at
http://hackage.haskell.org/package/scan
documented under http://projects.haskell.org/style-scanner/
It's best used in conjunction with hlint
http://community.haskell.org/~ndm/hlint/
and gives many suggestions regarding the
From: Daniel Fischer daniel.is.fisc...@web.de
Am Montag 19 April 2010 14:37:33 schrieb John Lato:
Is it really necessary to use Strings? I think a packed type, e.g.
Vector or ByteString, would be much more efficient here.
Not very much if the strings are fairly short (and the list isn't
Hello John:
Well I could use a packed type. The only letters that will be found in the
string are ATCG so yeah I don't need unicode and those things.
Will try out with vector or ByteString. Thanks! :)
On Mon, Apr 19, 2010 at 2:37 PM, John Lato jwl...@gmail.com wrote:
Subject: Re:
The strings will not be longer than 30 characters.
I am doing sets of 2000 (total of 2000^2 distance computations)
I am expecting that all the operations will be lazyly performed but at some
point I get a memory error.
Most of the memory is being allocated for the hamming distance and I am
Hello Christian,
On Apr 19, 2010, at 4:48 PM, Christian Maeder wrote:
I like to announce a Haskell style scanner at
http://hackage.haskell.org/package/scan
Feedback is welcome.
I get lots of multiple blanks which I'd rather not correct.
I often use multiple blanks to achieve vertical
On 10/04/2010 20:07, Iavor Diatchki wrote:
Hello,
I wonder if it might be possible to use just one primitive which
atomically changes the interrupt mask for a thread? Here is an example
of what I'm thinking:
data MaskingState = Unmasked
| MaskedInterruptible
On Mon, 19 Apr 2010, Christian Maeder wrote:
Dear Haskell friends,
I like to announce a Haskell style scanner at
http://hackage.haskell.org/package/scan
At first I thought it is a scanner (for whatever purpose) implemented in
Haskell style. No it checks whether a Haskell module follows a
Hello Daniel:
My % GC time is : 75.0% (81.4% elapsed) and I am compiling with -O2.
Thank you for clarifying about the pointers.
Slowly my memory grows up and eventually it explodes. I would expect that
the list comprehension is lazily evaluated and therefore at any given time I
am only
Sebastian Fischer schrieb:
Hello Christian,
On Apr 19, 2010, at 4:48 PM, Christian Maeder wrote:
I like to announce a Haskell style scanner at
http://hackage.haskell.org/package/scan
Feedback is welcome.
I get lots of multiple blanks which I'd rather not correct.
I often use
Hello
I am sorry for the silly question.
I have a function as the following
func:: ((Float,Float) -Bool) - Float - ((Float,Float) - Bool)
I am trying to make calculation in this type ((Float,Float) -Bool) with
Float and then pass the information to ((Float,Float) - Bool)
Thank again
On 10/04/2010 19:42, Iavor Diatchki wrote:
Hello,
It seems that rank-2 types are sufficient to make the more polymorphic types:
{-# LANGUAGE Rank2Types #-}
import Control.Exception
data Mask = Mask (forall a. IO a - IO a)
mask :: (Mask -
I wrote:
I did not find a way to configure scan to ignore multiple blanks.
The poor man's solution is to pipe the output through
grep --invert-match --regexp=multiple ([0-9]*) blanks
I agree with Henning about the hyphen option. This often (usually?)
means don't read from a file but
Henning Thielemann schrieb:
On Mon, 19 Apr 2010, Christian Maeder wrote:
Dear Haskell friends,
I like to announce a Haskell style scanner at
http://hackage.haskell.org/package/scan
At first I thought it is a scanner (for whatever purpose) implemented in
Haskell style. No it checks
On Mon, Apr 19, 2010 at 3:01 AM, Daniil Elovkov
daniil.elov...@googlemail.com wrote:
Hello haskellers!
I'm trying to process an xml file with as little footprint as possible. SAX
is alright for my case, and I think that's the lightest way possible. So,
I'm looking at HaXml.SAX
I'm
On 20 Apr 2010, at 00:57, Simon Marlow wrote:
My thoughts on the changes:
- yes to adding new_group to the CreateProcess record, and
corresponding support to System.Process.Internals
- no to adding runCommandNewGroup, and the other *NewGroup
functions. These were kept mostly for
On Sun, Apr 18, 2010 at 10:25 AM, Sean Leather leat...@cs.uu.nl wrote:
This is the annoying part about Haskell . I can not understand composition
.
One of the ways of understanding composition (and many other functions in
Haskell) is by trying to understand its type. Here it is shown by
Christian Maeder schrieb:
Henning Thielemann schrieb:
The updated Haskell code might be written to a new file by default. Then
I can interactively transfer the corrections I like to the original code
using Kompare. I would also not use '-' as option. How would you extend
the set of options
On Sun, Apr 18, 2010 at 9:02 PM, Brent Yorgey byor...@seas.upenn.eduwrote:
Conal,
Thanks for looking into this! Making (:-*) into a proper type seems
promising. I did try wrapping (:-*) in a newtype but that didn't
help (although I didn't expect it to).
What do you mean by a proper type?
Can you at least give an example of how you intend to use this func?
Since you do not describe it's behaviour, it is very hard to make a useful
comment (at least for me)
Best,
On 19 April 2010 16:54, Mujtaba Boori mujtaba.bo...@gmail.com wrote:
Hello
I am sorry for the silly question.
I
sorry
ok I am trying to make these calculation
func (x,y) s dg =((x*(cos dg) - y*(sin dg)),(x*(sin dg) - y*(cos dg)))
This work for type (Float - Float)
but how can make it work with ((Float - Float) - Bool)
because my main function that I want use with. it takes (Float,Float)
-Bool) I
Hello all:
I found my leak after adding some bang patterns in a different part of the
program. The compiler was generating all the combinations of the list
comprehensions and therefore the performance dropped very badly.
BTW, hamming is 2 times faster than hamming2.
Thank you as always!
Am Montag 19 April 2010 17:17:11 schrieb Arnoldo Muller:
The strings will not be longer than 30 characters.
For 20 -30 character strings, using ByteStrings should be better, in my
tests about 40% faster, allocation figures slightly lower, resident memory
much lower and bytes copied during GC
Am Montag 19 April 2010 17:53:27 schrieb Arnoldo Muller:
Hello Daniel:
My % GC time is : 75.0% (81.4% elapsed) and I am compiling with -O2.
Very bad. Can I see the code?
Thank you for clarifying about the pointers.
Not to forget the Ints for counting.
Slowly my memory grows up and
First of all, your function
func (x,y) s dg =((x*(cos dg) - y*(sin dg)),(x*(sin dg) - y*(cos dg)))
does NOT work for type (Float - Float), unless you mean that that is
the type of the unused parameter s. Also, your desired type ((Float -
Float) - Bool) itself looks suspicious. It must accept
Because it is the most utilitarian way to get a bunch of strict ByteStrings
out of a lazy one.
Yes it exposes an implementation detail, but the alternatives involve an
unnatural amount of copying.
-Edward Kmett
On Sat, Apr 17, 2010 at 6:37 PM, Ashley Yakeley ash...@semantic.org wrote:
Ketil
Daniel thank you for all your advice.
An additional ! bang pattern in convertIntToDouble fixed the issue! Also
using a foldl'
did the trick.
Now the program runs as it should with a constant amount of memory and in a
very small amount of time.
I believe these problems are one of the major
On 16/04/10 19:59, Daniel Fischer wrote:
Am Freitag 16 April 2010 20:50:25 schrieb Brian Hulley:
revealed a link to a US Patent (7120900) for the idea of implementing
the Unicode Bidirectional Algorithm (UAX #9
http://www.unicode.org/reports/tr9) in Haskell, making use, as far as I
can
Why is a function that gets a bunch of strict ByteStrings out of a lazy
one exposed?
In any case, it sounds like a similar situation to (==) on Float and
Double. There's a mismatch between the Haskellish desire for a law on
(==), and the convenient desire for -0.0 == 0.0, or for exposing
Hey everyone,
Has anyone done any work with bulk synchronous parallel computing in Haskell?
The idea behind the model is that you divide your computation into a series of
computation and communication phases, and it has recently occurred to me that
this might be an ideal setup for
This patent has zero practical impact.
When the patent was written there was no Unicode support, so the
implementation translates the input into lists of integers instead of
lists of characters. Crucially this step was also written into all
three independent claims (which are the only bit of
On Mon, Apr 19, 2010 at 09:40:25AM -0700, Conal Elliott wrote:
On Sun, Apr 18, 2010 at 9:02 PM, Brent Yorgey byor...@seas.upenn.eduwrote:
Conal,
Thanks for looking into this! Making (:-*) into a proper type seems
promising. I did try wrapping (:-*) in a newtype but that didn't
help
=On Mon, Apr 19, 2010 at 06:24:25PM +0200, Henning Thielemann wrote:
Christian Maeder schrieb:
Henning Thielemann schrieb:
The updated Haskell code might be written to a new file by default. Then
I can interactively transfer the corrections I like to the original code
using Kompare. I
On Mon, Apr 19, 2010 at 11:03 PM, Gregory Crosswhite
gcr...@phys.washington.edu wrote:
Hey everyone,
Has anyone done any work with bulk synchronous parallel computing in
Haskell? The idea behind the model is that you divide your computation into
a series of computation and communication
Thanks for the link; my ultimate interest, though, is in an architecture that
could scale to multiple machines rather than multiple cores with shared memory
on a single machine. Has there been any interest and/or progress in making DPH
run on multiple machines and other NUMA architectures?
On Mon, Apr 19, 2010 at 5:54 PM, Simon Marlow marlo...@gmail.com wrote:
So I think I like this variant, even though it adds a little API overhead.
Anyone else have any thoughts on this?
I do think the RankNTypes version:
mask :: ((forall b. IO b - IO b) - IO a) - IO a
is easier to use and
2010/4/19 Jonas Almström Duregård jonas.dureg...@gmail.com:
If this is to be used with QuickCheck maybe it should be named that way.
Certainly worth considering. There seems to be no convenient way of
renaming packages on Hackage though, is there?
AFAIK hackage has support for deprecating
Can the owner of
c10b66c97b5cd09384aa9f82ecd95...@orangeat.blackberry.com please fix
their emails up (or the haskell-cafe admins remove that address), as I
keep getting delivery status notification failure messages over a week
after I send an email to the list (I would have emailed that address
Thanks Dan. Great help
but my problem has not solved yet
This doesn't work for type ((Float - Float)-Bool)
to make it easier ignore the rotation and suppose I want just multiplay with
whatever (x ,y) and return the result to this type ((Float - Float)-Bool)
note this type is shorten and replace
Anders Kaseorg wrote:
Isaac Dupree wrote:
Do you see the difference? The effects are sequenced in different places.
The return/join pair moves all the effects *outside* the operations such
as catch... thus defeating the entire purpose of morphIO.
Yes; my question is more whether Wren has a
wren ng thornton wrote:
Anders Kaseorg wrote:
Isaac Dupree wrote:
Do you see the difference? The effects are sequenced in different
places.
The return/join pair moves all the effects *outside* the operations such
as catch... thus defeating the entire purpose of morphIO.
Yes; my question is
53 matches
Mail list logo