Re: [Haskell-cafe] Re: mathematical notation and functional programming

2005-02-05 Thread Dylan Thurston
On Fri, Feb 04, 2005 at 03:08:51PM +0100, Henning Thielemann wrote: On Thu, 3 Feb 2005, Dylan Thurston wrote: On Fri, Jan 28, 2005 at 08:16:59PM +0100, Henning Thielemann wrote: O(n) which should be O(\n - n) (a remark by Simon Thompson in The Craft of

Re: [Haskell-cafe] Re: mathematical notation and functional programming

2005-02-04 Thread Dylan Thurston
(Resurrecting a somewhat old thread...) On Fri, Jan 28, 2005 at 08:16:59PM +0100, Henning Thielemann wrote: On Fri, 28 Jan 2005, Chung-chieh Shan wrote: But I would hesitate with some of your examples, because they may simply illustrate that mathematical notation is a language with side

Re: [Haskell-cafe] Re: mathematical notation and functional programming

2005-02-04 Thread William Lee Irwin III
On Fri, Jan 28, 2005 at 08:16:59PM +0100, Henning Thielemann wrote: But what do you mean with 1/O(n^2) ? O(f) is defined as the set of functions bounded to the upper by f. So 1/O(f) has no meaning at the first glance. I could interpret it as lifting (1/) to (\f x - 1 / f x) (i.e. lifting from

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-31 Thread Chung-chieh Shan
(Is Lemming the same person as Henning Thielemann?) On 2005-01-30T21:24:24+0100, Lemming wrote: Chung-chieh Shan wrote: Wait a minute -- would you also say that 1+x has no meaning at the first glance, because x is a variable whereas 1 is an integer, so some lifting is called for? For me

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-31 Thread Henning Thielemann
On Mon, 31 Jan 2005, Chung-chieh Shan wrote: (Is Lemming the same person as Henning Thielemann?) Yes. :-) For the expression '1+x' I conclude by type inference that 'x' must be a variable for a scalar value, since '1' is, too. But the expression '1/O(n^2)' has the scalar value '1'

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-30 Thread Lemming
Chung-chieh Shan wrote: On 2005-01-28T20:16:59+0100, Henning Thielemann wrote: I can't imagine mathematics with side effects, because there is no order of execution. To clarify, I'm not saying that mathematics may have side effects, but that the language we use to talk about mathematics may have

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-29 Thread Stefan Monnier
a b c which is a short-cut of a b \land b c The confusion between f(x) and x.f(x) is indeed a real bummer. OTOH I like the abc shorthand because it's both obvious and unambiguous (as long as the return value of can't be passed as an argument to , which is typically the case when the

Re: [Haskell-cafe] Re: mathematical notation and functional programming

2005-01-29 Thread Marcin 'Qrczak' Kowalczyk
Stefan Monnier [EMAIL PROTECTED] writes: OTOH I like the abc shorthand because it's both obvious and unambiguous (as long as the return value of can't be passed as an argument to , which is typically the case when the return value is boolean and there's no ordering defined on booleans).

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-29 Thread Aaron Denney
On 2005-01-29, Stefan Monnier [EMAIL PROTECTED] wrote: a b c which is a short-cut of a b \land b c The confusion between f(x) and ?x.f(x) is indeed a real bummer. OTOH I like the abc shorthand because it's both obvious and unambiguous (as long as the return value of can't be passed

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-28 Thread Chung-chieh Shan
Henning Thielemann [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Over the past years I became more and more aware that common mathematical notation is full of inaccuracies, abuses and stupidity. I wonder if mathematical notation is subject of a

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-28 Thread Henning Thielemann
On Fri, 28 Jan 2005, Chung-chieh Shan wrote: Henning Thielemann [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Over the past years I became more and more aware that common mathematical notation is full of inaccuracies, abuses and stupidity. I wonder

[Haskell-cafe] Re: mathematical notation and functional programming

2005-01-28 Thread Chung-chieh Shan
On 2005-01-28T20:16:59+0100, Henning Thielemann wrote: On Fri, 28 Jan 2005, Chung-chieh Shan wrote: But I would hesitate with some of your examples, because they may simply illustrate that mathematical notation is a language with side effects -- see the third and fifth examples below. I

Re: [Haskell-cafe] Re: mathematical notation and functional programming

2005-01-28 Thread Ketil Malde
Chung-chieh Shan [EMAIL PROTECTED] writes: O(n) which should be O(\n - n) (a remark by Simon Thompson in The Craft of Functional Programming) It's a neat thought, IMHO. I usually try to quantify the variables used, making the equivalent of 'let n = .. in

Re: [Haskell-cafe] Re: mathematical notation and functional programming

2005-01-28 Thread William Lee Irwin III
On Fri, Jan 28, 2005 at 08:16:59PM +0100, Henning Thielemann wrote: But what do you mean with 1/O(n^2) ? O(f) is defined as the set of functions bounded to the upper by f. So 1/O(f) has no meaning at the first glance. I could interpret it as lifting (1/) to (\f x - 1 / f x) (i.e. lifting from