Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread Derek Elkins
On Sun, 2008-01-06 at 23:28 +0100, [EMAIL PROTECTED] wrote: > Derek Elkins writes: > > > Jonathan Cast wrote: > > >> I find the only > >> similarity between Haskell and Prolog to be that neither is imperative. > > > > Indeed, you've discovered it. The definition of "declarative" is often > >

Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread jerzy . karczmarczuk
Peter Verswyvelen writes: Jerzy wrote: The relational syntax of Prolog is more "universal" than the functional notation, since you have logic variables and logical-non-determinism, and Isn't this just because mathematically, a function *is* a relation, but not vice versa? A relation being ju

RE: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread Peter Verswyvelen
Jerzy wrote: > The relational syntax of Prolog is more "universal" than the functional > notation, since you have logic variables and logical-non-determinism, and Isn't this just because mathematically, a function *is* a relation, but not vice versa? A relation being just a subset of a Cartesian

Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread jerzy . karczmarczuk
Derek Elkins writes: Jonathan Cast wrote: I find the only similarity between Haskell and Prolog to be that neither is imperative. Indeed, you've discovered it. The definition of "declarative" is often "not imperative." I disagree. Practically. (I won't discuss doctrinal matter nor ling

Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread Derek Elkins
On Sun, 2008-01-06 at 13:48 -0800, Jonathan Cast wrote: > On 6 Jan 2008, at 1:31 PM, [EMAIL PROTECTED] wrote: > > > Derek Elkins writes: > >> Jonathan Cast wrote: > >>> I find the term `declarative' to be almost completely meaningless. > >> I was originally thinking of having the final sentence: "

Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread Jonathan Cast
On 6 Jan 2008, at 12:13 PM, Derek Elkins wrote: On Sun, 2008-01-06 at 09:45 -0800, Jonathan Cast wrote: On 6 Jan 2008, at 3:02 AM, Derek Elkins wrote: On Fri, 2007-12-28 at 17:54 -0600, Jonathan Cast wrote: Programming languages are generally classified into three groups, imperative, functi

Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread Jonathan Cast
On 6 Jan 2008, at 1:31 PM, [EMAIL PROTECTED] wrote: Derek Elkins writes: Jonathan Cast wrote: I find the term `declarative' to be almost completely meaningless. I was originally thinking of having the final sentence: "There are no clear, accepted meanings for any of these terms." Clear, no

Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread Derek Elkins
On Sun, 2008-01-06 at 22:31 +0100, [EMAIL PROTECTED] wrote: > Derek Elkins writes: > > > Jonathan Cast wrote: > >> I find the term `declarative' to be almost completely meaningless. > > > > I was originally thinking of having the final sentence: "There are no > > clear, accepted meanings for any

Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread jerzy . karczmarczuk
Derek Elkins writes: Jonathan Cast wrote: I find the term `declarative' to be almost completely meaningless. I was originally thinking of having the final sentence: "There are no clear, accepted meanings for any of these terms." Clear, no. Accepted, yes. Let Jonathan Cast repeat that sta

Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread Derek Elkins
On Sun, 2008-01-06 at 09:45 -0800, Jonathan Cast wrote: > On 6 Jan 2008, at 3:02 AM, Derek Elkins wrote: > > > On Fri, 2007-12-28 at 17:54 -0600, Jonathan Cast wrote: > > > >> Programming languages are generally classified into three groups, > >> imperative, functional, and logical. The differenc

Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread Jonathan Cast
On 6 Jan 2008, at 3:02 AM, Derek Elkins wrote: On Fri, 2007-12-28 at 17:54 -0600, Jonathan Cast wrote: Programming languages are generally classified into three groups, imperative, functional, and logical. The difference is in the style of programming encouraged (or mandated, for older langua

Re: [Haskell-cafe] Wikipedia on first-class object

2008-01-06 Thread Derek Elkins
On Fri, 2007-12-28 at 17:54 -0600, Jonathan Cast wrote: > Programming languages are generally classified into three groups, > imperative, functional, and logical. The difference is in the style > of programming encouraged (or mandated, for older languages) by the > language. Usually the di

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-28 Thread Jonathan Cast
On 28 Dec 2007, at 1:12 AM, Cristian Baboi wrote: On Thu, 27 Dec 2007 17:35:54 +0200, Jonathan Cast <[EMAIL PROTECTED]> wrote: Only on Von Neuman machines. Haskell implementations are not required to run on Von Neuman machines. That's why the language is called functional. (Imperative

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-28 Thread Wolfgang Jeltsch
Am Freitag, 28. Dezember 2007 08:12 schrieb Cristian Baboi: > On Thu, 27 Dec 2007 17:35:54 +0200, Jonathan Cast > > <[EMAIL PROTECTED]> wrote: > > Only on Von Neuman machines. Haskell implementations are not required > > to run on Von Neuman machines. That's why the language is called > > functio

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-28 Thread Wolfgang Jeltsch
Am Freitag, 28. Dezember 2007 07:49 schrieben Sie: > On Thu, 27 Dec 2007 18:14:53 +0200, Wolfgang Jeltsch > > <[EMAIL PROTECTED]> wrote: > > Am Donnerstag, 27. Dezember 2007 15:53 schrieb Cristian Baboi: > >> On Thu, 27 Dec 2007 16:50:10 +0200, Lennart Augustsson > >> > >> <[EMAIL PROTECTED]> wrote

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-28 Thread Wolfgang Jeltsch
Am Freitag, 28. Dezember 2007 07:49 schrieben Sie: > On Thu, 27 Dec 2007 18:19:47 +0200, Wolfgang Jeltsch > <[EMAIL PROTECTED]> wrote: > > Am Donnerstag, 27. Dezember 2007 16:34 schrieb Cristian Baboi: > >> I'll have to trust you, because I cannot test it. > >> > >> let x=(1:x); y=(1:y) in x==y . >

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 17:45:04 +0200, Jonathan Cast <[EMAIL PROTECTED]> wrote: On 27 Dec 2007, at 9:34 AM, Cristian Baboi wrote: I'll have to trust you, because I cannot test it. let x=(1:x); y=(1:y) in x==y . I also cannot test this: let x=(1:x); y=1:1:y in x==y Correct. You could try p

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 17:35:54 +0200, Jonathan Cast <[EMAIL PROTECTED]> wrote: Only on Von Neuman machines. Haskell implementations are not required to run on Von Neuman machines. That's why the language is called functional. (Imperative languages, by contrast, are just abstractions of

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 18:19:47 +0200, Wolfgang Jeltsch <[EMAIL PROTECTED]> wrote: Am Donnerstag, 27. Dezember 2007 16:34 schrieb Cristian Baboi: I'll have to trust you, because I cannot test it. let x=(1:x); y=(1:y) in x==y . I also cannot test this: let x=(1:x); y=1:1:y in x==y In these e

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 18:14:53 +0200, Wolfgang Jeltsch <[EMAIL PROTECTED]> wrote: Am Donnerstag, 27. Dezember 2007 15:53 schrieb Cristian Baboi: On Thu, 27 Dec 2007 16:50:10 +0200, Lennart Augustsson <[EMAIL PROTECTED]> wrote: > Absolutly. Every expression in Haskell denotes a value. > Now, w

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 18:13:57 +0200, Wolfgang Jeltsch <[EMAIL PROTECTED]> wrote: Am Donnerstag, 27. Dezember 2007 16:57 schrieb Cristian Baboi: On Thu, 27 Dec 2007 17:52:19 +0200, Jonathan Cast > Which is why Haskell treats IO as a domain specific language. Good to know. I intended to use Has

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Isaac Dupree
Bulat Ziganshin wrote: here T is any type. you said that values of ANY TYPE can be saved to disk, so show us the way ... try to prove that this mean that value of ANY type may be saved to disk Run another program that uses lots of memory, and watch the entire Haskell program's memory be sw

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Wolfgang Jeltsch
Am Donnerstag, 27. Dezember 2007 16:34 schrieb Cristian Baboi: > I'll have to trust you, because I cannot test it. > > let x=(1:x); y=(1:y) in x==y . > > I also cannot test this: > > let x=(1:x); y=1:1:y in x==y In these examples, x and y denote the same value but the result of x == y is _|_ (und

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Wolfgang Jeltsch
Am Donnerstag, 27. Dezember 2007 15:53 schrieb Cristian Baboi: > On Thu, 27 Dec 2007 16:50:10 +0200, Lennart Augustsson > > <[EMAIL PROTECTED]> wrote: > > Absolutly. Every expression in Haskell denotes a value. > > Now, we've not agreed what "value" means, but to me it is a value. :) > > It is one

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Wolfgang Jeltsch
Am Donnerstag, 27. Dezember 2007 16:57 schrieb Cristian Baboi: > On Thu, 27 Dec 2007 17:52:19 +0200, Jonathan Cast > > Which is why Haskell treats IO as a domain specific language. > > Good to know. I intended to use Haskell for algorithms, but it seems it is > not so good at them. Why is I/O need

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Jonathan Cast
On 27 Dec 2007, at 9:34 AM, Cristian Baboi wrote: I'll have to trust you, because I cannot test it. let x=(1:x); y=(1:y) in x==y . I also cannot test this: let x=(1:x); y=1:1:y in x==y Correct. You could try proving it. Or you could try proving that these expressions are equal to _|_.

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Jonathan Cast
On 27 Dec 2007, at 8:53 AM, Cristian Baboi wrote: On Thu, 27 Dec 2007 16:50:10 +0200, Lennart Augustsson <[EMAIL PROTECTED]> wrote: Absolutly. Every expression in Haskell denotes a value. Now, we've not agreed what "value" means, but to me it is a value. :) It is one value, or several ?

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Jonathan Cast
On 27 Dec 2007, at 8:28 AM, Cristian Baboi wrote: How about x below: let x=(1:x) in x ? Is x a single value in Haskell ? (let x=1:x in x) is. x went out of scope a couple of lines back. jcc ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Jonathan Cast
On 27 Dec 2007, at 8:08 AM, Cristian Baboi wrote: On Thu, 27 Dec 2007 14:02:36 +0200, Lennart Augustsson <[EMAIL PROTECTED]> wrote: Comparing functions is certainly possible in Haskell, but there's no standard function that does it. If course, it might not terminate, but the same is true for

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Jonathan Cast
On 27 Dec 2007, at 4:57 AM, Cristian Baboi wrote: On Thu, 27 Dec 2007 12:40:22 +0200, Yitzchak Gale <[EMAIL PROTECTED]> wrote: I wrote: On the other hand, functions are members of types that are just like any other Haskell type. They are first-class in that sense. Cristian Baboi wrote: I

Re: Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
I'll have to trust you, because I cannot test it. let x=(1:x); y=(1:y) in x==y . I also cannot test this: let x=(1:x); y=1:1:y in x==y On Thu, 27 Dec 2007 17:29:12 +0200, Lennart Augustsson <[EMAIL PROTECTED]> wrote: One value. One "infinite" value. On Dec 27, 2007 3:53 PM, Cristian

Re: Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Lennart Augustsson
One value. One "infinite" value. On Dec 27, 2007 3:53 PM, Cristian Baboi <[EMAIL PROTECTED]> wrote: > On Thu, 27 Dec 2007 16:50:10 +0200, Lennart Augustsson > <[EMAIL PROTECTED]> wrote: > > > Absolutly. Every expression in Haskell denotes a value. > > Now, we've not agreed what "value" means, b

Re: Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 16:50:10 +0200, Lennart Augustsson <[EMAIL PROTECTED]> wrote: Absolutly. Every expression in Haskell denotes a value. Now, we've not agreed what "value" means, but to me it is a value. :) It is one value, or several ? Information from NOD32 This messa

Re: Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Lennart Augustsson
gt; > Is x a single value in Haskell ? > > --- Forwarded message --- > From: "Cristian Baboi" <[EMAIL PROTECTED]> > To: "Lennart Augustsson" <[EMAIL PROTECTED]> > Cc: "haskell-cafe@haskell.org" > Subject: Re: [Haskell-cafe] Wikipedia o

Fwd: Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
How about x below: let x=(1:x) in x ? Is x a single value in Haskell ? --- Forwarded message --- From: "Cristian Baboi" <[EMAIL PROTECTED]> To: "Lennart Augustsson" <[EMAIL PROTECTED]> Cc: "haskell-cafe@haskell.org" Subject: Re: [Haskell-

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 14:02:36 +0200, Lennart Augustsson <[EMAIL PROTECTED]> wrote: Comparing functions is certainly possible in Haskell, but there's no standard function that does it. If course, it might not terminate, but the same is true for many other comparable objects in Haskell, e.g., inf

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 14:37:51 +0200, Yitzchak Gale <[EMAIL PROTECTED]> wrote: I wrote: Like any type, only certain operations make sense on functions... Yes, but one can store the result of an operation to disk except in the particular case the result happen to be a function. No, you can

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 14:37:51 +0200, Yitzchak Gale <[EMAIL PROTECTED]> wrote: I wrote: Like any type, only certain operations make sense on functions... Yes, but one can store the result of an operation to disk except in the particular case the result happen to be a function. No, you ca

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Yitzchak Gale
Cristian Baboi wrote: > Ah! You must have been thinking that function in Haskell are members of > DATA types. > Or, to put it another way, Haskell make no distinction between data types > and function types. Yes. I wrote: Like any type, only certain operations make sense on functions...

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
Thinking about files and types, I recalled that in Pascal files must have types. On Thu, 27 Dec 2007 12:40:22 +0200, Yitzchak Gale <[EMAIL PROTECTED]> wrote: I'm not sure that in Haskell one can say that storing a value of some type to disk is an operation defined on that type. It is. Fo

Re: Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Yitzchak Gale
Cristian Baboi wrote: > I think I found the answer to why functions cannot be written to files. > This is by design. Haskell must be free. > Enabling writing functions to files, might make it ilegal in some > countries. :-) Ha, excellent! I imagine that is what Haskell must have been like before

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 12:40:22 +0200, Yitzchak Gale <[EMAIL PROTECTED]> wrote: I wrote: On the other hand, functions are members of types that are just like any other Haskell type. They are first-class in that sense. Cristian Baboi wrote: I guess that would apply to any typed language. Perh

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Yitzchak Gale
I wrote: >> On the other hand, functions are members of types >> that are just like any other Haskell type. They are >> first-class in that sense. Cristian Baboi wrote: > I guess that would apply to any typed language. Perhaps. But for many typed languages, it is not practical to use. There may b

Fwd: Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
--- Forwarded message --- From: "Cristian Baboi" <[EMAIL PROTECTED]> To: "Yitzchak Gale" <[EMAIL PROTECTED]> Cc: Subject: Re: [Haskell-cafe] Wikipedia on first-class object Date: Thu, 27 Dec 2007 12:21:44 +0200 I think I found the answer to why func

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Cristian Baboi
On Thu, 27 Dec 2007 11:10:21 +0200, Yitzchak Gale <[EMAIL PROTECTED]> wrote: On the other hand, functions are members of types that are just like any other Haskell type. They are first-class in that sense. I guess that would apply to any typed language. Like any type, only certain operation

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Yitzchak Gale
Cristian Baboi wrote: > http://en.wikipedia.org/wiki/First-class_object > I'll guess that 5,9,12 does not apply to Haskell functions. I think there is a basic semantic difference between what the author of that article meant by the word "function" and what we mean by that word when we are talkin

Re: [Haskell-cafe] Wikipedia on first-class object

2007-12-27 Thread Sebastian Sylvan
On 12/27/07, Cristian Baboi <[EMAIL PROTECTED]> wrote: > http://en.wikipedia.org/wiki/First-class_object > > The term was coined by Christopher Strachey in the context of "functions > as first-class citizens" in the mid-1960's.[1] > > Depending on the language, this can imply: > 1. being express