Re: [Haskell-cafe] Type system madness

2007-07-14 Thread Andrew Coppin
Jonathan Cast wrote: On Friday 13 July 2007, Andrew Coppin wrote: Stefan O'Rear wrote: Try not to care what other people think. LOL! If only that were in fact physically possible... Why not? I do it all the time... Clearly you don't know me... I spend 80% of my

Re: [Haskell-cafe] Type system madness

2007-07-14 Thread Andrew Coppin
Stefan O'Rear wrote: On Fri, Jul 13, 2007 at 06:45:03PM -0400, Brandon S. Allbery KF8NH wrote: On Jul 13, 2007, at 15:11 , Stefan O'Rear wrote: There is no such thing as 8-bit ASCII - base assumes files contain ISO-8859-1. Hm, shouldn't it really be ISO-8859-15? (The

Re[2]: [Haskell-cafe] Type system madness

2007-07-14 Thread Bulat Ziganshin
Hello Andrew, Friday, July 13, 2007, 11:01:24 PM, you wrote: definitely. for example, on windows it doesn't support unicode filenames nor files bigger than 4gb so i use my own lib, a thin layer around Windows API Has a bug been reported for this? Have you (or anyone else) thought about

Re[2]: [Haskell-cafe] Type system madness

2007-07-13 Thread Bulat Ziganshin
Hello Andrew, Thursday, July 12, 2007, 10:15:00 PM, you wrote: While BOMs (Byte Order Mark) are pretty irrelevant to byte-oriented encodings like UTF-8, I think programs that fail on their presence can be considered buggy. Yay! Haskell's text I/O system is buggy. :-P definitely. for

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Ketil Malde
On Thu, 2007-07-12 at 19:15 +0100, Andrew Coppin wrote: While BOMs (Byte Order Mark) are pretty irrelevant to byte-oriented encodings like UTF-8, I think programs that fail on their presence can be considered buggy. Yay! Haskell's text I/O system is buggy. :-P Works for me, but feel free

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Stefan O'Rear
On Fri, Jul 13, 2007 at 10:26:38AM +0200, Ketil Malde wrote: On Thu, 2007-07-12 at 19:15 +0100, Andrew Coppin wrote: While BOMs (Byte Order Mark) are pretty irrelevant to byte-oriented encodings like UTF-8, I think programs that fail on their presence can be considered buggy. Yay!

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin
Donald Bruce Stewart wrote: By the way Andrew, have you noticed that you're generating 50% of the traffic on this list? Perhaps we can work a bit more on improving the signal/noise ratio. My inbox can only take so much of this... ;) o_O My God... even the Haskell mailing list is

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin
Bulat Ziganshin wrote: Hello Andrew, Yay! Haskell's text I/O system is buggy. :-P definitely. for example, on windows it doesn't support unicode filenames nor files bigger than 4gb ...OK, that's quite worrying... so i use my own lib, a thin layer around Windows API Has a bug

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin
Ketil Malde wrote: On Thu, 2007-07-12 at 19:15 +0100, Andrew Coppin wrote: While BOMs (Byte Order Mark) are pretty irrelevant to byte-oriented encodings like UTF-8, I think programs that fail on their presence can be considered buggy. Yay! Haskell's text I/O system is buggy.

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Stefan O'Rear
On Fri, Jul 13, 2007 at 08:05:36PM +0100, Andrew Coppin wrote: Ketil Malde wrote: On Thu, 2007-07-12 at 19:15 +0100, Andrew Coppin wrote: While BOMs (Byte Order Mark) are pretty irrelevant to byte-oriented encodings like UTF-8, I think programs that fail on their presence can be

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin
Stefan O'Rear wrote: On Fri, Jul 13, 2007 at 08:05:36PM +0100, Andrew Coppin wrote: I was actually commenting on the other guy's remark that anything that chokes on a BOM can be considered buggy - not entirely seriously. ;-) If there is a bug to be reported, it is merely that [the GHC

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin
Bryan O'Sullivan wrote: Andrew Coppin wrote: Oh well, the problem is easily fixed... *sigh* I doubt that anybody minds having you talk about Haskell. You've been responsible for spawning a lot of interesting threads. [And that one about compression that's still going on somewhere...

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Stefan O'Rear
On Fri, Jul 13, 2007 at 08:57:58PM +0100, Andrew Coppin wrote: Bryan O'Sullivan wrote: Andrew Coppin wrote: Oh well, the problem is easily fixed... *sigh* I doubt that anybody minds having you talk about Haskell. You've been responsible for spawning a lot of interesting threads. [And

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin
Stefan O'Rear wrote: On Fri, Jul 13, 2007 at 08:57:58PM +0100, Andrew Coppin wrote: - Join us on #haskell on IRC. It's extremely chatty, and you'll be welcome. Not in my experience, no. (Maybe I ask the wrong way... but almost everybody seems to simply ignore me. Actually, usually

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Andrew Coppin
Stefan O'Rear wrote: Don does not speak for the whole community, I for one am fine with answering all these questions :) I guess when somebody as important as Don says something, you take notice... Specifically, Don really wants you to get off of the mailing list and ask all these

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Brandon S. Allbery KF8NH
On Jul 13, 2007, at 15:11 , Stefan O'Rear wrote: There is no such thing as 8-bit ASCII - base assumes files contain ISO-8859-1. Hm, shouldn't it really be ISO-8859-15? (The difference being that -1 predates the euro symbol.) -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell]

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Stefan O'Rear
On Fri, Jul 13, 2007 at 06:45:03PM -0400, Brandon S. Allbery KF8NH wrote: On Jul 13, 2007, at 15:11 , Stefan O'Rear wrote: There is no such thing as 8-bit ASCII - base assumes files contain ISO-8859-1. Hm, shouldn't it really be ISO-8859-15? (The difference being that -1 predates the

Re: [Haskell-cafe] Type system madness

2007-07-13 Thread Jonathan Cast
On Friday 13 July 2007, Andrew Coppin wrote: Stefan O'Rear wrote: Don does not speak for the whole community, I for one am fine with answering all these questions :) I guess when somebody as important as Don says something, you take notice... Specifically, Don really wants you to get

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Henning Thielemann
On Tue, 10 Jul 2007, Jonathan Cast wrote: On Tuesday 10 July 2007, Andrew Coppin wrote: Stefan O'Rear wrote: Consider the ST monad, which lets you use update-in-place, but is escapable (unlike IO). ST actions have the form: ST s α Meaning that they return a value of type

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Henning Thielemann
On Tue, 10 Jul 2007, Albert Y. C. Lai wrote: Andrew Coppin wrote: Wait... I thought Unicode was still an experimental prototype? Since when does it work in the real world?? That myth is as old as Haskell is an experimental prototype. Old as in that's an old one. Windows has been well

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Stefan O'Rear
On Thu, Jul 12, 2007 at 09:12:14AM +0200, Henning Thielemann wrote: On Tue, 10 Jul 2007, Jonathan Cast wrote: On Tuesday 10 July 2007, Andrew Coppin wrote: Stefan O'Rear wrote: Consider the ST monad, which lets you use update-in-place, but is escapable (unlike IO). ST actions

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Jonathan Cast
On Thursday 12 July 2007, Henning Thielemann wrote: On Tue, 10 Jul 2007, Albert Y. C. Lai wrote: Andrew Coppin wrote: Wait... I thought Unicode was still an experimental prototype? Since when does it work in the real world?? That myth is as old as Haskell is an experimental prototype.

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Ketil Malde
On Wed, 2007-07-11 at 20:10 +0100, Andrew Coppin wrote: When I tell the editor to save UTF-8, it inserts some weird BOM character at the start of the file - and thus, any attempt at programatically processing that file instantly fails. :-( While BOMs (Byte Order Mark) are pretty irrelevant

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Andrew Coppin
Albert Y. C. Lai wrote: Andrew Coppin wrote: When I tell the editor to save UTF-8, it inserts some weird BOM character at the start of the file - and thus, any attempt at programatically processing that file instantly fails. :-( I know Windows Notepad puts a BOM at the beginning of UTF-8

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Philip Armstrong
On Thu, Jul 12, 2007 at 07:01:31PM +0100, Andrew Coppin wrote: Let me put it this way: It makes all my Tcl scripts stop working, and it makes my Haskell-based processor go nuts too... Given that (IIRC) the BOM is just a valid unicode non-breaking space, your scripts really ought to cope...

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Philip Armstrong
On Thu, Jul 12, 2007 at 09:24:24PM +0100, Philip Armstrong wrote: On Thu, Jul 12, 2007 at 07:01:31PM +0100, Andrew Coppin wrote: Let me put it this way: It makes all my Tcl scripts stop working, and it makes my Haskell-based processor go nuts too... Given that (IIRC) the BOM is just a valid

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Steve Schafer
On Thu, 12 Jul 2007 21:24:24 +0100, you wrote: Given that (IIRC) the BOM is just a valid unicode non-breaking space, your scripts really ought to cope... Choking on the BOM is probably just a symptom of a deeper problem. My bet is that removing the BOM would simply delay the failure until the

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Philip Armstrong
On Thu, Jul 12, 2007 at 04:58:43PM -0400, Steve Schafer wrote: On Thu, 12 Jul 2007 21:24:24 +0100, you wrote: Given that (IIRC) the BOM is just a valid unicode non-breaking space, your scripts really ought to cope... Choking on the BOM is probably just a symptom of a deeper problem. My bet

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Donald Bruce Stewart
andrewcoppin: Ketil Malde wrote: On Wed, 2007-07-11 at 20:10 +0100, Andrew Coppin wrote: When I tell the editor to save UTF-8, it inserts some weird BOM character at the start of the file - and thus, any attempt at programatically processing that file instantly fails. :-(

Re: [Haskell-cafe] Type system madness

2007-07-12 Thread Brandon S. Allbery KF8NH
On Jul 12, 2007, at 20:48 , Donald Bruce Stewart wrote: By the way Andrew, have you noticed that you're generating 50% of the traffic on this list? Perhaps we can work a bit more on improving the signal/noise ratio. My inbox can only take so much of this... ;) I can blather more, if you'd

Re[2]: [Haskell-cafe] Type system madness

2007-07-11 Thread Miguel Mitrofanov
AC Wait... I thought Unicode was still an experimental prototype? AC Since when does it work in the real world?? What? There was time when Unicode was not working Sorry... couldn't help saying that... ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Paul Moore
On 10/07/07, Andrew Coppin [EMAIL PROTECTED] wrote: Interesting... I tried to put a pound sign on my web page, and it came out garbled, so I had to replace it with pound;... You may need to specify a content encoding in the HTML header. For that, you need to know the encoding your HTML file is

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Albert Y. C. Lai
Paul Moore wrote: On 10/07/07, Andrew Coppin [EMAIL PROTECTED] wrote: Interesting... I tried to put a pound sign on my web page, and it came out garbled, so I had to replace it with pound;... You may need to specify a content encoding in the HTML header. For that, you need to know the

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Martin Percossi
Jonathan Cast wrote: toUpper :: exists x. x - x works for only one choice of x. Are you sure that's not: toUpper :: exists x. x - x works for *at least one* choice of x ? I'm not sure about the haskell meaning, but the logic meaning is definitely this. For example: forall x:Integer.

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Andrew Coppin
Paul Moore wrote: On 10/07/07, Andrew Coppin [EMAIL PROTECTED] wrote: Interesting... I tried to put a pound sign on my web page, and it came out garbled, so I had to replace it with pound;... You may need to specify a content encoding in the HTML header. For that, you need to know the

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Andrew Coppin
Bulat Ziganshin wrote: Hello Andrew, Hmm. Like the IO monad's RealWorld object, which isn't really there? ST and IO monads are the same beast. in ST, s is free to allow to create endless amount of independent threads while in IO it fixed to one type and describes evolution of one

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Andrew Coppin
Albert Y. C. Lai wrote: Lest I am painted as unhelpful(*), http://www.vex.net/~trebla/u.html exemplifies what can be done and how to do it. In particular, you must always specify a content encoding in the HTML header, and you must always order your editor to write out UTF-8. When I tell the

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Alex Queiroz
Hallo, On 7/11/07, Andrew Coppin [EMAIL PROTECTED] wrote: When I tell the editor to save UTF-8, it inserts some weird BOM character at the start of the file - and thus, any attempt at programatically processing that file instantly fails. :-( Are you sure it's not UTF-16? Cheers, --

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Steve Schafer
On Wed, 11 Jul 2007 20:10:00 +0100, you wrote: When I tell the editor to save UTF-8, it inserts some weird BOM character at the start of the file - and thus, any attempt at programatically processing that file instantly fails. :-( Which means that your processor doesn't properly understand

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Jonathan Cast
On Wednesday 11 July 2007, Martin Percossi wrote: Jonathan Cast wrote: toUpper :: exists x. x - x works for only one choice of x. Are you sure that's not: toUpper :: exists x. x - x works for *at least one* choice of x Not quite. When you give a constructive proof of exists x. x - x, you

Re: Re[2]: [Haskell-cafe] Type system madness

2007-07-11 Thread Lennart Augustsson
Well, Haskell defines the IO type to be abstract, so if IO and ST happen to be the same it's implementation dependent. -- Lennart On 7/11/07, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Andrew, Tuesday, July 10, 2007, 11:49:37 PM, you wrote: ...so the 's' doesn't really exist, it's

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Jonathan Cast
On Wednesday 11 July 2007, Lennart Augustsson wrote: Well, Haskell defines the IO type to be abstract, so if IO and ST happen to be the same it's implementation dependent. And if IO uses a RealWorld type, that's implementation dependent too. But it's still useful to understand both RealWorld

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Lennart Augustsson
Yes, that's one way to define IO. But it's not the only way. On 7/11/07, Jonathan Cast [EMAIL PROTECTED] wrote: On Wednesday 11 July 2007, Lennart Augustsson wrote: Well, Haskell defines the IO type to be abstract, so if IO and ST happen to be the same it's implementation dependent. And if

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Brandon S. Allbery KF8NH
On Jul 11, 2007, at 15:23 , Alex Queiroz wrote: On 7/11/07, Andrew Coppin [EMAIL PROTECTED] wrote: When I tell the editor to save UTF-8, it inserts some weird BOM character at the start of the file - and thus, any attempt at programatically processing that file instantly fails. :-( Are

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Albert Y. C. Lai
Brandon S. Allbery KF8NH wrote: GNOME's gedit, for one, has a tendency to put byte order marks at the beginning of every line in UTF8 mode. Somehow I have never got a single BOM. My http://www.vex.net/~trebla/u.html was written out by GNOME gedit. Version 2.14.4.

Re: [Haskell-cafe] Type system madness

2007-07-11 Thread Brandon S. Allbery KF8NH
On Jul 11, 2007, at 18:52 , Albert Y. C. Lai wrote: Brandon S. Allbery KF8NH wrote: GNOME's gedit, for one, has a tendency to put byte order marks at the beginning of every line in UTF8 mode. Somehow I have never got a single BOM. My http://www.vex.net/ ~trebla/u.html was written out by

Re: [Haskell-cafe] Type system madness

2007-07-10 Thread Daniil Elovkov
2007/7/10, Andrew Coppin [EMAIL PROTECTED]: I stand in awe of people who actually understand what universal and existential actually mean... To me, these are just very big words that sound impressive. The following is only my own understanding, please correct me if it's totally wrong! (and

Re: [Haskell-cafe] Type system madness

2007-07-10 Thread Andrew Coppin
Stefan O'Rear wrote: On Mon, Jul 09, 2007 at 09:57:14PM +0100, Andrew Coppin wrote: (BTW... How in the hell do you get symbols like that in plain ASCII??) You can't, but the most commonly used replacement for ASCII (Unicode-UTF8) supports them just fine. Wait... I thought Unicode

Re: [Haskell-cafe] Type system madness

2007-07-10 Thread Jonathan Cast
On Tuesday 10 July 2007, Andrew Coppin wrote: Stefan O'Rear wrote: On Mon, Jul 09, 2007 at 09:57:14PM +0100, Andrew Coppin wrote: (BTW... How in the hell do you get symbols like that in plain ASCII??) You can't, but the most commonly used replacement for ASCII (Unicode-UTF8) supports

Re: [Haskell-cafe] Type system madness

2007-07-10 Thread Alex Queiroz
Hallo, On 7/10/07, Andrew Coppin [EMAIL PROTECTED] wrote: Last time I looked, everything treats text as being 8 bits per character. (Or, more commonly, 7, and if the MSB isn't 0, weird things happen...) That's why (for example) HTML has lots of weird constructs such as hellip; in it, instead

Re: [Haskell-cafe] Type system madness

2007-07-10 Thread Albert Y. C. Lai
Andrew Coppin wrote: Wait... I thought Unicode was still an experimental prototype? Since when does it work in the real world?? That myth is as old as Haskell is an experimental prototype. Old as in that's an old one. Windows has been well supporting Unicode since 2000. That is pretty much

Re: [Haskell-cafe] Type system madness

2007-07-10 Thread Andrew Coppin
Albert Y. C. Lai wrote: Andrew Coppin wrote: Wait... I thought Unicode was still an experimental prototype? Since when does it work in the real world?? That myth is as old as Haskell is an experimental prototype. Old as in that's an old one. Windows has been well supporting Unicode since

Re: [Haskell-cafe] Type system madness

2007-07-10 Thread Hugh Perkins
We can consider three families of character sets: - ASCII: 127 characters, some of which are escape codes like bell etc - regional encodings: china uses GB2312, Europe uses ISO-8859-1, America uses ... something - unicode: UTF-8, UTF-16 The regional encodings are optimized for their region, and

Re: [Haskell-cafe] Type system madness

2007-07-10 Thread Alexis Hazell
On Wednesday 11 July 2007 05:49, Andrew Coppin wrote: Last time I checked, nobody was keen on using 64 bits per character... Hence the UTF-8 encoding: http://en.wikipedia.org/wiki/Utf-8 Alexis. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Type system madness

2007-07-09 Thread Stefan O'Rear
On Mon, Jul 09, 2007 at 09:05:55PM +0100, Andrew Coppin wrote: OK, can somebody explain to me *really slowly* exactly what the difference between an existential type and a rank-N type is? (I couldn't find much of use on the wiki. I have now in fact written some stuff there myself, but since

[Haskell-cafe] Type system madness

2007-07-09 Thread Andrew Coppin
OK, can somebody explain to me *really slowly* exactly what the difference between an existential type and a rank-N type is? (I couldn't find much of use on the wiki. I have now in fact written some stuff there myself, but since I don't understand it in the first place, I'm having difficulty

Re: [Haskell-cafe] Type system madness

2007-07-09 Thread Andrew Coppin
Stefan O'Rear wrote: All users should worry about is Quantifiers. A quantifier is an operator on types which defines a variable in some way. OK... id has type :: ∀α. α → α toUpper (can) have type :: ∃α. α → α So... you're saying that id:: x - x works for *every* possible choice of

Re: [Haskell-cafe] Type system madness

2007-07-09 Thread Stefan O'Rear
On Mon, Jul 09, 2007 at 09:57:14PM +0100, Andrew Coppin wrote: Stefan O'Rear wrote: id has type :: ∀α. α → α toUpper (can) have type :: ∃α. α → α So... you're saying that id:: x - x works for *every* possible choice of x, but toUpper :: x - x works for *one* possible choice of x?

Re: [Haskell-cafe] Type system madness

2007-07-09 Thread Albert Y. C. Lai
Andrew Coppin wrote: I stand in awe of people who actually understand what universal and existential actually mean... To me, these are just very big words that sound impressive. I offer to relieve that with http://www.vex.net/~trebla/allsome.txt I think of formal logic as clarifying thought

Re: [Haskell-cafe] Type system madness

2007-07-09 Thread David Menendez
On 7/9/07, Andrew Coppin [EMAIL PROTECTED] wrote: OK, can somebody explain to me *really slowly* exactly what the difference between an existential type and a rank-N type is? One important difference is that Hugs supports existential quantification, but not rank-N types. (It does support