Hi Alberto,
To some extent this already exists, it's just that nobody uses it. I
believe it's the approach taken by the Edison libraries. Also the
ListLike package provides the type classes ListLike, StringLike, and a
few others. Neither seems to have become very popular despite having
Once we have a tree of type classes suitable for all containers, as you
said, theoretically it shouldn't very difficult to incorporate the testing
of different instances for each class used in a program, besides testing
different compilation flags in a genetic algoritm. This latter has already
Hi Alberto
I rather doubt a valuable set of type classes that is suitable for all
containers exists, I'm afraid.
If you consider containers as the containers package, the data
structures are all (?) functorial - but they have different shapes,
so e.g. a cons operation makes sense on the linear
I still think that getting other authors to use it would be the
biggest difficulty. Another concern of mine is that RULEs-based
fusion can be fragile; if the type classes prevent fusion from
occurring you'll never approach the performance of monomorphic code.
That said, I think this is worth
I have a very specific StringLike typeclass in the web-encodings package so
that I can- for example- to HTML entity encoding on String, (lazy)
bytestrings and (lazy) text. Of course, I need to make assumptions about
character encoding for the bytestring version.
Michael
On Wed, Mar 24, 2010 at
On Wed, Mar 24, 2010 at 5:48 AM, Stephen Tetley stephen.tet...@gmail.comwrote:
I rather doubt a valuable set of type classes that is suitable for all
containers exists, I'm afraid.
I don't think it's so clear cut. Stepanov's Elements of Programming lays
out a pretty clear (and familiar to
-- Forwarded message --
From: Alberto G. Corona agocor...@gmail.com
Date: 2010/3/24
Subject: Re: [Haskell-cafe] Bytestrings and [Char]
To: Stephen Tetley stephen.tet...@gmail.com
2010/3/24 Stephen Tetley stephen.tet...@gmail.com
Hi Alberto
I rather doubt a valuable set
2010/3/24 Stephen Tetley stephen.tet...@gmail.com
If you consider containers as the containers package, the data
structures are all (?) functorial - but they have different shapes,
so e.g. a cons operation makes sense on the linear ones
(Data.Sequence, Data.List) but not on Data.Map,
On 22.03.2010 14:10, Johan Tibell wrote:
On Mon, Mar 22, 2010 at 1:16 PM, Johann Höchtljohann.hoec...@gmail.com wrote:
My question or discussion point: Why not depreciate [Char] altogether
and favour of lazy Bytestrings?
A sequence of bytes is not the same thing as a sequence of Unicode
On 22.03.2010 14:15, Ivan Miljenovic wrote:
On 23 March 2010 00:10, Johan Tibelljohan.tib...@gmail.com wrote:
A sequence of bytes is not the same thing as a sequence of Unicode
code points. If you want to replace String by something more efficient
have a look at Data.Text.
Though
On Tue, Mar 23, 2010 at 00:27, Johann Höchtl johann.hoec...@gmail.com wrote:
How are ByteStrings (Lazy, UTF8) and Data.Text meant to co-exist? When I
read bytestrings over a socket which happens to be UTF16-LE encoded and
identify a fitting function in Data.Text, I guess I have to transcode
Hi,
Am Dienstag, den 23.03.2010, 08:51 -0700 schrieb John Millikin:
On Tue, Mar 23, 2010 at 00:27, Johann Höchtl johann.hoec...@gmail.com wrote:
How are ByteStrings (Lazy, UTF8) and Data.Text meant to co-exist? When I
read bytestrings over a socket which happens to be UTF16-LE encoded and
On Tue, Mar 23, 2010 at 08:51:16AM -0700, John Millikin wrote:
On Tue, Mar 23, 2010 at 00:27, Johann Höchtl johann.hoec...@gmail.com wrote:
How are ByteStrings (Lazy, UTF8) and Data.Text meant to co-exist? When I
read bytestrings over a socket which happens to be UTF16-LE encoded and
On 18:11 Tue 23 Mar , Iustin Pop wrote:
I agree with the principle of correctness, but let's be honest - it's
(many) orders of magnitude between ByteString and String and Text, not
just a few percentage points…
I've been struggling with this problem too and it's not nice. Every time
one
On Tue, Mar 23, 2010 at 01:21:49PM -0400, Nick Bowler wrote:
On 18:11 Tue 23 Mar , Iustin Pop wrote:
I agree with the principle of correctness, but let's be honest - it's
(many) orders of magnitude between ByteString and String and Text, not
just a few percentage points…
I've been
On Tue, Mar 23, 2010 at 05:53:00PM +, Vincent Hanquez wrote:
On 23/03/10 17:11, Iustin Pop wrote:
Data.ByteString.Lazy (bytestring readFile + length) - 10 miliseconds,
incorrect length (as expected).
Data.ByteString.Lazy.UTF8 (system readFile + fromString + length) - 11
seconds,
2010/3/23 Iustin Pop iu...@k1024.org
I agree with the principle of correctness, but let's be honest - it's
(many) orders of magnitude between ByteString and String and Text, not
just a few percentage points…
Well, your benchmarks are highly suspect. See below.
Data.ByteString.Lazy.UTF8
BOS:
Well, your benchmarks are highly suspect.
Attached is another benchmark with similar results. This is no
criterion benchmark but I did try to adjust a wee bit for cache
issues. Suffice to say I am not yet impressed with Data.Text
performance wise.
In the broader scope I feel there is a
On 18:25 Tue 23 Mar , Iustin Pop wrote:
On Tue, Mar 23, 2010 at 01:21:49PM -0400, Nick Bowler wrote:
On 18:11 Tue 23 Mar , Iustin Pop wrote:
I agree with the principle of correctness, but let's be honest - it's
(many) orders of magnitude between ByteString and String and Text, not
On Tue, Mar 23, 2010 at 03:31:33PM -0400, Nick Bowler wrote:
On 18:25 Tue 23 Mar , Iustin Pop wrote:
On Tue, Mar 23, 2010 at 01:21:49PM -0400, Nick Bowler wrote:
On 18:11 Tue 23 Mar , Iustin Pop wrote:
I agree with the principle of correctness, but let's be honest - it's
On Tue, Mar 23, 2010 at 11:22:23AM -0700, Bryan O'Sullivan wrote:
2010/3/23 Iustin Pop iu...@k1024.org
I agree with the principle of correctness, but let's be honest - it's
(many) orders of magnitude between ByteString and String and Text, not
just a few percentage points…
Well, your
Bryan O'Sullivan wrote:
2010/3/23 Iustin Pop iu...@k1024.org mailto:iu...@k1024.org
I agree with the principle of correctness, but let's be honest - it's
(many) orders of magnitude between ByteString and String and Text, not
just a few percentage points…
Well, your benchmarks
The question can be generalized via type classes: Is there any common set of
primitives encapsulated into a single type class that has instances for
Strings (Data.List) ByteStrings, Data.Text, Lazy bytestrings, Arrays,
vectors and wathever container that can store an boxed, unboxed, packed
Just a dream:
-separate interface and implementation for all containers, via type classes
-develop, by genetic programming techniques + quickcheck, a system that find
the best container implementation for a particular program.
Is that suitable for a Google Summer of Code project?
2010/3/23
Hello, I was recentyl playing with Haskell (GHC that is) IO and text
processing.
Bytestrings and Lazy Bytestrings allow for fast and memory eficient
string (well, bytestring) handling, yet a lot of libraries do not
support them (yet)
Given the incredibly inneficient memory representation of
Johann Höchtl johann.hoec...@gmail.com writes:
Bytestrings and Lazy Bytestrings allow for fast and memory eficient
string (well, bytestring) handling, yet a lot of libraries do not
support them (yet)
WHat do you mean? A lot of libraries need to use String because it's
easier to deal with and
On Mon, Mar 22, 2010 at 1:16 PM, Johann Höchtl johann.hoec...@gmail.com wrote:
My question or discussion point: Why not depreciate [Char] altogether
and favour of lazy Bytestrings?
A sequence of bytes is not the same thing as a sequence of Unicode
code points. If you want to replace String by
On 23 March 2010 00:10, Johan Tibell johan.tib...@gmail.com wrote:
A sequence of bytes is not the same thing as a sequence of Unicode
code points. If you want to replace String by something more efficient
have a look at Data.Text.
Though Data.Text still has the disadvantage of not being as
On Mon, Mar 22, 2010 at 6:10 AM, Johan Tibell johan.tib...@gmail.comwrote:
On Mon, Mar 22, 2010 at 1:16 PM, Johann Höchtl johann.hoec...@gmail.com
wrote:
My question or discussion point: Why not depreciate [Char] altogether
and favour of lazy Bytestrings?
A sequence of bytes is not the
David Leimbach wrote:
On Mon, Mar 22, 2010 at 6:10 AM, Johan Tibell johan.tib...@gmail.com
mailto:johan.tib...@gmail.com wrote:
On Mon, Mar 22, 2010 at 1:16 PM, Johann Höchtl
johann.hoec...@gmail.com mailto:johann.hoec...@gmail.com wrote:
My question or discussion point: Why
Turn on OverloadedStrings and you can pattern match on any type you
like that is in the IsString class.
Which means that Data.Text can use string literals just like regular
strings (but you can't use Char literals in the match).
On Mon, Mar 22, 2010 at 1:15 PM, Ivan Miljenovic
Hi
David Leimbach wrote:
On Mon, Mar 22, 2010 at 6:10 AM, Johan Tibell johan.tib...@gmail.com
wrote:
On Mon, Mar 22, 2010 at 1:16 PM, Johann Höchtl
johann.hoec...@gmail.com wrote:
My question or discussion point: Why not depreciate [Char]
altogether
32 matches
Mail list logo