Simon Marlow [EMAIL PROTECTED] writes:
I think the reason we set O_NONBLOCK is so that we don't have to test
with select() before reading, we can just call read(). If you don't
use O_NONBLOCK, you need two system calls to read/write instead of
one. This probably isn't a big deal, given that
Simon Marlow [EMAIL PROTECTED] writes:
I agree that a generic select/poll interface would be nice.
We must be aware that epoll (and I think kqueue too) registers event
sources in advance, separately from waiting, which is its primary
advantage over poll.
The interface should use this model
Brian Hulley [EMAIL PROTECTED] writes:
My final suggestion if anyone is interested is as follows:
1) Use : for types
2) Use , instead of ; in the block syntax so that all brace blocks
can be replaced by layout if desired (including record blocks)
3) Use ; for list cons. ; is already used
Bulat Ziganshin [EMAIL PROTECTED] writes:
i reported only the speed of the buffering transformers. this don't
include speed of char encoding that should be very low at this time.
Recoding will be slow if it's done on top of buffering and if encoding
itself has heavy startup. Buffering should
Bulat Ziganshin [EMAIL PROTECTED] writes:
MQK It should be possible to use iconv for recoding. Iconv works on
MQK blocks and it should not be applied to one character at a time.
recoding don't need any startup.
Calling iconv (or other similar routine) does need startup. And you
really don't
Bulat Ziganshin [EMAIL PROTECTED] writes:
recoding don't need any startup. each vGetChar or vPutChar
just executes one or more vGetByte/vPutByte calls, according to
encoding rules. this should be fast enough
Hmm, your interface for the encoder (String - [Word8]) doesn't
support stateful
Gracjan Polak [EMAIL PROTECTED] writes:
intern :: Ord a = a - a
intern x = unsafePerformIO $ internIO x
iorefset :: Ord a = IORef(Map.Map a a)
iorefset = unsafePerformIO $ do
newIORef $ Map.empty
It will not work because you can't put values of different types as
keys of the same
Antti-Juhani Kaijanaho [EMAIL PROTECTED] writes:
As far as I know, the last programming language that included
arrays' sizes in their types was Standard Pascal,
There have been many such languages since Standard Pascal. For
example C, C++, C#, Java, Ada, VHDL, and NU-Prolog.
C, C++ and
Sebastian Sylvan [EMAIL PROTECTED] writes:
A list is, for me, more of a logical entity (as opposed to
structural). It's a sequence of stuff not a particular way to
store it (singly-linked, doubly-linked, arraylists etc.).
I call it sequence.
A list is usually a concrete type in a given
Daniel Carrera [EMAIL PROTECTED] writes:
$ nhc98 prng.hs -o prng
I/O error (user-defined), call to function `userError':
In file ./RC4.hi:
1:1-1:6 Found _module_ but expected a interface
GHC and NHC confuse each other with prng.hi files they produce and
examine, in incompatible formats.
Thomas Davie [EMAIL PROTECTED] writes:
I'm not familiar with your C++ example (not being familiar with C++),
but I think that it's a bit of a stretch of the imagination to say
that C introduces a variable of type array of 50 ints, the fact
that this is now an array of 50 integers is never
David Roundy [EMAIL PROTECTED] writes:
No, int (*p)[50] is a multidimensional array, one of the most useless
concepts in C, and is equivalent to int p[50][] (or is it p[][50]...
I always get my matrix subscripts messed up).
No, it's not equivalent to either. Array type are not the same as
Hamilton Richards [EMAIL PROTECTED] writes:
That's not the case in C, C++, Java, or Ada. In C and C++, for
example, given two arrays
int X[50];
int Y[100];
and a function declared as
void P( int a[] )
then these calls
P( X )
P( Y )
are both valid,
Donn Cave [EMAIL PROTECTED] writes:
I have been able to build ocaml everywhere I have wanted it, including
the native code compiler.
And it builds itself much faster than GHC.
(I couldn't measure how much, because GHC didn't build at all, failing
to find HsBaseConfig.h.in.)
--
__(
John Goerzen [EMAIL PROTECTED] writes:
I'd say that there are probably no features OCaml has that Haskell
lacks that are worth mentioning.
Its type system has some interesting features: polymorphic variants,
parametric modules, labeled and optional arguments, objects, variance
annotations of
Michael Vanier [EMAIL PROTECTED] writes:
I also learned ocaml before learning haskell, and the biggest single
difference I found is that haskell is a lazy, purely functional language
and ocaml is a strict, mostly functional language.
Indeed.
In contrast to this one, my differences were not
Arjun Guha [EMAIL PROTECTED] writes:
data (Eq v) = EqList v = EqList [v]
I'd like to make it an instance of Functor. However, fmap takes an
arbitrary function of type a - b. I need an Eq constraint on a and
b. Is there any way to do this without creating my own `EqFunctor'
class with
Wolfgang Thaller [EMAIL PROTECTED] writes:
Also, IIRC, Java strings are supposed to be unicode, too -
how do they deal with the problem?
Java (Sun)
--
Filenames are assumed to be in the locale encoding.
a) Interpreting. Bytes which cannot be converted are replaced by U+FFFD.
b)
Glynn Clements [EMAIL PROTECTED] writes:
If you provide wrapper functions which take String arguments,
either they should have an encoding argument or the encoding should
be a mutable per-terminal setting.
There is already a mutable setting. It's called locale.
It isn't a per-terminal
Glynn Clements [EMAIL PROTECTED] writes:
The (non-wchar) curses API functions take byte strings (char*),
so the Haskell bindings should take CString or [Word8] arguments.
Programmers will not want to use such interface. When they want to
display a string, it will be in Haskell String type.
Glynn Clements [EMAIL PROTECTED] writes:
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).
Duncan Coutts [EMAIL PROTECTED] writes:
It doesn't affect functions added by the hierarchical libraries,
i.e. those functions are safe only with the ASCII subset. (There is
a vague plan to make Foreign.C.String conform to the FFI spec,
which mandates locale-based encoding, and thus would
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 in C comes in two flavors: the traditional
John Meacham [EMAIL PROTECTED] writes:
In any case, we need tools to be able to conform to the common cases
of ascii-only (withCAStrirg) and current locale (withCString).
withUTF8String would be a nice addition, but is much less important to
come standard as it can easily be written by end
Wolfgang Thaller [EMAIL PROTECTED] writes:
Indeed, my brain is melting, but I did it :-)
Congratulations. How about we found a Bound-thread-induced brain
melt victims' support group?
The melt was entertaining :-)
Besides simplicity, one of the main reasons for moving our select()
call
Simon Marlow [EMAIL PROTECTED] writes:
I've now implemented a threaded runtime in my language Kogut, based
on the design of Haskell. The main thread is bound. The thread which
holds the capability performs I/O multiplexing itself, without a
separate service thread.
We found that doing this
Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes:
Why is the main thread bound?
I can answer myself: if the main thread is unbound, the end of the
program can be reached in a different OS thread, which may be a
problem if we want to return cleanly to the calling code.
I've now implemented
Benjamin Franksen [EMAIL PROTECTED] writes:
Producer/consumer ping-pong is 15 times slower between threads
running on different OS threads than on two unbound threads.
Which OS?
Linux/NPTL.
A context switch which changes OS threads involves:
setitimer
pthread_sigmask
Simon Marlow [EMAIL PROTECTED] writes:
Is it important which thread executes Haskell code (I bet no) and
unsafe foreign calls (I don't know)? If not, couldn't the same OS
thread execute code of both threads until a safe foreign call is made?
Actually in a bound thread, *all* foreign calls
Wolfgang Thaller [EMAIL PROTECTED] writes:
Since the main thread is bound, and unbound threads are never executed
on an OS thread which has some Haskell thread bound, this would imply
that when the main thread spawns a Haskell thread and they synchronize
a lot with each other using MVars, the
I'm trying to understand the semantics and implementation of bound threads
basing on the conc-ffi paper and others.
Since the main thread is bound, and unbound threads are never executed
on an OS thread which has some Haskell thread bound, this would imply
that when the main thread spawns a
Josef Svenningsson [EMAIL PROTECTED] writes:
You claimed that monad transformers break the
mzero-is-right-identity-for-bind law because they can be applied to
IO. I say, it's not the monad transformers fault. They cannot possibly
be expected to repair the law if they are given a faulty monad.
Ketil Malde [EMAIL PROTECTED] writes:
The Haskell functions accept or return Strings but interface to OS
functions which (at least on Unix) deal with arrays of bytes (char*),
and the encoding issues are essentially ignored. If you pass strings
containing anything other than ISO-8859-1, you
Graham Klyne [EMAIL PROTECTED] writes:
How can it make sense to have a BOM in UTF-8? UTF-8 is a sequence of
octets (bytes); what ordering is there here that can sensibly be
varied?
The *name* BOM doesn't make sense when applied to UTF-8, but some
software uses UTF-8 encoded U+FEFF it as a
Peter Simons [EMAIL PROTECTED] writes:
http://cryp.to/pathspec/PathSpec.hs
There also is a function which changes a path specification
into its canonic form, meaning that all redundant segments
are stripped.
It's incorrect: canon (read x/y/.. :: RelPath Posix) gives x,
yet on Unix they
Stefan Monnier [EMAIL PROTECTED] writes:
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 true, it is qualified
Glynn Clements [EMAIL PROTECTED] writes:
Then of course there's the issue that Win32 edge
labels are Unicode, while Posix edge labels are [Word8]. Hmm.
Strictly speaking, they're [CChar], but I doubt that anyone will ever
implement Haskell on a platform where a byte isn't 8 bits wide.
On
David Roundy [EMAIL PROTECTED] writes:
No, it's not Unix-specific, it's portable. If you want to write
portable C code, you have to use the standard library, which means
that file names are represented as Ptr CChar.
I disagree. We are talking about portable Haskell, not portable C.
The
Glynn Clements [EMAIL PROTECTED] writes:
And it isn't a theoretical issue. E.g. in an environment where EUC-JP
is used, filenames may begin with ESC$)B (designate JISX0208 to G1),
or they may not (because G1 is assumed to contain JISX0208 initally).
I think such encodings are never used as
Aaron Denney [EMAIL PROTECTED] writes:
Better yet would be to have the standard never allow the BOM.
If I could decide, I would ban the BOM in UTF-8 altogetger, but I'm
afraid the Unicode Consortium doesn't want to do this.
Miscosoft Notepad puts a BOM in UTF-8 encoded files.
--
__(
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).
John Goerzen [EMAIL PROTECTED] writes:
I'm looking for libraries / interfaces to these systems from Haskell:
LDAP
ncurses
zlib (the one in darcs doesn't suit my needs)
bz2lib
I once wrapped ncurses (incomplete), zlib and bz2lib.
http://sourceforge.net/projects/qforeign/
It's quite old
Robert Dockins [EMAIL PROTECTED] writes:
More than you would think, if you follow the conventions of modern
unix shells. eg, foo/.. is always equal to .,
For the OS it's not the same if foo is a non-local symlink.
Shells tend to resolve symlinks themselves on cd, and cd .. means
to remove the
John Meacham [EMAIL PROTECTED] writes:
too bad we can't do things like
#if exists(module System.Path)
import System.Path
#else
...
#endif
I still find it perplexing that there isn't a decent standard haskell
preprocessor
For my language Kogut I designed a syntax
ifDefined
Ashley Yakeley [EMAIL PROTECTED] writes:
But only some instances (such as []) satisfy this:
(mplus a b) = c = mplus (a = c) (b = c)
Other instances (IO, Maybe) satisfy this:
mplus (return a) b = return a
I think mplus should be separated into two functions.
This would prevent using
Aaron Denney [EMAIL PROTECTED] writes:
What about splitFileExt foo.bar.? (foo, bar.) or (foo.bar., )?
The latter makes more sense to me, as an extension of the first case
you give and splitting foo.tar.gz to (foo.tar, gz).
It's not that obvious: both choices are compatible with these.
The
Peter Simons [EMAIL PROTECTED] writes:
I was wondering: Does this calculation account for leap
years? Does it have to?
C itself leaves unspecified the question whether its time calculations
take leap seconds into account. All other systems I know of ignore
leap seconds: POSIX C, Common Lisp,
Ben Rudiak-Gould [EMAIL PROTECTED] writes:
Yes, this is a problem. In my original proposal InputStream and
OutputStream were types, but I enthusiastically embraced Simon M's
idea of turning them into classes. As you say, it's not without its
disadvantages.
This is my greatest single
Glynn Clements [EMAIL PROTECTED] writes:
They're similar, but not identical. Traditionally, Unix non-blocking
I/O (along with asynchronous I/O, select() and poll()) were designed
for slow streams such as pipes, terminals, sockets etc. Regular
files and block devices are assumed to return the
Glynn Clements [EMAIL PROTECTED] writes:
We do use a thread pool. But you still need as many OS threads as there
are blocked read() calls, unless you have a single thread doing select()
as I described.
How does the select() help? AFAIK, select() on a regular file or block
device will
Keean Schupke [EMAIL PROTECTED] writes:
Surely both requirements can be satisfied if the programs arguments are made
parameters of main:
main :: [String] - IO ()
From info '(libc)Error Messages', about program_invocation_name
and program_invocation_short_name:
*Portability Note:* These
John Meacham [EMAIL PROTECTED] writes:
I was thinking of it as a better implementation of a stream interface
(when available).
I'm not convinced that the stream interface
(http://www.haskell.org/~simonmar/io/System.IO.html) works at all,
i.e. whether it's complete, implementable and
Aaron Denney [EMAIL PROTECTED] writes:
So, I have heard claims that C 99 specifies that a variable v
of type complex t is stored as if declared as t v[2], with
v[0] the real part and v[1] the imaginary part.
I don't have a copy of the spec at hand. Could someone who does verify
this?
This
Pete Chown [EMAIL PROTECTED] writes:
of course, [mmap] can only be done on a limited type of file on some
architectures, so it should be an optimization under the hood rather
than an exposed interface.
In particular, you have to be careful not to run out of address space on
32-bit
Henning Thielemann [EMAIL PROTECTED] writes:
I did some shuffling based on mergesort, that is a list is randomly split
(unzipped) into two lists and the parts are concatenated afterwards. You
must repeat this some times. It even works for infinite lists.
I think it doesn't guarantee equal
Ketil Malde [EMAIL PROTECTED] writes:
It seemed to me, though, that streams are related to channels,
I'm not sure what exactly do you mean by streams (because they are
only being designed), but differences are:
- A stream is either an input stream or an output stream, while a
single channel
Ben Rudiak-Gould [EMAIL PROTECTED] writes:
First of all, I don't think any OS shares file pointers between
processes.
Unix does.
It's because shared files are usually stdin/stdout/stderr (I mean
that they are visible as stdin/stdout/stderr, rather than about their
nature as terminals - they
Ben Rudiak-Gould [EMAIL PROTECTED] writes:
is there *any* way to get, without an exploitable race condition,
two filehandles to the same file which don't share a file pointer?
AFAIK it's not possible if the only thing you know is one of the
descriptors. Of course independent open() calls which
Ben Rudiak-Gould [EMAIL PROTECTED] writes:
http://www.haskell.org/~simonmar/io/System.IO.html
fileRead :: File - FileOffset - Integer - Buffer - IO ()
This is unimplementable safely if the descriptor is read concurrently
by different processes. The current position is shared.
--
__(
Dimitry Golubovsky [EMAIL PROTECTED] writes:
|Sebastien's| Marcin's | Hugs
---+---+--+--
alnum | L* N* | L* N*| L*, M*, N* 1
alpha | L*| L* | L* 1
cntrl | Cc| Cc Zl Zp | Cc
digit | N*| Nd
Ben Rudiak-Gould [EMAIL PROTECTED] writes:
fileRead can be implemented in terms of OS primitives,
Only if they already support reading from a fixed offset (like pread).
I'm not sure if we can rely on something like this being always
available, or whether it should be emulated using lseek which
Aaron Denney [EMAIL PROTECTED] writes:
Does open(/dev/fd/n) or (/proc/self/fd/n) act as dup() or a fresh
open() to underlying file?)
As a dup(), with a side effect of resetting the file pointer to the
beginning.
It would not help anyway: if it's a terminal or pipe, it *has* to act
as a dup()
Jrmy Bobbio [EMAIL PROTECTED] writes:
Once this is agreed, it would be easy to make scripts which generate
C code from UnicodeData.txt tables from Unicode. I think table-driven
predicates and toUpper/toLower should better be implemented in C;
Haskell is not good at static constant tables with
Simon Marlow [EMAIL PROTECTED] writes:
- Do the character class functions (isUpper, isAlpha etc.) work
correctly on the full range of Unicode characters? This is true in
Hugs. It's true with GHC on some systems (basically we were lazy
and used the underlying C library's support
Jorge Adriano Aires [EMAIL PROTECTED] writes:
Naive use of foldl. I tend to think the default foldl should be
strict (ie. replaced by foldl') -- are there important cases where it
needs to be lazy?
Hi,
One simple example would be,
reverse = foldl (flip (:)) []
No, it would work with
Jorge Adriano Aires [EMAIL PROTECTED] writes:
No, it would work with strict foldl too. In fact in the absence
of optimization it would work better (uses less time and space).
The optimization required is inlining and strictness analysis.
Is this also true if your just going to use the first
[EMAIL PROTECTED] writes:
This is what I want. For a given set of vectors, the associated
scalars are unique, otherwise I would have problems with norm.
In the instance Vspace a a the compiler doesn't know that a is
supposed to be a scalar only. It matches vector types (functions) too.
And
Robert Dockins [EMAIL PROTECTED] writes:
So, to be safe, the action of a finalizer must commute with every
other finalizer (they must be central).
What does should mean? There are useful finalizers which don't have
this property. E.g. a finalizer can remove an entry from a weak
dictionary,
Andres Loeh [EMAIL PROTECTED] writes:
The function ($) is the identity function, restricted to functions.
Almost. With the standard definition of
f $ x = f x
it happens that
($) undefined `seq` () = ()
id undefined `seq` () = undefined
--
__( Marcin Kowalczyk
\__/
GoldPython [EMAIL PROTECTED] writes:
In the case of writing something like a text editor where the data
involved is by its very nature mutable, what sort of design paradigm
would you use in a functional language?
This is specific to text editors:
1. Use a traditional mutable data structure,
Keean Schupke [EMAIL PROTECTED] writes:
What happens with this method when the display needs refreshing, does
the current state have to be recomputed every time ...
No. The new state is constructed from bits of old state and the
changed data. Applying a change on average requires logarithmic
Jules Bean [EMAIL PROTECTED] writes:
When writing a compiler, it makes sense to collect errors as by the
writer monad, and not abort anything - producing dummy values instead
(except perhaps some fatal errors when it's inconvenient).
Or you could use the monad:
data Perhaps a = Success a |
Keean Schupke [EMAIL PROTECTED] writes:
I disagee - Allowing unique state is a mistake in my opinion.
I want Haskell to be the operating system - how can I do
this if I cannot create new process contexts.
Why does it matter if you can't compile code for new programs at
runtime, to become a
Ben Rudiak-Gould [EMAIL PROTECTED] writes:
I may be confused, but I don't think it does. It seems like the OP
wants a type like
data Perhaps a = Success a | Failure [Error]
When writing a compiler, it makes sense to collect errors as by the
writer monad, and not abort anything -
[EMAIL PROTECTED] writes:
and use `asTypeOf` result wherever we need to refer to resType.
I don't like being left with only asTypeOf, because when the desired
type has its structure shuffled, it forces to invent a transformation
on unused expressions which yields the given transformation on
George Russell [EMAIL PROTECTED] writes:
Your implementation is probably much simpler than mine because
you don't implement withEmptyDict. I'm really quite keen about
withEmptyDict, because one of the MAJOR conceptual problems I have
with unsafePerformIO global variables is that you only get
Benjamin Franksen [EMAIL PROTECTED] writes:
stdin = makeHandle 0
stdout = makeHandle 1
stderr = makeHandle 2
in absolutely pure Haskell, only the things that manipulate them need
be in the IO monad.
If they were simple wrappers around the integers, you'd be right and I
couldn't
Iavor S. Diatchki [EMAIL PROTECTED] writes:
I find the argument a bit disturbing, as it seems to imply that it
is OK for the compiler to produce code without any context switches
at all
Note that in this case if the main program doesn't explicitly block
on MVars, I/O nor timeout, then
Graham Klyne [EMAIL PROTECTED] writes:
isSubsumedByWith :: TBox c - c - c - Bool
isSubsumedByWith [] c d = isALSubsumedBy c d
isSubsumedByWith _ _ _ = error TBox reasoning not supported for AL
and immediately noticed that I might also write this:
isSubsumedByWith
Benjamin Franksen [EMAIL PROTECTED] writes:
It's worse: Since according to IEEE +0 is not equal to -0, atan2 is not a
function!
Sorry, I meant to write: Since according to IEEE +0 *is* to be regarded as
equal to -0, atan2 is not a function. (Because it gives different values for
argument
Sam Mason [EMAIL PROTECTED] writes:
The best idea I've seen is another one from Microsoft Research.
It's an extension to C that allows the the programmer to use the
type system to specify the lifetime of things.
I'm worried about putting too many thing in types. For example many
people
Remi Turk [EMAIL PROTECTED] writes:
Hm, I'm not sure about the should. Garbage collection is meant
for memory, and anything making that less clear makes people
more likely to depend on incorrect assumptions.
And redefining GC to be a collection of _all_ garbage, instead of
just memory
Tomasz Zielonka [EMAIL PROTECTED] writes:
P.S. Why do so many people (including me) seem to come to Haskell
from Python? It can't be just the indentation, can it? ;)
How many? I don't.
And I don't either.
But indeed I've seen more references to Haskell on Python lists than
on other
Conal Elliott [EMAIL PROTECTED] writes:
I'm puzzled why explicit bracketing is seen as an acceptable solution.
It seems to me that bracketing has the same drawbacks as explicit memory
management, namely that it sometimes retains the resource (e.g., memory
or file descriptor) longer than
Andrew Butterfield [EMAIL PROTECTED] writes:
I though clean was always strict, and that was the major difference
between clean and haskell (that and the fact clean is a proprietry
language)
No - Clean is pure and lazy like Haskell,
But it uses explicit strictness annotations a lot, and
John Goerzen [EMAIL PROTECTED] writes:
1. Can exceptions be used in pure functions (outside of monads?)
For the theoretical background of this, see A Semantics for Imprecise
Exceptions http://citeseer.ist.psu.edu/196569.html.
--
__( Marcin Kowalczyk
\__/ [EMAIL PROTECTED]
John Goerzen [EMAIL PROTECTED] writes:
The OCaml compiler was able to optimize tail-recursive functions such
that they could be compiled using a loop. This would achieve two main
benefits: performance due to not needing to allocate/deallocate stack
frames, and the ability to work on very
John Goerzen [EMAIL PROTECTED] writes:
If I instead wrote:
sum [] = 0
sum (x:xs) = x + sum(xs)
then I have the same problem.
What is the proper way to solve this little problem then?
sum n [] = n
sum n (x:xs) = (sum $! n + x) xs
It's unfortunate that it requires $! or seq, but it's
Glynn Clements [EMAIL PROTECTED] writes:
Ok, but let it be in addition to, not instead treating them as
character strings.
Provided that you know the encoding, nothing stops you converting
them to strings, should you have a need to do so.
There are already APIs which use Strings for
Glynn Clements [EMAIL PROTECTED] writes:
What I'm suggesting in the above is to sidestep the encoding issue
by keeping filenames as byte strings wherever possible.
Ok, but let it be in addition to, not instead treating them as
character strings.
And program-generated email notifications
[EMAIL PROTECTED] writes:
The discussion of i18n i/o highlighted the need for general overlay
streams. We should be able to place a processing layer onto a handle
-- and to peel it off and place another one. The layers can do
character encoding, subranging (limiting the stream to the
Glynn Clements [EMAIL PROTECTED] writes:
But this seems to be assuming a closed world. I.e. the only files
which the program will ever see are those which were created by you,
or by others who are compatible with your conventions.
Yes, unless you set the default encoding to Latin1.
Some
Glynn Clements [EMAIL PROTECTED] writes:
Unless you are the sole user of a system, you have no control over
what filenames may occur on it (and even if you are the sole user,
you may wish to use packages which don't conform to your rules).
For these occasions you may set the encoding to
Glynn Clements [EMAIL PROTECTED] writes:
[Actually, regarding on-screen display, this is also an issue for
Unicode. How many people actually have all of the Unicode glyphs?
I certainly don't.]
If I don't have a particular character in fonts, I will not create
files with it in filenames.
Henning Thielemann [EMAIL PROTECTED] writes:
I even plead for an abstract data type FilePath which supports
operations like 'enter a directory', 'go one level higher' and so
on.
Beware of Common Lisp history:
http://www.gigamonkeys.com/book/practical-a-portable-pathname-library.html
As we
Here is what happens when a language provides only narrow-char API for
filenames:
Start of forwarded message
Date: Wed, 15 Sep 2004 15:18:00 +0100
From: Peter Jolly [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: caml-list [EMAIL PROTECTED]
Subject: Re:
Glynn Clements [EMAIL PROTECTED] writes:
1. API for manipulating byte sequences in I/O (without representing
them in String type).
Note that this needs to include all of the core I/O functions, not
just reading/writing streams. E.g. FilePath is currently an alias for
String, but (on
Sven Panne [EMAIL PROTECTED] writes:
Hmmm, the Unicode tables start with ISO-Latin-1, so what would exactly break
when we stipulate that the standard encoding for string I/O in Haskell is
ISO-Latin-1? Additional encodings could be specified e.g. via a new open
variant.
That the encoding of
Glynn Clements [EMAIL PROTECTED] writes:
But the default encoding should
come from the locale instead of being ISO-8859-1.
The problem with that is that, if the locale's encoding is UTF-8, a
lot of stuff is going to break (i.e. anything in ISO-8859-* which
isn't limited to the 7-bit ASCII
W licie z wto, 03-08-2004, godz. 13:05 +0200, Bjoern Knafla napisa:
Herb Sutter gave these rules :
An error is any failure that prevents a function from succeeding. Three
main kind of errors:
[...]
These kinds don't explain much. They don't give a clue which errors
to report by exceptions
1 - 100 of 153 matches
Mail list logo