Re: [Haskell-cafe] Bathroom reading

2007-08-15 Thread Ketil Malde
On Tue, 2007-08-14 at 17:22 +0200, Bas van Dijk wrote:
 On 8/14/07, Dougal Stanton [EMAIL PROTECTED] wrote:
  I'm looking for cool but mind-bending examples of functional brilliance.

 Maybe:
 
 http://www.haskell.org/haskellwiki/Blow_your_mind
 http://haskell.org/haskellwiki/Research_papers/Functional_pearls

The Evolution of a Haskell Programmer is cute:

http://www.willamette.edu/~fruehr/haskell/evolution.html

-k

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


Re: [Haskell-cafe] Bathroom reading

2007-08-15 Thread Dan Piponi
On 8/14/07, Dougal Stanton [EMAIL PROTECTED] wrote:
 I'm looking for cool but mind-bending examples of functional brilliance.

One of my favourite examples is:
http://citeseer.ist.psu.edu/hinze99functional.html
Anyone who studies binomial heaps is struck by the similarity to
binary arithmetic. What Hinze does is formalise that similarity so
that binomial heaps and binary numbers are instances of the same type
class. Very pretty.
--
Dan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Bathroom reading

2007-08-14 Thread Dougal Stanton
I'm looking for cool but mind-bending examples of functional brilliance.

Let us say, hypothetically, you had a bathroom without any reading
material. And having read all the Dilbert and Garfield you could
seriously stomach, decide you should educate yourself while on the
job. :-)

So you decide to print up some one-liner style programs into a
little booklet. Something between credit-card and postcard sized, with
a neat but mind-bending program on it. Don Stewart occasionally swoops
in with some fixpoint malarkey to defuse heated discussions. I mean
that kind of thing, but with a slightly wider scope than just fibs...

Suggestions, please!

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


Re: [Haskell-cafe] Bathroom reading

2007-08-14 Thread Bas van Dijk
On 8/14/07, Dougal Stanton [EMAIL PROTECTED] wrote:
 I'm looking for cool but mind-bending examples of functional brilliance.

 Let us say, hypothetically, you had a bathroom without any reading
 material. And having read all the Dilbert and Garfield you could
 seriously stomach, decide you should educate yourself while on the
 job. :-)

 So you decide to print up some one-liner style programs into a
 little booklet. Something between credit-card and postcard sized, with
 a neat but mind-bending program on it. Don Stewart occasionally swoops
 in with some fixpoint malarkey to defuse heated discussions. I mean
 that kind of thing, but with a slightly wider scope than just fibs...

 Suggestions, please!

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


Maybe:

http://www.haskell.org/haskellwiki/Blow_your_mind

and:

http://haskell.org/haskellwiki/Research_papers/Functional_pearls

regards,

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


Re: [Haskell-cafe] Bathroom reading

2007-08-14 Thread Brandon S. Allbery KF8NH


On Aug 14, 2007, at 11:17 , Dougal Stanton wrote:


Let us say, hypothetically, you had a bathroom without any reading
material. And having read all the Dilbert and Garfield you could
seriously stomach, decide you should educate yourself while on the
job. :-)


Sounds to me like you want a waterproof panel displaying #haskell.  :)

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon universityKF8NH


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


Re: [Haskell-cafe] Bathroom reading

2007-08-14 Thread Spencer Janssen
On Tuesday 14 August 2007 10:17:53 Dougal Stanton wrote:
 I'm looking for cool but mind-bending examples of functional brilliance.

 Let us say, hypothetically, you had a bathroom without any reading
 material. And having read all the Dilbert and Garfield you could
 seriously stomach, decide you should educate yourself while on the
 job. :-)

 So you decide to print up some one-liner style programs into a
 little booklet. Something between credit-card and postcard sized, with
 a neat but mind-bending program on it. Don Stewart occasionally swoops
 in with some fixpoint malarkey to defuse heated discussions. I mean
 that kind of thing, but with a slightly wider scope than just fibs...

 Suggestions, please!

 D.

Here's a small puzzle: without using a Haskell interpreter, explain what 
the 'foo' function does.

 foo = filterM (const [True, False])

In case you aren't familiar, here's the definition of filterM:

 filterM  :: (Monad m) = (a - m Bool) - [a] - m [a]
 filterM _ [] =  return []
 filterM p (x:xs) =  do
flg - p x
ys  - filterM p xs
return (if flg then x:ys else ys)


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


Re: [Haskell-cafe] Bathroom reading

2007-08-14 Thread Brent Yorgey

 So you decide to print up some one-liner style programs into a
 little booklet. Something between credit-card and postcard sized, with
 a neat but mind-bending program on it. Don Stewart occasionally swoops
 in with some fixpoint malarkey to defuse heated discussions. I mean
 that kind of thing, but with a slightly wider scope than just fibs...


Clearly, we need to actually put together such a book!  I'm imagining
something where you have two mostly blank facing pages, with the code by
itself in the middle of the right page; then the next 2-4 pages devoted to a
short discussion of the code, how it works, related issues and techniques,
and a list of references.  All featuring beautiful typography and fantastic
writing, of course. =)

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


Re: [Haskell-cafe] Bathroom reading

2007-08-14 Thread Dougal Stanton
On 14/08/07, Brent Yorgey [EMAIL PROTECTED] wrote:
 Clearly, we need to actually put together such a book!  I'm imagining
 something where you have two mostly blank facing pages, with the code by
 itself in the middle of the right page; then the next 2-4 pages devoted to a
 short discussion of the code, how it works, related issues and techniques,
 and a list of references.  All featuring beautiful typography and fantastic
 writing, of course. =)

Oh indeed! This wasn't *completely* idle chatter on my part. I used to
work in a print shop and we did a lot of work for art and architecture
students who would do this kind of thing all the time. Fantastic
little notebook-style gifts of images and blank pages and elegant
typography. It's just a shame so many of them were terrible at
spelling! :-P

It shouldn't be too difficult to use LaTeX to this end. Once a
document class has been hammered out you can offer a range of
different booklets! The Evolution of a Haskell Programmer series
would be a good place to start. Bring it to your next job interview to
whip out when someone points to that bit on your CV and says, what's
that?.

Any skilled TeXers in the house?

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


Re: [Haskell-cafe] Bathroom reading

2007-08-14 Thread Brent Yorgey
On 8/14/07, Dougal Stanton [EMAIL PROTECTED] wrote:

 On 14/08/07, Brent Yorgey [EMAIL PROTECTED] wrote:
  Clearly, we need to actually put together such a book!  I'm imagining
  something where you have two mostly blank facing pages, with the code by
  itself in the middle of the right page; then the next 2-4 pages devoted
 to a
  short discussion of the code, how it works, related issues and
 techniques,
  and a list of references.  All featuring beautiful typography and
 fantastic
  writing, of course. =)

 Oh indeed! This wasn't *completely* idle chatter on my part. I used to
 work in a print shop and we did a lot of work for art and architecture
 students who would do this kind of thing all the time. Fantastic
 little notebook-style gifts of images and blank pages and elegant
 typography. It's just a shame so many of them were terrible at
 spelling! :-P

 It shouldn't be too difficult to use LaTeX to this end. Once a
 document class has been hammered out you can offer a range of
 different booklets! The Evolution of a Haskell Programmer series
 would be a good place to start. Bring it to your next job interview to
 whip out when someone points to that bit on your CV and says, what's
 that?.

 Any skilled TeXers in the house?

 D.


Well, it wasn't completely idle chatter on my part, either! =)   After
spending the past year writing (and typesetting) a mathematics book in my
spare time, I would consider myself an intermediate to advanced user of
LaTeX, although I know much less about TeX itself than I would like
(although I do intend to learn).  Unfortunately, what with applying to grad
school and other things, it probably wouldn't be wise for me to spearhead
such a project at the moment, although I'd be excited about contributing.
But I very well might pick it up at a later date if no one decides to run
with it right now.

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