Re: [Haskell-cafe] Re: Hugsvs GHC (again)was: Re: Somerandomnewbiequestions

2005-01-24 Thread Glynn Clements
the issue that memory (i.e. code/data/stack segments) is demand-paged. The only solution there is multiple threads. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] File path programme

2005-01-30 Thread Glynn Clements
used to denote switches) where there's an issue. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] File path programme

2005-01-30 Thread Glynn Clements
by both Java and Tcl permits NUL characters to be embedded in NUL-terminated UTF-8 strings by encoding them as a two-byte sequence (which is invalid in UTF-8 proper). -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: File path programme

2005-01-30 Thread Glynn Clements
Marcin 'Qrczak' Kowalczyk wrote: The various UTF encodings do not have this particular problem; if a UTF string is valid, then it is a unique representation of a unicode string. However, decoding is still a partial function and can fail. And while it is partly

Re: [Haskell-cafe] File path programme

2005-01-30 Thread Glynn Clements
file for which the administrator is (unsuccessfully) trying to restrict access. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: File path programme

2005-02-02 Thread Glynn Clements
of definition, e.g. is /dev/tty considered equivalent to the specific /dev/ttyXX device for the current process? -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] invalid character encoding

2005-03-16 Thread Glynn Clements
to any applicable functions. If application code doesn't want to use the locale's encoding, it shouldn't be shoe-horned into doing so because a library developer decided to duck the encoding issues by grabbing whatever encoding was readily to hand (i.e. the locale's encoding). -- Glynn Clements

Re: [Haskell-cafe] invalid character encoding

2005-03-17 Thread Glynn Clements
Marcin 'Qrczak' Kowalczyk wrote: Glynn Clements [EMAIL PROTECTED] writes: It should be possible to specify the encoding explicitly. Conversely, it shouldn't be possible to avoid specifying the encoding explicitly. What encoding should a binding to readline or curses use? Curses

Re: [Haskell-cafe] invalid character encoding

2005-03-17 Thread Glynn Clements
). E.g. Gtk-2.x uses UTF-8 almost exclusively, although you can force the use of the locale's encoding for filenames (if you have filenames in multiple encodings, you lose; filenames using the wrong encoding simply don't appear in file selectors). -- Glynn Clements [EMAIL PROTECTED

Re: [Haskell-cafe] invalid character encoding

2005-03-17 Thread Glynn Clements
) as Esperanto for computers. Both use the same approach to try to solve essentially the same problem. And both will be about as successful in the long run. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] invalid character encoding

2005-03-17 Thread Glynn Clements
EUC-JP and Shift-JIS filenames (occasionally wrapped in ISO-2022, but usually raw). -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] invalid character encoding

2005-03-18 Thread Glynn Clements
string, and the encoding needs to be reversible. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] invalid character encoding

2005-03-18 Thread Glynn Clements
strings with associated encodings are probably still the most common of all. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] invalid character encoding

2005-03-19 Thread Glynn Clements
), there are multiple plausible equivalent representations in practice. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] invalid character encoding

2005-03-19 Thread Glynn Clements
which works well enough; they don't *need* UTF-8, and aren't going to rebuild their IT infrastructure from scratch for the sake of it. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] invalid character encoding

2005-03-19 Thread Glynn Clements
, you'd expect the CJK world to be the first adopters, but they're actually the least eager; you are more likely to find UTF-8 in an English-language HTML page or email message than a Japanese one. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing

Re: [Haskell-cafe] invalid character encoding

2005-03-21 Thread Glynn Clements
issues are only problems because the conversions are being done at all. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Specify array or list size?

2005-05-08 Thread Glynn Clements
use T x[] or T x[N] as an alternative syntax for T *x; x is still a pointer, regardless of the syntax used. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Compiling with NHC98

2005-05-08 Thread Glynn Clements
$ # how to build the prng program prng: RC4.o prng.o $(HC) -o $@ $+ # note that prng.o depends upon RC4.hi prng.o: RC4.hi -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] New to Haskell, suggestions on code

2005-06-28 Thread Glynn Clements
of Show, and Haskell can automatically derive Show instances for user defined types, provided that all of the constituent types are instances of Show. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] matrix computations based on the GSL

2005-07-09 Thread Glynn Clements
] = [x y z 1] h' [x y z w] = [x/w y/w z/w] then \v - h'(h(v).M) is a translation, but M isn't itself a translation. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Interaction in Haskell

2005-07-11 Thread Glynn Clements
of M-x shell). -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Newbie question

2005-08-12 Thread Glynn Clements
. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haskell versus Lisp

2005-09-16 Thread Glynn Clements
. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell] Re: [Haskell-cafe] Haskell versus Lisp

2005-09-20 Thread Glynn Clements
, being able to do so locally. Probably the most useful consequence is the ability to create new control constructs without being constrained by the existing syntax and semantics (and without having to write your own monadic versions of existing functions). -- Glynn Clements [EMAIL PROTECTED

Re: [Haskell-cafe] Trapped by the Monads

2005-09-20 Thread Glynn Clements
only exist when they are meaningful. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell] Re: [Haskell-cafe] Haskell versus Lisp

2005-09-21 Thread Glynn Clements
just write a Lisp interpreter. As for convenience: syntax matters. The equivalence of code and data in Lisp lets you write your own syntactic sugar. You're still bound by the lexical (token-level) grammar, although reader macros mean that isn't much of a restriction. -- Glynn Clements [EMAIL

Re: [Haskell-cafe] newbe question

2005-09-27 Thread Glynn Clements
will always produce the same sequence of tokens regardless of what definitions exist. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Converting [Word8] to String

2005-10-04 Thread Glynn Clements
) For anything else, you will have to either to write a decoder (or use someone else's; several exist for UTF-8), or interface to iconv() using the FFI. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Records (was Re: [Haskell] Improvements to GHC)

2005-11-18 Thread Glynn Clements
). It doesn't exist on a UK keyboard (where Shift-4 is the dollar sign). In any case, using non-ASCII characters gives rise to encoding issues (e.g. you have to be able to edit UTF-8 files). -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX

2005-12-11 Thread Glynn Clements
-editing and CR-LF translation (i.e. pressing the Enter/Return key will result in CR, not LF). Remember to set it back before exiting. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Functions with side-effects?

2005-12-23 Thread Glynn Clements
) applies it to the World value representing the state of the universe at program start, and updates the universe to match the World value returned from main at program end. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Haskell vs OCaml

2005-12-25 Thread Glynn Clements
Branimir Maksimovic wrote: Could you give an example of a loop you find awkward in Haskell? Well I want simple loop for(int i =0;i10;++i)doSomething(i); mapM_ doSomething [0..9] -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe

Re: [Haskell-cafe] Bug in Haskell for C programmers tutorial?

2006-01-01 Thread Glynn Clements
buffering altogether, as disabling buffering will result in putStr etc calling write() once per character, which is very inefficient. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Bug in Haskell for C programmers tutorial?

2006-01-02 Thread Glynn Clements
for terminals, block buffering otherwise, stderr is always unbuffered), even though C's puts(), printf() etc behave a lot better with unbuffered streams (they pass either whole strings or large chunks to write() rather than individual characters). -- Glynn Clements [EMAIL PROTECTED

Re: [Haskell-cafe] How to print a string (lazily)

2006-01-03 Thread Glynn Clements
a function, just a value. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Problems with IO

2002-09-24 Thread Glynn Clements
/ Further Information: http://www.haskell.org/bookshelf/ -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: can't find sequence?

2002-10-29 Thread Glynn Clements
package. The constructor itself is called Identity, so you shouldn't need to change anything other than the import statement. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: someone help me

2002-11-30 Thread Glynn Clements
k4 - give let k = (k1, k2, k3, k4) Or: main = do [k1, k2, k3, k4] - sequence $ replicate 4 give let k = (k1, k2, k3, k4) -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http

Re: Editor Tab Expansion

2002-12-06 Thread Glynn Clements
. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: AW: Editor Tab Expansion

2002-12-09 Thread Glynn Clements
. This is the same interpretation as everything else uses (except where explicitly reconfigured to behave otherwise). I've never encountered anything that treated a tab as 8 spaces regardless of column, or which defaults to any value other than 8. -- Glynn Clements [EMAIL PROTECTED

Re: Lazy streams and unsafeInterleaveIO

2002-12-23 Thread Glynn Clements
are the lack of control over ordering (e.g. you can't delete the file until a stream has been closed, but you may not be able to control how long the stream remains open), and the inability to handle exceptions (the actual exception won't occur until after e.g. getContents has returned). -- Glynn

Re: Lazy streams and unsafeInterleaveIO

2002-12-25 Thread Glynn Clements
. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Global variables?

2003-01-30 Thread Glynn Clements
global variable of the same type. If you enable optimisation, common subexpression elimination may result in both names referring to the same IORef. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org

Re: how to open a file descriptor

2003-02-01 Thread Glynn Clements
what I want, but it doesn't seem to be exported. :( Any ideas? GHC has an interface to the POSIX I/O API (i.e. descriptors) in System.Posix.IO. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org

Re: Explicit function call

2003-03-12 Thread Glynn Clements
need to change myFunc's type to: myFunc :: a - IO [b] then use: do a - myFunc ... -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: FFI Help

2003-06-04 Thread Glynn Clements
) { return signgam; } and import that. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: FFI Help

2003-06-05 Thread Glynn Clements
. */ # define errno (*__errno_location ()) # endif [where __errno_location() returns a thread-specific location via pthread_getspecific().] OTOH, a C wrapper will cope with whatever contortions the libc developers decide to use. -- Glynn Clements [EMAIL PROTECTED

Re: Using an accumulator, iterating...

2003-06-20 Thread Glynn Clements
also need a base case: pyindex' _ _ [] = Nothing -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: IO system

2003-06-21 Thread Glynn Clements
as the program's semantics are preserved, but I/O operations must be performed as and when specified. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: lazy Printing question

2003-07-25 Thread Glynn Clements
it recieves it? If you put an ampersand () after the command, Emacs will run it in the background. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: haskell newbie seeking for advice

2003-08-14 Thread Glynn Clements
for Java stuff. what do haskellers use? my initial thought was using a plain Makefile with ghc, but there is also hmake and maybe other tools i am missing. what would you use? [2] There's also ghc --make. -- Glynn Clements [EMAIL PROTECTED

Re: Editor in Linux for Hint/Helium

2003-08-14 Thread Glynn Clements
into an existing XEmacs process, i.e. gnuclient +20 foo.txt Emacs requires the server-start command (e.g. in ~/.emacs) before emacsclient can connect; similarly XEmacs requires gnuserv-start. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe

Re: An IO Question from a Newbie

2003-09-12 Thread Glynn Clements
? Thanks. Yes; if you don't want a newline after the prompt, you need to use: hFlush stdout to flush the stream. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: An IO Question from a Newbie

2003-09-14 Thread Glynn Clements
while setting it to line-buffered or fully-buffered enables it). -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Read and Write to Same File

2003-10-05 Thread Glynn Clements
over the other. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: hSetBuffering stdin NoBuffering messes up terminal

2003-10-14 Thread Glynn Clements
individual key codes without waiting for the user to hit Return), and hSetBuffering didn't change the terminal settings, you would have to do it yourself anyhow, leading to the same issues. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing

RE: hSetBuffering stdin NoBuffering messes up terminal

2003-10-21 Thread Glynn Clements
) may change them while the program is suspended, so they should probably be refreshed upon SIGCONT. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: Type checking/inference

2003-12-28 Thread Glynn Clements
, and functions aren't instances of Show, so it can't print the result. Maybe you didn't mean (map (foldr filter))? The argument to map is usually a function of one argument (i.e. a function whose result *isn't* a function). What are you ultimately trying to achieve? -- Glynn Clements [EMAIL

Re: Module creation

2004-01-01 Thread Glynn Clements
into the hugs/ghci interpreter, just expressions; definitions have to be loaded from a file. [Actually, ghci is slightly more liberal; it also allows let forms (e.g. let foo = ...) and IO actions (e.g. foo - getLine).] -- Glynn Clements [EMAIL PROTECTED

Re: Limiting resources on a per-function basis?

2004-01-02 Thread Glynn Clements
the resource consumption. In a lazy language, you have to think about what evaluation really means. Ultimately, I suspect that the inability to produce a sensible definition would render any implementation issues moot. -- Glynn Clements [EMAIL PROTECTED

Re: [Haskell-cafe] Interpreting fields in a buffer

2004-01-26 Thread Glynn Clements
order. 2. If you want to read certain IP options (e.g. record route), you need to read unaligned words. It would be simpler to just read bytes, and piece them together yourself. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL

Re: [Haskell-cafe] Outstanding context : (Num b, Random b)

2004-02-26 Thread Glynn Clements
an explicit type signature to one of the literals will eliminate the error, e.g.: m1 = do b - getStdRandom (randomR (1,10 :: Int)) print b -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http

Re: [Haskell-cafe] GHC and libc

2004-05-16 Thread Glynn Clements
it is : *highly* recommended *not* to use --enable-static-nss since this makes : the behaviour of the programs on the system inconsistent. IOW, you will probably have to build glibc yourself if you want to be able to create binaries which don't require any shared libraries. -- Glynn Clements [EMAIL

Re: [Haskell-cafe] Type conversion problems

2004-06-13 Thread Glynn Clements
for intermediate results, so it might be better to force the return type to e.g. Double. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Type conversion problems

2004-06-13 Thread Glynn Clements
be defined as returning a non-integral result without using an explicit (and conceptually incorrect) type conversion. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Inferred type is not general enough

2004-07-08 Thread Glynn Clements
type TestLocation. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] file upload with Network.CGI

2004-08-26 Thread Glynn Clements
a high-level interface (which typically isn't as useful as the author assumes), then only export the high-level interface. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Writing binary files?

2004-09-11 Thread Glynn Clements
= fromIntegral . ord octetToChar :: Word8 - Char octetToChar = chr . fromIntegral -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Writing binary files?

2004-09-11 Thread Glynn Clements
-- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Writing binary files?

2004-09-12 Thread Glynn Clements
$ length ws hGetBytes :: Handle - Int - IO [Word8] hGetBytes h c = allocaArray c $ \p - do c' - hGetBuf h p c peekArray c' p The problem with this approach is that the entire array has to be held in memory, which could be an issue if the amount of data involved is large. -- Glynn

Re: [Haskell-cafe] Writing binary files?

2004-09-12 Thread Glynn Clements
choice if your Haskell implementation doesn't have h{Get,Put}Buf). The problems would come if it was decided to change the existing behaviour, i.e. use something other than Latin1. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL

Re: [Haskell-cafe] Writing binary files?

2004-09-12 Thread Glynn Clements
), and write out the results. OTOH, if you assume UTF-8 (e.g. because that happens to be the locale's encoding), the decoder is likely to abort shortly after the first non-ASCII character it finds (either that, or it will just silently drop characters). -- Glynn Clements [EMAIL PROTECTED

Re: [Haskell-cafe] Writing binary files?

2004-09-12 Thread Glynn Clements
set it back to ISO-8859-1 to get reasonable worst-case behaviour. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Writing binary files?

2004-09-13 Thread Glynn Clements
. But this isn't some obscure third-party libray. This is the Haskell98 standard library; some of it's in the Prelude. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Writing binary files?

2004-09-14 Thread Glynn Clements
. Everything else is synthesised. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Writing binary files?

2004-09-15 Thread Glynn Clements
everything which has gone before to the scrap heap, and without everyone having to wait a couple of decades to (reliably) do simple things like copying a file to a socket or enumerating a directory. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe

Re: [Haskell-cafe] Writing binary files?

2004-09-15 Thread Glynn Clements
will have to live with some of the mistakes of the past, i.e. using String in the I/O functions. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Writing binary files?

2004-09-15 Thread Glynn Clements
. Getting in the way is not letting you do something yourself. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Writing binary files?

2004-09-15 Thread Glynn Clements
the hand we've been dealt. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] FilePath handling [Was: Writing binary files?]

2004-09-15 Thread Glynn Clements
is a pure FilePath - FilePath function.] if the last component in the path is a symlink. If you want to make FilePath an instance of Eq, the situation gets much more complicated. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL

Re: [Haskell-cafe] Unicoded filenames

2004-09-15 Thread Glynn Clements
suggests that it might be.] IOW, this incident seems to oppose, rather than support, the filenames-as-characters viewpoint. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Re: Writing binary files?

2004-09-16 Thread Glynn Clements
of (and goes into) most core library functions is the latter. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Writing binary files?

2004-09-16 Thread Glynn Clements
like. My I/O design doesn't force UTF-8, it works with ISO-8859-x as well. But I was specifically addressing Unicode versus multiple encodings internally. The size of the Unicode alphabet effectively prohibits using codepoints as indices. -- Glynn Clements [EMAIL PROTECTED

Re: [Haskell-cafe] Re: Writing binary files?

2004-09-16 Thread Glynn Clements
. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

RE: [Haskell-cafe] Re: Writing binary files?

2004-09-16 Thread Glynn Clements
, argv, the environment etc. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Writing binary files?

2004-09-16 Thread Glynn Clements
suddenly becoming unreliable if the hardwired default ISO-8859-1 conversion is changed. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

RE: [Haskell-cafe] Re: Writing binary files?

2004-09-16 Thread Glynn Clements
, the iconv interface doesn't allow the encoder state to be extracted, so a generic iconv-based converter would have to be in the IO monad. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo

RE: [Haskell-cafe] Re: Writing binary files?

2004-09-16 Thread Glynn Clements
(argv[i], ...) works. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Writing binary files?

2004-09-16 Thread Glynn Clements
correctly if it can't decode it (it has to index into the font). But that isn't a reason to reject it altogether. E.g. if I create a file whose name contains control characters, most GUI programs display it incorrectly in the file selection dialog, but they still manage to open it. -- Glynn Clements

RE: [Haskell-cafe] Re: Writing binary files?

2004-09-16 Thread Glynn Clements
and body, switching between them as you read the stream. You wouldn't want to have to accumulate the entire body as a single byte string just so that you could decode it in one go, and you can't just push a decoder onto the stream. -- Glynn Clements [EMAIL PROTECTED

RE: [Haskell-cafe] Re: Writing binary files?

2004-09-17 Thread Glynn Clements
! Are you sure that will work in the general case? Or are you assuming lazy I/O? -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Writing binary files?

2004-09-17 Thread Glynn Clements
never deal with characters, yet you keep insinuating that is my argument, then proceed to attack it. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] What Functions are Standard?

2004-10-05 Thread Glynn Clements
could I have known for myself that those particular ghc functions were unsupported elsewhere? The Haskell98 report can be found at: http://www.haskell.org/onlinereport/ Anything which isn't listed there is essentially a vendor extension. -- Glynn Clements [EMAIL PROTECTED

Re: [Haskell-cafe] Re: What Functions are Standard?

2004-10-06 Thread Glynn Clements
as theoretically) impossible to perform binary I/O using the Haskell98 API, even on Unix. This issue has been beaten to death fairly recently, so I'm not going to repeat it here. See the thread entitled Writing binary files from Sep 11-18 for the details. -- Glynn Clements [EMAIL PROTECTED

RE: [Haskell-cafe] Are handles garbage-collected?

2004-10-24 Thread Glynn Clements
the process which closes it. If it refers to the write end of a pipe or socket, closing it may cause the reader to receive EOF; if it refers to a file, any locks will be released; and so on. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: exitFailure under forkProcess

2004-10-27 Thread Glynn Clements
John Goerzen wrote: Oh also, I would very much appreciate Haskell interfaces to realpath() and readlink(). I don't know about realpath() (which is a BSD-ism, and included in GNU libc, but I'm not sure about other Unices), but readlink() exists as System.Posix.readSymbolicLink. -- Glynn

RE: [Haskell-cafe] Re: exitFailure under forkProcess

2004-10-27 Thread Glynn Clements
in more involved programs, etc. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Set of reals...?

2004-10-27 Thread Glynn Clements
intermediate values were included, the resulting list would be massive. Single precision floating-point uses a 24-bit mantissa, so an exhaustive iteration of the range [0.5..1.0] would have 2^24+1 elements. -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe

Re: [Haskell-cafe] Re: exitFailure under forkProcess

2004-10-27 Thread Glynn Clements
to fwrite() may simply result in data being appended to the buffer; it doesn't guarantee a call to write(). -- Glynn Clements [EMAIL PROTECTED] ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

  1   2   >