Skip to content

Conversation

@rodentrabies
Copy link
Contributor

@rodentrabies rodentrabies commented Oct 13, 2018

Implements proposal in #12948. Fixes the problem with white space delimiters inside single-quoted strings in ParseScript.

@meshcollider
Copy link
Contributor

Concept ACK


std::vector<std::string> blocks;
std::vector<std::string> words;
boost::algorithm::split(words, s, boost::algorithm::is_any_of(" \t\n"), boost::algorithm::token_compress_on);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are overlapping with the work in #13751, here: https://github.com/bitcoin/bitcoin/pull/13751/files#diff-846395c972e400d3933d195c29740098R50.
It might be worth helping review those changes, and/or considering how to do this without introducing new Boost usage, as the project is trying to reduce it where possible, see https://github.com/bitcoin/bitcoin/projects/3.

Copy link
Contributor Author

@rodentrabies rodentrabies Oct 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out. Some of the ways to resolve this:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See 86315aa for std::regex-based tokenizer. Noticed there's no std::regex usage throughout code base, so let me know if there's any policy against that.

@sipa
Copy link
Member

sipa commented Oct 17, 2018

I'm not convinced we need more pure utility functionality as RPCs. These things can be implemented as a library or whatever.

@laanwj
Copy link
Member

laanwj commented Oct 18, 2018

I tend to agree with @sipa
though also this discussion should probably have been done in #12948, @mrwhythat simply picked an open issue which didn't seem to have anyone protesting against it, and implemented it

@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 20, 2018

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #13751 (Utils and libraries: Drops the boost/algorithm/string/split.hpp dependency by 251Labs)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@Sjors
Copy link
Member

Sjors commented Nov 6, 2018

I created an issue to discuss a tool that could replace pure utility RPC calls: #14671

{
if (request.fHelp || request.params.size() != 1)
throw std::runtime_error(
"encodescript \"asm\"\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs rebase and be switched to RPCHelpMan{"encodescript", { ...

@rodentrabies
Copy link
Contributor Author

Closing this because #12984 was rejected.

@rodentrabies rodentrabies deleted the encodescript-rpc branch March 15, 2021 22:52
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants