Re: simple binary IO proposition.

2000-09-04 Thread Manuel M. T. Chakravarty
John Meacham <[EMAIL PROTECTED]> wrote, >I don't have a problem with all the character encoding infrastructure >and whatnot, but it makes sense logically in an Language API to >provide access to the lowest level of IO that is possible, whether the >more advanced operations themsel

Re: simple binary IO proposition.

2000-09-04 Thread Marcin 'Qrczak' Kowalczyk
4 Sep 2000 14:22:52 GMT, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> pisze: > > Perhaps this is too much complication given that the underlying > > implementations are so similar, but it seems nice. > > Some functions would have to be overloaded (not polymorphic). > Hopefully I will manage to

Re: simple binary IO proposition.

2000-09-04 Thread Marcin 'Qrczak' Kowalczyk
Mon, 4 Sep 2000 06:08:11 -0700, Simon Marlow <[EMAIL PROTECTED]> pisze: > So: a handle would either be no-encoding, in which case you can > use hGetByte and friends, or it would have an encoding in which > case you can use hGetChar and friends. I assume that using a wrong version would throw an

RE: simple binary IO proposition.

2000-09-04 Thread Simon Marlow
> "Incorrect" UTF-8 in Chars is seen only by the conversion engine and > sometimes by low-level I/O code. ... and by the application if it inadvertently specifies "no encoding" when the source is actually encoded. I think I agree with John here - specifying "no encoding" on a Handle shouldn't yi

Re: simple binary IO proposition.

2000-09-04 Thread Marcin 'Qrczak' Kowalczyk
4 Sep 2000 08:12:14 GMT, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> pisze: > I will check how would it look like. Maybe it's not that bad... Seems that it does not make much sense unless Handles are parametrized too. (And this would be IMHO too ugly. Enough that Posix has its Fd.) Assume tha

Re: simple binary IO proposition.

2000-09-04 Thread Marcin 'Qrczak' Kowalczyk
Sun, 3 Sep 2000 11:58:40 -0700, John Meacham <[EMAIL PROTECTED]> pisze: > * program determinism (soundness): the goal is to write one program, >guaranteed to produce the exact same byte output for a given byte >stream input regardless of compiler/platform it is run on. if >

Re: simple binary IO proposition.

2000-09-03 Thread John Meacham
I don't have a problem with all the character encoding infrastructure and whatnot, but it makes sense logically in an Language API to provide access to the lowest level of IO that is possible, whether the more advanced operations themselves are implemented in Haskell or specially by

Re: simple binary IO proposition.

2000-09-03 Thread Marcin 'Qrczak' Kowalczyk
Sat, 02 Sep 2000 15:37:50 -0700, Joe English <[EMAIL PROTECTED]> pisze: > > I know. How to convert between the default multibyte locale and > > Unicode on such systems? > > As far as I can tell, there's no way to do so in Standard C without > investigating the details of each particular implemen

Re: simple binary IO proposition.

2000-09-02 Thread Joe English
Marcin 'Qrczak' Kowalczyk wrote: > Joe English pisze: > > According to the ISO C standard, the meaning of wchar_t > > is implementation-defined. > > I know. How to convert between the default multibyte locale and > Unicode on such systems? As far as I can tell, there's no way to do so in Standa

Re: simple binary IO proposition.

2000-09-02 Thread Marcin 'Qrczak' Kowalczyk
1 Sep 2000 14:00:44 GMT, Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> pisze: > Haskell assumes that Chars have a fixed encoding (Unicode). Otherwise > it would be quite impossible to have functions like isSpace or toUpper > or words. I have a working temporary hack: module with a separate Handl

Re: simple binary IO proposition.

2000-09-01 Thread Marcin 'Qrczak' Kowalczyk
Fri, 01 Sep 2000 08:44:56 -0700, Joe English <[EMAIL PROTECTED]> pisze: > > [1] I was told on linux-utf8 that I should use iconv, not ISO C > > wchar_t functions, to be portable to systems where wchar_t is not > > Unicode. I did not get an answer: which systems are these. > > According t

Re: simple binary IO proposition.

2000-09-01 Thread Joe English
Marcin 'Qrczak' Kowalczyk wrote: > [1] I was told on linux-utf8 that I should use iconv, not ISO C > wchar_t functions, to be portable to systems where wchar_t is not > Unicode. I did not get an answer: which systems are these. According to the ISO C standard, the meaning of wchar_t is

Re: simple binary IO proposition.

2000-09-01 Thread Marcin 'Qrczak' Kowalczyk
Fri, 1 Sep 2000 00:07:22 -0700, John Meacham <[EMAIL PROTECTED]> pisze: > but the whole point of the module was to finally distingwish between > Bytes and Chars and provide a base mechanism which allows machine and > compiler independant IO with haskell.. This is independent of the issue whether

Re: simple binary IO proposition.

2000-09-01 Thread John Meacham
but the whole point of the module was to finally distingwish between Bytes and Chars and provide a base mechanism which allows machine and compiler independant IO with haskell.. i mean what is the point of a strong type system if we go out of our way to loose distinctions between values, a raw byt

Re: simple binary IO proposition.

2000-09-01 Thread Marcin 'Qrczak' Kowalczyk
Thu, 31 Aug 2000 15:19:03 -0700, John Meacham <[EMAIL PROTECTED]> pisze: > the definition of Byte as a type will help out incredibly, i have > seen to many modules that define type Byte = Char, even the Posix > stuff in hslibs does it; the existance of a 'proper' definition > of Byte will at leas