On 08-Feb-2001, John Meacham <[EMAIL PROTECTED]> wrote:
> A nice advantage of using my mid-level routines is that there are very
> little requirements placed on 'Byte' as a type, this means that as long
> as to the outside world you only read in 8 bit values and spit 8 bit
> values out you can rep
Since there seems to be general support for the idea of some sort of
Portable Byte IO package, I will work on am implementation of my
proposal for ghc being the platform I am most familiar with. I really
like the simplicity of the hPut and hGet idea and will probably use it
as my mechanism for imp
esday, February 06, 2001 6:25 AM
Subject: Re: binary files in haskell
> Johannes Waldmann wrote:
>
> | Should this also apply to names in the standard
> | library? like Monad (filterM, zipWithM ,..) I mean,
> | theoretically yes, but is it feasible to change it?
>
&g
Johannes Waldmann wrote:
| Should this also apply to names in the standard
| library? like Monad (filterM, zipWithM ,..) I mean,
| theoretically yes, but is it feasible to change it?
Obviously, these functions should have been called:
Monad.filter, Monad.zipWith
The lazy programmer can t
On Tue, 6 Feb 2001, Stefan Karrmann wrote:
> > type Byte = Word8
>
> I would prefer
>
> type Octet = Word8
>
> to emphasise that the functions really uses 8 bits.
I would define Byte as something different on an architecture where the
basic file unit is not 8 bits. It's like char in C.
--
M
Marcin 'Qrczak' Kowalczyk schrieb folgendes am Tue, Feb 06, 2001 at 12:54:29PM +0100:
> On Tue, 6 Feb 2001, Olaf Chitil wrote:
>
> > I just see one problem with John's proposal: the type Byte.
>
> type Byte = Word8
I would prefer
type Octet = Word8
to emphasise that the functions really uses
> Style Warning! ... writeByte -> Byte.write
Yes yes yes please!
Often, if someone writes identifiersWithSuffix,
the suffix actually carries a type information or a module information,
and the programmer should use the type resp. module system
of the language to express that.
Should this also a
Marcin 'Qrczak' Kowalczyk wrote:
| IMHO it looks nicer to have Byte in function names, so
| there can be such type synonym too.
Style Warning!
Why do many people when designing libraries not make full
use of the Haskell module system? Instead of
writeByte
readByte
(or so), one could als
Marcin 'Qrczak' Kowalczyk wrote:
> type Byte = Word8
>
> IMHO it looks nicer to have Byte in function names, so there can be such
> type synonym too.
I agree that Byte is nicer than Word8.
So why is this type synonym not in the library Word of the FFI?
I think that is the right place for it.
-
On Tue, 6 Feb 2001, Olaf Chitil wrote:
> I just see one problem with John's proposal: the type Byte.
type Byte = Word8
IMHO it looks nicer to have Byte in function names, so there can be such
type synonym too.
I would call the module ByteIO or BinaryIO instead of cryptic BIO.
--
Marcin 'Qrcz
Simon Marlow wrote:
> > http://www.ugcs.caltech.edu/~john/computer/haskell/
>
> How about this slightly more general interface, which works with the new
> FFI libraries, and is trivial to implement on top of the primitives in
> GHC's IOExts:
>
> hPut :: Storable a => Handle -> a -> IO (
> There is actually NO way with haskell 98 to portably read and write
> binary files. and many libraries which provide this feature are
> inherently non portable, (they assume a Haskell Char = C char = byte)
> which is not necisarily the case. I wrote up a proposal for a binary
> file IO mechanism
There is actually NO way with haskell 98 to portably read and write
binary files. and many libraries which provide this feature are
inherently non portable, (they assume a Haskell Char = C char = byte)
which is not necisarily the case. I wrote up a proposal for a binary
file IO mechanism to be add
Sven Panne <[EMAIL PROTECTED]> said:
>[ Seems I *can't* mail in a sane way anymore, so please excuse my last
> half-baked one. But at least I've learned now that Ctrl-RET means
> "send immediately" in Netscape. Great idea! Here my next try... ]
>
>Timmy Douglas wrote:
>> I was wondering if anyon
[ Seems I *can't* mail in a sane way anymore, so please excuse my last
half-baked one. But at least I've learned now that Ctrl-RET means
"send immediately" in Netscape. Great idea! Here my next try... ]
Timmy Douglas wrote:
> I was wondering if anyone here has a solution for writing binary fi
[ OK, let's see if I get a typo-free mail out of the door *this* time... :-]
Timmy Douglas wrote:
> I was wondering if anyone here has a solution for writing binary files
> that works in hugs and ghc that doesn't require getting libs.
I dont' know exactly about the current status of Hugs' libs,
> Malcolm> In fact, Binary allows you to process the data directly
> Malcolm> from the disk rather than hauling it all into memory.
> Malcolm> This eliminates start-up time altogether. What's more,
> Malcolm> provided the file is used read-only, you can use pure
> Malcolm> laz
> "Malcolm" == Malcolm Wallace <[EMAIL PROTECTED]> writes:
Malcolm> In fact, Binary allows you to process the data directly
Malcolm> from the disk rather than hauling it all into memory.
Malcolm> This eliminates start-up time altogether. What's more,
Malcolm> provided the fil
> "Steve" == Steve Roggenkamp <[EMAIL PROTECTED]> writes:
Steve> I currently working on a database which consists mainly of
Steve> integers. I have to search large arrays of these integers
Steve> which may contain over a hundred million entries. With
Steve> this amount of da
> If the representation is simple enough, you might consider accessing
> the database via C ...
>
> Of course, Binary or Native would be easier, but the start-up time
> for a large database might be a problem.
In fact, Binary allows you to process the data directly from the disk
rather than haul
Alex Ferguson wrote:
>
> Tony Davie:
> > And anyway didn't this start out about how to do I/O on binary data.
>
> To be honest, I'm not sure this discussion does necessarily address
> the original query:
>
> Steve Roggenkamp:
> > I would like to use Haskell for several larger scale projects, bu
Alex Ferguson and (earlier) Yoshihiko Ichikawa ask for clarification of
the intent of the discussion on binary I/O.
It might help if I outline the capabilities of the Binary library
(currently available only for nhc13, but as Simon PJ notes, if you want
it in ghc/hugs, ask him).
> 1. Reading a
> Real world example: development tools process a large geometric data set to
> build a run-time optimized BSP tree with precalculated lighting and
> collision information. The user application will not modify this data, but
> it will have to load it dynamically without slowing down a 30Hz
> gra
At 07:52 PM 3/10/98 GMT, Alex Ferguson wrote:
>Steve Roggenkamp:
>> I would like to use Haskell for several larger scale projects, but I
>> can't figure out how to read and write binary data.
>
>Steve, can you clarify what sort of binary file manipulation it is you
>are actually looking for,...
I
On Wed, 25 Feb 1998, Jerzy Karczmarczuk wrote:
: PS. Could somebody inform me what is the current status of
: multi-parametric classes? Concretely (for example) I would
: like to construct a generic Universal Parser
:
: type Uparser a c = [c] -> [(a,[c])]
:
: which consumes any stream and prod
Tim writes:
> I noticed the tracer stuff on the nhc web-site. It looks very much
> like a declarative-debugger, although that term never appeared in the
> documentation I read. Will it in fact be a declarative-debugger ?
Debugging is certainly one of the applications of a tracer. I'm not
sure
On Wed, 25 Feb 1998, Jerzy Karczmarczuk wrote:
> Compete in the space of professional production quality languages?
>
> I am sorry, but if one day the Haskell, or any other language creators
> decide to include *everything* into their language, it will be The End
> of it.
Yes that comment went t
The discussion about heap dumps, binary persistent objects, etc.
continues.
S. Alexander Jacobson:
> Java comes with a serialization mechanism that allows the user to save
> and load all objects ...
> Object databases, like PSE, provide caching and indirection facilities
...
> Relational da
> "Malcolm" == Malcolm Wallace <[EMAIL PROTECTED]> writes:
Malcolm> space-efficiency, portability, and good monitoring tools
Malcolm> (profiler/tracer).
I noticed the tracer stuff on the nhc web-site. It looks very much
like a declarative-debugger, although that term never appeared i
Tim Barbour writes
>> "Tony" == Tony Davie <[EMAIL PROTECTED]> writes:
>
>Tony> This has well know disadvantages. Simon has already pointed
>Tony> out that it's not relocatable. It's also limited to the size
>Tony> of virtual memory and takes up that amount of space even
>Tony
The debate about heavy or light-weight saving sounds a lot like the debate
in traditional programming languages of how users should implement
persistent state.
Java comes with a serialization mechanism that allows the user to save
and load all objects reachable from a particular object root. It
Timothy Robin BARBOUR <[EMAIL PROTECTED]> writes:
> No need to relocate on an Alpha - just use a different high 32-bits
> for each persistent store. Not that I've got an Alpha yet...
Sure - not a portable solution, though.
> BTW I will probably get an Alpha sometime for running ghc, but it
> wi
> "Tony" == Tony Davie <[EMAIL PROTECTED]> writes:
Tony> This has well know disadvantages. Simon has already pointed
Tony> out that it's not relocatable. It's also limited to the size
Tony> of virtual memory and takes up that amount of space even
Tony> though most of it may no
> "Malcolm" == Malcolm Wallace <[EMAIL PROTECTED]> writes:
Malcolm> With our current design, it is possible to map binary
Malcolm> files into memory and vice versa, in a completely
Malcolm> orthogonal fashion.
Do you mean "map" as in mmap or just flattening into and out of binary
> "Simon" == Simon Marlow <[EMAIL PROTECTED]> writes:
Simon> If I understand this right, you're suggesting essentially
Simon> dumping out part of the Haskell heap to a file. Assuming
Simon> the data you want to dump out is closed (i.e. has no
Simon> external references) and i
Sorry for interruption, but I feel this thread of discussion
includes four different aspects of `binary' data:
1. Reading and writing binary data in a prescribed format.
Typical examples are image data in GIF, TIFF, Sun Raster etc,
and user-account statistics files used in Unix.
>This thread and particularly the following passage:
>
> "If I understand this right, you're suggesting essentially dumping
>out part of the Haskell heap to a file."
>
>reminds me very strongly of APL, where dumping the current state of
>the system into a binary file that you can later reloa
"Steve" == Steve Roggenkamp <[EMAIL PROTECTED]> writes:
Steve> I would like to use Haskell for several larger scale
Steve> projects, but I can't figure out how to read and write
Steve> binary data. It does not appear that the language supports
Steve> binary files. Am I missing something
--MimeMultipartBoundary
Content-Type: text/plain; charset="us-ascii"
Tony Davie wrote:
> This has well know disadvantages. Simon has already pointed out that
> it's not relocatable.
How is it done in APL and in other systems that do it (SmallTalk
and some LISP systems, according to another p
> I would like to use Haskell for several larger scale projects, but I
> can't figure out how to read and write binary data. It does not appear
> that the language supports binary files. Am I missing something?
Colin Runciman and his Merrie Men are working on writing
Haskell values into binary
--MimeMultipartBoundary
Content-Type: text/plain; charset="us-ascii"
This thread and particularly the following passage:
"If I understand this right, you're suggesting essentially dumping
out part of the Haskell heap to a file."
reminds me very strongly of APL, where dumping the current
Timothy Robin BARBOUR <[EMAIL PROTECTED]> writes:
> There is another way one might proceed. Why not just use a
> memory-mapped file (mmap) to make the data persistent in-place ? This
> would be a way of getting efficient persistence of (almost) any
> Haskell data structure without any code-writin
> "Steve" == Steve Roggenkamp <[EMAIL PROTECTED]> writes:
Steve> I would like to use Haskell for several larger scale
Steve> projects, but I can't figure out how to read and write
Steve> binary data. It does not appear that the language supports
Steve> binary files. Am I mis
Phil Trinder asked:
> Do any Haskell implementations support Binary files?
At York we have a version of nhc13 which supports, amongst other things,
binary file I/O. We hope to release it to the world fairly soon.
We have confirmed that binary files enable a faster data transfer rate
than the t
44 matches
Mail list logo