Pharo 7 new file stream encoders

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Pharo 7 new file stream encoders

Thierry Goubier
Hi all,

how does one create a file stream in Pharo 7 that forces a specific
line end convention ? For example, for forcing all end of lines to be
Character lf.

The old way,

fileStream lineEndConvention: #'lf'.

does not work anymore.

Thanks,

Thierry

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 7 new file stream encoders

Sven Van Caekenberghe-2
I think the idea is to use ZnCrPortableWriteStream for that.

> On 15 Mar 2018, at 14:58, Thierry Goubier <[hidden email]> wrote:
>
> Hi all,
>
> how does one create a file stream in Pharo 7 that forces a specific
> line end convention ? For example, for forcing all end of lines to be
> Character lf.
>
> The old way,
>
> fileStream lineEndConvention: #'lf'.
>
> does not work anymore.
>
> Thanks,
>
> Thierry
>


Reply | Threaded
Open this post in threaded view
|

Re: Pharo 7 new file stream encoders

Guillermo Polito
Hi,

Yes, I'll provide a PR with that functionality soon. Probably in that case *ZnCrPortableWriteStream* is not the right name for that class. Sven, do you think renaming it now (before it has lots of users) would be acceptable towards backwards compatibility? Otherwise I would name it ZnNewLineConverterStream...

Keep you updated,
Guille

On Thu, Mar 15, 2018 at 3:11 PM, Sven Van Caekenberghe <[hidden email]> wrote:
I think the idea is to use ZnCrPortableWriteStream for that.

> On 15 Mar 2018, at 14:58, Thierry Goubier <[hidden email]> wrote:
>
> Hi all,
>
> how does one create a file stream in Pharo 7 that forces a specific
> line end convention ? For example, for forcing all end of lines to be
> Character lf.
>
> The old way,
>
> fileStream lineEndConvention: #'lf'.
>
> does not work anymore.
>
> Thanks,
>
> Thierry
>





--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 7 new file stream encoders

Guillermo Polito
Thierry, Sven,


Tx,
Guille

On Fri, Mar 16, 2018 at 11:29 AM, Guillermo Polito <[hidden email]> wrote:
Hi,

Yes, I'll provide a PR with that functionality soon. Probably in that case *ZnCrPortableWriteStream* is not the right name for that class. Sven, do you think renaming it now (before it has lots of users) would be acceptable towards backwards compatibility? Otherwise I would name it ZnNewLineConverterStream...

Keep you updated,
Guille

On Thu, Mar 15, 2018 at 3:11 PM, Sven Van Caekenberghe <[hidden email]> wrote:
I think the idea is to use ZnCrPortableWriteStream for that.

> On 15 Mar 2018, at 14:58, Thierry Goubier <[hidden email]> wrote:
>
> Hi all,
>
> how does one create a file stream in Pharo 7 that forces a specific
> line end convention ? For example, for forcing all end of lines to be
> Character lf.
>
> The old way,
>
> fileStream lineEndConvention: #'lf'.
>
> does not work anymore.
>
> Thanks,
>
> Thierry
>





--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: <a href="tel:+33%206%2052%2070%2066%2013" value="+33652706613" target="_blank">+33 06 52 70 66 13




--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 7 new file stream encoders

Sven Van Caekenberghe-2
In reply to this post by Guillermo Polito


> On 16 Mar 2018, at 11:29, Guillermo Polito <[hidden email]> wrote:
>
> Hi,
>
> Yes, I'll provide a PR with that functionality soon. Probably in that case *ZnCrPortableWriteStream* is not the right name for that class. Sven, do you think renaming it now (before it has lots of users) would be acceptable towards backwards compatibility? Otherwise I would name it ZnNewLineConverterStream...

Renaming is OK/better, if it works (critical class in IO)

Note #forPlatformLineEnding should do: OSPlatform current lineEnding

> Keep you updated,
> Guille
>
> On Thu, Mar 15, 2018 at 3:11 PM, Sven Van Caekenberghe <[hidden email]> wrote:
> I think the idea is to use ZnCrPortableWriteStream for that.
>
> > On 15 Mar 2018, at 14:58, Thierry Goubier <[hidden email]> wrote:
> >
> > Hi all,
> >
> > how does one create a file stream in Pharo 7 that forces a specific
> > line end convention ? For example, for forcing all end of lines to be
> > Character lf.
> >
> > The old way,
> >
> > fileStream lineEndConvention: #'lf'.
> >
> > does not work anymore.
> >
> > Thanks,
> >
> > Thierry
> >
>
>
>
>
>
> --
>    
> Guille Polito
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
> CRIStAL - UMR 9189
> French National Center for Scientific Research - http://www.cnrs.fr
>
> Web: http://guillep.github.io
> Phone: +33 06 52 70 66 13


Reply | Threaded
Open this post in threaded view
|

Re: Pharo 7 new file stream encoders

Guillermo Polito
That should be fixed now. I proposed also the rename. I can revert it if needed.

On Fri, Mar 16, 2018 at 1:04 PM, Sven Van Caekenberghe <[hidden email]> wrote:


> On 16 Mar 2018, at 11:29, Guillermo Polito <[hidden email]> wrote:
>
> Hi,
>
> Yes, I'll provide a PR with that functionality soon. Probably in that case *ZnCrPortableWriteStream* is not the right name for that class. Sven, do you think renaming it now (before it has lots of users) would be acceptable towards backwards compatibility? Otherwise I would name it ZnNewLineConverterStream...

Renaming is OK/better, if it works (critical class in IO)

Note #forPlatformLineEnding should do: OSPlatform current lineEnding

> Keep you updated,
> Guille
>
> On Thu, Mar 15, 2018 at 3:11 PM, Sven Van Caekenberghe <[hidden email]> wrote:
> I think the idea is to use ZnCrPortableWriteStream for that.
>
> > On 15 Mar 2018, at 14:58, Thierry Goubier <[hidden email]> wrote:
> >
> > Hi all,
> >
> > how does one create a file stream in Pharo 7 that forces a specific
> > line end convention ? For example, for forcing all end of lines to be
> > Character lf.
> >
> > The old way,
> >
> > fileStream lineEndConvention: #'lf'.
> >
> > does not work anymore.
> >
> > Thanks,
> >
> > Thierry
> >
>
>
>
>
>
> --
>
> Guille Polito
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
> CRIStAL - UMR 9189
> French National Center for Scientific Research - http://www.cnrs.fr
>
> Web: http://guillep.github.io
> Phone: <a href="tel:%2B33%2006%2052%2070%2066%2013" value="+33652706613">+33 06 52 70 66 13





--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: Pharo 7 new file stream encoders

Thierry Goubier


2018-03-16 15:01 GMT+01:00 Guillermo Polito <[hidden email]>:
That should be fixed now. I proposed also the rename. I can revert it if needed.

Thanks.

I'll have a look later.

Thierry
 

On Fri, Mar 16, 2018 at 1:04 PM, Sven Van Caekenberghe <[hidden email]> wrote:


> On 16 Mar 2018, at 11:29, Guillermo Polito <[hidden email]> wrote:
>
> Hi,
>
> Yes, I'll provide a PR with that functionality soon. Probably in that case *ZnCrPortableWriteStream* is not the right name for that class. Sven, do you think renaming it now (before it has lots of users) would be acceptable towards backwards compatibility? Otherwise I would name it ZnNewLineConverterStream...

Renaming is OK/better, if it works (critical class in IO)

Note #forPlatformLineEnding should do: OSPlatform current lineEnding

> Keep you updated,
> Guille
>
> On Thu, Mar 15, 2018 at 3:11 PM, Sven Van Caekenberghe <[hidden email]> wrote:
> I think the idea is to use ZnCrPortableWriteStream for that.
>
> > On 15 Mar 2018, at 14:58, Thierry Goubier <[hidden email]> wrote:
> >
> > Hi all,
> >
> > how does one create a file stream in Pharo 7 that forces a specific
> > line end convention ? For example, for forcing all end of lines to be
> > Character lf.
> >
> > The old way,
> >
> > fileStream lineEndConvention: #'lf'.
> >
> > does not work anymore.
> >
> > Thanks,
> >
> > Thierry
> >
>
>
>
>
>
> --
>
> Guille Polito
> Research Engineer
>
> Centre de Recherche en Informatique, Signal et Automatique de Lille
> CRIStAL - UMR 9189
> French National Center for Scientific Research - http://www.cnrs.fr
>
> Web: http://guillep.github.io
> Phone: <a href="tel:%2B33%2006%2052%2070%2066%2013" value="+33652706613" target="_blank">+33 06 52 70 66 13





--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: <a href="tel:+33%206%2052%2070%2066%2013" value="+33652706613" target="_blank">+33 06 52 70 66 13