Re[2]: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Bulat Ziganshin
Hello Andy, Tuesday, December 19, 2006, 12:35:28 AM, you wrote: and concluded that there are only 2 tasks which speed is dependent on Maybe it would not be a bad idea to check the number of cache misses, branch mispredictions etc. per instruction executed for the shootout apps, in

Re[2]: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Bulat Ziganshin
Hello Neil, Monday, December 18, 2006, 11:04:59 PM, you wrote: let's go further in this long-term discussion. i've read Shootout problems It's more than 2 tasks that are dependant on the code generated by the compiler. can you give me their names, please? :) And in my opinion, generally

Re[2]: A suggestion for the next high profile Haskell project [Was: Re: [Haskell-cafe] What is a hacker?]

2006-12-19 Thread Bulat Ziganshin
Hello Tomasz, Tuesday, December 19, 2006, 2:35:35 AM, you wrote: Haskell can't provide fast execution speed unless very low-level programming style is used (which is much harder to do in Haskell than in C, see one of my last messages for example) AND jhc compiler is used I have experienced

Re[2]: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Bulat Ziganshin
Hello Tomasz, Tuesday, December 19, 2006, 2:11:37 AM, you wrote: no. it seems that you never tried to write such code and believe someone else who's said that such code may be written. try to write something very simple, like summing bytes in memory buffer, before you will do any conclusions

Re: A suggestion for the next high profile Haskell project [Was: Re: [Haskell-cafe] What is a hacker?]

2006-12-19 Thread Tomasz Zielonka
On Tue, Dec 19, 2006 at 12:31:01PM +0300, Bulat Ziganshin wrote: it was because C++ program was not optimized at maximum, yes? :) we are saying about PGP, are you believe that its code isn't yet optimized? We are talking about _useful_ programs. A program doesn't have to be blindingly fast to

Re[2]: A suggestion for the next high profile Haskell project [Was: Re: [Haskell-cafe] What is a hacker?]

2006-12-19 Thread Bulat Ziganshin
Hello Tomasz, Tuesday, December 19, 2006, 12:33:54 PM, you wrote: it was because C++ program was not optimized at maximum, yes? :) we are saying about PGP, are you believe that its code isn't yet optimized? We are talking about _useful_ programs. A program doesn't have to be blindingly fast

[Haskell-cafe] Data.Generics question

2006-12-19 Thread Grote Collective
Hello all, I have two datatypes, both representing the same language. However, one is a flattened version of the other. For instance: data Flattened = Const Flattened | Sum Flattened Flattened | ... | IntConst Int | RealConst Float | BoolConst Bool | Void data Term = Const

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Magnus Therning
On Mon, Dec 18, 2006 at 20:11:05 -0500, Brandon S. Allbery KF8NH wrote: On Dec 18, 2006, at 18:26 , [EMAIL PROTECTED] wrote: Tomasz Zielonka [EMAIL PROTECTED] writes: On Mon, Dec 18, 2006 at 11:57:59PM +0100, [EMAIL PROTECTED] wrote: ... but I wonder: GPG, AFAIK undertakes some special

Re: [Haskell-cafe] maybeToM

2006-12-19 Thread Bjorn Bringert
On 18 dec 2006, at 18.22, Stefan O'Rear wrote: I can't see how such a generalization could look like, especially since maybe can be used with arbitrary monad: maybe (fail Nothing) return Well, that???s a possible implementation of a maybeToM. The question is: Is it useful enough for

[Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread Joachim Durchholz
Tomasz Zielonka schrieb: On Mon, Dec 18, 2006 at 12:14:36AM +0100, Joachim Durchholz wrote: Magnus Therning schrieb: There is of course the possibility that Haskell would bring a whole slew of yet-to-be-determined security issues. I doubt it will be worse than C though. Haskell might be prone

RE: Re[2]: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Patrick Mulder
why you (and Donald) don't want to understand me. i say that imperative Haskell code is more efficient than pure (and especially lazy) one and that even such code in ghc is slower than C equivalent. I think the concern about execution speed of algorithms is a fairly recent topic. At least,

[Haskell-cafe] Re: Getting my feet wet - small browser game

2006-12-19 Thread Joachim Durchholz
Marc A. Ziegert schrieb: Comments and suggestions welcome :-) hi Joachim. i have some suggestions: apache: use fastcgi instead of hacking an own http-server. http://www.cs.chalmers.se/~bringert/darcs/haskell-fastcgi/doc/ http://www.cs.chalmers.se/~bringert/darcs/cgi-compat/doc/ Ah, that's

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Tomasz Zielonka
On Tue, Dec 19, 2006 at 12:33:18PM +0300, Bulat Ziganshin wrote: Are you claiming that every (even slightly) non-trivial problem (or algorithm) results in a mess of IO code in Haskell? Come on, admit that you like to program in imperative style, and that's why you end up with such mess ;-)

Re: A suggestion for the next high profile Haskell project [Was: Re: [Haskell-cafe] What is a hacker?]

2006-12-19 Thread Tomasz Zielonka
On Tue, Dec 19, 2006 at 12:39:31PM +0300, Bulat Ziganshin wrote: Tuesday, December 19, 2006, 12:33:54 PM, you wrote: it was because C++ program was not optimized at maximum, yes? :) we are saying about PGP, are you believe that its code isn't yet optimized? We are talking about _useful_

Re: A suggestion for the next high profile Haskell project [Was: Re: [Haskell-cafe] What is a hacker?]

2006-12-19 Thread Tomasz Zielonka
On Tue, Dec 19, 2006 at 01:24:36PM +0100, Tomasz Zielonka wrote: I see a lack of will to understand on your part (the same thing you see in me :-). My statements are not contradictory: Some of the programs I was talking about were throw-away programs, for one use, and I would be satisfied even

Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-19 Thread Malcolm Wallace
Iavor Diatchki [EMAIL PROTECTED] wrote: class IxMonad m where (=) :: m i j a - (a - m j k b) - m i k b ret:: a - m i i a And just for fun we can define another indexed monad: state that supports strong updates (i.e., the type of the state can change as you compute):

Re[2]: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Bulat Ziganshin
Hello Tomasz, Tuesday, December 19, 2006, 3:19:52 PM, you wrote: why you (and Donald) don't want to understand me. i say that imperative Haskell code is more efficient Your statement is too general to deserve answering. can you provide couter-examples, or just believe? i mean

Re: [Haskell-cafe] maybeToM

2006-12-19 Thread Tomasz Zielonka
On Mon, Dec 18, 2006 at 04:59:45PM +, Joachim Breitner wrote: Well, that???s a possible implementation of a maybeToM. The question is: Is it useful enough for a name on it???s own? OK, I agree it's sufficiently useful, and it's a generalization of Data.Maybe.maybeToList. Perhaps we could

Re[2]: A suggestion for the next high profile Haskell project [Was: Re: [Haskell-cafe] What is a hacker?]

2006-12-19 Thread Bulat Ziganshin
Hello Tomasz, Tuesday, December 19, 2006, 3:24:36 PM, you wrote: in me :-). My statements are not contradictory: Some of the programs I was talking about were throw-away programs, for one use, and I would be satisfied even if they ran 10x-100x slower than they did, as long as you was 101st

Re: [Haskell-cafe] Data.Generics question

2006-12-19 Thread Vyacheslav Akhmechet
Sorry, I sent the email to the wrong place and messed up the code (it's early :)). Take two: transform = everywhere (mkT transform') where transform = (\Term a-Flattened a) `extT` (Contstant a-Flattened a) On 12/19/06, Vyacheslav Akhmechet [EMAIL PROTECTED] wrote:

Re: [Haskell-cafe] Data.Generics question

2006-12-19 Thread Mark T.B. Carroll
Hmmm. That's interesting. I have a slightly different problem and I don't know if it's relevant or not. I have nested algebraic data types for things like expressions with terms and operators and whatever too, and some of my functions do a transformation that removes all instances of particular

Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-19 Thread David Roundy
On Mon, Dec 18, 2006 at 06:52:41PM -0800, Iavor Diatchki wrote: Hi David, I don't think you need functional dependencies or associated type synonyms to get your example to work. In the past, I have used the abstraction that you are describing (I call it an indexed monad and it has a nice

Re: [Haskell-cafe] Data.Generics question

2006-12-19 Thread Neil Mitchell
Hi Mark, nested type, but to do that I seem to have to create a whole other near-copy of the data declarations with slightly different names and the occasional constructor missing. I wonder if there's a better way. Instead of getting the type system to enforce it, you can write annotations

Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-19 Thread Jacques Carette
David Roundy wrote: The trouble is that your solution doesn't allow you to use do-notation with the IxMonad. And if you did allow yourself to use do-notation by rebinding (=), etc, then you wouldn't be able to use ordinary monads with do-notation in the same module. That's what makes things

Re : Re[2]: A suggestion for the next high profile Haskell project [Was: Re: [Haskell-cafe] What is a hacker?]

2006-12-19 Thread minh thu
Hi, Hey folks, I'm sure you can all agree :) Just (if you want to) re-list what you want to say ... each mail is a step further incomprehension for each participant in this thread (while I think each position of you is not so different). It would be a shame if the haskell mailing list ends

[Haskell-cafe] Re: Writing Haskell For Dummies Or At Least For People Who Feel Like Dummies When They See The Word 'Monad'

2006-12-19 Thread John Goerzen
Kirsten Chevalier wrote: It's not as if this is the first time that this has been suggested, but some people have suggested that a practical book about Haskell would be a good idea. I agree. Some people have also suggested that the right moment for this hasn't arrived yet, and I see that as a

[Haskell-cafe] Re: Writing Haskell For Dummies Or At Least For People Who Feel Like Dummies When They See The Word 'Monad'

2006-12-19 Thread John Goerzen
John Goerzen wrote: I know this is a late reply, but some of us tried to get something like this off the ground a little while back. darcs get --partial http://software.complete.org/haskell-v8/ My brain is fried. Make that: darcs get --partial http://darcs.complete.org/haskell-v8

[Haskell-cafe] exception output

2006-12-19 Thread Ferenc Wagner
Hi, the following program main = readFile nonexistent = putStr is meant to produce an exception. When compiled with GHC 6.4, it outputs the *** Exception... string to stderr, which makes me happy. However, when run with runghc6 or runhugs, the message is sent to stdout, which makes me sad. Is

Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-19 Thread David Roundy
On Tue, Dec 19, 2006 at 10:08:12AM -0500, Jacques Carette wrote: David Roundy wrote: The trouble is that your solution doesn't allow you to use do-notation with the IxMonad. And if you did allow yourself to use do-notation by rebinding (=), etc, then you wouldn't be able to use ordinary

Re: Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-19 Thread Nicolas Frisby
On the FD impasse: Witness.hs:33:0: Couldn't match expected type `m'' (a rigid variable) against inferred type `RealWitness a a'' `m'' is bound by the type signature for `' at Witness.hs:11:29 When using functional dependencies to combine Witness WitnessReally a

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread Tomasz Zielonka
On Tue, Dec 19, 2006 at 12:52:17PM +0100, Joachim Durchholz wrote: Tomasz Zielonka schrieb: On Mon, Dec 18, 2006 at 12:14:36AM +0100, Joachim Durchholz wrote: Haskell might be prone to denial-of-service attacks. E.g. sending it data that cause it to evaluate an infinite data structure.

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread Neil Mitchell
Hi Joachim, Why? In case the strictness analyzer was buggy? I'd be perfectly happy if that analysis were just a note saying run ghc with such-and-these options and inspect the intermediate code for function foo to see that the strictness analyzer determined it will always terminate. I

[Haskell-cafe] On the various faces of Composition

2006-12-19 Thread Jacques Carette
[As recently seen on LtU - http://lambda-the-ultimate.org/node/1919] An amazing paper http://www.dbmcintyre.pwp.blueyonder.co.uk/index_f/menu_f/j_f/apl95.pdf on composition as seen from APL and J. The terminology (using verbs, nouns, adverbs, etc) is _so_ much more evocative than the

[Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread ls-haskell-developer-2006
Tomasz Zielonka [EMAIL PROTECTED] writes: Anyway, don't concentrate on this particular example. All I say is that: - sometimes I get efficient programs in Haskell right away (I my case quite often, but YMMV) - sometimes efficiency doesn't matter I don't think it is contradictory,

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread ls-haskell-developer-2006
Brandon S. Allbery KF8NH [EMAIL PROTECTED] writes: You could just mlock() everything allocated by the RTS... Brute force. :-) Certainly the most simple way to do it. But is that option already here (say in ghc), or would one have to patch the runtime for that? Note also that this requires

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Neil Mitchell
Hi Obviously when Cost(Upgrade) Cost(Optimisation) for the customer. Those costs are Cost(Upgrade) = Price of more memory or new PC which is fast enough. Cost(Optimisation) = Hours_spent * Fee_per_Hour / N You are talking closed source commercial software for the masses. I don't

Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-19 Thread Jacques Carette
First, I believe that this paper http://homepages.inf.ed.ac.uk/ratkey/param-notions.pdf is intimately related to WitnessMonad. David Roundy wrote: Rebinding the do notation is at least reasonably clean, it's just that we don't want to lose the ability to mix with ordinary monads. This

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Sebastian Sylvan
On 12/19/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Tomasz Zielonka [EMAIL PROTECTED] writes: Anyway, don't concentrate on this particular example. All I say is that: - sometimes I get efficient programs in Haskell right away (I my case quite often, but YMMV) - sometimes efficiency

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread ls-haskell-developer-2006
Bulat Ziganshin [EMAIL PROTECTED] writes: Hello Tomasz, Tuesday, December 19, 2006, 3:19:52 PM, you wrote: why you (and Donald) don't want to understand me. i say that imperative Haskell code is more efficient Your statement is too general to deserve answering. can you provide

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Jeff Polakow
Hello, PS: Talking about smart programs: Is there a library anywhere that could be used to implement expert systems in Haskell or to evaluate Horn clauses in Prolog style? Here is one possible starting point is the backtracking monad transformer by Oleg et al:

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Tomasz Zielonka
On Tue, Dec 19, 2006 at 07:14:09PM +0100, [EMAIL PROTECTED] wrote: Tomasz Zielonka [EMAIL PROTECTED] writes: Anyway, don't concentrate on this particular example. All I say is that: - sometimes I get efficient programs in Haskell right away (I my case quite often, but YMMV) -

[Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread Joachim Durchholz
Tomasz Zielonka schrieb: On Tue, Dec 19, 2006 at 12:52:17PM +0100, Joachim Durchholz wrote: Tomasz Zielonka schrieb: On Mon, Dec 18, 2006 at 12:14:36AM +0100, Joachim Durchholz wrote: Haskell might be prone to denial-of-service attacks. E.g. sending it data that cause it to evaluate an

Re: [Haskell-cafe] Class annotation on datatype ineffective in function

2006-12-19 Thread Brian Hulley
Reto Kramer wrote: The code below does not compile unless the bar function is annotated with a suitable constraint on the class of the formal parameter. class (C a) data (C foo) = XY foo = X foo | Y foo bar :: a - XY a bar aFoo = X aFoo As suggested, this works: bar :: (C a) = a - XY a

Re: [Haskell-cafe] Data.Generics question

2006-12-19 Thread Carl Witty
On Tue, 2006-12-19 at 09:25 -0500, Mark T.B. Carroll wrote: Hmmm. That's interesting. I have a slightly different problem and I don't know if it's relevant or not. I have nested algebraic data types for things like expressions with terms and operators and whatever too, and some of my functions

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread Seth Gordon
Joachim Durchholz wrote: Trying to fully evaluate an infinite data structure will result in looping or memory exhaustion, and you have that possibilities in almost all languages. Yes, but I suspect that Haskell makes it easier to make that kind of bug. Worse, it's easy to introduce this

Re: [Haskell-cafe] Re: Writing Haskell For Dummies Or At Least For People Who Feel Like Dummies When They See The Word 'Monad'

2006-12-19 Thread Bulat Ziganshin
Hello John, Tuesday, December 19, 2006, 7:16:48 PM, you wrote: It's not as if this is the first time that this has been suggested, but some people have suggested that a practical book about Haskell would be a good idea. I agree. Some people have also suggested that the right moment for this

[Haskell-cafe] howto c2hs marshall in out argument by reference

2006-12-19 Thread Marc Weber
The function takes a pointer to an integer, prints its value and returns the increment. void cl_inc(int *i){ printf(changing int from %d to %d, *i, (++i)); } I've managed it by using this code: {#fun pure cl_inc {alloca `CInt' peek*}

Re : [Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread minh thu
2006/12/19, Neil Mitchell [EMAIL PROTECTED]: Hi Neil, Hi Joachim, Why? In case the strictness analyzer was buggy? I'd be perfectly happy if that analysis were just a note saying run ghc with such-and-these options and inspect the intermediate code for function foo to see that the

Re: Re : [Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread Neil Mitchell
Hi minh thu, Lazy semantics - equational reasoning ? I thought that : lack of mutable state - equational reasoning. For instance, I think to data flow variable in Oz (whcih I really don't know much / never used) : if a (Oz managed) thread attemps to read the value of an unbound (data flow)

Re : [Haskell-cafe] A suggestion for the next high profileHaske ll project

2006-12-19 Thread Steve Schafer
On Tue, 19 Dec 2006 21:34:06 +0100, you wrote: Lazy semantics - equational reasoning ? I thought that : lack of mutable state - equational reasoning. For instance, I think to data flow variable in Oz (whcih I really don't know much / never used) : if a (Oz managed) thread attemps to read the

Re: [Haskell-cafe] A suggestion for the next high profile Haskell project

2006-12-19 Thread Stefan O'Rear
On Tue, Dec 19, 2006 at 08:42:06PM +, Neil Mitchell wrote: Lack of mutable state, referentially transparent and laziness all help with equational reasoning. Inlining is much easier in a lazy language - and inlining is really handy for equational reasoning. Imagine: not_term = non_term

Re: [Haskell-cafe] A suggestion for the next high profile Haskell project

2006-12-19 Thread Neil Mitchell
Hi I don't know if any actual language does this, What, that is strict and would like to inline things for performance? There is a reason they can't do this. but your inlining problem can be solved by letting _|_ = arbitrary behaivor. So would you allow folding? (inlining = unfolding)

Re : Re : [Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread minh thu
2006/12/19, Neil Mitchell [EMAIL PROTECTED]: Hi minh thu, Lazy semantics - equational reasoning ? I thought that : lack of mutable state - equational reasoning. For instance, I think to data flow variable in Oz (whcih I really don't know much / never used) : if a (Oz managed) thread attemps

Re: [Haskell-cafe] A suggestion for the next high profile Haskell project

2006-12-19 Thread Stefan O'Rear
On Tue, Dec 19, 2006 at 08:57:33PM +, Neil Mitchell wrote: I don't know if any actual language does this, What, that is strict and would like to inline things for performance? There is a reason they can't do this. I had intended for that to apply to my proposal - I know real strict

Re: [Haskell-cafe] Strange type behavior in GHCi 6.4.2

2006-12-19 Thread Dan Piponi
On 12/2/06, Chris Kuklewicz [EMAIL PROTECTED] wrote: Grady Lemoine wrote: I've been playing around with Dan Piponi's work on automatic differentiation... I played with such things, as seen on the old wiki: http://haskell.org/hawiki/ShortExamples_2fSymbolDifferentiation I missed this while I

Re : Re : Re : [Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread minh thu
2006/12/19, Brandon S. Allbery KF8NH [EMAIL PROTECTED]: On Dec 19, 2006, at 16:03 , minh thu wrote: 2006/12/19, Neil Mitchell [EMAIL PROTECTED]: not_term = non_term f x = 12 Now evaluating: main = f non_term In a lazy language the value is always 12, in a strict language its always

[Haskell-cafe] Re: A suggestion for the next high profile Haskell project [Was: Re: What is a hacker?]

2006-12-19 Thread Joachim Durchholz
Seth Gordon schrieb: Joachim Durchholz wrote: Trying to fully evaluate an infinite data structure will result in looping or memory exhaustion, and you have that possibilities in almost all languages. Yes, but I suspect that Haskell makes it easier to make that kind of bug. Worse, it's easy to

[Haskell-cafe] Showing the 1 element tuple

2006-12-19 Thread Neil Mitchell
Hi, A weird question, what does the 1 element tuple look like? () -- 0 element tuple (,) a b -- 2 element tuple (,,) a b c -- 3 element tuple () a - meaningless (a) - a in brackets GHC has the 1 element unboxed tuple, (# a #), and all the other sizes unboxed as well, but how would you

Re: [Haskell-cafe] Showing the 1 element tuple

2006-12-19 Thread Stefan O'Rear
On Tue, Dec 19, 2006 at 10:41:56PM +, Neil Mitchell wrote: A weird question, what does the 1 element tuple look like? () -- 0 element tuple (,) a b -- 2 element tuple (,,) a b c -- 3 element tuple () a - meaningless (a) - a in brackets ... Thoughts? Python uses the syntax (foo,) to

Re: [Haskell-cafe] Showing the 1 element tuple

2006-12-19 Thread dgriffi3
On Tue, Dec 19, 2006 at 10:41:56PM +, Neil Mitchell wrote: Hi, A weird question, what does the 1 element tuple look like? () -- 0 element tuple (,) a b -- 2 element tuple (,,) a b c -- 3 element tuple () a - meaningless (a) - a in brackets GHC has the 1 element unboxed tuple, (# a #),

Re: [Haskell-cafe] Origins of (x:xs)?

2006-12-19 Thread Paul Hudak
Pattern matching goes back to Burstall and Darlington's work in the 1970's. As for x:xs, the xs is meant to be the plural of x, and is pronounced exs (I guess...). Similarly, n:ns is one n followed by many more ens. Make sense? (By the way, : is often pronounced followed by.) -Paul

Re: [Haskell-cafe] Origins of (x:xs)?

2006-12-19 Thread Dougal Stanton
Quoth Toby Hutton, nevermore: Does anyone know why (x:xs)? Is xs meant to be a synonym for 'excess'? I've seen it said somewhere (possibly Hudak's _Haskell School of Expression_) that xs should be read as the plural of x. Although personally I always gravitate towards the excess notion,

Re: [Haskell-cafe] AT solution: rebinding = for restricted monads

2006-12-19 Thread Iavor Diatchki
Hi, On 12/19/06, Jacques Carette [EMAIL PROTECTED] wrote: First, I believe that this paper http://homepages.inf.ed.ac.uk/ratkey/param-notions.pdf is intimately related to WitnessMonad. This paper definitely seems to be related. Thanks for the link! -Iavor

Re: [Haskell-cafe] Showing the 1 element tuple

2006-12-19 Thread Greg Fitzgerald
Neil, On Tue, Dec 19, 2006 at 10:41:56PM +, Neil Mitchell wrote: A weird question, what does the 1 element tuple look like? Could tuples be implemented as an HList? singleton = (`hCons` hNil) -Greg ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Dan Weston
Maybe we should take to heart lessons learned from the Erlang development experience in Joe Armstrong's Erlang Tutorial: 1 Concentrate on essential features 2 You need a protector 3 You will never displace an existing technology if it works -- Wait for the failures 4 Move quickly into

Re: [Haskell-cafe] Showing the 1 element tuple

2006-12-19 Thread Brian Hulley
Neil Mitchell wrote: Hi, A weird question, what does the 1 element tuple look like? () -- 0 element tuple (,) a b -- 2 element tuple (,,) a b c -- 3 element tuple () a - meaningless (a) - a in brackets GHC has the 1 element unboxed tuple, (# a #), and all the other sizes unboxed as well, but

Re: [Haskell-cafe] Showing the 1 element tuple

2006-12-19 Thread Stefan O'Rear
On Tue, Dec 19, 2006 at 11:35:49PM -, Brian Hulley wrote: Tuples represent dimensionality therefore a 1-element tuple is just a 1-dimensional value ie the value itself hence a == (a) == ((a)) == (((a))) That is true in a strict language, and for unboxed (unlifted) types, but in haskell

Re: [Haskell-cafe] Showing the 1 element tuple

2006-12-19 Thread Neil Mitchell
Hi Python uses the syntax (foo,) to denote a singleton tuple (that is an extra comma at the end); quoting the python tutorial Ugly, but effective. Yes, I thought of that, the issue is: (a,b) is considered syntactic sugar for (,) a b (a,) is syntactic sugar for... And the place I'm

Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-19 Thread Alexey Rodriguez Yakushev
Andy, The GHC head can currently build against PAPI[1], a library for gathering CPU statistics. At the moment you can only gather such statistics for AMD Opteron but it shouldn't be difficult to port it to other CPUs after a bit of browsing around the PAPI docs. Installing PAPI requires

[Haskell-cafe] Haskell Weekly News: December 20, 2006

2006-12-19 Thread Donald Bruce Stewart
--- Haskell Weekly News http://sequence.complete.org/hwn/20061220 Issue 54 - December 20, 2006 --- Welcome to issue 54 of HWN, a weekly newsletter

[Haskell-cafe] Possible commercial FP/Haskell job

2006-12-19 Thread Donald Bruce Stewart
Noticed this in the blargh-o-sphere, some people might be interested: http://www.nnseek.com/e/comp.lang.python/lisp_python_programmers_among_others_wanted_20059193t.html Senior applications developer: Our advanced applications work is currently being done in Common Lisp, but that

[Haskell-cafe] FD problem in GHC 6.6

2006-12-19 Thread Robert
Fellow Haskellers, I have a package that uses some light typeclass hackery to automaticly build parsing algorithms based on the type of a function. I was recently informed that my package doesn't compile on GHC 6.6 due to the new restrictions on FD resolution; in particular I have instance

Re: [Haskell-cafe] FD problem in GHC 6.6

2006-12-19 Thread Dan Weston
instance CommandFunction (Sh st ()) st where ^ I think your first argument (on which the second has a functional dependence) does not determine the second argument, since it makes use of st in the first argument. This strikes me as a likely place to begin. Dan

Re: [Haskell-cafe] Showing the 1 element tuple

2006-12-19 Thread Marc A. Ziegert
A weird question, what does the 1 element tuple look like? there is one in Control.Monad.Identity: Identity 1 i miss the short version newtype Id x = x writing (1,) is not that well defined; how do you want to use its constructor alone? writing (1;) may be the solution, i think. (;) could

[Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-19 Thread Imam Tashdid ul Alam
hi guys, I was just wondering if anyone is interested is a quasi-project of rewriting the Prelude (only shrinking it as measured by the total number of names imported, read along...) the idea is (just to be substantially different in approach) to develop an alternate history of Haskell. take map