ANN (bis): Release 0.1 of Haskell/Java VM Bridge

2001-12-18 Thread Ashley Yakeley
OK, the SourceForge file release system bug has been fixed, so I put the release files up there. Please download from there rather than from semantic.org. Revised, expanded announcement... --- The first releas

gcd oops

2001-12-18 Thread Michael Ackerman
Sorry for an error in my previous message. The definition there of a gcd works only in a prinicpal ideal domain (which covers all the rings mentioned in the examples). According to Bourbaki, chapter on ordered groups, the gcd of two non-zero elements of a UFD A is well-defined as an element of (A-

Re: gcd 0 0 = 0

2001-12-18 Thread Jan de Wit
Why not define gcd a b as the largest (in 'normal' order) integer d such that the set of sums of multiples of a and b {na+mb | n <- Z, m <- Z} is equal to the set of multiples of d {nd | n <- Z}? Easy to understand, no talk of division, lattices, rings, ideals etcetera, and it covers the cases wit

Re: gcd 0 0 = 0

2001-12-18 Thread Michael Ackerman
The general meaning of `having a prime factorization' is that every non-zero element is uniquely a product of a unit and a product of primes. The algebraic structures where unique factorizations live are `unique factorization domains' (UFDs) of which a central class is formed by the ring of polyno

Re: gcd 0 0 = 0

2001-12-18 Thread Dylan Thurston
On Tue, Dec 18, 2001 at 06:00:30PM +0100, Kent Karlsson wrote: > Why? If EVERY natural number is to have a prime factorisation, then BOTH > 0 AND 1 have to be promoted to prime numbers; 1 has a perfectly fine prime factorization. It is the product of 0 primes, the null product. (A null produc

RE: gcd 0 0 = 0

2001-12-18 Thread Kent Karlsson
> > "Simon" == Simon Peyton-Jones <[EMAIL PROTECTED]> writes: > > Simon> Christoph does not like this I still don't like this. 0 has never, and will never, divide anything, in particular not 0. 0 may be a prime factor of 0 (see also below!), but that is different. It is not the greate

Re: gcd 0 0 = 0

2001-12-18 Thread Marc van Dongen
Lars Henrik Mathiesen ([EMAIL PROTECTED]) wrote: : > Alan Bawden ([EMAIL PROTECTED]) wrote: : > : Indeed, that's a nice way of putting it. How about if the report just : > : says: : > : : > :In order to make the non-negative integers into a lattice under `gcd' : > :and `lcm', we define

x^y

2001-12-18 Thread Toralf Wittner
Hello, you can count me as a newbie in functional programming. I'm attempting to define a function that computes the value of x^y for whole numbers. Intuively (all efficiency considerations aside) I would start with something like this: power x y | x == 0= 0 | y == 0

Re: gcd 0 0 = 0

2001-12-18 Thread Lars Henrik Mathiesen
> From: Marc van Dongen <[EMAIL PROTECTED]> > Date: Tue, 18 Dec 2001 09:32:49 + > > Alan Bawden ([EMAIL PROTECTED]) wrote: > : Indeed, that's a nice way of putting it. How about if the report just > : says: > : > :In order to make the non-negative integers into a lattice under `gcd' > :

Re: space efficiency question

2001-12-18 Thread Janis Voigtlaender
Frank Dellaert asks: > test (Instance a1 _) (Instance a2 _) = (a1==a2) > > will this be implemented efficiently ? I.e. will it check first whether the > >pointers happen to be the same, and only then do a full Eq comparison ? No, otherwise you might also expect that the following test' functio

Re: space efficiency question

2001-12-18 Thread Frank Dellaert
Title: Message Thanks !   Now, a small follow-up question: if I subsequently test 2 Instances whether they were instantiated with the same Attributes value, as in   test (Instance a1 _) (Instance a2 _) = (a1==a2)   will this be implemented efficiently ? I.e. will it check first whether the p

RE: gcd 0 0 = 0

2001-12-18 Thread Ch. A. Herrmann
> "Simon" == Simon Peyton-Jones <[EMAIL PROTECTED]> writes: Simon> Christoph does not like this It's OK if the definition is clear; it wasn't using the words "positive" or "greatest integer". Stating "gcd 0 0 = 0" explicitly is a good thing, even if it could be expressed verbatim; peopl

4th Int'l Symp.: Practical Aspects of Declarative Languages

2001-12-18 Thread Dr. Gopal Gupta
[ o Apologies for multiple messages. o Please register and make hotel reservations as soon as possible since both deadlines are approaching fast (Dec. 27th) ]. You are cordially invited to the Fourth International Symposium on Practical Aspects of Declarative Languages that will be h

Haskell 98 IO

2001-12-18 Thread Simon Peyton-Jones
| Anyway, what should the report say? I think it is reasonable | to expect that stdin & stdout should both be unbuffered in | order for interact to work right. So the defn of interact should be | | interact f = do | hSetBuffering stdin NoBuffering -- new | hSetBuffering stdout No

RE: Confused about default

2001-12-18 Thread Simon Peyton-Jones
| Let me try to clarify what I was asking: | | What is a monotype? For example, is "[Foo]" a monotype and is | "Foo -> Int" a monotype? The context free grammar implies | that a monotype is identical to a type, in which case why is | a different name used? A monotype is a type with no for-all

RE: gcd 0 0 = 0

2001-12-18 Thread Simon Peyton-Jones
If everyone likes this I'll put it in; otherwise I'll simply state that gcd 0 0 is defined to be 0. Christoph does not like this, but the weight of world opinion seems to be fairly clearly in favour of gcd 0 0 = 0.Let's try to wrap this one up. Simon | -Original Message- | From: A

Re: gcd 0 0 = 0

2001-12-18 Thread Marc van Dongen
Alan Bawden ([EMAIL PROTECTED]) wrote: :In case it isn't clear already, these definitions make a lattice on :the positive integers, with divides ~ leq, gcd ~ meet and lcm ~ join, :using the report's definitions of gcd and lcm. : : Indeed, that's a nice way of putting it. How about i

ANNOUNCE: hsclock-0.01.0 release

2001-12-18 Thread Jens-Ulrik Petersen
I am pleased to announce the initial release of hsclock, another gtk+hs "applet" I've written. hsclock is an accurate multi-zone gtk clock, which can also run in a tty. hsclock uses gtk timeouts to synchronise the time updates to occur on the second or minute "tick" (dependent on the clock forma

Re: gcd 0 0 = 0

2001-12-18 Thread Marc van Dongen
Ch. A. Herrmann ([EMAIL PROTECTED]) wrote: : In contrast, 0*x=0, thus 0 "divides" 0 (somehow). : But I have problems with "gcd being the greatest positive integer ..." [snip] : - 0 is not positive, it is non-negative or natural : - 2 also divides 0 and 2 is a "greater integer" than 0 : (0 is