On Tue, Mar 20, 2018 at 5:59 AM, Vt Ondruch <v.ondruch / gmail.com> wrote:

> 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/
(supressed text/html)
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>