Re: [Haskell-cafe] optimising for vector units

2004-07-26 Thread Ketil Malde
Jan-Willem Maessen - Sun Labs East <[EMAIL PROTECTED]> writes: > There are, I believe, a couple of major challenges: >* It's easy to identify very small pieces of parallel work, but much > harder to identify large, yet finite, pieces of work. Only the > latter are really worth paral

[Haskell-cafe] Parsec Problem

2004-07-26 Thread haskell
Hello, I copied this example exactly from the page http://www.cs.uu.nl/people/daan/download/parsec/parsec.html -begin- module Parser where import Data.Char import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Char import Text.ParserCombinators.Parsec.Token price

Re: [Haskell-cafe] Type Theory? Relations

2004-07-26 Thread Scott Turner
On 2004 July 26 Monday 13:46, [EMAIL PROTECTED] wrote: > According to Enderton, one of the ways to define an ordered pair (a,b) > is {{a},{a,b}}. A relation is defined as a set of ordered-pairs. A > map, of course, is a single-valued relation. The motivation for defining ordered pairs that way i

Re: [Haskell-cafe] optimising for vector units

2004-07-26 Thread Jan-Willem Maessen - Sun Labs East
Ketil Malde wrote: I'm sure somebody, somewhere, is working on speculative execution of Haskell code. I think we both graduated (myself from MIT, Robert Ennals from Cambridge; I'm building compilers for supercomputers at Sun). If anyone else is working seriously on speculative evaluation of Ha

Re: [Haskell-cafe] Ambiguous type variable

2004-07-26 Thread John Meacham
This would be a great idea for something to put on the wiki, a page for each error message produced by the various compilers and a more in depth description of what it means and some ideas on how to track down the problem. John -- John Meacham - ârepetae.netâjohnâ _

[Haskell-cafe] Type Theory? Relations

2004-07-26 Thread haskell
Hello, I have a question that may pertain to type theory. According to Enderton, one of the ways to define an ordered pair (a,b) is {{a},{a,b}}. A relation is defined as a set of ordered-pairs. A map, of course, is a single-valued relation. Given all that, suppose I have a "FiniteMap Int Strin

Re: [Haskell-cafe] Beginner problems with 'triple' code

2004-07-26 Thread Henning Thielemann
On Mon, 26 Jul 2004, Stu White wrote: > As part of a project, I'm trying to construct a data type that can > represent three values as a 'triple' (as opposed to a 'tuple'), and then > make a function so that I can sort these values into ascending ord er. Since sorting requires equal types of the

Re: [Haskell-cafe] Beginner problems with 'triple' code

2004-07-26 Thread Jon Fairbairn
On 2004-07-26 at 18:10BST =?iso-8859-1?q?Stu=20White?= wrote: > Hi > > I'm not especially experienced in using haskell, and I could use some help. > > As part of a project, I'm trying to construct a data type > that can represent three values as a 'triple' (as opposed > to a 'tuple'), you coul

[Haskell-cafe] Beginner problems with 'triple' code

2004-07-26 Thread Stu White
Hi   I'm not especially experienced in using haskell, and I could use some help.   As part of a project, I'm trying to construct a data type that can represent three values as a 'triple' (as opposed to a 'tuple'), and then make a function so that I can sort these values into ascending order.   I'm

Re: [Haskell-cafe] optimising for vector units

2004-07-26 Thread Jon Cast
MR K P SCHUPKE <[EMAIL PROTECTED]> wrote: > As far as I understand it haskells lazy evaluation resembles dataflow > computation - IE values are computed on demand. > > This problem has already been solved for hardware, you end up with > what is termed a super-scalar architecture. > > Instructions

Re: [Haskell-cafe] Ambiguous type variable

2004-07-26 Thread Arjun Guha
Thanks for the tip, I solved to problem by making MinimaxState a subclass of Ord, thereby removing the utility method entirely. It makes far more sense this way as well. -Arjun ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mai

Re: [Haskell-cafe] optimising for vector units

2004-07-26 Thread MR K P SCHUPKE
As far as I understand it haskells lazy evaluation resembles dataflow computation - IE values are computed on demand. This problem has already been solved for hardware, you end up with what is termed a super-scalar architecture. Instructions read from memory fill a re-order buffer. As computatio

Re: [Haskell-cafe] optimising for vector units

2004-07-26 Thread Ketil Malde
Jon Cast <[EMAIL PROTECTED]> writes: >> factor c constant overhead, > ^^ > What makes you think the overhead is constant? (Referring to the overhead introduced by boxing and such, not parallelizing. Sorry if that wasn't clear) -kzm -- If I haven't seen further, it i

Re: [Haskell-cafe] optimising for vector units

2004-07-26 Thread Jon Cast
Ketil Malde <[EMAIL PROTECTED]> wrote: > MR K P SCHUPKE <[EMAIL PROTECTED]> writes: > One would expect a lazy and pure language Not lazy! See below. > to be excellent for parallelization, since the programmer is generally > removed from the actual flow of execution anyway. At some point (for

Re: [Haskell-cafe] optimising for vector units

2004-07-26 Thread Ketil Malde
MR K P SCHUPKE <[EMAIL PROTECTED]> writes: > Well I have to say the dataflow style of lazy programming made me think > Haskell would be ideal for multi-processor use (and now HyperThreading > is common most PCs have more than one processor from the code's point > of view)... > I was disappointed

Re: [Haskell-cafe] optimising for vector units

2004-07-26 Thread MR K P SCHUPKE
>Correct me if I'm wrong but I thought that there was some overhead to >making FFI (even safe/unsafe) You are not wrong... so it would only be worth it if you could execute a whole bunch of C at the same time. But it is possible... Consider: Use a monad to sequence vector operations on the Vector

Re: [Haskell-cafe] optimising for vector units

2004-07-26 Thread Duncan Coutts
On Mon, 2004-07-26 at 10:58, MR K P SCHUPKE wrote: > In the absence of such a standard, the best that can be done is to > abstract vectorisation by word size and number of words, and supply > a software implementation of all vector ops to use if the hardware > does not support certain primitives.

Re: [Haskell-cafe] optimising for vector units

2004-07-26 Thread MR K P SCHUPKE
Well I have to say the dataflow style of lazy programming made me think Haskell would be ideal for multi-processor use (and now HyperThreading is common most PCs have more than one processor from the code's point of view)... I was disappointed to find GHC only uses one thread, and therefore will o

[Haskell-cafe] Re: optimising for vector units

2004-07-26 Thread André Pang
On 26/07/2004, at 10:49 AM, Ben Lippmeier wrote: ... though it would be nice to be able to define a + b :: (Float, Float, Float, Float) -> (Float, Float, Float, Float) -> (Float, Float, Float, Float) and expect it to go via SSE.. I believe it would be possible to do this with "associated types":

Re: [Haskell-cafe] Ambiguous type variable

2004-07-26 Thread Ben Lippmeier
Arjun Guha wrote: AlphaBeta.hs:1: Ambiguous type variable `v' in the top-level constraint: `Ord v' arising from use of `maxValue' at AlphaBeta.hs:12 Another person had a similar problem just the other week.. The error messages are different, but the problem is the same. Read the messa

[Haskell-cafe] Ambiguous type variable

2004-07-26 Thread Arjun Guha
Hi, I'm new to Haskell and am getting this error: AlphaBeta.hs:1: Ambiguous type variable `v' in the top-level constraint: `Ord v' arising from use of `maxValue' at AlphaBeta.hs:12 in the following code: module AlphaBeta where -- Game states are instances of MinimaxState class MinimaxSta