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
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
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
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
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
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
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
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.
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
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
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 _
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
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?
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:
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
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
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
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
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
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
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
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
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
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
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.
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! =)
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
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
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
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
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
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 ...
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
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
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
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
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
37 matches
Mail list logo