> On the other hand, I hadn't got round to cleaning up the interface,
> let alone firming the theoretical foundations, so perhaps this isn't an
> exception to your rule?-) But I thought I'd mention it on the topic of
> "other FRP libraries", with variations of approach/concepts.
Thanks for the po
Robin Green wrote:
On Wed, 15 Apr 2009 23:31:50 -0700
Michael Mossey wrote:
I was thinking that it might be useful to have a Google-like "do you
mean this?" feature. If the field name is //customer=, then the
parser might recognize a huge list of variants
like //ustomer=, //customor=, etc...
2009/4/16 Michael Mossey :
> I don't think I would create a parser language that includes every variant,
> but instead the field names would be tokens that could be passed to another
> routine.
Right.
> The variants could be generated ahead of time. I would limit the
> number of variants to somet
Matt Morrow wrote:
And i forgot to include the defs of (co)prod:
coprod (<>) i1 i2 = (\a b -> i1 a <> i2 b)
lambdabot> pl \f i1 i2 -> (\a b -> i1 a `f` i2 b)
(flip .) . (((.) .) .) . (.)
Muhahaha. :-D Too bad the flip is still in there. :-)
Martijn.
_
Hi,
On 16.04.2009, at 05:08, Matt Morrow wrote:
And i forgot to include the defs of (co)prod:
prod (><) p1 p2 = (\a -> p1 a >< p2 a)
I think this one is liftM2 of the ((->) a) Monad instance.
Cheers, Jan
___
Haskell-Cafe mailing list
Haskell-C
On Sun, 2009-04-12 at 20:02 -0700, Iavor Diatchki wrote:
> Hello,
> What is the preferred way to install a cabal package so that it works
> with winhugs? When I tried "cabal install --user --hugs" I got an
> error that it could not find "hugsffi". I managed to get things
> working by manually dow
ghci> let diag = foldr (curry (prod mappend fst snd . uncurry
(coprod mappend (splitAt 2) (splitAt 1 []
nice :)
thanks to the comments of Martijn and Jan we can replace prod and
coprod by liftA2 and :
> let diag = foldr (curry (liftA2 mappend fst snd.uncurry (((flip.).
(((.).).).(.))
On Wed, 2009-04-15 at 01:53 +0200, Henk-Jan van Tuyl wrote:
> On Tue, 14 Apr 2009 08:25:52 +0200, Raja Koduru wrote:
>
> > hi,
> >
> > I am a beginner to haskell.
> >
> > I am trying to install glut using "cabal install glut"
> > Pasting here a tail of the output
> > checking for GLUT/glut.h...
Niemeijer, R.A. wrote:
> Today I happened to need a large list of prime numbers.
> Obviously this is a well-known problem, so I figured there would
> be something on Hackage that I could use. Surprisingly, there isn't,
> or if there is it's not easy to find.
>
> Since it's such a common problem I'
> On the other hand, breaking referential transparency in the
> external interface is a very bad idea, in my opinion. Actually,
> this means that the library user would have to turn certain
> compiler optimizations off to get the intended behavior.
However, in practice you can compile Elerea with -
I end up doing
:set -i../Documents/haskell/SOE/src
To set the search directory so that ghci can find the source.
I've not been how to tailor that 'cd' which is run at start up (but
I've not looked to hard)
Neil
On 16 Apr 2009, at 04:12, Daryoush Mehrtash wrote:
I am having problem run
There's no guarantee about unsafePerformIO not being inlined, that's
just how ghc treats it.
2009/4/16 Patai Gergely :
>> On the other hand, breaking referential transparency in the
>> external interface is a very bad idea, in my opinion. Actually,
>> this means that the library user would have to
> I end up doing
>
> :set -i../Documents/haskell/SOE/src
>
> To set the search directory so that ghci can find the source.
>
> I've not been how to tailor that 'cd' which is run at start
> up (but I've not looked to hard)
It is looking for the closest ancestor directory with a file ending in
Well, the documentation says:
Use {-# NOINLINE foo #-} as a pragma on any function foo that calls
unsafePerformIO.
If the call is inlined, the I/O may be performed more than once.
So you claim this does not prevent GHC to inline it anyway? That feels like
a bug then, both in the documentation and
Thanks, that does the trick.
Daryoush
2009/4/16 Patai Gergely
> > I end up doing
> >
> > :set -i../Documents/haskell/SOE/src
> >
> > To set the search directory so that ghci can find the source.
> >
> > I've not been how to tailor that 'cd' which is run at start
> > up (but I've not looked t
Heinrich Apfelmus wrote:
> +1 except that exporting the potentially infinite list of primes is
> problematic in that it may become a memory leak.
>
> I'd suggest to export two versions
>
> primes :: [Integer]
> primes' :: () -> [Integer]
>
> for casual (i.e. throwaway program to solve a Projec
The parameterless version is a top-level definition and won't get
garbage-collected, IIRC.
So, if you evaluate primes!!1000, you'll end up with a
1000-element list hanging in memory forever.
If you evaluate (primes' ()) !! 1000, you won't.
2009/4/16 Niemeijer, R.A. :
> Heinrich Apfelmu
Eugene Kirpichov wrote:
> The parameterless version is a top-level definition and won't get
> garbage-collected, IIRC.
> So, if you evaluate primes!!1000, you'll end up with a
> 1000-element list hanging in memory forever.
> If you evaluate (primes' ()) !! 1000, you won't.
>
>
{-# CA
But things are a little more complicated than that.
If the () argument to primes' is not used in calculating the primes
then ghc might decide to lift the computed list of primes into a top
level CAF, and so you will have a memory leak anyway.
If ghc does so or not depends, e.g., on the optimization
2009/04/16 Achim Schneider :
> {-# CAF foo #-}
> {-# NOCAF foo #-}
Where do I find docs for these pragmas?
--
Jason Dusek
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Jason Dusek wrote:
> 2009/04/16 Achim Schneider :
> > {-# CAF foo #-}
> > {-# NOCAF foo #-}
>
> Where do I find docs for these pragmas?
>
...in your friendly bug tracker, under the label "missing feature"
--
(c) this sig last receiving data processing entity. Inspect headers
for copyright h
Hello Peter,
Thursday, April 16, 2009, 12:29:41 PM, you wrote:
Lennart (and Patai) said about unsafePerformIO, you - about NOINLINE
> Well, the documentation says:
> Use {-# NOINLINE foo #-} as a pragma on any function foo that calls
> unsafePerformIO. If the call is inlined, the I/O may be perf
With NOINLINE you should be safe, but you never mentioned that originally. :)
On Thu, Apr 16, 2009 at 10:29 AM, Peter Verswyvelen wrote:
> Well, the documentation says:
> Use {-# NOINLINE foo #-} as a pragma on any function foo that
> calls unsafePerformIO. If the call is inlined, the I/O may be
Am Donnerstag 16 April 2009 10:41:43 schrieb Niemeijer, R.A.:
> Heinrich Apfelmus wrote:
> > +1 except that exporting the potentially infinite list of primes is
> > problematic in that it may become a memory leak.
> >
> > I'd suggest to export two versions
> >
> > primes :: [Integer]
> > prime
I vaguely remember someone (maybe Duncan Coutts?) saying that this was
a commonly held misconception, and that GHC did indeed GC CAFs when
optimization is enabled. If I am remembering incorrectly, does anyone
have a reference to a ticket outlining this non-GC'ed CAF behavior?
Thanks,
Dan
On Thu,
Eugene Kirpichov wrote:
The parameterless version is a top-level definition and won't get
garbage-collected, IIRC.
This has not-much to do with CAFs and is really just about scope +
values + liveness. live values (those which a program still refers to,
e.g. from a function which might get cal
Niemeijer, R.A. wrote:
> Heinrich Apfelmus wrote:
>> +1 except that exporting the potentially infinite list of primes is
>> problematic in that it may become a memory leak.
>>
>> I'd suggest to export two versions
>>
>> primes :: [Integer]
>> primes' :: () -> [Integer]
>>
>> for casual (i.e. t
Oh I see. Gergely did mention it in a previous email:
Am I right thinking that the NOINLINE pragma on unsafeDupablePerformIO
prevents the problem of
multiple evaluation discussed yesterday? Or should I add NOINLINE to
primitives in Elerea.Internal too? If that guaranteed sharing, it would
So I got
http://pastebin.com/m88c7dc
It works fine if you delete the ".Lazy".
Enjoy, and thanks...
David
On Thu, Apr 16, 2009 at 12:35 AM, Jason Dusek wrote:
> Could you pastebin something that demoes the error?
>
> --
> Jason Dusek
>
___
Haskell-Cafe mailin
On Fri, 2009-04-03 at 12:47 +0200, Johannes Waldmann wrote:
> Is there a nice way of upgrading ghc:
> I mean does cabal-upgrade know to install
> exactly the packages that I had with the previous ghc version?
There will be soon!
http://hackage.haskell.org/trac/hackage/ticket/199
There's a patch
On Thu, 2009-04-16 at 12:49 +0100, David Carter wrote:
> http://pastebin.com/m88c7dc
>
> It works fine if you delete the ".Lazy".
>
> Enjoy, and thanks...
This will be because the version of the regex lib you're using does not
have an instance for lazy ByteStrings. Do you know what versions of t
On Thu, 2009-04-16 at 07:11 -0400, Daniel Peebles wrote:
> I vaguely remember someone (maybe Duncan Coutts?) saying that this was
> a commonly held misconception, and that GHC did indeed GC CAFs when
> optimization is enabled. If I am remembering incorrectly, does anyone
> have a reference to a tic
| But the core part of my suggestion (which this example was meant
| to help explain) remains attractive, at least to me: somewhere during
| type inference, GHC *does* unify the *apparently free* 'd' with an
| internal type variable (lets call it 'd1, as in the type error message)
You are specula
Hello Anatoly,
On Sat, Apr 11, 2009 at 20:44, Anatoly Yakovenko wrote:
> i am trying to understand how data.data works. How would i traverse
> the subterms of one type and build another type out of them.
> something like this:
>
> > gmapQ (\a -> Right a) (Just "hello")
I am not sure I understa
On Apr 15, 2009, at 5:27 PM, Adrian Neumann wrote:
I've just uploaded a package with some functions I had lying around.
> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Numbers
This package seems to be missing the source file Data/Numbers/
Primes.hs so I couldn't compare it to m
I am pleased to announce the package 'primes' that implements lazy
wheel sieves for efficient, purely functional generation of prime
numbers in Haskell.
Following the current discussion about primes in Haskell, I packaged
up an implementation inspired by the papers "Lazy wheel sieves and
> It is looking for the closest ancestor directory with a file ending in
> .cabal, and that's where cd goes. Probably the simplest way to trick it
> without chaniging any setting is to create an empty dummy.cabal in the
> directory of your program.
The haskell-mode code in the CVS repository has a
Sebastian Fischer wrote:
> I am pleased to announce the package 'primes' that implements lazy
> wheel sieves for efficient, purely functional generation of prime
> numbers in Haskell.
>
> The implementation is reasonably efficient. The query
>
> > primes !! 100
> 15485867
>
> answers after
I have just finished benchmarking all the implementations provided
in http://www.cs.hmc.edu/~oneill/code/haskell-primes.zip (the zip
file linked to from the Haskell wiki article on primes).
NaurPrimes.hs is by far the fastest version, and at least 2 or 3
times faster than your current imple
To measure how similar two strings are, you can use a metric like
Levenshtein distance, Damerau-Levenshtein distance, or Jaro-Winkler
I tried some of those just the other day, and in my app this worked much better:
http://www.catalysoft.com/articles/StrikeAMatch.html
__
Am Donnerstag 16 April 2009 16:45:59 schrieb Niemeijer, R.A.:
> Sebastian Fischer wrote:
> > I am pleased to announce the package 'primes' that implements lazy
> > wheel sieves for efficient, purely functional generation of prime
> > numbers in Haskell.
> >
> > The implementation is reasonably effi
On Thu, Apr 16, 2009 at 12:39 PM, Daniel Fischer
wrote:
> Am Donnerstag 16 April 2009 16:45:59 schrieb Niemeijer, R.A.:
>> Sebastian Fischer wrote:
>> > I am pleased to announce the package 'primes' that implements lazy
>> > wheel sieves for efficient, purely functional generation of prime
>> > nu
I find it easier to understand when looking at the declarative meaning
of the definition. There is the trivial case of the empty list, but for
the non-empty list:
The possible inits of the list is the empty list and the inits of the
"rest of the list" with the "head" element it their front.
The e
I don't know if the following explanation seems too basic or redundant
to you, I'm sorry if that is the case, but it might help if you don't
understand high order functions very well:
In my description of the declarative meaning of the definition I
understood this: "map (x:) (cinits xs)" as add th
Just curious, what kind of super-cooled processor is this guy running on? I got
the same answer but it took almost three minutes (2:43:15).
Michael
--- On Thu, 4/16/09, Geoffrey Irving wrote:
From: Geoffrey Irving
Subject: Re: [Haskell-cafe] RE: [Announce] primes
To: "Daniel Fischer"
Cc: has
Excerpts from Toby Hutton's message of Wed Apr 15 05:00:16 +0200 2009:
> On Wed, Apr 15, 2009 at 8:57 AM, Jeff Wheeler wrote:
> >
> > As one of the Yi developers, I'd love to hear some more specific
> > feedback on this. Do you remember any specific Vim features that were
> > missing?
>
> My main
michael rice wrote:
Just curious, what kind of super-cooled processor is this guy running
on? I got the same answer but it took almost three minutes (2:43:15).
Only took a few seconds on my machine (Core 2 Duo 2.53GHz).
- Jake
___
Haskell-Cafe mailin
Jake McArthur wrote:
michael rice wrote:
Just curious, what kind of super-cooled processor is this guy running
on? I got the same answer but it took almost three minutes (2:43:15).
Only took a few seconds on my machine (Core 2 Duo 2.53GHz).
Maybe it's the version of GHC that matters?
__
On Thu, Apr 16, 2009 at 1:32 PM, Nicolas Pouillard <
nicolas.pouill...@gmail.com> wrote:
> Excerpts from Toby Hutton's message of Wed Apr 15 05:00:16 +0200 2009:
> > On Wed, Apr 15, 2009 at 8:57 AM, Jeff Wheeler wrote:
> > >
> > > As one of the Yi developers, I'd love to hear some more specific
>
On Tue, 14 Apr 2009, rodrigo.bonifacio wrote:
I guess this is a very simple question. How can I convert IO [XmlTree] to just
a list of
XmlTree?
The old Wiki had:
http://www.haskell.org/wikisnapshot/ThatAnnoyingIoType.html
Should be ported to the new Wiki since it is a FAQ ...
Hello,
I'm trying to create a GUI by using wxHaskell. However I get the weird error
message of "Not in scope "dt"", well so I sorted them so that my so called
"dt" was in scope, however it failed. Can someone please tell me how I can
solve this error?
... A lot of code that is not rele
Variables bound in the do block are not in scope in the where.
Use a let inside the do for onOpen instead.
On Thu, Apr 16, 2009 at 11:53 PM, Tsunkiet Man wrote:
> Hello,
>
> I'm trying to create a GUI by using wxHaskell. However I get the weird error
> message of "Not in scope "dt"", well so I so
Andrew Coppin wrote:
Jake McArthur wrote:
michael rice wrote:
Just curious, what kind of super-cooled processor is this guy running
on? I got the same answer but it took almost three minutes (2:43:15).
Only took a few seconds on my machine (Core 2 Duo 2.53GHz).
Maybe it's the version of GHC
Thank you for your response, however if I can't do that, why can the example
of wxHaskell do that?
I refer to the following code inside
http://darcs.haskell.org/wxhaskell/samples/wx/ (ImageViewer.hs)
Line 99 untill 110
openImage sw vbitmap mclose status fname
= do -- load the new bitma
The names defined in the where clause are in scope in the do block,
but not vice versa.
On Fri, Apr 17, 2009 at 12:43 AM, Tsunkiet Man wrote:
> Thank you for your response, however if I can't do that, why can the example
> of wxHaskell do that?
>
> I refer to the following code inside
> http://da
Note: the source can be found here:
http://www.students.cs.uu.nl/~jtkman/Application.hs (It's my own work,
please tell me what I did wrong)
2009/4/16 Tsunkiet Man
> Hello,
>
> I'm trying to create a GUI by using wxHaskell. However I get the weird
> error message of "Not in scope "dt"", well so I
PS: a small note, sorry for multiple mails.
After doing the let ... in function it did not work. =( It gave the error
that 'do' has to end with some result. I did:
do let in
and it still didn't work =(. I'm doing something wrong I think.
Thanks for your help.
2009/4/17 Tsunkiet Man
> Thank
Am Freitag 17 April 2009 00:43:18 schrieb Tsunkiet Man:
> Thank you for your response, however if I can't do that, why can the
> example of wxHaskell do that?
>
> I refer to the following code inside
> http://darcs.haskell.org/wxhaskell/samples/wx/ (ImageViewer.hs)
>
> Line 99 untill 110
>
> op
Take a look at the syntax for 'let' inside a 'do'.
On Fri, Apr 17, 2009 at 12:57 AM, Tsunkiet Man wrote:
> PS: a small note, sorry for multiple mails.
>
> After doing the let ... in function it did not work. =( It gave the error
> that 'do' has to end with some result. I did:
>
> do let in
>
>
Hello,
what you suggested worked! Im very happy with it. However another error
suddenly came up. It sais the last statement in a 'do' must be an
expression, he is refering to line 41:45
I change my code to this:
on (menu exit) := close f,
on (menu open) :=
PS: if the indents are wrong, that's because of gmail copy and past, Im so
sorry.
2009/4/17 Tsunkiet Man
> Hello,
>
> what you suggested worked! Im very happy with it. However another error
> suddenly came up. It sais the last statement in a 'do' must be an
> expression, he is refering to line 4
Oh, I just remembered, I'm using ghci. I'll bet that's why I'm so slow.
Thanks.
Michael
--- On Thu, 4/16/09, Andrew Coppin wrote:
From: Andrew Coppin
Subject: Re: [Haskell-cafe] RE: [Announce] primes
To: haskell-cafe@haskell.org
Date: Thursday, April 16, 2009, 4:38 PM
Jake McArthur wrote:
>
This is interesting (and from 1990):
http://groups.google.co.uk/group/comp.lang.functional/msg/655bb7bbd0fd8586
(Not sure if this is well-known. It seems like it either is, or it should
be. Either way, I just stumbled across it.)
___
Haskell-Cafe mailin
Here are some choice-quotes that are one of {insightful, controversial,
arguable}:
Starting with my favorite quote ;):
"The ability to operate on the program as data is basic to the provision of
many desirable utilities, e.g. the Boyer-Moore theorem prover, and the
program
transformation work tha
G'day all.
Quoting Eugene Kirpichov :
I'd suggest also
primesFrom :: Integer -> [Integer]
This:
primes :: [Integer]
isn't as useful as you might think for a library, because it must, by
definition, leak an uncontrolled amount of memory. This:
primesUpTo :: Integer -> [Integer]
is a bett
Unless primesUpTo n goes from highest to lowest prime (ending in 2), I
don't see how sharing is possible (in either space or time) between
primesUpTo for different n.
Is it intended that the primes should therefore be listed in descending
order?
a...@spamcop.net wrote:
primes :: [Integer]
On Thu, Apr 16, 2009 at 4:40 PM, David Leimbach wrote:
>
>
> On Thu, Apr 16, 2009 at 1:32 PM, Nicolas Pouillard
> wrote:
>>
>> Excerpts from Toby Hutton's message of Wed Apr 15 05:00:16 +0200 2009:
>> > On Wed, Apr 15, 2009 at 8:57 AM, Jeff Wheeler wrote:
>> > >
>> > > As one of the Yi developer
I want to write a parser that can read a file with this format: the file has
sections which are demarcated by keywords. Keywords always begin with two
forward slashes and consist of letters, digits, and underscore. The text can be
anything, including special characters. For instance:
//keywor
Dear Haskellers,
The deadline for the May 2009 edition of the Haskell Communities
and Activities Report is only two weeks away. If you haven't already,
please write an entry for your new project, or update your old entry.
Please mail your entries to h...@haskell.org in LaTeX format. More
informa
Hi,
you can use http://hpaste.org/ to overcome this problem.
Cheers,
Thu
2009/4/17 Tsunkiet Man :
> PS: if the indents are wrong, that's because of gmail copy and past, Im so
> sorry.
>
> 2009/4/17 Tsunkiet Man
>>
>> Hello,
>>
>> what you suggested worked! Im very happy with it. However another
2009/4/17 Michael P Mossey :
> I want to write a parser that can read a file with this format: the file has
> sections which are demarcated by keywords. Keywords always begin with two
> forward slashes and consist of letters, digits, and underscore. The text can
> be anything, including special cha
71 matches
Mail list logo