Skip to content
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

^D now works with readLineFromStdin (in particular in nim secret) #18442

Closed
wants to merge 11 commits into from

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Jul 6, 2021

changelog.md Outdated Show resolved Hide resolved
lib/impure/rdstdin.nim Outdated Show resolved Hide resolved
@timotheecour timotheecour added the Ready For Review (please take another look): ready for next review round label Jul 7, 2021
@Araq
Copy link
Member

Araq commented Jul 7, 2021

Bugfixes come with rdstdin API additions, not exactly ideal. If you put effort into "nim secret", can you please move it so that it is a tool of its own?

@timotheecour
Copy link
Member Author

timotheecour commented Jul 7, 2021

Bugfixes come with rdstdin API additions, not exactly ideal.

ok, see #18448 which can be merged first

If you put effort into "nim secret", can you please move it so that it is a tool of its own?

the API additions are useful for any tool that uses rdstdin not just nim secret; I'm simply using the new APIs to improve nim secret. Splitting nim secret in another tool is a much more involved change that should be discussed separately, it's not at all clear it'd decrease total amount of complexity (but it very well might increase it). nim secret is so far the only published true REPL we have (inim is useful but isn't a true REPL as it re-evaluates everything on each cmd) so improving what we have makes sense.

@Araq
Copy link
Member

Araq commented Jul 8, 2021

in another tool is a much more involved change that should be discussed separately, it's not at all clear it'd decrease total amount of complexity (but it very well might increase it).

Maybe but then the Nim compiler itself does not depend on linenoise anymore so that's a benefit.

@timotheecour
Copy link
Member Author

Maybe but then the Nim compiler itself does not depend on linenoise anymore so that's a benefit.

future work can add a plugin interface to compiler so you'd be able to load an optional linenoise-compatible plugin at compiler runtime via nim --linenoise:/pathto/linenoise.so args, which has other use cases. At that point nimlinenoise (it's nim patch) will be able to live in a separate nimble package and be forked.

@stale
Copy link

stale bot commented Jul 10, 2022

This pull request has been automatically marked as stale because it has not had recent activity. If you think it is still a valid PR, please rebase it on the latest devel; otherwise it will be closed. Thank you for your contributions.

@stale stale bot added the stale Staled PR/issues; remove the label after fixing them label Jul 10, 2022
@stale stale bot closed this Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review (please take another look): ready for next review round stale Staled PR/issues; remove the label after fixing them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

control+D should exit nim secret; quit sometimes doesn't work
3 participants