Re: [Haskell-cafe] bug in number reading?

2008-09-29 Thread Henning Thielemann
On Sun, 28 Sep 2008, Brandon S. Allbery KF8NH wrote: On 2008 Sep 28, at 18:42, Jason Dusek wrote: Maybe I'm missing something, but this doesn't seem right... :; ghc -e '10e4' interactive:1:0: Warning: Defaulting the following constraint(s) to type `Double' `Fractional a'

[Haskell-cafe] about logical computation

2008-09-29 Thread z_axis
hi, friends I am a Haskell newbie however i like it very much. After starting learn haskell, i donot find the corresponding , | , ~, , logical computation of C language. Sincerely! -- z_axis 2008-09-29 ___

Re: [Haskell-cafe] about logical computation

2008-09-29 Thread Bulat Ziganshin
Hello z_axis, Monday, September 29, 2008, 11:22:22 AM, you wrote: hi, friends I am a Haskell newbie however i like it very much. After starting learn haskell, i donot find the corresponding , | , ~, , logical computation of C language. import Data.Bits just its exports: module Data.Bits

RE: [Haskell-cafe] TH error

2008-09-29 Thread Mitchell, Neil
Hi Tim, You seem to be duplicating the functionality of Data.Derive to some extent: http://www.cs.york.ac.uk/~ndm/derive/ You might find it easier to use that tool, and if it doesn't meet your needs send in a patch :-) Thanks Neil -Original Message- From: [EMAIL PROTECTED]

Re: [Haskell-cafe] about logical computation

2008-09-29 Thread Sean Leather
hi, friends I am a Haskell newbie however i like it very much. After starting learn haskell, i donot find the corresponding , | , ~, , logical computation of C language. import Data.Bits just its exports: Perhaps you might like a *bit* more documentation than that:

[Haskell-cafe] 'par' - why has it the type a - b - b ?

2008-09-29 Thread Henning Thielemann
What is the reason for implementing parallelism with 'par :: a - b - b'? Analogy to 'seq'? I thought parallelism would be introduced most naturally by a function which does two computations in parallel and puts together their results after completion. Say par2 :: (a - b - c) - (a - b - c)

RE: [Haskell-cafe] Re: Haddock + Hoogle == Javadoc on steroids

2008-09-29 Thread Mitchell, Neil
Hi Simon, http://joyful.com/repos/darcs-sm/api-doc is a mashup of haddock, hoogle and hscolour (and darcsweb, darcs-graph - see http://joyful.com/repos). I can see the Haddock information, but not the Hoogle/HsColour mashup. I'm using Firefox 3. Am I missing something? How do you get

Re: [Haskell-cafe] Hmm, what license to use?

2008-09-29 Thread Ketil Malde
Bit Connor [EMAIL PROTECTED] writes: I believe that it's wrong to use a license to try to enforce such cooperation. Look what happened with KHTML when Apple started using it for their Safari web browser. I haven't followed this in detail, but I think that, even when a company is reluctant to

[Haskell-cafe] Re: Version 0.4.3 of happs-tutorial is a HAppS job board, done in HAppS.

2008-09-29 Thread Thomas Hartman
Someone on reddit pointed out that many firewalls block 5001 so I moved to vanilla http port 80. http://www.happstutorial.com 2008/9/29 Thomas Hartman [EMAIL PROTECTED]: Hello, world. In Version 4 of the ongoing self-demoing HAppS Tutorial, we implement a HAppS job board using HAppS.

[Haskell-cafe] Re: 'par' - why has it the type a - b - b ?

2008-09-29 Thread Achim Schneider
Henning Thielemann [EMAIL PROTECTED] wrote: par2 :: (a - b - c) - a - b - c par2 f x y = f x (par x y) ($!):: (a - b) - a - b f $! x = x `seq` f x It's terseness vs. maximum composability. I don't even want to think about implementing seq in terms of $!, makes my brain twist. --

Re: [Haskell-cafe] Hmm, what license to use?

2008-09-29 Thread Bit Connor
On Mon, Sep 29, 2008 at 4:06 AM, Michael Giagnocavo [EMAIL PROTECTED] wrote: Goal 2 (The open source angle): Developers who use the library should have to contribute their modifications of the library back to the community. I believe that it's wrong to use a license to try to enforce such

Re: [Haskell-cafe] Re: 'par' - why has it the type a - b - b ?

2008-09-29 Thread Malcolm Wallace
par2 :: (a - b - c) - a - b - c par2 f x y = f x (par x y) Here is the dual: 'par' implemented in terms of parallel application: a `par` b = par2 (\x y- y) a b ($!):: (a - b) - a - b f $! x = x `seq` f x It's terseness vs. maximum composability. I don't even want to

[Haskell-cafe] Code.haskell.org down

2008-09-29 Thread Mitchell, Neil
Hi, For me, it seems that code.haskell.org is down. Is this the case for other people as well? It seems code.haskell.org regularly looses connectivity for me :-( Thanks Neil == Please access the attached hyperlink

Re: [Haskell-cafe] Code.haskell.org down

2008-09-29 Thread Dougal Stanton
On Mon, Sep 29, 2008 at 4:02 PM, Mitchell, Neil [EMAIL PROTECTED] wrote: Hi, For me, it seems that code.haskell.org is down. Is this the case for other people as well? It seems code.haskell.org regularly looses connectivity for me :-( Thanks Neil

RE: [Haskell-cafe] Code.haskell.org down

2008-09-29 Thread Mitchell, Neil
Hi http://downforeveryoneorjustme.com/code.haskell.org sez: It's just you. code.haskell.org is up. Now its up for me as well. It's a little annoying that code.haskell.org seems so flakey. (Seriously though, the above site is a great tool for such circumstances.) That is a great site,

[Haskell-cafe] Re: Code.haskell.org down

2008-09-29 Thread Achim Schneider
Dougal Stanton [EMAIL PROTECTED] wrote: (Seriously though, the above site is a great tool for such circumstances.) I like this one: http://downforeveryoneorjustme.com/downforeveryoneorjustme.com -- (c) this sig last receiving data processing entity. Inspect headers for copyright history.

[Haskell-cafe] not able to compile Happy GLR examples

2008-09-29 Thread [EMAIL PROTECTED]
(posted on 9/23/08 on haskell-beginners, no response was received) I'm unable to compile the GLR examples (in the 'glr' directory) provided with Happy, version 1.16. I'm using ghc version 6.6.1. I've looked at the version of Happy currently in darcs and the part of the examples that seems to be

[Haskell-cafe] Re: 'par' - why has it the type a - b - b ?

2008-09-29 Thread Achim Schneider
Malcolm Wallace [EMAIL PROTECTED] wrote: (\x y - y) *shudder* I just can't stand such things. -- (c) this sig last receiving data processing entity. Inspect headers for copyright history. All rights reserved. Copying, hiring, renting, performance and/or quoting of this signature prohibited.

[Haskell-cafe] ANNOUNCE: Graphalyze-0.1

2008-09-29 Thread Ivan Miljenovic
I'd like to announce the initial release of my graph-theoretic analysis library, Graphalyze [1], the darcs repo for which is also available [2]. This is a pre-release of the library that I'm writing for my mathematics honours thesis, Graph-Theoretic Analysis of the Relationships in Discrete Data.

Re: [Haskell-cafe] Re: Code.haskell.org down

2008-09-29 Thread Hugo Pacheco
It was down for me as well, right after Neil's message and it has happened before as well.I wonder why the interruptions. hugo On Mon, Sep 29, 2008 at 4:34 PM, Achim Schneider [EMAIL PROTECTED] wrote: Dougal Stanton [EMAIL PROTECTED] wrote: (Seriously though, the above site is a great tool

Re: [Haskell-cafe] Code.haskell.org down

2008-09-29 Thread Ian Lynagh
On Mon, Sep 29, 2008 at 04:02:06PM +0100, Mitchell, Neil wrote: For me, it seems that code.haskell.org is down. Is this the case for other people as well? It seems code.haskell.org regularly looses connectivity for me :-( Thanks for the heads-up. On

Re: [Haskell-cafe] Re: 'par' - why has it the type a - b - b ?

2008-09-29 Thread Sean Leather
(\x y - y) *shudder* I just can't stand such things. What is it that you can't stand? Would you prefer flip const? Sean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Version 0.4.3 of happs-tutorial is a HAppS job board, done in HAppS.

2008-09-29 Thread Simon Michael
This is looking very useful. Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] The container problem

2008-09-29 Thread Albert Y. C. Lai
Andrew Coppin wrote: Seriously, that sounded like gibberish. Please don't say that. I think we are too polite to rudeness. While we shouldn't condemn people to RTFM, we shouldn't tolerate people calling us gibberish either. I mean unless we say something objectively gibberish.

[Haskell-cafe] Re: Haddock + Hoogle == Javadoc on steroids

2008-09-29 Thread Simon Michael
Hi Neil.. my apologies, my nightly cron script clobbered it. Please try now, same url: http://joyful.com/repos/darcs-sm/api-doc You should see three panes with hoogle in the lower left. The answer is to add a line similar to: @haddock

Re: [Haskell-cafe] not able to compile Happy GLR examples

2008-09-29 Thread Krzysztof Skrzętnicki
with Happy, version 1.16. I'm using ghc version 6.6.1. I've looked at the Just looking at the GHC version number: perhaps update to 6.8.3 would help? Best regards Christopher Skrzętnicki ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: 'par' - why has it the type a - b - b ?

2008-09-29 Thread Jonathan Cast
On Mon, 2008-09-29 at 17:59 +0200, Achim Schneider wrote: Malcolm Wallace [EMAIL PROTECTED] wrote: (\x y - y) *shudder* I just can't stand such things. Then call it `flip const'. jcc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Haddock + Hoogle == Javadoc on steroids

2008-09-29 Thread Sean Leather
Hi Neil.. my apologies, my nightly cron script clobbered it. Please try now, same url: http://joyful.com/repos/darcs-sm/api-doc It seems the Contents link embeds the outer frame into the right-hand side inner frame. Otherwise, it looks nice! Sean

[Haskell-cafe] Re: 'par' - why has it the type a - b - b ?

2008-09-29 Thread Achim Schneider
Sean Leather [EMAIL PROTECTED] wrote: (\x y - y) *shudder* I just can't stand such things. What is it that you can't stand? Would you prefer flip const? It's the missing x on the right side. Makes my internal C compiler ache. -- (c) this sig last receiving data processing

Re: [Haskell-cafe] Re: Version 0.4.3 of happs-tutorial is a HAppS job board, done in HAppS.

2008-09-29 Thread Thomas Hartman
The executable needs the templates in the same directory to work correctly. Copy the happs-tutorial.tar.gz file from whereever cabal put it -- probably somewhere under .cabal if you're on linux. Untar it, cd into the directory, compile and run in there. Should work. I'll revise the tutorial

Re: [Haskell-cafe] Re: 'par' - why has it the type a - b - b ?

2008-09-29 Thread Jonathan Cast
On Mon, 2008-09-29 at 19:50 +0200, Achim Schneider wrote: Sean Leather [EMAIL PROTECTED] wrote: (\x y - y) *shudder* I just can't stand such things. What is it that you can't stand? Would you prefer flip const? It's the missing x on the right side. Makes my internal

[Haskell-cafe] Re: 'par' - why has it the type a - b - b ?

2008-09-29 Thread Achim Schneider
Jonathan Cast [EMAIL PROTECTED] wrote: On Mon, 2008-09-29 at 19:50 +0200, Achim Schneider wrote: Sean Leather [EMAIL PROTECTED] wrote: (\x y - y) *shudder* I just can't stand such things. What is it that you can't stand? Would you prefer flip const?

Re: [Haskell-cafe] Re: 'par' - why has it the type a - b - b ?

2008-09-29 Thread Jonathan Cast
On Mon, 2008-09-29 at 20:34 +0200, Achim Schneider wrote: Jonathan Cast [EMAIL PROTECTED] wrote: On Mon, 2008-09-29 at 19:50 +0200, Achim Schneider wrote: Sean Leather [EMAIL PROTECTED] wrote: (\x y - y) *shudder* I just can't stand such things.

Re: [Haskell-cafe] Re: 'par' - why has it the type a - b - b ?

2008-09-29 Thread Henning Thielemann
On Mon, 29 Sep 2008, Sean Leather wrote: (\x y - y) *shudder* I just can't stand such things. What is it that you can't stand? Would you prefer flip const? No, certainly const id. :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Haddock + Hoogle == Javadoc on steroids

2008-09-29 Thread Neil Mitchell
Hi The answer is to add a line similar to: @haddock http://hackage.haskell.org/packages/archive/Cabal/latest/doc/html/ to the Text file you get out of haddock --hoogle. You can also add an @hackage url, which is treated as the home page of the package. Aha, I had not detected that at

Re: [Haskell-cafe] Hmm, what license to use?

2008-09-29 Thread Magnus Therning
2008/9/29 Bit Connor [EMAIL PROTECTED]: [..] Basically it seems to me that you believe in the benevolence and enligtenment of companies. Something I don't. I believe you are right in splitting the LGPL into two different objectives, and you are right in saying that I really only care about

[Haskell-cafe] Health effects

2008-09-29 Thread Andrew Coppin
The other day, I sat down to eat a 2 Kg block of chocolate - one of those ones that's divided into lots of little squares. I proceeded to recursively subdivide it into smaller and smaller blocks, and then eat the individual squares in depth-first order. It was only after getting through 16 of

[Haskell-cafe] System.Process

2008-09-29 Thread Andrew Coppin
Much hair-pulling resulted today when I attempted to perform a small task. The System.Process module provides the runCommand function. This takes a complete command line and returns a ProcessHandle. No problem there. The module also provides the runProcess function, which enables you to set

Re: [Haskell-cafe] Health effects

2008-09-29 Thread Gianfranco Alongi
Maybe I haven't done enough haskell, but enough lisp to NOT eat _2_ Kg of chocolate. Did you really think you would get those 2 Kg's down? /Gf On Mon, Sep 29, 2008 at 9:43 PM, Andrew Coppin [EMAIL PROTECTED] wrote: The other day, I sat down to eat a 2 Kg block of chocolate - one of those ones

Re: [Haskell-cafe] System.Process

2008-09-29 Thread Brandon S. Allbery KF8NH
On Sep 29, 2008, at 15:49 , Andrew Coppin wrote: Herein lies the problem: I have a program that accepts complete commands from a file and executes them. It works perfectly. And now I'd just like to set an environment variable while each command runs... But alas no, the only way to do that

Re: [Haskell-cafe] System.Process

2008-09-29 Thread Andrew Coppin
Brandon S. Allbery KF8NH wrote: On Sep 29, 2008, at 15:49 , Andrew Coppin wrote: Herein lies the problem: I have a program that accepts complete commands from a file and executes them. It works perfectly. And now I'd just like to set an environment variable while each command runs... But alas

Re: [Haskell-cafe] Health effects

2008-09-29 Thread Andrew Coppin
Gianfranco Alongi wrote: Maybe I haven't done enough haskell, but enough lisp to NOT eat _2_ Kg of chocolate. Did you really think you would get those 2 Kg's down? Oh, no. The entire bar is 2 Kg, I wasn't actually planning to eat the whole thing! o_O My god, my pancreas would explode or

Re: [Haskell-cafe] Health effects

2008-09-29 Thread Anton van Straaten
Andrew Coppin wrote: The other day, I sat down to eat a 2 Kg block of chocolate - one of those ones that's divided into lots of little squares. I proceeded to recursively subdivide it into smaller and smaller blocks, and then eat the individual squares in depth-first order. It was only after

Re: [Haskell-cafe] System.Process

2008-09-29 Thread Brandon S. Allbery KF8NH
On Sep 29, 2008, at 15:59 , Andrew Coppin wrote: Brandon S. Allbery KF8NH wrote: On Sep 29, 2008, at 15:49 , Andrew Coppin wrote: Herein lies the problem: I have a program that accepts complete commands from a file and executes them. It works perfectly. And now I'd just like to set an

Re: [Haskell-cafe] Health effects

2008-09-29 Thread Jason Dagit
On Mon, Sep 29, 2008 at 12:43 PM, Andrew Coppin [EMAIL PROTECTED] wrote: The other day, I sat down to eat a 2 Kg block of chocolate - one of those ones that's divided into lots of little squares. I proceeded to recursively subdivide it into smaller and smaller blocks, and then eat the

Re: [Haskell-cafe] Health effects

2008-09-29 Thread Gianfranco Alongi
Oh, yeah, I thought you really meant that you would force that baby down. :) Nice to hear that you wouldn't. Not even lazy evaluation would save you there 7-8 hours later. ;) /Gf On Mon, Sep 29, 2008 at 10:00 PM, Andrew Coppin [EMAIL PROTECTED] wrote: Gianfranco Alongi wrote: Maybe I haven't

Re: [Haskell-cafe] Health effects

2008-09-29 Thread Andrew Coppin
Anton van Straaten wrote: You're not alone: http://xkcd.com/245/ Heh. Randel appears to have not heard of Haskell. He thinks _Lisp_ is the ultimate language. ;-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: Haddock + Hoogle == Javadoc on steroids

2008-09-29 Thread Simon Michael
that one day cabal will pass some --hoogle-extra flags or something to haddock, but I've not yet decided how packages should specify where they live - if you have any suggestions do let me know. Will do.. I've yet to come to grips with cabal, still in makefile land as yet.. For your example

Re: [Haskell-cafe] Health effects

2008-09-29 Thread Alex Sandro Queiroz e Silva
Hallo, Andrew Coppin wrote: Anton van Straaten wrote: You're not alone: http://xkcd.com/245/ Heh. Randel appears to have not heard of Haskell. He thinks _Lisp_ is the ultimate language. ;-) Well, at least he's close, let's wait till he finds out about Scheme. :-) Cheers, -alex

Re: [Haskell-cafe] Health effects

2008-09-29 Thread Simon Brenner
On 9/29/08, Gianfranco Alongi [EMAIL PROTECTED] wrote: Oh, yeah, I thought you really meant that you would force that baby down. :) Nice to hear that you wouldn't. Not even lazy evaluation would save you there 7-8 hours later. 2kg of chocolate 'thunks' to 'force' really might 'blow your

Re: [Haskell-cafe] announcing darcs 2.1.0pre2

2008-09-29 Thread Lennart Kolmodin
Eric Kow wrote: The second pre-release of darcs 2.1 (formerly known as 2.0.3) is now available at http://darcs.net/darcs-2.1.0pre2.tar.gz darcs 2.1.0pre2 is now available in Gentoo Linux, hard masked. Update your portage tree and unmask[1] it. Cheers, Lennart Kolmodin [1]

Re: [Haskell-cafe] Hmm, what license to use?

2008-09-29 Thread Don Stewart
magnus: 2008/9/29 Bit Connor [EMAIL PROTECTED]: [..] Basically it seems to me that you believe in the benevolence and enligtenment of companies. Something I don't. I believe you are right in splitting the LGPL into two different objectives, and you are right in saying that I really only

[Haskell-cafe] Re: Climbing up the shootout...

2008-09-29 Thread Manlio Perillo
Simon Marlow ha scritto: Manlio Perillo wrote: Simon Marlow ha scritto: Manlio Perillo wrote: [...] We'd certainly support any efforts to add support for a more modern I/O multiplexing or asynchronous I/O back-end to the IO library. It's not too difficult, because the interface between the

Re: [Haskell-cafe] 'par' - why has it the type a - b - b ?

2008-09-29 Thread Bertram Felgenhauer
Henning Thielemann wrote: What is the reason for implementing parallelism with 'par :: a - b - b'? Analogy to 'seq'? I'd think it's actually easier to implement than par2 below; evaluating par x y sparks a thread evaluating x, and then returns y. The analogy to 'seq' is there, of course. I

Re: [Haskell-cafe] Re: Red-Blue Stack

2008-09-29 Thread Timothy Goddard
It won't be O(1) but this is how I would do it. It uses alternating lists of red and blue elements. It has to access at most three elements from this list for any one operation so as long as we don't have huge blocks of red or blue elements performance should be quite good. The worst case I

Re: [Haskell-cafe] Re: Red-Blue Stack

2008-09-29 Thread Timothy Goddard
There was a bug in there with popping the non-head colour off the stack. Updated code, please test thoroughly: module RBStack where data RBColour = Red | Blue deriving (Show, Eq) data RBStack a = RBStack { headColour :: RBColour, stackElems :: [[a]] } deriving (Show, Eq) otherCol ::

Re: [Haskell-cafe] System.Process

2008-09-29 Thread Timothy Goddard
On Tue, 30 Sep 2008 08:49:44 Andrew Coppin wrote: Before anybody remarks that words will do this, consider the echo command, which treats whitespace meaningfully.) [EMAIL PROTECTED]:~/$ echo foo barbaz foo bar baz Echo doesn't receive special treatment. It joins its arguments with

Re: [Haskell-cafe] Distributing Haskell binaries as OSX App Bundles

2008-09-29 Thread Manuel M T Chakravarty
I wrote a command-line program recently for a friend in haskell. However, he's far away and not particularly computer literate. I sent him the raw binaries, but they came up with errors about not being able to find libgmp stuff. So then I thought I should probably be able to somehow

[Haskell-cafe] Total Functional Programming in Haskell

2008-09-29 Thread Jason Dagit
Hello, I recently had someone point me to this thread on LtU: http://lambda-the-ultimate.org/node/2003 The main paper in the article is this one: http://www.jucs.org/jucs_10_7/total_functional_programming/jucs_10_07_0751_0768_turner.pdf It leaves me with several questions: 1) Are there are

[Haskell-cafe] state monad and continuation monads ...

2008-09-29 Thread Galchin, Vasili
Hello, I would like to read 1) pedagogical examples of State monad and the Continuation monad 2) library usage of these monads Regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] not able to compile Happy GLR examples

2008-09-29 Thread [EMAIL PROTECTED]
Thanks. I don't imagine that will help as the flag in the Happy source is (to my knowledge) outdated, indicating that it hasn't been touched in a while. On Mon Sep 29 19:05 , "Krzysztof Skrzętnicki" <[EMAIL PROTECTED]> sent: with Happy, version 1.16. I'm using ghc version 6.6.1. I've looked