Re: [Haskell-cafe] Think of a monad...

2007-02-01 Thread Frederick Ross

And we have reached the monadic equivalent of Schrodinger's cat.

On 1/31/07, Eric Y. Kow <[EMAIL PROTECTED]> wrote:

Dear Haskellers,

In the recent HWN, I noticed a new monad metaphor by Don Stewart:
  Think of a monad as a spacesuite full of nuclear waste in the ocean next to a
  container of apples. now, you can't put oranges in the space suite or the
  nucelar waste falls in the ocean, *but* the apples are carried around
  anyway, and you just take what you need

This metaphor very clearly captures the essence of monads.  Perhaps it
will be even more helpful if accompanied by a small illustration:
  http://koweycode.blogspot.com/2007/01/think-of-monad.html

I hope this turns out to be useful to somebody,

--
Eric Kow http://www.loria.fr/~kow
PGP Key ID: 08AC04F9 Merci de corriger mon français.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe






--
Frederick Ross
Graduate Fellow, (|Siggia> + |McKinney>)/sqrt(2) Lab
The Rockefeller University
Je ne suis pas Fred Cross!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] State of OOP in Haskell

2007-01-28 Thread Frederick Ross

I'm going to be offensive, bigoted, and myopic for a minute here:
programming straight onto the Turing machine (and not too
dissimilarly, the von Neumann machine) is the act of making your
thoughts comprehensible to a little gizmo that exists to zip back and
forth on an infinite ticker tape.  We should therefore abstract.
However, I am only marginally happier about making my thoughts
comprehensible to a tinkertoy set (which is how I regard object
oriented programming).

Why not just stay as close to mathematics as possible?  Why the deep
desire to communicate your loftiest intentions to a tinkertoy set?

There was the Lambada project to map between Java's object hierarchies
and Haskell, however, and there was a lot of effort put into making
Haskell talk properly through COM.  Both of those necessitate a model
of object oriented programming embedded in Haskell which would provide
you with prior art.

On 1/27/07, Alexy Khrabrov <[EMAIL PROTECTED]> wrote:

...In the tradition of the "letters of an ignorant newbie"...

What's the consensus on the OOP in Haskell *now*?  There're some
libraries such as OOHaskell, O'Haskell, and Haskell~98's own qualified
type system with inheritance.

If I have GHC, which way to do anything OOP-like is considered "right" today?


--
Frederick Ross
Graduate Fellow, (|Siggia> + |McKinney>)/sqrt(2) Lab
The Rockefeller University
Je ne suis pas Fred Cross!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How did you stumble on Haskell?

2007-01-28 Thread Frederick Ross

On 1/28/07, Alexy Khrabrov <[EMAIL PROTECTED]> wrote:

How do people stumble on Haskell?


Read Ullman's book on ML.  Look at Haskell at that point, but was
insufficiently mathematically sophisticated to "get it" (hey, I was
sixteen).  Wrote numerical analysis code in Forth for a year or so.
Hacked on a several hundred thousand line FORTRAN 77 codebase.  Wrote
the simulation code for my physics thesis in C.  Decided I never
wanted to instantiate, destroy, or otherwise manage memory ever again.
Had a hate-hate relationship with MATLAB, decided Mathematica was
rubbish.  Remembered Haskell.  Now creating the programmatic
equivalent of a cyborg, hunchback puppeteer to control a Java image
analysis program in Scheme.

So of course the best work I've done has been completely analytic
mathematical physics without reference to computing of any kind.  And
I'm a biologist.

This is known as being born in the Random monad.

--
Frederick Ross
Graduate Fellow, (|Siggia> + |McKinney>)/sqrt(2) Lab
The Rockefeller University
Je ne suis pas Fred Cross!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Channel9 Interview: Software Composability and theFu ture of Languages

2007-01-27 Thread Frederick Ross

On 1/26/07, Collin Winter <[EMAIL PROTECTED]> wrote:

I find it incredibly insulting for you to assert that people who
complain about Haskell's difficulty are too lazy and aren't really
interested in a better solution. Maybe they just don't want to have to
take graduate-level classes in category theory to get their job done.
Maybe they want a solution that meets them half-way, one that doesn't
require that they understand how to build their own resistors and
capacitors in order to make their TV work again (to use your analogy).
That's what Meijer means when he says that Haskell is too hard.


I have an odd background in programming (never took a compsci class,
did take a graduate computational physics course in my first year of
undergrad, taught by an old nuclear physicist, who used nothing but
Forth...beat that for bizarre), but since physicists represent an
interesting conglomeration of snapshots of the mainstream of
programming through the ages, I do have a bit of an archaeological
perspective on how people think about "hard."  In case the following
seems far fetched, let me assure you that four years ago I worked in a
high energy physics group on a codebase of a few hundred thousand
lines of FORTRAN 77, with no documentation.  It had GOTOs.  The folks
working on this regarded C as a newfangled, difficult language, and
some of them were still writing FORTRAN IV or RATFOR.

So here's my completely anecdotal view of the history of "hard" in
programming: In the beginning there was GOTO.  Well, actually there
was machine language, then assembler, but we'll skip that.  GOTO was
king.  And then there was this movement among the ivory tower computer
scientists called "structured programming."  It was considered
difficult and complicated, with lots of hard concepts.  And then the
compsci departments made a concerted effort, taught a generation of
students in the new style with no reference whatsoever to what came
before.  Structured programming suddenly became blasé.  How else would
you program?

And then similar, though smaller and often partial repetitions of this
break happened: designing nicer data structures when the Wirth
languages came to their height; object oriented programming (which I
regard as one of the great intellectual failures of programming).

So when the kids are presented with exercises on functors, ADTs, and
monads in intro compsci, and the professors pretend that it was always
this way, there was never any other way, then they will grow up, they
will go forth, and these will be the everyday things.  Until then, I
will continue to hear people say that map is a scary, unfamiliar
object that makes the meaning of code obscure.

--
Frederick Ross
Graduate Fellow, (|Siggia> + |McKinney>)/sqrt(2) Lab
The Rockefeller University
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe