Giter VIP home page Giter VIP logo

Comments (4)

krivenko avatar krivenko commented on August 17, 2024

I checked three command-line parsing header-only libraries.

All three come with the same caveat: There is no way to simulate Boost's multitoken() feature, which allows us to write

anderson.pomerol --levels 1.0 2.0 --hoppings 3.0 4.0

With those libraries, it has to be either

anderson.pomerol --levels 1.0,2.0 --hoppings 3.0,4.0

or

anderson.pomerol --levels "1.0 2.0" --hoppings "3.0 4.0"

@aeantipov How much of a problem do you think this change of the command line format would be?

from pomerol.

aeantipov avatar aeantipov commented on August 17, 2024

I think it's fine or actually it's even better when we need to provide arguments via a comma.

cxxopts support std::vector arguments, so something like that would work.

from pomerol.

krivenko avatar krivenko commented on August 17, 2024

cxxopts looked like a perfect choice as its API is very similar to that of boost::program_options. So I tried it and got disappointed.

  • For some reason, dots are disallowed in option names, and we do need them (gf.eta, gf.step, etc).
  • An option with a single-character name (for instance, --U) is always assumed to be a short option and has to be used as -U (jarro2783/cxxopts#249).
  • Not really a problem, but a rather strange decision to define default values in their unparsed form, i.e. as strings.

I have some positive experience using args and will try it next, but it will require some redesign of the programs.

from pomerol.

krivenko avatar krivenko commented on August 17, 2024

Fixed by #40.

from pomerol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.