Pharo 7 new file stream encoders
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
I think the idea is to use ZnCrPortableWriteStream for that.
On 15 Mar 2018, at 14:58, Thierry Goubier <thierry.goubier@gmail.com> 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
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 <sven@stfx.eu> wrote:
I think the idea is to use ZnCrPortableWriteStream for that.
On 15 Mar 2018, at 14:58, Thierry Goubier <thierry.goubier@gmail.com> 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 <http://www.cnrs.fr>* *Web:* *http://guillep.github.io* <http://guillep.github.io> *Phone: *+33 06 52 70 66 13
Thierry, Sven, Can you review https://github.com/pharo-project/pharo/pull/1116 ? Tx, Guille On Fri, Mar 16, 2018 at 11:29 AM, Guillermo Polito < guillermopolito@gmail.com> 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 <sven@stfx.eu> wrote:
I think the idea is to use ZnCrPortableWriteStream for that.
On 15 Mar 2018, at 14:58, Thierry Goubier <thierry.goubier@gmail.com> 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 <http://www.cnrs.fr>*
*Web:* *http://guillep.github.io* <http://guillep.github.io>
*Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
-- 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 <http://www.cnrs.fr>* *Web:* *http://guillep.github.io* <http://guillep.github.io> *Phone: *+33 06 52 70 66 13
On 16 Mar 2018, at 11:29, Guillermo Polito <guillermopolito@gmail.com> 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 <sven@stfx.eu> wrote: I think the idea is to use ZnCrPortableWriteStream for that.
On 15 Mar 2018, at 14:58, Thierry Goubier <thierry.goubier@gmail.com> 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
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 <sven@stfx.eu> wrote:
On 16 Mar 2018, at 11:29, Guillermo Polito <guillermopolito@gmail.com> 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 <sven@stfx.eu> wrote: I think the idea is to use ZnCrPortableWriteStream for that.
On 15 Mar 2018, at 14:58, Thierry Goubier <thierry.goubier@gmail.com> 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
-- 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 <http://www.cnrs.fr>* *Web:* *http://guillep.github.io* <http://guillep.github.io> *Phone: *+33 06 52 70 66 13
2018-03-16 15:01 GMT+01:00 Guillermo Polito <guillermopolito@gmail.com>:
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 <sven@stfx.eu> wrote:
On 16 Mar 2018, at 11:29, Guillermo Polito <guillermopolito@gmail.com> 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 <sven@stfx.eu> wrote: I think the idea is to use ZnCrPortableWriteStream for that.
On 15 Mar 2018, at 14:58, Thierry Goubier <thierry.goubier@gmail.com> 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
--
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 <http://www.cnrs.fr>*
*Web:* *http://guillep.github.io* <http://guillep.github.io>
*Phone: *+33 06 52 70 66 13 <+33%206%2052%2070%2066%2013>
participants (3)
-
Guillermo Polito -
Sven Van Caekenberghe -
Thierry Goubier