From: Code Aas Date: 2018-03-20T13:36:34+09:00 Subject: [ruby-core:86213] Re: [Ruby trunk Feature#14618] Add display width method to String for CLI --===============1643070349== Content-Type: multipart/alternative; boundary="0000000000009d292e0567d09e3b" --0000000000009d292e0567d09e3b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Mar 20, 2018 at 5:59 AM, V=C3=ADt Ondruch wro= te: > Just out of curiosity, why are you reimplementing readline in pure Ruby > if there exists rb-readline [1], used by Ruby Installer. > > [1] https://github.com/ConnorAtherton/rb-readline Just to be safe, I will write it for other people too. The new library in Ruby core needs a maintainer until Ruby core removes it. Even if Ruby core removes the libraries, the operation "gemify" continues very long time and goes through a serious hardship [1]. After gemified, it still needs a maintainer. I read all source code of rb-readline, GNU Readline and Editline [2]. The rb-readline is a simple porting from GNU Readline's C source code. Almost original source code files are combined into only one file. Some String objects are expected NULL ("\0") terminated. Some features of GNU Readline is not implemented, for example, Vi mode (some my friends are using it). I don't think that someone of Ruby committers should maintain it. On the other hand, the source code of GNU Readline and Editline is small and clearly to read for me. I can reimplement it by pure Ruby and maintain. I guess that the reason for that RubyInstaller uses rb-readline is that it is the only Windows Readline implementation for now. I think that it's amazing value, but Ruby core needs a better solution. [1]: https://bugs.ruby-lang.org/issues/5481 [2]: http://thrysoee.dk/editline/ --0000000000009d292e0567d09e3b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Mar 20, 2018 at 5:59 AM, V=C3=ADt Ondruch <v.ondruch@gmail.com> wrote:

The new library in Ruby core needs a maintainer until Ruby core removes it. Even if Ruby core removes the libraries, the operation "gemify"= =20 continues very long time and goes through a serious hardship [1]. After=20 gemified, it still needs a maintainer.

I read all source code of=20 rb-readline, GNU Readline and Editline [2]. The rb-readline is a simple por= ting=20 from GNU Readline's C source code. Almost original source code files ar= e combined into only one file. Some String objects are expected NULL=20 ("\0") terminated. Some features of GNU Readline is not implement= ed, for example, Vi mode (some my friends are using it). I don't think that=20 someone of Ruby committers should maintain it.

On the other hand, the source code of GNU Readline and Editline is small and clearly to=20 read for me. I can reimplement it by pure Ruby and maintain.

I guess= that the reason for that RubyInstaller uses rb-readline is that it is the = only Windows Readline implementation for now. I think that it's amazing= value, but Ruby core needs a better solution.

[1]: https://bugs.ruby-lang.org/issues/5481
[2]:
http://thrysoee.dk/edit= line/

--0000000000009d292e0567d09e3b-- --===============1643070349== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Unsubscribe: --===============1643070349==--