Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread jagrhask
jagrhask пишет: What do you think about this logo? I'm not a good painter but just to illustrate idea: lazy lambda taking rest laying under tree and some blinks symbolize how is it. Of course symbolize how clean is it. I hope somebody could draw it better. Don Stewart пишет: I noticed a new

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Miguel Mitrofanov
Sorry to disappoint you, but the tree is not the very first thing that comes to mind when you look at this drawing. And, despite that it satisfies Don's condition to be mature (though adult would be a better word), this kind of pornography is NOT, I believe, what most of us want for a

[Haskell-cafe] Re: [Haskell] Missing Documentation

2008-12-16 Thread Neil Mitchell
Hi Ron This may very well be a FAQ, but I tried to search the archives and could not find a post... Anyway, some documentation seems to be missing, which was there before I thought. For example: http://www.haskell.org/ghc/docs/latest/html/libraries/haskell98/Random.html That's a bug, I've

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread jagrhask
Miguel Mitrofanov пишет: Sorry to disappoint you, but the tree is not the very first thing that comes to mind when you look at this drawing. And, despite that it satisfies As I already said, I'm not good in drawing, so if somthing bad comes to your mind looking at this tree - just draw it so

RE: [Haskell-cafe] Re: MVar and Par ..

2008-12-16 Thread Mozhgan Kabiri
Hi , Yeah , first I want to get unexpected answer ! And then I want to prove that when I use MVar I will get the write answer.I want to show that when we have a shared variable, we should use MVar.Besides we use for example two processors to do different tasks.But the point is these

Re: [Haskell-cafe] Re: MVar and Par ..

2008-12-16 Thread Luke Palmer
Okay, that's a bit clearer. Control.Parallel is not what you want; that is for parallelizing pure code (and is very nice inside its little domain). But you want concurrent code: multiple threads that change state at the same time. That is in Control.Concurrent. In particular, the shared

Re: [Haskell-cafe] How to think about this? (profiling)

2008-12-16 Thread Magnus Therning
On Tue, Dec 16, 2008 at 12:14 PM, Lemmih lem...@gmail.com wrote: You could use a Map or a mutable array. However, this kind of problem comes up a lot less often than you'd think. Well, I happen to have a problem just like it right now, hence my interest :-) In order to better understand the

[Haskell-cafe] Re: GHC 6.10.1 for Solaris i86

2008-12-16 Thread Christian Maeder
Donald Halomoan wrote: I am waiting for GHC 6.10. 1 binary for Solaris i86. Thanks. You could try mine: http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/hets/pc-solaris/ghcs/ghc-6.10.1-i386-unknown-solaris2.tar.bz2 it needs libedit.so.0 and libncurses.so.5 Cheers

[Haskell-cafe] Re: How to think about this? (profiling)

2008-12-16 Thread ChrisK
Or if you don't want to pay for laziness at all you could build your memo array imperatively (but purely): import Data.Array.IArray(elems,(!),inRange) import Data.Array.MArray(newArray_,writeArray,readArray) import Data.Array.Unboxed(UArray) import Data.Array.ST(runSTUArray,STUArray) import

[Haskell-cafe] Type wildcards

2008-12-16 Thread Eyal Lotem
Martin Foster (aka. EvilTerran) suggested an interesting idea, and I decided it was too nice to ignore/be forgotten inside Martin's head... So I'd like to try and suggest it. Type wildcards that allow partially specifying types, e.g: f :: _ - String f x = show x This will instruct the

Re: [Haskell-cafe] Re: [Haskell] Missing Documentation

2008-12-16 Thread Neil Mitchell
Hi Ron, Thanks... I have been 'away' from Haskell for a while and it is taking me a bit to get re-synced! Anyway, before posting here I also sent an email to Simon Marlow, and he let me know that this bug (or one very similar) was reported for Char in:

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Ross Mellgren
It does require a mathematical mind, but does not require that you understand the mathematical language. If mathematics are the basis of computation, and programming is an implementation of computation, then in many ways programming languages are a (less powerful) equivalent language to

Re: [Haskell-cafe] Type wildcards

2008-12-16 Thread Edsko de Vries
Hi, On Tue, Dec 16, 2008 at 05:26:00PM +0200, Eyal Lotem wrote: Martin Foster (aka. EvilTerran) suggested an interesting idea, and I decided it was too nice to ignore/be forgotten inside Martin's head... So I'd like to try and suggest it. Type wildcards that allow partially specifying

[Haskell-cafe] Re: Type wildcards

2008-12-16 Thread ChrisK
You can get pretty far with the same trick oleg mentions at [1]. If you use local type signature then you can do things like this: {- ghci infers this type: *Main :t f f :: (Ord a) = Int - a - t - String -} f i j x | False = (undefined (i::Int) (isOrd j)) :: String f i j x = error not filled

Re: [Haskell-cafe] How to think about this? (profiling)

2008-12-16 Thread Lemmih
On Tue, Dec 16, 2008 at 1:07 PM, Magnus Therning mag...@therning.org wrote: On Mon, Dec 15, 2008 at 11:33 PM, Lemmih lem...@gmail.com wrote: 2008/12/16 Magnus Therning mag...@therning.org: This behaviour by Haskell seems to go against my intuition, I'm sure I just need an update of my

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Gianfranco Alongi
Obviously there are a lot of different wills in this discussion, and I propose we take this to the next level by letting people submit all their ideas to the Haskell wiki page, and vote later on. /Gf On Tue, Dec 16, 2008 at 9:52 AM, jagrhask jagrh...@gmail.com wrote: Miguel Mitrofanov пишет:

Re: [Haskell-cafe] How to think about this? (profiling)

2008-12-16 Thread Magnus Therning
On Mon, Dec 15, 2008 at 11:33 PM, Lemmih lem...@gmail.com wrote: 2008/12/16 Magnus Therning mag...@therning.org: This behaviour by Haskell seems to go against my intuition, I'm sure I just need an update of my intuition ;-) I wanted to improve on the following little example code: foo ::

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread John Van Enk
We could take the HL2 logo and replace the 2 with 6. I'm sure there's some trademark issue here, but i like the idea. /jve On Mon, Dec 15, 2008 at 5:52 PM, Michael Giagnocavo m...@giagnocavo.netwrote: Don Stewart wrote: I noticed a new haskell logo idea on a tshirt today,

Re: [Haskell-cafe] How to think about this? (profiling)

2008-12-16 Thread Emil Axelsson
This is actually a perfect case for lazy immutable arrays, if you use a circular program: import Data.Array foo' :: Array Int Int - Int - Int foo' arr 0 = 0 foo' arr 1 = 1 foo' arr 2 = 2 foo' arr n = arr!(n-1) + arr!(n-2) + arr!(n-3) foo :: Int - Int foo n = arr ! n where assocs = [(i,

Re: [Haskell-cafe] Re: MVar and Par ..

2008-12-16 Thread Luke Palmer
On Tue, Dec 16, 2008 at 5:54 AM, Luke Palmer lrpal...@gmail.com wrote: Okay, that's a bit clearer. Control.Parallel is not what you want; that is for parallelizing pure code (and is very nice inside its little domain). But you want concurrent code: multiple threads that change state at the

Re: [Haskell-cafe] How to think about this? (profiling)

2008-12-16 Thread Bertram Felgenhauer
Magnus Therning wrote: This behaviour by Haskell seems to go against my intuition, I'm sure I just need an update of my intuition ;-) I wanted to improve on the following little example code: foo :: Int - Int foo 0 = 0 foo 1 = 1 foo 2 = 2 foo n = foo (n - 1) + foo (n - 2) +

Re: [Haskell-cafe] How to think about this? (profiling)

2008-12-16 Thread Thorkil Naur
Hello, On Tuesday 16 December 2008 13:19, Felipe Lessa wrote: 2008/12/16 Magnus Therning mag...@therning.org: That is, where each value depends on _all_ preceding values. AFAIK list access is linear, is there a type that is a more suitable state for this changed problem? I realise

[Haskell-cafe] MVar and Par ..

2008-12-16 Thread Mozhgan Kabiri
Hi .. Hope you are doing well . I've just joined this group. Recently, I am struggling to do some simple experiment with haskell language about parallelism and wrong answers that we can get while using a shared variable . I tried to write a simple program, for example calculationg 'n=n+1'

[Haskell-cafe] Re: MVar and Par ..

2008-12-16 Thread ChrisK
Mozhgan Kabiri wrote: Hi .. Hope you are doing well . I've just joined this group. Hi. Recently, I am struggling to do some simple experiment with haskell language about parallelism and wrong answers that we can get while using a shared variable . Your goal is still unclear. Are you

[Haskell-cafe] Re: [Haskell] Missing Documentation

2008-12-16 Thread Ronald Legere
This may very well be a FAQ, but I tried to search the archives and could not find a post... Anyway, some documentation seems to be missing, which was there before I thought. For example: http://www.haskell.org/ghc/docs/latest/html/libraries/haskell98/Random.html That's a bug, I've

[Haskell-cafe] MVar and Par ..

2008-12-16 Thread Mozhgan Kabiri
Hi .. Hope you are doing well . I've just joined this group. Recently, I am struggling to do some simple experiment with haskell language about parallelism and wrong answers that we can get while using a shared variable . I tried to write a simple program, for example calculationg

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Darrin Thompson
My $0.02 us: Apologies for ascii art, and hopefully gmail doesn't munge this: \\ \\ \\ \\ \| \\ \\ --- \\ \\ // / \ // / \ \| // / /\\ ---

[Haskell-cafe] Haskell as a religion

2008-12-16 Thread Hugo Pacheco
I just found this on the web. Do you like the description of Haskell? It is not that far from true :P http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html -- www.di.uminho.pt/~hpacheco ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Malcolm Wallace
Andrew Coppin andrewcop...@btinternet.com wrote: To him, apparently, the current logo says Haskell is all about arcane and obscure mathematical constructs. In fact, we think that complicated mathematics is so good that we stuffed our logo full of it. If you don't like hard math, don't even

Re: [Haskell-cafe] MVar and Par ..

2008-12-16 Thread Luke Palmer
2008/12/16 Mozhgan Kabiri mozhgan_...@hotmail.com Hi .. Hope you are doing well . I've just joined this group. Recently, I am struggling to do some simple experiment with haskell language about parallelism and wrong answers that we can get while using a shared variable . I tried to write a

RE: [Haskell-cafe] MVar and Par ..

2008-12-16 Thread Mozhgan Kabiri
Hi ..Hmm .. maybe I explained it badly.For example I want my two processor to do two tasks while they are sharing a variable . Is it not parallelism ? We don't need MVar, as well ? I completely misunderstood !MozhganDate: Tue, 16 Dec 2008 04:03:59 -0700From: lrpal...@gmail.comto:

Re: [Haskell-cafe] haskell compiler never comes back

2008-12-16 Thread Ian Lynagh
Hi Greg, On Mon, Dec 15, 2008 at 12:23:08PM -0800, Greg Meredith wrote: The simple-minded and smallish code sample at this linkhttp://paste.pocoo.org/show/95503/causes the compiler to go off into never-never land. Any clues would be greatly appreciated. I've lost track of this thread, but

Re: [Haskell-cafe] How to think about this? (profiling)

2008-12-16 Thread Felipe Lessa
2008/12/16 Magnus Therning mag...@therning.org: That is, where each value depends on _all_ preceding values. AFAIK list access is linear, is there a type that is a more suitable state for this changed problem? I realise this particular function can be written using scanl: [...] but I guess

Re: [Haskell-cafe] haskell compiler never comes back

2008-12-16 Thread Greg Meredith
Ian, Thanks for your diligence! i upgraded to ghc 6.10.1 and that resolved the issue. i've a working version of the sample at this linkhttp://paste.pocoo.org/show/95533/ . Best wishes, --greg On Tue, Dec 16, 2008 at 10:28 AM, Ian Lynagh ig...@earth.li wrote: Hi Greg, On Mon, Dec 15, 2008

RE: [Haskell-cafe] Re: MVar and Par ..

2008-12-16 Thread Mozhgan Kabiri
Hi .. Thanks .. But I keep get error when I run the program in order to see the result . It says 'var' is not in the scope. Mozhgan Date: Tue, 16 Dec 2008 05:54:40 -0700 From: lrpal...@gmail.com To: mozhgan_...@hotmail.com Subject: Re: [Haskell-cafe] Re: MVar and Par .. CC:

Re: [Haskell-cafe] How to think about this? (profiling)

2008-12-16 Thread wren ng thornton
Lemmih wrote: On Tue, Dec 16, 2008 at 1:07 PM, Magnus Therning mag...@therning.org wrote: I understand your solution, but AFAICS it's geared towards limited recursion in a sense. What if I want to use memoization to speed up something like this foo :: Int - Int foo 0 = 0 foo 1 = 1

[Haskell-cafe] Random language humour

2008-12-16 Thread Andrew Coppin
http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html Seems pretty accurate, actually... ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haskell as a religion

2008-12-16 Thread Paul Johnson
Hugo Pacheco wrote: http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html What does it mean, *If* Programming Languages were religions? Paul. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: Time for a new logo?

2008-12-16 Thread mail
Darrin Thompson darri...@gmail.com writes: \\ \\ \\ \\ \| \\ \\ --- \\ \\ // / \ // / \ \| // / /\\ --- // / / \\

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Andrew Coppin
Malcolm Wallace wrote: Andrew Coppin andrewcop...@btinternet.com wrote: To him, apparently, the current logo says Haskell is all about arcane and obscure mathematical constructs. In fact, we think that complicated mathematics is so good that we stuffed our logo full of it. If you don't

Re: [Haskell-cafe] Haskell as a religion

2008-12-16 Thread Don Stewart
paul: Hugo Pacheco wrote: http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html What does it mean, *If* Programming Languages were religions? I think of Haskell more as a revolutionary movement. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Haskell as a religion

2008-12-16 Thread Andrew Coppin
Don Stewart wrote: I think of Haskell more as a revolutionary movement LOL! Longest revolution EVER, eh? I mean, how long ago was its dogma first codified? ;-) The thing that saddens me is this: http://prog21.dadgum.com/31.html Basically, Haskell will never be popular, but its coolest

[Haskell-cafe] Implementing PacMan

2008-12-16 Thread Andrew Coppin
What do we think of this, folks? http://prog21.dadgum.com/23.html (And the rest in the series, obviously.) To me, it seems that this plan would *work*... but it wouldn't be very eligant. You'd have the code to respond to user input and move PacMan in one place, the code for collision

Re: [Haskell-cafe] Memoization-question

2008-12-16 Thread Mattias Bengtsson
On Fri, 2008-12-12 at 15:47 +0100, Bertram Felgenhauer wrote: GHC does opportunistic CSE, when optimizations are enabled. [...] I see. Thank you! Mattias ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: Reader monad, implicit parameters, or something else altogether?

2008-12-16 Thread Bjorn Buckwalter
Richard A. O'Keefe ok at cs.otago.ac.nz writes: Just an idiot-level question: so these constants are subject to revision, but *how often*? What is the actual cost of recompiling and using them *as* constants, compared with the cost of rereading the stuff every time you run the program and

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Jonathan Cast
On Tue, 2008-12-16 at 20:23 +, Andrew Coppin wrote: Malcolm Wallace wrote: Andrew Coppin andrewcop...@btinternet.com wrote: To him, apparently, the current logo says Haskell is all about arcane and obscure mathematical constructs. In fact, we think that complicated

Re: [Haskell-cafe] Haskell as a religion

2008-12-16 Thread Jonathan Cast
On Tue, 2008-12-16 at 20:38 +, Andrew Coppin wrote: Don Stewart wrote: I think of Haskell more as a revolutionary movement LOL! Longest revolution EVER, eh? No. Das Kapital publication 1867. Russian Revolution 1917. FTW. jcc ___

Re: [Haskell-cafe] Implementing PacMan

2008-12-16 Thread Henrik Nilsson
Hi, What do we think of this, folks? http://prog21.dadgum.com/23.html (And the rest in the series, obviously.) To me, it seems that this plan would *work*... but it wouldn't be very eligant. You'd have the code to respond to user input and move PacMan in one place, the code for

[Haskell-cafe] excessive usage of CPU by threadDelay in GHCi

2008-12-16 Thread Jeremy Shaw
Hello, I have the following simple program: import Control.Concurrent main = threadDelay (10^6) main If I run it in GHCi it requires 2-5% of my CPU. If i compile it, it takes 0% of my CPU. It does not matter if I compile -O0, -O2, -threaded, it always uses 0% (which is good). Is it expected

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Richard O'Keefe
On 15 Dec 2008, at 2:57 pm, Eelco Lempsink wrote: haskell-logo.png By the way, the font used (Kautiva) is not free. That's fine, I wouldn't take it as a gift. It looks horrible. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Haskell as a religion

2008-12-16 Thread Luke Palmer
On Tue, Dec 16, 2008 at 2:21 PM, Jonathan Cast jonathancc...@fastmail.fmwrote: On Tue, 2008-12-16 at 20:38 +, Andrew Coppin wrote: Don Stewart wrote: I think of Haskell more as a revolutionary movement LOL! Longest revolution EVER, eh? No. Das Kapital publication 1867. Russian

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Nathan Bloomfield
On Tue, Dec 16, 2008 at 11:40 AM, Darrin Thompson darri...@gmail.comwrote: My $0.02 us: Apologies for ascii art, and hopefully gmail doesn't munge this: \\ \\ \\ \\ \| \\ \\ --- \\ \\ // /

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Richard O'Keefe
On 16 Dec 2008, at 1:24 am, Álvaro Vilanova Vidal wrote: One more concept. haskell_infinitylambda_logo.svg haskell_infinitylambda.svghaskell_infinitylambda.png The hybrid lambda/infinity sign looks more like a bra advertisement and the lettering is unpleasant. For one thing, the language

[Haskell-cafe] Re: Threads not running under GHC 6.10?

2008-12-16 Thread Gwern Branwen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Mon, Dec 15, 2008 at 9:00 AM, Simon Marlow wrote: -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEAREKAAYFAklIL3wACgkQvpDo5Pfl1oIqAgCdHruLx+LQ1j7vaoJM3VD2vpNr rG0An0IL9ZXTmwd0bcp0V9clBy6UYeGt =UHCv -END PGP

[Haskell-cafe] How to think about this? (profiling)

2008-12-16 Thread Patrick Perry
I agree with everyone else who has said that the better solution is Lemmih's. It is simple, fast, and does not use much memory. On the other hand, here is a more faithful implementation of what you were trying to write. To use mutable arrays, you need to work in either the IO or the ST

Re: [Haskell-cafe] Time for a new logo? - Haskell logo as a stamp!

2008-12-16 Thread Henning Thielemann
On Mon, 15 Dec 2008, Henning Thielemann wrote: On Mon, 15 Dec 2008, Don Stewart wrote: And anyone who does a version, place put it on the wiki. It'll be lost if you only post to the list. I propose we gather submissions and vote on the best for a new logo in 2009. Whatever logo someone

[Haskell-cafe] Yampa vs. Reactive

2008-12-16 Thread Tony Hannan
Hello, Can someone describe the advantages and disadvantages of the Yampa library versus the Reactive library for functional reactive programming, or point me to a link. Thanks, Tony P.S. It is hard to google for Yampa and Reactive together because reactive as in function reactive programming

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Jeff Wheeler
On Dec 16, 2008, at 17:40:27 GMT, Darrin Thompson wrote: My $0.02 us: Apologies for ascii art, and hopefully gmail doesn't munge this: I love this ASCII-art version. I tried to make a vector version of it in Photoshop, and I came up with this [1]. Any critiques/suggestions? I'm thinking

[Haskell-cafe] Re: Time for a new logo?

2008-12-16 Thread Jeff Wheeler
Darrin Thompson darrinth at gmail.com writes: My $0.02 us: Apologies for ascii art, and hopefully gmail doesn't munge this: I love this ASCII-art version. I tried to make a vector version of it in Photoshop, and I came up with this [1] and [2]. Any critiques/suggestions? I'm thinking

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread George Pollard
On Tue, 2008-12-16 at 12:40 -0500, Darrin Thompson wrote: My $0.02 us: Apologies for ascii art, and hopefully gmail doesn't munge this: \\ \\ \\ \\ \| \\ \\ --- \\ \\ // / \

Re: [Haskell-cafe] Re: Time for a new logo?

2008-12-16 Thread George Pollard
On Wed, 2008-12-17 at 02:47 +, Jeff Wheeler wrote: Darrin Thompson darrinth at gmail.com writes: My $0.02 us: Apologies for ascii art, and hopefully gmail doesn't munge this: I love this ASCII-art version. I tried to make a vector version of it in Photoshop, and I came up with

Re: [Haskell-cafe] Re: Time for a new logo?

2008-12-16 Thread Jeff Wheeler
On Dec 16, 2008, at 10:08 PM, Ryan Grant wrote: nice. the first is better. in the second, i don't even see the lambda. Thanks the feedback. I just uploaded a new version [1] that is icon- sized, although the font used is Helvetica Neue, which is non-free. I have no free fonts on my Mac,

Re: [Haskell-cafe] Time for a new logo?

2008-12-16 Thread Aaron Tomb
On Dec 15, 2008, at 9:03 AM, Don Stewart wrote: And anyone who does a version, place put it on the wiki. It'll be lost if you only post to the list. I propose we gather submissions and vote on the best for a new logo in 2009. I'm a big fan of those posted by FalconNL. I showed the whole

[Haskell-cafe] Re: Time for a new logo?

2008-12-16 Thread mail
George Pollard por...@porg.es writes: On Wed, 2008-12-17 at 02:47 +, Jeff Wheeler wrote: I love this ASCII-art version. I tried to make a vector version of it in Photoshop, and I came up with this [1] and [2]. Any critiques/suggestions? I'm thinking about a second version that more