Re: [Haskell-cafe] New slogan for haskell.org

2007-10-09 Thread Henning Thielemann
On Mon, 8 Oct 2007, Derek Elkins wrote: On Mon, 2007-10-08 at 20:54 +1000, Thomas Conway wrote: I must say, I get that! but at the same time, of course, the high level abstraction is exactly what *we* love about Haskell. Then they should teach assembly not Python. In fact, I'd recommend

[Haskell-cafe] EnableGUI hack changes working directory

2007-10-09 Thread apfelmus
Hello, the EnableGUI hack for getting a window in GHCi on Mac OS X (10.3.9 for me) unexpectedly changes the working directory for the running ghci [...] apfelmus$ ghci -i../../Hackage/SOE/src [...] GHC Interactive, version 6.6.1, for Haskell 98. *Main :! pwd

[Haskell-cafe] Some lambda identities

2007-10-09 Thread Yitzchak Gale
While playing with @pl on #haskell, I noticed some weird and surprising lambda identities. For example: let {c = (.); c4 = c c c c} Then we have: c c4 == c c4 c c c c Proof: Repeatedly apply the identity: (*) x (y z) == c x y z More stuff: c c2 == c4, c c3 == c7, but c cn does not appear to

[Haskell-cafe] Re: unsafePerformIO: are we safe?

2007-10-09 Thread Simon Marlow
Jorge Marques Pelizzoni wrote: Hi, all! This is a newbie question: I sort of understand what unsafePerformIO does but I don't quite get its consequences. In short: how safe can one be in face of it? I mean, conceptually, it allows any Haskell function to have side effects just as in any

Re: [Haskell-cafe] EnableGUI hack changes working directory

2007-10-09 Thread Yitzchak Gale
apfelmus wrote: Is there a way to automate ghci ... EnableGUI -framework Carbon and typing enableGUI at the first prompt? I have the following in my .ghci file: -- Read GHCI commands from the file whose name is -- in the GHCIRC environment variable :def _load

[Haskell-cafe] Re: Some lambda identities

2007-10-09 Thread Yitzchak Gale
I wrote: And flip is (essentially) the B combinator. Oops, the C combinator. -Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: New slogan for haskell.org

2007-10-09 Thread Brent Yorgey
On 10/8/07, Alex Tarkovsky [EMAIL PROTECTED] wrote: Alex Tarkovsky wrote: Brandon S. Allbery KF8NH wrote: I can has English? :) This comment inspired what could be either the beginning of an infectious Haskell recruitment campaign, or just a sign that some of us are mad. I present

[Haskell-cafe] Re: Haskell FFI and finalizers

2007-10-09 Thread Simon Marlow
Maxime Henrion wrote: Stefan O'Rear wrote: On Thu, Oct 04, 2007 at 12:55:41AM +0200, Maxime Henrion wrote: When writing the binding for foo_new(), I need to open a file with fopen() to pass it the FILE *. Then I get a struct foo * that I can easily associate the the foo_destroy() finalizer.

Re: [Haskell-cafe] ANNOUNCE: binary 0.4: high performance, pure binary parsing and serialisation

2007-10-09 Thread Don Stewart
ketil: Don Stewart [EMAIL PROTECTED] writes: The main thing is porting to ghc 6.8 -- which means the new (*faster*) lazy bytestring representation, and the smp parallel quickcheck driver for the testsuite (it'll use N cores, watch the jobs migrate around). Binary 0.4 seems to require

[Haskell-cafe] Re: Haskell FFI and finalizers

2007-10-09 Thread Maxime Henrion
Simon Marlow wrote: Maxime Henrion wrote: Stefan O'Rear wrote: On Thu, Oct 04, 2007 at 12:55:41AM +0200, Maxime Henrion wrote: When writing the binding for foo_new(), I need to open a file with fopen() to pass it the FILE *. Then I get a struct foo * that I can easily associate the the

[Haskell-cafe] Manual constructor specialization

2007-10-09 Thread Johan Tibell
I have a rope data type with the invariant that one of its data constructors can never appear as a leaf. module Data.Rope where import Data.Word (Word8) data Rope = Empty | Leaf | Node !Rope !Rope index :: Rope - Int - Word8 index Empty _ = error empty index Leaf _

Re: [Haskell-cafe] Manual constructor specialization

2007-10-09 Thread David Benbennick
On 10/9/07, Johan Tibell [EMAIL PROTECTED] wrote: data Rope = Empty | Leaf | Node !Rope !Rope The point is that Empty can only appear at the top by construction How about indicating this in your data type? I.e., data Rope = Empty | NonEmptyRope data NonEmptyRope = Leaf

Re: [Haskell-cafe] Manual constructor specialization

2007-10-09 Thread Johan Tibell
On 10/9/07, David Benbennick [EMAIL PROTECTED] wrote: On 10/9/07, Johan Tibell [EMAIL PROTECTED] wrote: data Rope = Empty | Leaf | Node !Rope !Rope The point is that Empty can only appear at the top by construction How about indicating this in your data type?

RE: [Haskell-cafe] New slogan for haskell.org

2007-10-09 Thread Peter Verswyvelen
Yep, I totally agree. At our school, we're teaching the students assembly language, starting with 8-bit 6502 assembly :-) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Henning Thielemann Sent: Tuesday, October 09, 2007 10:06 AM To: Derek Elkins Cc:

[Haskell-cafe] Re: Manual constructor specialization

2007-10-09 Thread ChrisK
Johan Tibell wrote: On 10/9/07, David Benbennick [EMAIL PROTECTED] wrote: On 10/9/07, Johan Tibell [EMAIL PROTECTED] wrote: data Rope = Empty | Leaf | Node !Rope !Rope The point is that Empty can only appear at the top by construction How about indicating this in your

Re: [Haskell-cafe] Manual constructor specialization

2007-10-09 Thread Thomas Schilling
On Tue, 2007-10-09 at 17:40 +0200, Johan Tibell wrote: On 10/9/07, David Benbennick [EMAIL PROTECTED] wrote: On 10/9/07, Johan Tibell [EMAIL PROTECTED] wrote: data Rope = Empty | Leaf | Node !Rope !Rope The point is that Empty can only appear at the top by

Re: [Haskell-cafe] ANNOUNCE: binary 0.4: high performance, pure binary parsing and serialisation

2007-10-09 Thread Duncan Coutts
In message [EMAIL PROTECTED] Don Stewart [EMAIL PROTECTED] writes: ketil: Don Stewart [EMAIL PROTECTED] writes: The main thing is porting to ghc 6.8 -- which means the new (*faster*) lazy bytestring representation, and the smp parallel quickcheck driver for the testsuite (it'll use

Re: [Haskell-cafe] ANNOUNCE: binary 0.4: high performance, pure binary parsing and serialisation

2007-10-09 Thread Don Stewart
duncan.coutts: In message [EMAIL PROTECTED] Don Stewart [EMAIL PROTECTED] writes: ketil: Don Stewart [EMAIL PROTECTED] writes: The main thing is porting to ghc 6.8 -- which means the new (*faster*) lazy bytestring representation, and the smp parallel quickcheck driver for

[Haskell-cafe] Re: New slogan for haskell.org

2007-10-09 Thread Alex Tarkovsky
Brent Yorgey wrote: Aren't you going to make one featuring a catamorphism? =) Done, thanks for the contribution! ;) -- Alex Tarkovsky ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Manual constructor specialization

2007-10-09 Thread Roberto Zunino
A GADT version seems to generate OK code: data Top data NTop data Rope t where Empty :: Rope Top Leaf :: Rope NTop Node :: !(Rope NTop) - !(Rope NTop) - Rope NTop index :: Rope t - Int - Word8 index Empty _ = error empty index Leaf _ = error leaf index (Node l r) n = index' l n

Re: [Haskell-cafe] New slogan for haskell.org

2007-10-09 Thread Seth Gordon
Henning Thielemann wrote: In my experience only the other way round works: Let people use C, Perl and Python until they find their programs unmaintainable. Then they will become interested in style and discipline and programming languages which _support_ good style. Perhaps this could be

Re: [Haskell-cafe] Re: New slogan for haskell.org

2007-10-09 Thread Henning Thielemann
On Tue, 9 Oct 2007, Alex Tarkovsky wrote: Brent Yorgey wrote: Aren't you going to make one featuring a catamorphism? =) Done, thanks for the contribution! ;) I wish concat or concatMap :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] pi

2007-10-09 Thread Jonathan Cast
I just noticed that pi doesn't have a default definition in the standard prelude, according to the Haddock docs. Why is this? jcc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] pi

2007-10-09 Thread Don Stewart
jonathanccast: I just noticed that pi doesn't have a default definition in the standard prelude, according to the Haddock docs. Why is this? $ ghci Prelude :t pi pi :: (Floating a) = a Prelude pi 3.141592653589793 It's in the Floating class. -- Don

Re: [Haskell-cafe] Re: New slogan for haskell.org

2007-10-09 Thread Dougal Stanton
On 09/10/2007, Alex Tarkovsky [EMAIL PROTECTED] wrote: Brent Yorgey wrote: Aren't you going to make one featuring a catamorphism? =) Done, thanks for the contribution! ;) Goes to look... ...oh, very impressive! ;-) Lolcats seem to have reached a terrifying new nadir. D.

Re: [Haskell-cafe] Re: New slogan for haskell.org

2007-10-09 Thread Brent Yorgey
On 10/9/07, Henning Thielemann [EMAIL PROTECTED] wrote: On Tue, 9 Oct 2007, Alex Tarkovsky wrote: Brent Yorgey wrote: Aren't you going to make one featuring a catamorphism? =) Done, thanks for the contribution! ;) I wish concat or concatMap :-) ask and ye shall receive! =)

Re: [Haskell-cafe] Re: New slogan for haskell.org

2007-10-09 Thread Brent Yorgey
On 10/9/07, Andrew Coppin [EMAIL PROTECTED] wrote: Brent Yorgey wrote: On 10/9/07, *Henning Thielemann* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I wish concat or concatMap :-) ask and ye shall receive! =) http://wso.williams.edu/~byorgey/concatMap.png

Re: [Haskell-cafe] pi

2007-10-09 Thread jerzy . karczmarczuk
Jonathan Cast reacts to Don Stewart statement about PI: It's in the Floating class. Yes. But it doesn't have a default implementation. That strikes me as odd, considering the mathematical and actual correctness of class Floating sigma where pi = acos (-1) ... So, you assume that

Re: [Haskell-cafe] pi

2007-10-09 Thread Dan Piponi
On 10/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: So, you assume that acos should have a *default* implementation in the Floating class? Propose it, please. I don't think the proposal makes any such assumption. It implies only that *if* you provide acos, pi will be provided for you

Re: [Haskell-cafe] Re: New slogan... (A long speculation)

2007-10-09 Thread ok
On 9 Oct 2007, at 9:10 am, [EMAIL PROTECTED] wrote: * Scheme is very different from what we practice (C++, Fortran, etc., you know the song...) It may slow down the *adaptation* of students. They *will need* all that imperative stuff you hate. But, as a first language, the FLs condition the

[Haskell-cafe] Re: New slogan for haskell.org

2007-10-09 Thread Alex Tarkovsky
Andrew Coppin wrote: Where do you guys find so many strange cat pictures?! You don't know any cats or cat owners, do you? ;) -- Alex Tarkovsky ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: New slogan... (A long speculation)

2007-10-09 Thread jerzy . karczmarczuk
ok writes: On 9 Oct 2007, at 9:10 am, [EMAIL PROTECTED] wrote: / I cited some arguments of our neighbours promoting imperative languages / the FLs condition the young minds in a way we do not appreciate. The only empirical evidence I'm aware of about this comes from Monash University ...

Re: [Haskell-cafe] pi

2007-10-09 Thread jerzy . karczmarczuk
Dan Piponi writes: jerzy.karczmarczuk wrote: So, you assume that acos should have a *default* implementation in the Floating class? Propose it, please. I don't think the proposal makes any such assumption. It implies only that *if* you provide acos, pi will be provided for you automatically

Re: [Haskell-cafe] pi

2007-10-09 Thread Dan Piponi
On 10/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Yes, sorry, I slipped... I was so against the acos(-1) /or atan(...)/ solution, that I wrote anything... +1, Honest -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Manual constructor specialization

2007-10-09 Thread Bryan O'Sullivan
Johan Tibell wrote: I have a rope data type [...] Perhaps you should talk to Derek Elkins about his. It would be nice if we had fewer, more canonical implementations of popular data structures, instead of a proliferation of half bakery. b

[Haskell-cafe] help!!!! install HakellDirect

2007-10-09 Thread Sulema Rocha Betancur
Hello :) Someone knows like installing HDirect 1,2 in Windows XP with cygwin? , and that version of GHC is the one that uses???.Thank you for its collaboration Sule ;) _ Invite your mail contacts to join your

[Haskell-cafe] help!!!! install HaskellDirect

2007-10-09 Thread Sulema Rocha Betancur
Hello :) Someone knows like installing HDirect 1,2 in Windows XP with cygwin? , and that version of GHC is the one that uses???.Thank you for its collaboration Sule ;) _ News, entertainment and everything you care