7 ms·
Show HN: Linenoise NG – GNU Readline Replacement, with UTF8 and Windows (BSD)
- deleted 11y ago[deleted]
- dorfsmay 11y agoCan it switch between emacs and vi mode (like Deadline)?
- davexunit 11y agoAll of this to get around the GPL. Boo!
- fceller 11y agoYes, it is a shame that there are so many programs out there, that do not provide good line support because of the GPL issue.
- davexunit 11y agoPerhaps they should use the GPL.
- fceller 11y agoWhy? I assume there are good reasons for not being GPL. Redis for example is BSD. But it cannot use readline because of it is not LGPL.
- davexunit 11y agoGNU Readline is GPL on purpose. It's not the GNU project's fault that Redis cannot use Readline. The Redis maintainer isn't interested in protecting user freedom with copyleft, which means that Redis has to live without Readline.
- don71 11y agoWhy is GPL better than BSD for example. I have the full source code of Redis and I can do any change I like. Why is copyleft per se a better solution?
- Xophmeister 11y ago"Better" is subjective. The virility of the GPL gives it certain properties that a BSD license doesn't, which is important to some [many].
- jimrandomh 11y agoI'm all for replacing readline. It's an ancient, very closely linked to the everyday experience of using the command line, and not very good. I want my REPLs to have things like syntax highlighting and decent tab completion UI, and readline has positioned itself to have a monopoly on the ability to implement these things but failed to deliver. But this isn't addressing the real problem, which is that readline gets conjoined with the programs that use it. So if I want to write my own line editor, I have to significantly modify every program I want to use it in, which is enough of an obstacle that I won't do it (and neither will others). Nevermind more difficult architectural problems, like making editing local when on high-latency connections. Still, having a BSD-licensed line editor to start from may be helpful for whoever takes on that project some day.
- fceller 11y agoI would love to see contributions improving LINENOISE NG in this direction.
- yyin 11y ago"But this isn't addressing the real problem..." Well, he addressed a real problem in my opinion: readline is too large and too complicated for many uses. I used hping in the old days; while I'm not a Redis user (I use cdb and kdb+ for key/value stores), I really appreciate linenoise. I use it everyday. I thank the author for a very useful contribution.
- cmsd2 11y agothere are a lot of forks of linenoise out there now. this one looks good, but it's a big task to pick through all the divergent copies of the code and figure out which ones have genuine improvements and which ones are now rotting. there's a rust one too which i recently added mingw/msvc support to. that's actually an example of how this splintering could be causing problems because we've just vendored some upstream version of the native c code and changes may be difficult to send back upstream.
- fceller 11y agoThat is one of the reason, why I renamed it the LINENOISE NG. The interface is compatible with the original LINENOISE, but it works on linux, Mac and Windows and it supports UTF-8.
- kazinator 11y agoToo bad about the C++, though; my condolences. (The original authors should have made the header comment "against the idea that a line editing lib needs to be 20,000 lines of C code, or any quantity of C++".)
- melling 11y agoHow about predictive typing? It would be helpful if something modern learned what I frequently type. http://papersdb.cs.ualberta.ca/~papersdb/uploaded_files/712/paper_korvemaker00predicting.pdf http://papersdb.cs.ualberta.ca/~papersdb/uploaded_files/712/...
- kazinator 11y agoFork of linenoise in the TXR language: http://www.kylheku.com/cgit/txr/log/linenoise http://www.kylheku.com/cgit/txr/log/linenoise Doc: http://www.nongnu.org/txr/txr-manpage.html#N-025AAA27 http://www.nongnu.org/txr/txr-manpage.html#N-025AAA27 These changes are in a different direction. I don't have windows or UTF-8 support, though. I started a branch to convert it to use wchar_t. Maybe I can cherry pick some things out of NG.