jugyo / rb-readline Goto Github PK
View Code? Open in Web Editor NEWThis project forked from connoratherton/rb-readline
Pure-Ruby Readline Implementation
License: BSD 3-Clause "New" or "Revised" License
This project forked from connoratherton/rb-readline
Pure-Ruby Readline Implementation
License: BSD 3-Clause "New" or "Revised" License
= Description The readline library provides a pure Ruby implementation of the GNU readline C library, as well as the Readline extension that ships as part of the standard library. = Synopsis require 'readline' loop do line = Readline::readline('> ') Readline::HISTORY.push(line) puts "You typed: #{line}" break if line == 'quit' end = Motivation First, building the GNU readline library on MS Windows with Visual C++ is nigh impossible. However, certain libraries depend on readline. By providing a pure Ruby version we eliminate the entire compiler compatibility issue. Second, even on distributions of Windows built with MinGW (that include the readline library for Windows), the behavior was sometimes erratic and would break. Third, even on certain Unix distributions the GNU readline library is not guaranteed to be installed. Providing a pure Ruby readline eliminates the need to install a C library first. It's also one less link in the dependency chain, meaning we don't need to worry about possible changes in the underlying C library affecting our interface. Fourth, by making the interface pure Ruby, we increase the likelihood of receiving patches, feature requests, documentation updates, etc from the community at large, since not everyone knows C. Lastly, the Readline interface that ships as part of the standard library is weak, and only provides a very limited subset of the actual GNU readline library. By providing a pure Ruby implementation we allow 3rd party library authors to write their own interface as they see fit. = Tutorial For an excellent tutorial on how to use Readline in practice, please see Joseph Pecoraro's examples at http://bogojoker.com/readline/. There is also documentation by Michael Fellinger at http://p.ramaze.net/18421.md. = Alternatives See Rawline for a library that began life in pure Ruby and provides an interface that's probably more comfortable to Ruby programmer. It has certain features that Readline does not. In addition, it provides a Readline compatibility mode. = Authors * Park Heesob (C translation, code donated as part of bounty) * Daniel Berger (Documentation and testing)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.