Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread Steffen Märcker
No worries! =) Let me clarify the relation between Transducers and function composition. The main component in the framework are so-called ReducingFunctions, which are the operations you want to perform. They are functions that take two arguments, an 'intermediate value' and a 'current

Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread Steffen Märcker
No worries! =) Let me clarify the relation between Transducers and function composition. The basic component in the framework is the so-called ReducingFunction. This are functions that take two arguments, an 'intermediate value' and a 'current element', and map them to a new intermediate value,

Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread herby
Solutions to different problems. I proposed a simple generic thing that only composes functions, allowing for transformation of block arg. Transducers seem like streaming, data-flow specific, thing. Maybe yours helps the original problem in the long run. I just tried to find something to

Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread Steffen Märcker
I think, streams and functional composition match up nicely and transducers are a way to do this. I've introduced them earlier on this list. (I hesitated to weight into the discussion, as I won't have time to work on the Pharo port of Transducers until October.) Let me give a simplified

Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread Damien Pollet
On Tue, 3 Jul 2018 at 11:36, Sven Van Caekenberghe wrote: > Most probably this idea of functional composition has been discussed > before ... > Transducers (aka. Reducers) come to mind…

Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread Sven Van Caekenberghe
> On 3 Jul 2018, at 11:28, Herbert Vojčík wrote: > > > > Herbert Vojčík wrote on 3. 7. 2018 11:21: >> Sven Van Caekenberghe wrote on 3. 7. 2018 10:55: >>> >>> On 3 Jul 2018, at 10:08, Herbert Vojčík wrote: Sven Van Caekenberghe wrote on 2. 7. 2018 16:00:

Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread Herbert Vojčík
Herbert Vojčík wrote on 3. 7. 2018 11:21: Sven Van Caekenberghe wrote on 3. 7. 2018 10:55: On 3 Jul 2018, at 10:08, Herbert Vojčík wrote: Sven Van Caekenberghe wrote on 2. 7. 2018 16:00: On 25 Jun 2018, at 12:56, Herbert Vojčík wrote: Peter Uhnák wrote on 23. 6. 2018 15:39:

Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread Herbert Vojčík
Sven Van Caekenberghe wrote on 3. 7. 2018 10:55: On 3 Jul 2018, at 10:08, Herbert Vojčík wrote: Sven Van Caekenberghe wrote on 2. 7. 2018 16:00: On 25 Jun 2018, at 12:56, Herbert Vojčík wrote: Peter Uhnák wrote on 23. 6. 2018 15:39: Hi, I'm starting to familiarize myself with new

Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread Sven Van Caekenberghe
> On 3 Jul 2018, at 10:08, Herbert Vojčík wrote: > > > > Sven Van Caekenberghe wrote on 2. 7. 2018 16:00: >>> On 25 Jun 2018, at 12:56, Herbert Vojčík wrote: >>> >>> >>> >>> Peter Uhnák wrote on 23. 6. 2018 15:39: Hi, I'm starting to familiarize myself with new streams, and

Re: [Pharo-users] Pharo 7 streams API

2018-07-03 Thread Herbert Vojčík
Sven Van Caekenberghe wrote on 2. 7. 2018 16:00: On 25 Jun 2018, at 12:56, Herbert Vojčík wrote: Peter Uhnák wrote on 23. 6. 2018 15:39: Hi, I'm starting to familiarize myself with new streams, and one thing I've noticed is the removal of #lineEndConvention (which I use all the

Re: [Pharo-users] Pharo 7 streams API

2018-07-02 Thread Sven Van Caekenberghe
> On 25 Jun 2018, at 12:56, Herbert Vojčík wrote: > > > > Peter Uhnák wrote on 23. 6. 2018 15:39: >> Hi, >> I'm starting to familiarize myself with new streams, and one thing I've >> noticed is the removal of #lineEndConvention (which I use all the time). >> So a statement like this >>

Re: [Pharo-users] Pharo 7 streams API

2018-07-02 Thread Sven Van Caekenberghe
> On 24 Jun 2018, at 03:08, Ben Coman wrote: > > > > On 24 June 2018 at 00:53, Sven Van Caekenberghe wrote: > Peter, > > > On 23 Jun 2018, at 15:39, Peter Uhnák wrote: > > > > Hi, > > > > I'm starting to familiarize myself with new streams, and one thing I've > > noticed is the

Re: [Pharo-users] Pharo 7 streams API

2018-06-25 Thread Richard O'Keefe
Experience with Java taught me to loath ethe "do I/O by composing lots of little wrappers" approach for several reasons: - the fact that the commonest case was not the default case, so that simple obvious code was somewhere between disgracefully slow and wrong - the extra complexity needed

Re: [Pharo-users] Pharo 7 streams API

2018-06-25 Thread Herbert Vojčík
Peter Uhnák wrote on 23. 6. 2018 15:39: Hi, I'm starting to familiarize myself with new streams, and one thing I've noticed is the removal of #lineEndConvention (which I use all the time). So a statement like this aFile writeStreamDo: [ :stream | stream lineEndConvention: #lf. stream <<

Re: [Pharo-users] Pharo 7 streams API

2018-06-23 Thread Ben Coman
On 24 June 2018 at 00:53, Sven Van Caekenberghe wrote: > Peter, > > > On 23 Jun 2018, at 15:39, Peter Uhnák wrote: > > > > Hi, > > > > I'm starting to familiarize myself with new streams, and one thing I've > noticed is the removal of #lineEndConvention (which I use all the time). > > > > So a

Re: [Pharo-users] Pharo 7 streams API

2018-06-23 Thread Sven Van Caekenberghe
Peter, > On 23 Jun 2018, at 15:39, Peter Uhnák wrote: > > Hi, > > I'm starting to familiarize myself with new streams, and one thing I've > noticed is the removal of #lineEndConvention (which I use all the time). > > So a statement like this > > aFile writeStreamDo: [ :stream | >

[Pharo-users] Pharo 7 streams API

2018-06-23 Thread Peter Uhnák
Hi, I'm starting to familiarize myself with new streams, and one thing I've noticed is the removal of #lineEndConvention (which I use all the time). So a statement like this aFile writeStreamDo: [ :stream | stream lineEndConvention: #lf. stream << '...' ]. has to be written like so aFile