Comments (24)
Yeah i have been looking at various options for this for a little while now but never really got to comparing the different options very well.
from openrhythm.
Well i searched the different existing libs and this one seems the easies to use !
from openrhythm.
You can define " hard-coded" args in an array, plus parse manually other args
from openrhythm.
Honestly I don't like the syntax of any of the major options out there.
The syntax of this parser is pretty cool though:
https://github.com/aardvarkk/argh
from openrhythm.
If we have to I don't mind just implementing my own lol. They aren't very complex to do honestly. I could also just fork that one and throw it into our codebase and clean it up a bit. :P
from openrhythm.
Sure, I wanted to write my own lib too, and also for configuration files. But hell, there are so many good libs out there ^^
from openrhythm.
Well for config files i was wanting to use json or YAML.
from openrhythm.
We should probably make another issue about config files
from openrhythm.
ok issue #15 is for config files and the config system
from openrhythm.
Great !
from openrhythm.
I checked out Argh, seems cool, the syntax is pretty clear. But there are some problems :
- no apparent support for "bad args"
- only "dynamic" args definitions, can't use a header to define the args (header parsed for the html doc :p )
from openrhythm.
I dont really want to use Argh because its not really a well used library, and if thats the case i'd just rather do something ourselfs. But I mainly just mentioned it as a example of some nicer looking syntax :P
from openrhythm.
Hmm on the other hand OptionParser let us do a lot of job. I have to parse myself the integer args… :p
from openrhythm.
To be fair I think I'm gonna rewrite optionparser x)
from openrhythm.
One thing though what did you mean by "bad args"?
from openrhythm.
Well there are two things : "non-options" (things not preceded by --
or --option
) such as filenames for gcc, and unknown options. Argh does not seem to support "out of the box" neither of them… And it does not support parameters for short options.
Anyway, i've almost finished to rewrite OptionParser.
from openrhythm.
@Salamandar So how is this going, you said you were going to write your own parser(or rewrite the other one)
from openrhythm.
Well it's going fine, I just had a really big existential issue about if it was relevant or not ^^
from openrhythm.
Finally OptionParser is just too overkill. TCLAP is pretty good (I just wrote a PR to TCLAP and may write a second to support multiple one-char flags for an option).
The work in the commandline branch is just a draft because I'm working on my laptop this week :p
from openrhythm.
My problem with TCLAP is that it is largely unmaintained. Last release was 2011, last commits were 2015, and the page even says that it will likely not be developed any further.
from openrhythm.
Yeah that was my issue too. But some widely libs are unmaintained too. TCLAP does not seem buggy, and the authors seem quick to answer on sourceforge even if it's "i don't have much time but please make a patch !"
from openrhythm.
I still don't mind rolling our own
from openrhythm.
Well I think I'm gonna fork TCLAP on Github (and tell the original authors about it) so we can restart dev on it.
from openrhythm.
Finished with PR #32. Closing, we'll solve the possible problems in the PR.
from openrhythm.
Related Issues (20)
- Translation support HOT 6
- Configuration and Config Files. HOT 13
- Finish the VFS and integrate it with the codebase. HOT 4
- Complete the audio system. HOT 13
- How to save scores HOT 12
- Change MIDI for another format HOT 1
- Doc HOT 7
- Perhaps look into unit testing? HOT 6
- Audio compilation errors with Visual Studio. HOT 4
- Error while compiling master HOT 2
- Optional PNG++ ? HOT 8
- Possible memory leak in audiotests.cpp HOT 3
- gettext has issues on windows, find an alternative. HOT 7
- Configuration systems HOT 3
- Rust HOT 2
- Go through and make a documentation pass on everything.
- OSX Build HOT 7
- Link SoundTouch-C on Mac HOT 1
- Can't run without notes.mid and song.ogg HOT 1
- Status of project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openrhythm.