Re: [Haskell-cafe] Small question

2007-08-10 Thread Stefan O'Rear
On Sat, Aug 11, 2007 at 12:06:23AM -0400, David Menendez wrote: > On 8/10/07, Andrew Coppin <[EMAIL PROTECTED]> wrote: > > > > My program needs to make decisions based on a pair of boolean values. > > Encoding both values as a single algebraic data type means I have to > > keep "taking it apart" so

Re[2]: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Bulat Ziganshin
Hello Andrew, Friday, August 10, 2007, 9:37:31 PM, you wrote: > Would be nice if it *could* somehow be parametric... ForeignArray may hold any Storable values. look at http://haskell.org/haskellwiki/Modern_array_libraries - we have no less than 10 array constructors :)) -- Best regards, Bula

Re: [Haskell-cafe] Small question

2007-08-10 Thread David Menendez
On 8/10/07, Andrew Coppin <[EMAIL PROTECTED]> wrote: > > My program needs to make decisions based on a pair of boolean values. > Encoding both values as a single algebraic data type means I have to > keep "taking it apart" so I can work with it. I'm not sure how much time > this wastes... Incident

Re: [Haskell-cafe] Explaining monads

2007-08-10 Thread Ronald Guida
Brian Brunswick wrote: > g f ??? g ??? f > > application a a->b flip ($) b > monad bind m a a->m b>>= m b > comonad cobind w a w a->b=>> w b > arrowarr a b arr b c >>>

Re: [Haskell-cafe] Dynamic thread management?

2007-08-10 Thread Hugh Perkins
On 8/11/07, Thomas Conway <[EMAIL PROTECTED]> wrote: > There are many papers about this in the Parallel Logic Programming > area. It is commonly called "Embarrassing Parallelism". Ah, I wasnt very precise ;-) I didnt mean I dont understand the problem; I meant I dont understand why people think i

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Thomas Conway
On Friday 10 August 2007 03:51:49 Hugh Perkins wrote: > Getting back to the original problem, which is: threading. Donald, one of > the things that is very interesting about Haskell is it's potential for > automatic threading, ie you write a trivial algorithm that looks like it > runs in a single

Re: [Haskell-cafe] Dynamic thread management?

2007-08-10 Thread Thomas Conway
On 8/11/07, Hugh Perkins <[EMAIL PROTECTED]> wrote: > > - parallelism must be quite coarse to offset overheads > >(which I think is the problem with expecting things like map and fold > > to parallelised automagically; they're just too small grained for it to > > be worthwhile) > > Someone else

Re: [Haskell-cafe] Problem with question 3 about knights and knaves on wikipedia

2007-08-10 Thread Dan Piponi
On 8/9/07, Peter Verswyvelen <[EMAIL PROTECTED]> wrote: > I was writing some haskell code for fun to solve some "knights and knaves" > . . . > John: answers either Yes or No, and you can now solve the problem. We can write a Haskell *program* to solve this problem. Bu

[Haskell-cafe] Re: Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Benjamin Franksen
Hugh Perkins wrote: > Now, arguably the fact that we are pattern matching on the receiver at least > means we dont do anything with the invalid data sent, but this is not rocket > science: the standard technique to ensure decent compile time validation in > rpc-type things is to use an interface. >

[Haskell-cafe] Re: towards a new foundation for set theory with atoms

2007-08-10 Thread Greg Meredith
Haskellians, A quick follow up. If you look at the code that i have written there is a great deal of repeated structure. Each of these different kinds of sets and atoms are isomorphic copies of each other. Because, however, of the alternation discipline, i could see no way to abstract the structur

Re: [Haskell-cafe] Defining new operators

2007-08-10 Thread Shachaf Ben-Kiki
> Hi all, > > Given the follwing function: > > > owner :: Step -> Scenario > > owner (Step id scenario action state response) = scenario > > Is it possible to define the owner function in such way that I can write > x.owner (returning the scenario related with the Step x)? Some people use (|>), w

[Haskell-cafe] listify

2007-08-10 Thread Chad Scherrer
Don't be too impressed, I think I was way off base. Looks like just a homomorphism: http://en.wikipedia.org/wiki/Homomorphism Chad > > I wonder, is listify a contravariant functor? > I wonder - will I ever reach the stage where I too make off-hand remarks > like this? :-} > Now I know how all t

Re: [Haskell-cafe] Defining new operators

2007-08-10 Thread Albert Y. C. Lai
rodrigo.bonifacio wrote: owner :: Step -> Scenario owner (Step id scenario action state response) = scenario Is it possible to define the owner function in such way that I can write x.owner (returning the scenario related with the Step x)? The . is already taken. Choose some other symbol, sa

[Haskell-cafe] Re: Small question

2007-08-10 Thread Benjamin Franksen
Andrew Coppin wrote: >>> Like that time yesterday, I compiled from program and got a weird message >>> about GHC about "ignored trigraphs" or something... What the heck is a >>> trigraph? >>>     >> >> Everyone's favorite obscure feature of the ANSI C99 preprocessor. >> Probably you had something

Re: [Haskell-cafe] Defining new operators

2007-08-10 Thread Dan Weston
Prelude> let (.) = flip ($) in 5 . odd True But please don't, the (.) operator is a sacred artifact in my religion, and I'd hate to see it desecrated... :( Dan rodrigo.bonifacio wrote: Hi all, Given the follwing function: owner :: Step -> Scenario owner (Step id scenario action state resp

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Spencer Janssen
On Friday 10 August 2007 12:37:31 Andrew Coppin wrote: > Stefan O'Rear wrote: > > Bool is 32 bits, but Don is using UArray. UArray is not parametric in > > the element type, which means it's less generally useful (no UArray of > > Complex Double, for instance), but conversely it is able to use mor

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Spencer Janssen
On Friday 10 August 2007 03:51:49 Hugh Perkins wrote: > Well, managed to shave 25% of C# execution time by writing my own bit > array. For now, I will concede that, under the conditions of the shoot, > bitarrays in c# are slower than bitarrays in Haskell. I'll let you know if > I get any new idea

[Haskell-cafe] Defining new operators

2007-08-10 Thread rodrigo.bonifacio
Hi all, Given the follwing function: > owner :: Step -> Scenario > owner (Step id scenario action state response) = scenario Is it possible to define the owner function in such way that I can write x.owner (returning the scenario related with the Step x)? Thanks in advance, Rodrigo.

Re: Re[2]: [Haskell-cafe] Pure functional GUI (was "a regressive view of support for imperativeprogramming in Haskell")

2007-08-10 Thread Conal Elliott
> On 8/8/07, Bulat Ziganshin <[EMAIL PROTECTED]> wrote: > Hello Peter, > Wednesday, August 8, 2007, 11:14:37 PM, you wrote: > > [...] So could you please tell me more about the problem with pure > > functional GUIs > seems that such program will have no effects :) Not necessarily. Just design t

Re: [Haskell-cafe] where to put handy functions?

2007-08-10 Thread Andrew Coppin
Chad Scherrer wrote: I wonder, is listify a contravariant functor? I wonder - will I ever reach the stage where I too make off-hand remarks like this? :-} Now I know how all the "normal" people feel when I tell them that a relation is simply a subset of the extended Cartesian product of the

[Haskell-cafe] towards a new foundation for set theory with atoms

2007-08-10 Thread Greg Meredith
Haskellians, i have a particular interest in FM-set theory in that it simplifies a host of otherwise non-trivial aspects of programming language semantics, especially, fresh names. You can provide semantics without sets with atoms, but the functor category machinery is more than a little on the he

Re: [Haskell-cafe] where to put handy functions?

2007-08-10 Thread Brian Sniffen
Posix has pretty well taken the name "select." It probably isn't a good idea to use that name in a commonly imported library like Data.List, since users will have to mask and qualify it if they also import Posix libraries. -- Brian T. Sniffen [EMAIL PROTECTED]or[EMAIL PROTECTED] http://w

Re: [Haskell-cafe] Dynamic thread management?

2007-08-10 Thread Andrew Coppin
Hugh Perkins wrote: - parallelism must be quite coarse to offset overheads (which I think is the problem with expecting things like map and fold to parallelised automagically; they're just too small grained for it to be worthwhile) Someone else said that. I dont und

Re: Re[2]: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Hugh Perkins
On 8/10/07, Bulat Ziganshin <[EMAIL PROTECTED]> wrote: > > if you mean Erlang's sophisticated rules of which messages in queue to > process first - this may be not yet implemented for Haskell. if you > mean that program is just many threads which pass messages through > channels to each other - it'

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Andrew Coppin
Stefan O'Rear wrote: Bool is 32 bits, but Don is using UArray. UArray is not parametric in the element type, which means it's less generally useful (no UArray of Complex Double, for instance), but conversely it is able to use more efficient representations depending on the type. Would be ni

Re: [Haskell-cafe] Small question

2007-08-10 Thread Andrew Coppin
Stefan O'Rear wrote: or, if you used the (correct and unintuitive) argument order to testBit: GAH! >_< Do you have ANY IDEA how many times I've got that wrong so far?? All I can say is thank God that Haskell is a statically-typed language! The type checker has saved my life here more time

Re: [Haskell-cafe] Dynamic thread management?

2007-08-10 Thread Hugh Perkins
On 8/10/07, Bayley, Alistair <[EMAIL PROTECTED]> wrote: > > Well, the Harris/Singh paper summarises the common problems: > - not many programs are inherently parallel If thats the case, then multicores are not going to be very useful. Where there's a will there's a way. What I think is: if maps

Re: [Haskell-cafe] Small question

2007-08-10 Thread Stefan O'Rear
On Fri, Aug 10, 2007 at 06:12:03PM +0100, Andrew Coppin wrote: > > [big blob of simplifier output] > > Mmm. See, now, I have *no idea* what GHC is saying. But I would have > expected that if I do something like > > x = if testBit 3 q ... > > then the definition of testBit would get inlined, and t

Re: [Haskell-cafe] Small question

2007-08-10 Thread Andrew Coppin
Stefan O'Rear wrote: On Fri, Aug 10, 2007 at 07:26:28AM +0100, Andrew Coppin wrote: My program needs to make decisions based on a pair of boolean values. Encoding both values as a single algebraic data type means I have to keep "taking it apart" so I can work with it. I'm not sure how much t

Re: [Haskell-cafe] Small question

2007-08-10 Thread Andrew Coppin
Stefan O'Rear wrote: Just wait 12 years, and if the price of processors follows Moore's extrapolation and the Haskell keeps its parallelism, Haskell will win :) Nice idea. Unfortunately, writing code in Haskell does not [yet] magically cause it to become "parallel". It's just that writing

Re: [Haskell-cafe] Matters of precision

2007-08-10 Thread David Roundy
On Thu, Aug 09, 2007 at 06:47:04PM +0100, Andrew Coppin wrote: > First of all, currently I'm just using Double to represent coordinates. > Can anybody tell me what the smallest value you can represent with one > is? (Not including denormals.) The smallest number is around 1e-300, but the smalles

[Haskell-cafe] Erlang-style concurrency

2007-08-10 Thread Kyle Consalus
In digest #69, Hugh Perkins mentioned the coolness of Erlang-style message passing concurrency. It just so happened that I was playing with that yesterday, so I figured I'd post a link to a 'ping-pong' thing that I based on an example in the erlang tutorial. I figured "Haskell has lightweight threa

[Haskell-cafe] Re: Interval Arithmetics

2007-08-10 Thread Al Falloon
Mitar wrote: Hi! First, disclaimer: everything I know about interval arithmetics comes from this video: http://video.google.com/videoplay?docid=-2285617608766742834 The discussion in the implementation of the Boost Interval Arithmetic Library is also useful. http://www.boost.org/libs/numeri

Re: [Haskell-cafe] where to put handy functions?

2007-08-10 Thread Chad Scherrer
Agreed. I like "select" better too, and the regular vs "Asc" version is a nice parallel with fromList and fromAscList. Chad On 8/10/07, Tillmann Rendel <[EMAIL PROTECTED]> wrote: > Non-negative is obvious for a list of indexes. Ordered makes sense > implementation-wise, and should be easy to mat

Re: [Haskell-cafe] where to put handy functions?

2007-08-10 Thread Chad Scherrer
Hmm, this would make a good QuickCheck property. I wonder, is listify a contravariant functor? Fun to work through the details of that some time, I think. Chad On 8/10/07, Brent Yorgey <[EMAIL PROTECTED]> wrote: > > Amusingly, extract is intimately related to function composition. Suppose we > ha

Re: [Haskell-cafe] where to put handy functions?

2007-08-10 Thread Tillmann Rendel
Chad Scherrer wrote: extract :: [Int] -> [a] -> [a] [...] This behaves roughly as extract ns xs == map (xs !!) ns extract sounds like removing the elements to be extracted from the original list. I would therefore expect it's type signature to be extract :: [Int] -> [a] -> ([a], [a]) wi

Re: [Haskell-cafe] can't build haxml under ghc 6.7, says HughesPJis hidden... but ghc-pkg doesn't say it's hidden...

2007-08-10 Thread Claus Reinke
For now, we just edit .cabal files when transporting code between GHC versions... Just for information, the HaXml darcs repo has recently adopted the solution of containing two .cabal files, one for ghc-6.6.x, and the other for the split-base packages (>=ghc-6.7). The only difference is the bui

[Haskell-cafe] Re: Polymorphic variants

2007-08-10 Thread Al Falloon
The proposal that I like the most is this one: "Open Data Types and Open Functions" http://lambda-the-ultimate.org/node/1453 However, it doesn't readily admit using the variants as overlapping enumerations like John suggested in a previous thread: http://article.gmane.org/gmane.comp.lang.haskel

RE: [Haskell-cafe] Dynamic thread management?

2007-08-10 Thread Bayley, Alistair
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Hugh Perkins > > Not many replies on this thread? Am I so wrong that no-one's > even telling me? I find it hard to believe that if there > were obvious errors in the proposition that anyone would > resist pointing them out to

Re: [Haskell-cafe] Dynamic thread management?

2007-08-10 Thread Jan-Willem Maessen
On Aug 10, 2007, at 9:31 AM, Hugh Perkins wrote: Not many replies on this thread? Am I so wrong that no-one's even telling me? I find it hard to believe that if there were obvious errors in the proposition that anyone would resist pointing them out to me ;-) So, that leaves a couple of

Re: [Haskell-cafe] Monad Description For Imperative Programmer

2007-08-10 Thread Alexis Hazell
On Thursday 09 August 2007 04:02, Seth Gordon wrote: > I feel like I still don't understand comonads. If you haven't done so already, you might like to check out: "(Co)Monads for Grad Students" http://www.cas.mcmaster.ca/~carette/CAS706/F2006/presentations/comonads.pdf "Codata and Comonads in

Re: [Haskell-cafe] Dynamic thread management?

2007-08-10 Thread Hugh Perkins
Not many replies on this thread? Am I so wrong that no-one's even telling me? I find it hard to believe that if there were obvious errors in the proposition that anyone would resist pointing them out to me ;-) So, that leaves a couple of possibilites: some people are agreeing, but see no point i

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Hugh Perkins
On 8/10/07, Donald Bruce Stewart <[EMAIL PROTECTED]> wrote: > > No, STUArray s Int Bool is a bit array. > Look at the space use. Or try replacing Bool with Word32, and see what > happens. > Fair enough. Well, the mono example in the shootout is lacking quite a few optimizations, eg its using the

Re: [Haskell-cafe] can't build haxml under ghc 6.7, says HughesPJ is hidden... but ghc-pkg doesn't say it's hidden...

2007-08-10 Thread Malcolm Wallace
Stefan O'Rear <[EMAIL PROTECTED]> wrote: > When you build a package, Cabal passess the -hide-all-packages option > to GHC, which prevents the package from using any installed packages > other than the ones explicitly listed in the Build-Depends: field. > > For now, we just edit .cabal files when

Re[2]: [Haskell-cafe] Small question

2007-08-10 Thread Bulat Ziganshin
Hello Donald, Friday, August 10, 2007, 10:46:36 AM, you wrote: > Hmm. Not looking so good so for for the imperative, GC'd languages. > > Java? > > http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=ghc&lang2=java > C#? Donald, i have written (an not once) that most of shoou

Re: [Haskell-cafe] Haskell DB tutorial link is broken.

2007-08-10 Thread Henk-Jan van Tuyl
I suppose you mean the link at http://haskelldb.sourceforge.net/#documentation you can find the tutorial at the Wayback Machine: http://web.archive.org/web/20070514141711/http://www.haskell.org/hawiki/HaskellDbTutorial Regards, Henk-Jan van Tuyl -- http://functor.bamikanarie.com http://

Re[2]: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Bulat Ziganshin
Hello Michael, Friday, August 10, 2007, 12:50:43 PM, you wrote: > As for threading, in addition to Haskell's approach you might also > look at Erlang, which has a quite > different (and quite interesting) approach to the whole problem. I wonder if > anyone has tried to > implement a message-pa

Re: [Haskell-cafe] where to put handy functions?

2007-08-10 Thread Brent Yorgey
On 8/9/07, Chad Scherrer <[EMAIL PROTECTED]> wrote: > > extract :: [Int] -> [a] -> [a] > extract = f 0 > where > f _ _ [] = [] > f _ [] _ = [] > f k nss@(n:ns) (x:xs) = if n == k then x:f (k+1) ns xs > else f (k+1) nss xs Finally, even if no one else is

Re: [Haskell-cafe] Small question

2007-08-10 Thread Josef Svenningsson
On 8/10/07, John Meacham <[EMAIL PROTECTED]> wrote: > On Thu, Aug 09, 2007 at 06:37:32PM +0100, Andrew Coppin wrote: > > Which of these is likely to go faster? > > type Quad = (Bool,Bool) > ... > > data Quad = BL | BR | TL | TR > ... > > I'm hoping that the latter one will more more strict / use

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Stefan O'Rear
On Fri, Aug 10, 2007 at 04:51:49PM +0800, Hugh Perkins wrote: > Well, managed to shave 25% of C# execution time by writing my own bit > array. For now, I will concede that, under the conditions of the shoot, > bitarrays in c# are slower than bitarrays in Haskell. I'll let you know if > I get any

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Hugh Perkins
On 8/10/07, Michael Vanier <[EMAIL PROTECTED]> wrote: > > Just to get the history right: garbage collectors have been around a > _long_ time, since the '60s in > Lisp systems. They only became known to most programmers through Java > (which is one unarguable good > thing that Java did). Ah inter

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Hugh Perkins
Well, managed to shave 25% of C# execution time by writing my own bit array. For now, I will concede that, under the conditions of the shoot, bitarrays in c# are slower than bitarrays in Haskell. I'll let you know if I get any new ideas on this. Getting back to the original problem, which is: t

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Michael Vanier
Hugh Perkins wrote: I'm not trolling, despite strong appearances to the contrary ;-) My primary objective/goal is to find a way to make threading easy. Thread management today is like memory management in the early 90s. We kindof had tools (new, delete in C++ for example) to do it. At som

Re: [Haskell-cafe] Small question

2007-08-10 Thread Jon Harrop
On Friday 10 August 2007 07:46:36 Donald Bruce Stewart wrote: > Doesn't look too good for your assertion :( Poor benchmark design forces the authors of the shootout to subjectively reject or cripple submissions. In fact, counting primes and printing pi are among the worst possible benchmark task

RE: [Haskell-cafe] Derivation of Eq given Ord

2007-08-10 Thread Simon Peyton-Jones
It may not be a bug, because you do get an error, but it's certainly an infelicity because the error comes out much too late. I'll Trac this and fix in due course. Thanks for raising it. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douga

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Hugh Perkins
On 8/10/07, Stefan O'Rear <[EMAIL PROTECTED]> wrote: > > Bool is 32 bits, but Don is using UArray. UArray is not parametric in > the element type, which means it's less generally useful (no UArray of > Complex Double, for instance), but conversely it is able to use more > efficient representations

Re: [Haskell-cafe] Explaining monads

2007-08-10 Thread Kim-Ee Yeoh
Brian Brunswick-5 wrote: > > g f ??? g ??? f > > application a a->b flip ($) b > monad bind m a a->m b>>= m b > comonad cobind w a w a->b=>> w b > arrowarr a b arr b c >

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Stefan O'Rear
On Fri, Aug 10, 2007 at 04:00:01PM +0800, Hugh Perkins wrote: > On 8/10/07, Donald Bruce Stewart <[EMAIL PROTECTED]> wrote: > > > > It's using bit arrays. > > > > Well I'm a total Haskell newbie, and you're using Haskell to write > imperative code, so it's really hard for me to read, but looking a

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Donald Bruce Stewart
hughperkins: > >On 8/10/07, Donald Bruce Stewart <[EMAIL PROTECTED]> >wrote: > > It's using bit arrays. > >Well I'm a total Haskell newbie, and you're using Haskell to >write imperative code, so it's really hard for me to read, >but looking at your code, you have: > >

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Hugh Perkins
On 8/10/07, Donald Bruce Stewart <[EMAIL PROTECTED]> wrote: > > It's using bit arrays. > Well I'm a total Haskell newbie, and you're using Haskell to write imperative code, so it's really hard for me to read, but looking at your code, you have: (IOUArray Int Bool) -- an array of Bool Bool is a 3

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Donald Bruce Stewart
hughperkins: > >On 8/10/07, Donald Bruce Stewart <[EMAIL PROTECTED]> >wrote: > > > [2]http://shootout.alioth.debian.org/gp4/benchmark.php?te > st=nsievebits&lang=all > The GHC-compiled entry comes in at 1.2x C++, which I'm > quite happy with. > Strangely, despit

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Hugh Perkins
On 8/10/07, Donald Bruce Stewart <[EMAIL PROTECTED]> wrote: > > > http://shootout.alioth.debian.org/gp4/benchmark.php?test=nsievebits&lang=all > > The GHC-compiled entry comes in at 1.2x C++, which I'm quite happy with. > Strangely, despite your assertions, the C# entry lags well down the list. Y

RE: [Haskell-cafe] Small question

2007-08-10 Thread Simon Peyton-Jones
| And, of course, if it's a strict argument, then the values stored are | ALWAYS one of two possibilities. So as a matter of curiosity, would | there be any advantage at all for "unboxing" enumeration types? (Apart | from, I suppose, the possibility of using fewer than 32/64 bits to store | a fla

Re: [Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Donald Bruce Stewart
hughperkins: >Now, I did have kindof a shootout thread with Don and >Sebastien, calculating prime numbers, where Don managed to >get to within an order of magnitude of C# performance (I >think he got to about 70-80% of C# performance, cool!) -> Despite my better judgement, I'll jus

Re: [Haskell-cafe] Problem with question 3 about knights andknavesonw ikipedia

2007-08-10 Thread Peter Verswyvelen
Oh boy, never mind, after a good night sleep the solution is super obvious... Grrr what a waste of time ;-) The solution is in the sentence "the logician has then enough information to solve the problem", which I yesterday read like "the problem can now be solved", which is not the same. So t

[Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

2007-08-10 Thread Hugh Perkins
Haskell vs GC'd imperative languages === On 8/10/07, Thomas Conway <[EMAIL PROTECTED]> wrote: > > > Well, C++ is not really competitive with Haskell, because C++ does not > have > > a GC, and it's trivial to corrupt the stack/heap. > > Beg to differ. I offer the following p

Re: [Haskell-cafe] Small question

2007-08-10 Thread Stefan O'Rear
On Fri, Aug 10, 2007 at 07:26:28AM +0100, Andrew Coppin wrote: > Stefan O'Rear wrote: >> I like pretty pictures. > > ...and have lots of spare time, apparently. ;-) Indeed. :) >> Probably none. The STG-machine was designed to make user-defined >> algebraic types very fast. > > My program needs t