
"A Wake Up Call for the Logic Programming Community" Or what the logic programming community can learn from the Haskell community (in particular): http://www.cs.kuleuven.ac.be/%7Edtai/projects/ALP//newsletter/dec07/content/... Interesting read! -- Don

Don Stewart
"A Wake Up Call for the Logic Programming Community"
http://www.cs.kuleuven.ac.be/%7Edtai/projects/ALP//newsletter/dec07/content/...
Interesting read!
Clearly, the logic programming people are vastly more successful at our prime goal: avoiding success at all costs. We have much to learn here :-) -k -- If I haven't seen further, it is by standing in the footprints of giants

Don Stewart wrote:
"A Wake Up Call for the Logic Programming Community"
Or what the logic programming community can learn from the Haskell community (in particular):
http://www.cs.kuleuven.ac.be/%7Edtai/projects/ALP//newsletter/dec07/content/...
Interesting read!
"Haskell is the undisputed flagship of the FP community." Er... really? I thought Lisp and Erlang were both infinitely more popular and better known. Followed by Clean and O'Camal. Indeed, until I stumbled across an article on Wikipidia quite by chance, I'd never even *heard* of this thing called Haskell. (Note to self: Add more links to the Haskell page on Wikipedia...) [I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros". I tried to learn it, and disliked it greatly. It's too messy. And what the heck is "cdr" ment to mean anyway? To me, LISP doesn't even seem all that different from normal languages (modulo weird syntax). Now Haskell... that's FUN!]

Hallo, Andrew Coppin escreveu:
[I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros". I tried to learn it, and disliked it greatly. It's too messy. And what the heck is "cdr" ment to mean anyway? To me, LISP doesn't even seem all that different from normal languages (modulo weird syntax). Now Haskell... that's FUN!]
Macros are not the only thing that makes Lisp (it hasn't been called LISP for ages) great, but surely contributes for that. Unfortunately Lisp is like the Matrix, you can't be told how great it is, you have to see for yourself. Cheers, -alex

On Dec 28, 2007 6:05 AM, Andrew Coppin
[I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros". I tried to learn it, and disliked it greatly. It's too messy. And what the heck is "cdr" ment to mean anyway? To me, LISP doesn't even seem all that different from normal languages (modulo weird syntax). Now Haskell... that's FUN!]
Contents of Data Register. Macros are like Template Haskell. One example of where they're useful is programmer definition of new binding forms. That's not possible in Haskell without Templates. Macros were invented in Lisp because the syntax is so easy for machine manipulation---they don't have a tenth the complexity of Template Haskell for about the same power. -Brian -- Brian T. Sniffen bts@alum.mit.edu or brian.sniffen@gmail.com http://www.evenmere.org/~bts

Brian Sniffen wrote:
On Dec 28, 2007 6:05 AM, Andrew Coppin
wrote: [I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros". I tried to learn it, and disliked it greatly. It's too messy. And what the heck is "cdr" ment to mean anyway? To me, LISP doesn't even seem all that different from normal languages (modulo weird syntax). Now Haskell... that's FUN!]
Contents of Data Register.
Macros are like Template Haskell. One example of where they're useful is programmer definition of new binding forms. That's not possible in Haskell without Templates. Macros were invented in Lisp because the syntax is so easy for machine manipulation---they don't have a tenth the complexity of Template Haskell for about the same power.
-Brian
There is also Likell, at http://liskell.org/ by Clemens Fruhwir, which translates Haskell source into a lisp style prefix syntax (will (all (the (parentheses)))). This is to allow macro-like analysis and transformation without template haskell. The main use of template haskell that I have seen mentioned on the mailing lists is to analyze a "data" declaration and auto-generate some new "class" and "instance" declarations. But I agree that template haskell has problems: (*) Its own syntax, as big and complicated as Haskell (*) Has historically been very poorly documented (that _might_ have changed) (*) Only works with ghc -- Chris

Brian Sniffen wrote:
On Dec 28, 2007 6:05 AM, Andrew Coppin
wrote: [I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros". I tried to learn it, and disliked it greatly. It's too messy. And what the heck is "cdr" ment to mean anyway? To me, LISP doesn't even seem all that different from normal languages (modulo weird syntax). Now Haskell... that's FUN!]
Contents of Data Register.
Right. I've heard the story about why it came to be called that, but seriously... I can never remember whether I want cdr or car. It's a silly choice of name. [Sure, you can rename it. And then nobody but you will understand it.]
Macros are like Template Haskell.
Which, incidentally, I also don't use. ;-) Doesn't Derive cover most of the useful cases for TH?

Hallo, Andrew Coppin escreveu:
Brian Sniffen wrote:
On Dec 28, 2007 6:05 AM, Andrew Coppin
wrote: [I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros". I tried to learn it, and disliked it greatly. It's too messy. And what the heck is "cdr" ment to mean anyway? To me, LISP doesn't even seem all that different from normal languages (modulo weird syntax). Now Haskell... that's FUN!]
Contents of Data Register.
Right. I've heard the story about why it came to be called that, but seriously... I can never remember whether I want cdr or car. It's a silly choice of name. [Sure, you can rename it. And then nobody but you will understand it.]
In Common Lisp, standardised in 1984, there are the equivalent functions FIRST and REST, which everyone know what they mean. Cheers, -alex

Andrew Coppin
Brian Sniffen wrote:
On Dec 28, 2007 6:05 AM, Andrew Coppin
wrote: [I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros". I tried to learn it, and disliked it greatly. It's too messy. And what the heck is "cdr" ment to mean anyway? To me, LISP doesn't even seem all that different from normal languages (modulo weird syntax). Now Haskell... that's FUN!]
Contents of Data Register.
Right. I've heard the story about why it came to be called that, but seriously... I can never remember whether I want cdr or car. It's a silly choice of name. [Sure, you can rename it. And then nobody but you will understand it.]
That's not even the end of the fun: You can freely switch around car and cdr, treating cdr as "element of head" and car as "tail", and try to put into words why that won't make a foldl out of a foldr. You can also never put any useful value into any cons and still have it represent something useful, or say caaaddaaadaddaddadadadaddar, at which point you're hopefully lost. It's probably called dadaism. Actually, if you read through the Wizard Book, at least half of the defined functions are defined solely in terms of list, car, cdar, cddar and so on. One might be tempted to claim that any sufficiently complicated scheme program contains an informally-specified, bug-ridden implementation of half of haskell's type system.

Contents of DECREMENT Register.
On Dec 28, 2007 6:20 PM, Brian Sniffen
On Dec 28, 2007 6:05 AM, Andrew Coppin
wrote: [I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros". I tried to learn it, and disliked it greatly. It's too messy. And what the heck is "cdr" ment to mean anyway? To me, LISP doesn't even seem all that different from normal languages (modulo weird syntax). Now Haskell... that's FUN!]
Contents of Data Register.
Macros are like Template Haskell. One example of where they're useful is programmer definition of new binding forms. That's not possible in Haskell without Templates. Macros were invented in Lisp because the syntax is so easy for machine manipulation---they don't have a tenth the complexity of Template Haskell for about the same power.
-Brian
-- Brian T. Sniffen bts@alum.mit.edu or brian.sniffen@gmail.com http://www.evenmere.org/~bts http://www.evenmere.org/%7Ebts _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Andrew Coppin
http://www.cs.kuleuven.ac.be/%7Edtai/projects/ALP//newsletter/dec07/content/...
"Haskell is the undisputed flagship of the FP community."
Er... really?
It depends on how you define the "FP community", of course. The author counts participation at ICFP, so he probably has an academic slant.
I thought Lisp and Erlang were both infinitely more popular and better known.
Certainly not infinitely. Lisp isn't entirely functional, and while Erlang is an industrial success story, I think Haskell is seeing a wider range of application.
[I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros".
The close ties between data and code in Lisp gives some nice opportunities for your program to e.g. manipulate itself. For e.g. genetic programming. I think macros are used for bottom-up design (i.e. building EDSLs), where you would use higher-order functions in Haskell. (I don't really have a lot of Lisp experience, I'd be interested to hear if other people agree or not) -k -- If I haven't seen further, it is by standing in the footprints of giants

I thought Lisp and Erlang were both infinitely more popular and better known.
Certainly not infinitely. Lisp isn't entirely functional, and while Erlang is an industrial success story, I think Haskell is seeing a wider range of application.
Well, it seems for me that Erlang is much less functional than Lisp. It's totally OO, in fact.

On Dec 28, 2007 2:55 PM, Miguel Mitrofanov
I thought Lisp and Erlang were both infinitely more popular and better known.
Certainly not infinitely. Lisp isn't entirely functional, and while Erlang is an industrial success story, I think Haskell is seeing a wider range of application.
Well, it seems for me that Erlang is much less functional than Lisp. It's totally OO, in fact.
OO is orthogonal to functional. Erlang is pure functional, Lisp is a bastard child... Luke

On Saturday 29 December 2007 06:09:44 Bill Wood wrote:
On Fri, 2007-12-28 at 20:23 -0700, Luke Palmer wrote:
OO is orthogonal to functional. Erlang is pure functional, Lisp is a bastard child...
Give it its historical due, please -- bastard grandsire at least.
You'll have to speak up: I don't think Lisp can hear you. ;-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e

Well, it seems for me that Erlang is much less functional than Lisp. It's totally OO, in fact.
OO is orthogonal to functional.
? Kay's definition of OOP necessarily implies imperative behaviour.
Erlang is pure functional,
Erlang functions are not prevented from having side effects in any way.

On Saturday 29 December 2007 06:31:35 Miguel Mitrofanov wrote:
Well, it seems for me that Erlang is much less functional than Lisp. It's totally OO, in fact.
OO is orthogonal to functional.
? Kay's definition of OOP necessarily implies imperative behaviour.
OCaml has purely functional object update IIRC. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e

Luke Palmer wrote:
OO is orthogonal to functional. Erlang is pure functional, Lisp is a bastard child...
1. Wasn't Lisp here first? (I mean, from what I've read, Lisp is so old it almost predates electricity...) 2. I'm curios as to how you can have a functional OO language. The two seem fundamentally incompatible: - FP could be defined as "programming without mutable state". - In OOP we have the definition: "An object has identity, state and behaviour". That a state has an *identity* more or less demands *mutable* state. So OOP is programming with mutable state inside objects, and FP is programming without mutable state. Hmm... 3. I know very little about Erlang, but the Haskell wiki claims it is not pure functional. (This agrees with the small amount of Erlang I do know.) http://www.haskell.org/haskellwiki/Comparison_of_functional_programming_lang...

On Dec 29, 2007 10:32 AM, Andrew Coppin
Luke Palmer wrote:
OO is orthogonal to functional. Erlang is pure functional, Lisp is a bastard child...
1. Wasn't Lisp here first? (I mean, from what I've read, Lisp is so old it almost predates electricity...)
Before the concepts of OO, functional, and imperative? Well, certainly before OO -- the other two... perhaps.
2. I'm curios as to how you can have a functional OO language. The two seem fundamentally incompatible:
See O'Caml, O'Haskell. I'd call those OO functional languages. You may reject state from OO and still have something which is quite close to OO. But it's a matter of minor semantics now I think...
3. I know very little about Erlang, but the Haskell wiki claims it is not pure functional. (This agrees with the small amount of Erlang I do know.)
I don't know any erlang. Someone in freenode.net#erlang things erlang is pure functional :-) Luke

Luke Palmer wrote:
On Dec 29, 2007 10:32 AM, Andrew Coppin
wrote: 1. Wasn't Lisp here first? (I mean, from what I've read, Lisp is so old it almost predates electricity...)
Before the concepts of OO, functional, and imperative? Well, certainly before OO -- the other two... perhaps.
I actually meant "before Erlang, O'Camal and Haskell". ;-)
2. I'm curios as to how you can have a functional OO language. The two seem fundamentally incompatible:
See O'Caml, O'Haskell. I'd call those OO functional languages. You may reject state from OO and still have something which is quite close to OO. But it's a matter of minor semantics now I think...
Right. So a language where you have objects and methods, it's just that all objects are immutable?
3. I know very little about Erlang, but the Haskell wiki claims it is not pure functional. (This agrees with the small amount of Erlang I do know.)
I don't know any erlang. Someone in freenode.net#erlang things erlang is pure functional :-)
And I met somebody who thinks assembly is a pure OO language. ;-)

Andrew Coppin
Luke Palmer wrote:
OO is orthogonal to functional. Erlang is pure functional, Lisp is a bastard child...
2. I'm curios as to how you can have a functional OO language. The two seem fundamentally incompatible:
By writing an object that takes a parameter in its constructor (eg. Int) and has a member of type () -> Int, you have a closure, which is a let binding. Then you most likely have expression nesting, and you're done. You can, of course, also take a C struct and call the whole thing a chunk or whatever, but that's beside the point. In Java, you have inner classes, which make writing in a functional style verbose and ugly, but quite straight-forward. Heck, you can even use reflection to only allow non-sideeffect stuff. Any sufficiently restricted subset of any high-level assembler is an awkward implementation of your favourite declarative language. -- (c) this sig last receiving data processing entity. Inspect headers for past copyright information. All rights reserved. Unauthorised copying, hiring, renting, public performance and/or broadcasting of this signature prohibited.

On Friday 28 December 2007 11:05:12 Andrew Coppin wrote:
I thought Lisp and Erlang were both infinitely more popular and better known. Followed by Clean and O'Camal.
According to the Debian and Ubuntu package popularity figures OCaml, Haskell and Erlang are the most popular general-purpose functional programming languages, followed by Lisp and Scheme: http://flyingfrogblog.blogspot.com/2007/11/most-popular-functional-languages... OCaml, Haskell and Erlang are also growing much more rapidly than Lisp: http://people.debian.org/~igloo/popcon-graphs/index.php?packages=ocaml-nox%2Cghc6%2Cerlang-base%2Csbcl%2Cclisp&show_installed=on&want_legend=on&want_ticks=on&from_date=&to_date=&hlght_date=&date_fmt=%25Y-%25m&beenhere=1 However, both F# and Scala have the potential to dwarf all of these languages in the not-so-distant future. I believe F# will do so in 2008 but Scala will take 2-3 years because they have far fewer resources to develop essential tools like working IDE plug-ins.
[I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros". I tried to learn it, and disliked it greatly. It's too messy. And what the heck is "cdr" ment to mean anyway? To me, LISP doesn't even seem all that different from normal languages (modulo weird syntax). Now Haskell... that's FUN!]
OCaml also has macros as well and, yes, forking the syntax of a language is a bad idea. I would have said that the metacircular evaluator was the most interesting aspect of Lisp/Scheme though, not macros. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e

Jon Harrop wrote:
However, both F# and Scala have the potential to dwarf all of these languages in the not-so-distant future. I believe F# will do so in 2008 but Scala will take 2-3 years because they have far fewer resources to develop essential tools like working IDE plug-ins.
I agree on that. IMHO, having looked at both F# and Scala, these seem like the most pragmatic languages, adding functional programming on top of "industry proven" imperative/OO technologies. Furthermore, if F# really becomes an officially supported Microsoft product as promised, this will indeed have the potential of rapidly becoming popular. It is also possible that C# will get more and more functional features as it is currently doing, and hence either become a monster or remain very popular in the industry... And what do you think about Sun's Fortress? I kind of liked that language a lot too, but it was way too early to use it. What I like about Haskell is that the language progresses faster than I can learn it ;-) (which might be one of the reasons people don't like it, but hey, it's a *research* language, it must advance!) Andrew Coppin wrote:
[I actually heard a number of people tell me that learning LISP would change my life forever because LISP has something called "macros". I tried to learn it, and disliked it greatly. It's too messy. And what the heck is "cdr" ment to mean anyway? To me, LISP doesn't even seem all that different from normal languages (modulo weird syntax). Now
Ah well, CDR and CAR are historic terms, something to do with the first LISP hardware (Content of Data / Address Register). Wikipedia tells you all about it. Or watch the MIT videos about SICP (structure and interpretation of computer programs), they are fun too.
Actually "Lambda" is just as abstract no? It also has historic meaning.
Haskell... that's FUN! Yes, it's fun, but again, it would be much more fun to me if it had a good IDE with integrated refactoring, good completion, on the fly type inference, etc... But that of course is not of great research interest, so I should not have brought that up again ;-)
Peter

On Saturday 29 December 2007 07:18:28 Peter Verswyvelen wrote:
Jon Harrop wrote:
However, both F# and Scala have the potential to dwarf all of these languages in the not-so-distant future. I believe F# will do so in 2008 but Scala will take 2-3 years because they have far fewer resources to develop essential tools like working IDE plug-ins.
I agree on that. IMHO, having looked at both F# and Scala, these seem like the most pragmatic languages, adding functional programming on top of "industry proven" imperative/OO technologies.
F# is certainly pragmatic and I'm hugely impressed with the work they're doing. I'm undecided about Scala. It seems to be going in research directions that solve new problems at the (grave) expense of usability. In particular, it seems to have forgotten many of the lessons taught by languages like OCaml and Haskell.
Furthermore, if F# really becomes an officially supported Microsoft product as promised, this will indeed have the potential of rapidly becoming popular. It is also possible that C# will get more and more functional features as it is currently doing, and hence either become a monster or remain very popular in the industry...
Yes. Microsoft have already employed half a dozen people to work on F# full time, so I think there is no question that they are putting their money where their mouth is.
And what do you think about Sun's Fortress? I kind of liked that language a lot too, but it was way too early to use it.
I have only read a presentation about Fortress and not actually tried to use it. While I think it is nice that Sun are trying to do something specfically for technical users, I think they would get a lot more out of an industrial-strength implementation of ML like F#.
What I like about Haskell is that the language progresses faster than I can learn it ;-) (which might be one of the reasons people don't like it, but hey, it's a *research* language, it must advance!)
As much as I like the languages, I would really like to ship commercial software for them (e.g. libraries for visualization) but the current generation of implementations basically make this impossible. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e
participants (13)
-
Achim Schneider
-
Alex Sandro Queiroz e Silva
-
Andrew Coppin
-
Bill Wood
-
Brian Sniffen
-
ChrisK
-
Don Stewart
-
Jon Harrop
-
Ketil Malde
-
Lennart Augustsson
-
Luke Palmer
-
Miguel Mitrofanov
-
Peter Verswyvelen