[Haskell-cafe] Re: How Albus Dumbledore would sell Haskell

2007-04-22 Thread apfelmus
Claus Reinke wrote:
 - oscon seems to be a huge event.

A bold idea would be to redo a talk of another speaker in Haskell and
accidentally surpass the techniques presented there :) Alas, this
doesn't work for OSCON since there are too many talks attendees have to
choose between and the event starts with the tutorials, so the audience
doesn't know a common talk it could compare the Haskell tutorial to.

Regards,
apfelmus

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


Re: [Haskell-cafe] Re: How Albus Dumbledore would sell Haskell

2007-04-22 Thread Cale Gibbard

On 21/04/07, apfelmus [EMAIL PROTECTED] wrote:

Dan Weston wrote:
 -- Why is this not in Prelude?
 dup x = (x,x)

It is (almost). It's called

  join (,)


It's unfortunate that the Monad instance for ((-) e) isn't in the Prelude.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: How Albus Dumbledore would sell Haskell

2007-04-21 Thread apfelmus
Dan Weston wrote:
 -- Why is this not in Prelude?
 dup x = (x,x)

It is (almost). It's called

  join (,)

Regards,
apfelmus

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


Re: [Haskell-cafe] Re: How Albus Dumbledore would sell Haskell

2007-04-21 Thread Steve Downey

I think you are right. If you used something like a theorem prover as
an example, you accidentally send the messsage that Haskell is very
useful for esoteric stuff that only academics are interested in.

Now, that doesn't mean that the example has to solve a real problem,
but it does need to be something that the audience can relate to their
own problems.

There's already a lot of general buzz about functional techniques.
Closures and lambda expressions are being, or have been, added to
several imperative languages. This naturally leads to interest in
higher order functions. The concurrency revolution is driving interest
in immutable values and lockless algorithms. For people who do
transactional work, having launchTheMissiles in the middle of a
transaction be caught by the type system is incredible. At least some
of the interest in dynamic types is driven by frustration with dealing
with type annotations.

So really, the example code just has to solve a problem they
recognize. Even the sudoko solvers would be good, trite as they are.
Or, some of the unix tools in Haskell.

$0.02

-SMD

On 4/19/07, Lennart Augustsson [EMAIL PROTECTED] wrote:

A theorem prover might be a really cool example, but if there's one
person in the audience that cares then Simon is lucky. :)  You need
to have examples that people can recognize and see the utility of.

-- Lennart

On Apr 19, 2007, at 20:48 , DavidA wrote:

 Simon Peyton-Jones simonpj at microsoft.com writes:

 But, just to remind you all: I'm particularly interested in

   concrete examples (pref running code) of programs that are
* small
* useful
* demonstrate Haskell's power
* preferably something that might be a bit
tricky in another language

 I have something that I think nearly fits the bill. Unfortunately,
 I don't
 think it quite works because it's a bit specialised. However, I
 think it
 suggests a possible area to look, which I'll mention at the end.

 It's a theorem prover for intuitionistic propositional logic:
 http://www.polyomino.f2s.com/david/haskell/gentzen.html

 It's much shorter in Haskell than it would be in other languages.
 (It's even
 shorter than the ML that I based it on, because of some shortcuts I
 can take
 using lazy evaluation.)

 Strengths of Haskell that it demonstrates are:
 * How easy it is to define datatypes (eg trees), and manipulate
 them using
 pattern matching, with constructors, Eq, Show coming for free.
 * How lazy evaluation reduces code length by letting you write code
 that looks
 like it would do too much, and then lazy evaluate it (in the
 proof function)
 * The ability to extend the syntax with new symbolic operators
 * Use of higher order functions to simplify code (the (+++) operator)

 The problem is that I think Gentzen systems are a bit obscure. But
 I think you
 could probably show most of the same strengths of Haskell in something
 similar: game search, eg alpha-beta algorithm. Another advantage of
 doing game
 search would be that you'd get to show off persistent data
 structures (so that
 when you make a move in lookahead, you don't need to make a copy of
 the game
 state, because when you update the game state the old state still
 persists).


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

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


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


Re: [Haskell-cafe] Re: How Albus Dumbledore would sell Haskell

2007-04-20 Thread Bryan O'Sullivan

Derek Elkins wrote:

Game search is exactly an example use in Why Functional Programming 
Matters (http://www.math.chalmers.se/~rjmh/Papers/whyfp.html).  That 
paper, 23 years later, is still pretty compelling.  Perhaps, it should 
just be modernized and somewhat expanded.


I'll echo Lennart's response to the theorem proving suggestion :-)

Tom Moertel's parallel port scanner is much more the kind of thing that 
will get people's attention.  It's practical; it's parallel; and it's 
short.  And for Simon's convenience, it's already been written, so he 
can concentrate on presenting it, rather than writing it.


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


[Haskell-cafe] Re: How Albus Dumbledore would sell Haskell

2007-04-19 Thread DavidA
Simon Peyton-Jones simonpj at microsoft.com writes:

 But, just to remind you all: I'm particularly interested in
 
   concrete examples (pref running code) of programs that are
* small
* useful
* demonstrate Haskell's power
* preferably something that might be a bit
tricky in another language

I have something that I think nearly fits the bill. Unfortunately, I don't 
think it quite works because it's a bit specialised. However, I think it 
suggests a possible area to look, which I'll mention at the end.

It's a theorem prover for intuitionistic propositional logic:
http://www.polyomino.f2s.com/david/haskell/gentzen.html

It's much shorter in Haskell than it would be in other languages. (It's even 
shorter than the ML that I based it on, because of some shortcuts I can take 
using lazy evaluation.)

Strengths of Haskell that it demonstrates are:
* How easy it is to define datatypes (eg trees), and manipulate them using 
pattern matching, with constructors, Eq, Show coming for free.
* How lazy evaluation reduces code length by letting you write code that looks 
like it would do too much, and then lazy evaluate it (in the proof function)
* The ability to extend the syntax with new symbolic operators
* Use of higher order functions to simplify code (the (+++) operator)

The problem is that I think Gentzen systems are a bit obscure. But I think you 
could probably show most of the same strengths of Haskell in something 
similar: game search, eg alpha-beta algorithm. Another advantage of doing game 
search would be that you'd get to show off persistent data structures (so that 
when you make a move in lookahead, you don't need to make a copy of the game 
state, because when you update the game state the old state still persists).


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


Re: [Haskell-cafe] Re: How Albus Dumbledore would sell Haskell

2007-04-19 Thread Lennart Augustsson
A theorem prover might be a really cool example, but if there's one  
person in the audience that cares then Simon is lucky. :)  You need  
to have examples that people can recognize and see the utility of.


-- Lennart

On Apr 19, 2007, at 20:48 , DavidA wrote:


Simon Peyton-Jones simonpj at microsoft.com writes:


But, just to remind you all: I'm particularly interested in

  concrete examples (pref running code) of programs that are
   * small
   * useful
   * demonstrate Haskell's power
   * preferably something that might be a bit
   tricky in another language


I have something that I think nearly fits the bill. Unfortunately,  
I don't
think it quite works because it's a bit specialised. However, I  
think it

suggests a possible area to look, which I'll mention at the end.

It's a theorem prover for intuitionistic propositional logic:
http://www.polyomino.f2s.com/david/haskell/gentzen.html

It's much shorter in Haskell than it would be in other languages.  
(It's even
shorter than the ML that I based it on, because of some shortcuts I  
can take

using lazy evaluation.)

Strengths of Haskell that it demonstrates are:
* How easy it is to define datatypes (eg trees), and manipulate  
them using

pattern matching, with constructors, Eq, Show coming for free.
* How lazy evaluation reduces code length by letting you write code  
that looks
like it would do too much, and then lazy evaluate it (in the  
proof function)

* The ability to extend the syntax with new symbolic operators
* Use of higher order functions to simplify code (the (+++) operator)

The problem is that I think Gentzen systems are a bit obscure. But  
I think you

could probably show most of the same strengths of Haskell in something
similar: game search, eg alpha-beta algorithm. Another advantage of  
doing game
search would be that you'd get to show off persistent data  
structures (so that
when you make a move in lookahead, you don't need to make a copy of  
the game
state, because when you update the game state the old state still  
persists).



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


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


Re: [Haskell-cafe] Re: How Albus Dumbledore would sell Haskell

2007-04-19 Thread Derek Elkins

DavidA wrote:

Simon Peyton-Jones simonpj at microsoft.com writes:


But, just to remind you all: I'm particularly interested in

  concrete examples (pref running code) of programs that are
   * small
   * useful
   * demonstrate Haskell's power
   * preferably something that might be a bit
   tricky in another language


I have something that I think nearly fits the bill. Unfortunately, I don't 
think it quite works because it's a bit specialised. However, I think it 
suggests a possible area to look, which I'll mention at the end.


It's a theorem prover for intuitionistic propositional logic:
http://www.polyomino.f2s.com/david/haskell/gentzen.html

It's much shorter in Haskell than it would be in other languages. (It's even 
shorter than the ML that I based it on, because of some shortcuts I can take 
using lazy evaluation.)


Strengths of Haskell that it demonstrates are:
* How easy it is to define datatypes (eg trees), and manipulate them using 
pattern matching, with constructors, Eq, Show coming for free.
* How lazy evaluation reduces code length by letting you write code that looks 
like it would do too much, and then lazy evaluate it (in the proof function)

* The ability to extend the syntax with new symbolic operators
* Use of higher order functions to simplify code (the (+++) operator)

The problem is that I think Gentzen systems are a bit obscure. But I think you 
could probably show most of the same strengths of Haskell in something 
similar: game search, eg alpha-beta algorithm. Another advantage of doing game 
search would be that you'd get to show off persistent data structures (so that 
when you make a move in lookahead, you don't need to make a copy of the game 
state, because when you update the game state the old state still persists).


Game search is exactly an example use in Why Functional Programming Matters 
(http://www.math.chalmers.se/~rjmh/Papers/whyfp.html).  That paper, 23 years 
later, is still pretty compelling.  Perhaps, it should just be modernized and 
somewhat expanded.


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