At first I regarded this as simply a bug in the Iteratee.map definition, but
like Ben, it's started to bother me a lot. I think this is precisely the
sort of issue a proper denotational semantics would fix.
Unfortunately the only general solution I see is to abandon chunking and
work strictly
On Mon, Sep 6, 2010 at 22:49, Ben midfi...@gmail.com wrote:
Sorry to be late coming into this conversation.
Something that has bothered me (which I have mentioned to John Lato
privately) is that it is very easy to write non-compositional code due
to the chunking. For example, there is a
Sorry to be late coming into this conversation.
Something that has bothered me (which I have mentioned to John Lato
privately) is that it is very easy to write non-compositional code due
to the chunking. For example, there is a standard function
map :: (a - b) - Enumeratee a b c
whose
Tilo Wiklund wrote:
Daniel Fischer wrote:
[...]
Well, I just gave an example where one would want chunking for reasons
other than performance. That iteratees don't provide the desired
functionality is a different matter.
[...]
In the case of hashing, wouldn't it be more reasonable to consider
On 26/08/2010, Daniel Fischer daniel.is.fisc...@web.de wrote:
[...]
Well, I just gave an example where one would want chunking for reasons
other than performance. That iteratees don't provide the desired
functionality is a different matter.
[...]
In the case of hashing, wouldn't it be more
Daniel Fischer wrote:
Heinrich Apfelmus wrote:
Daniel Fischer wrote:
For many hashing or de/encryption algorithms, chunking is more natural
than single-character access.
Even when the chunk lengths are unpredictable? After all, unlike with
fread in C, you can't request the next chunk to
Daniel Fischer wrote:
John Lato wrote:
Heinrich Apfelmus wrote:
Do you have an example where you want chunking instead of single
character access?
I am unable to think of any examples where you want chunking for any
reason other than efficiency.
For many hashing or de/encryption
On Thursday 26 August 2010 09:33:30, Heinrich Apfelmus wrote:
Daniel Fischer wrote:
John Lato wrote:
Heinrich Apfelmus wrote:
Do you have an example where you want chunking instead of single
character access?
I am unable to think of any examples where you want chunking for any
Stephen Tetley wrote:
John Lato wrote:
This is how I think of them. I particularly your description of them as a
foldl with a pause button.
Maybe it would be helpful to consider iteratees along with delimited
continuations?
Aren't they closer - in implementation and by supported operations
Jason Dagit wrote:
Heinrich Apfelmus wrote:
I'm curious, can you give an example where you want to be explicit about
chunking? I have a hard time imagining an example where chunking is
beneficial compared to getting each character in sequence. Chunking
seems to be common in C for reasons of
Nicolas Pouillard wrote:
Heinrich Apfelmus wrote:
There are also enumerators and enumeratees. I think that
purpose of enumerator =
run an iteratee on multiple sources
(i.e. first part of the input from a Handle ,
second part from a String )
I would say
From: Heinrich Apfelmus apfel...@quantentunnel.de
Jason Dagit wrote:
Heinrich Apfelmus wrote:
I'm curious, can you give an example where you want to be explicit about
chunking? I have a hard time imagining an example where chunking is
beneficial compared to getting each character in
On Wednesday 25 August 2010 13:53:47, John Lato wrote:
From: Heinrich Apfelmus apfel...@quantentunnel.de
Do you have an example where you want chunking instead of single
character access?
I am unable to think of any examples where you want chunking for any
reason other than efficiency.
Here's a way I've been tinkering with to think about iteratees clearly.
For simplicity, I'll stick with pure, error-free iteratees for now, and take
chunks to be strings. Define a function that runs the iteratee:
runIter :: Iteratee a - [String] - (a, [String])
Note that chunking is explicit
Conal Elliott wrote:
Is there a simpler model of Enumerator? My intuition is that it's simply a
stream:
[[Enumerator a]] = String
Oddly, 'a' doesn't show up on the RHS. Maybe the representation ought to be
type Enumerator = forall a. Iteratee a - Iteratee a
so
[[Enumerator]] = String
Jason Dagit wrote:
From a purely practical viewpoint I feel that treating the chunking
as an abstraction leak might be missing the point. If you said, you
wanted the semantics to acknowledge the chunking but be invariant
under the size or number of the chunks then I would be happier.
I use
On Tue, Aug 24, 2010 at 12:49 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Jason Dagit wrote:
From a purely practical viewpoint I feel that treating the chunking
as an abstraction leak might be missing the point. If you said, you
wanted the semantics to acknowledge the chunking
I think the big problem with chunking is that many useful iteratees need to
be able to inspect the length of the chunk. The most obvious is drop, but
there are many others. Or if not inspect the length, have a new function on
the stream dropReport :: Int - s - (s, Int) which reports how much was
Hi John,
Please note that I'm suggesting eliminating chunks from the semantics only
-- not from the implementation.
For precise simple chunk-less semantics, it's only important that the
iteratees map equivalent input streams to equivalent output streams, where
equivalent means equal after
Hi Conal,
I'm aware of one case that violates semantic referential transparency, but
it's a bug. Which pretty much proves your point as I understand it.
John
On Tue, Aug 24, 2010 at 2:01 PM, Conal Elliott co...@conal.net wrote:
Hi John,
Please note that I'm suggesting eliminating chunks
Conal Elliott wrote:
For anyone interested in iteratees (etc) and not yet on the iteratees
mailing list.
I'm asking about what iteratees *mean* (denote), independent of the various
implementations. My original note (also at the end below):
In my world view, iteratees are just a monad M with
On Mon, Aug 23, 2010 at 1:06 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Conal Elliott wrote:
For anyone interested in iteratees (etc) and not yet on the iteratees
mailing list.
I'm asking about what iteratees *mean* (denote), independent of the
various
implementations. My
Luke Palmer wrote:
Heinrich Apfelmus wrote:
Conal Elliott wrote:
For anyone interested in iteratees (etc) and not yet on the iteratees
mailing list.
I'm asking about what iteratees *mean* (denote), independent of the
various implementations.
In my world view, iteratees are just a monad M
On Mon, 23 Aug 2010 14:38:29 +0200, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Luke Palmer wrote:
Heinrich Apfelmus wrote:
Conal Elliott wrote:
For anyone interested in iteratees (etc) and not yet on the iteratees
mailing list.
I'm asking about what iteratees *mean* (denote),
I have omitted the chunking [Char] because I don't like it; invariance with
respect to the chunk sizes is something that should be left to the iteratee
abstraction.
I have this same reservation about iteratees. And related one for
enumerators and enumeratees. Assuming my sense of their
So perhaps this could be a reasonable semantics?
Iteratee a = [Char] - Maybe (a, [Char])
I've been tinkering with this model as well.
However, it doesn't really correspond to the iteratee interfaces I've seen,
since those interfaces allow an iteratee to notice size and number of
chunks. I
I'm not a semanticist, so I apologize right now if I say something stupid or
incorrect.
On Mon, Aug 23, 2010 at 9:57 PM, Conal Elliott co...@conal.net wrote:
So perhaps this could be a reasonable semantics?
Iteratee a = [Char] - Maybe (a, [Char])
I've been tinkering with this model as
On 24 August 2010 14:14, Jason Dagit da...@codersbase.com wrote:
I'm not a semanticist, so I apologize right now if I say something stupid or
incorrect.
On Mon, Aug 23, 2010 at 9:57 PM, Conal Elliott co...@conal.net wrote:
So perhaps this could be a reasonable semantics?
Iteratee a =
On Mon, Aug 23, 2010 at 10:37 PM, Conrad Parker con...@metadecks.orgwrote:
On 24 August 2010 14:14, Jason Dagit da...@codersbase.com wrote:
I'm not a semanticist, so I apologize right now if I say something stupid
or
incorrect.
On Mon, Aug 23, 2010 at 9:57 PM, Conal Elliott
On 24 August 2010 14:47, Jason Dagit da...@codersbase.com wrote:
On Mon, Aug 23, 2010 at 10:37 PM, Conrad Parker con...@metadecks.org
wrote:
On 24 August 2010 14:14, Jason Dagit da...@codersbase.com wrote:
I'm not a semanticist, so I apologize right now if I say something
stupid or
30 matches
Mail list logo