-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notionflux rewrite: support REPL, line-editing, etc #118
Conversation
I think this makes sense: this means if we ever find a LGPL-compatible alternative to libreadline we can switch to that. Indeed binaries of the notionflux utility must be GPL, but that seems fine. Travis suggests the Makefile still needs some tweaking though? |
I guess perhaps on travis libreadline is not installed? |
The most popular libreadline replacement under a permissive license with compatible API is BSD libedit (used by many tools like e.g. llvm's lldb), however it isn't as fully-featured as GNU readline and it involves doing more work by hand. This effort started out by extending notionflux with libedit, but in the end I figured it's less effort to rewrite notionflux entirely than to use it. YMMV.
Seems you're right, I'll add libreadline-dev to .travis.yml |
Apparently debian does not install the readline.pc file used by pkg-config :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick look at the code looks great, will test in more detail later!
{ | ||
perror(s); | ||
exit(1); | ||
Display *dpy = XOpenDisplay(NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks tab-indented, while the general coding style is 4 spaces. I guess we should introduce an autoformatter...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't follow the guidelines very much, especially since the general coding style has weird rules about whitespace IMO (no spaces around most operators) that I've never seen anyone else use - feel free to fix it up as you deem fit. I had an awful mix of tabs and spaces at some point, so I just settled for tabs since I figured it's semi-independent anyway and that's what my editor was configured to use (changing those settings is like deliberately hammering things under my fingernails).
Thanks for the feedback :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, yeah it's a bit inconventional, and I think not applied consistently across the codebase as it is either. Added #125.
Remember kids, don't stay up late and write memory allocation code
3e6dc50
to
d075b5d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
{ | ||
perror(s); | ||
exit(1); | ||
Display *dpy = XOpenDisplay(NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, yeah it's a bit inconventional, and I think not applied consistently across the codebase as it is either. Added #125.
As mentioned on IRC I've rewritten notionflux.
Notable features:
Please test and enjoy!