Boost logo

Boost :

From: Bruno Martínez Aguerre (br1_at_[hidden])
Date: 2005-01-17 15:28:05


On Mon, 17 Jan 2005 11:31:36 -0700, Jonathan Turkanis
<technews_at_[hidden]> wrote:

> Bruno Martínez Aguerre wrote:
>> Coroutines or threads are overkill for this problem, IMHO. What you
>> need is laziness, as in haskell. FC++ probably can handle decompress
>> with
>> less overhead than threads.
>
> I'm not sure what you mean. The algorithm Daniel mentioned can be
> implemented
> efficiently in the current framework. The question is whether it can be
> simplified without sacrificing performance.

You can write decompress as a FC++ function taking and returning lazy
lists, in the straight-forward way. FC++'s lists can be contructed from a
pair of iterators, which are used lazily, and can be converted to forward
iterators themselves, so it should be possible to interface FC++ with the
current framework.

> If you think this can be done with FC++, please post some code.

I don't have FC++ installed, but what I say should be possible according
to:
http://www.cc.gatech.edu/~yannis/fc++/boostpaper/fcpp.sectrelation.html#id270098

A Haskell implementation can be found here:
http://community.moertel.com/ss/space/Talk+-+Haskell+for+Perl+Hackers/pgh-pm-talk-haskell.pdf
page 74.

Regards,
Bruno


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk