You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Remko Popma <re...@gmail.com> on 2017/04/15 14:25:03 UTC

Feedback request

Everyone, I would love your feedback on this:

https://remkop.github.io/picocli/
https://github.com/remkop/picocli

It is heavily inspired by JCommander and Args4j but has improved
ergonomics, customizable help (with colors) and various other improvements.

I hope this will be useful in the log4j-tools module, but any kind of
feedback would be great.

Remko

Re: Feedback request

Posted by Gary Gregory <ga...@gmail.com>.
I do love the color help output!

Gary

On Apr 15, 2017 6:13 PM, "Remko Popma" <re...@gmail.com> wrote:

> JCommander is very, very good. Apart from the dependency thing, some
> differences:
>
> Picocli has:
> - strongly typed positional parameters (in JCommander only options are
> strongly typed, positional parameters are a list of Strings)
> - support for POSIX short options (so you can say `<command> -xvfInputFile`
> as well as `<command> -x -v -f=InputFile`, JCommander only supports the
> latter)
> - an arity model that allows a minimum,  maximum and variable number of
> parameters, e.g, "1..*", "3..5"  (JCommander only has minimum _or_ variable
> arity, and these are weakly typed - Strings only)
>
> JCommander has:
> - support for suppressing password echo to the console
> - case-insensitive option name matching
> - support for abbreviated options
> - support for Map fields
> - internationalization
>
> All of these are on the todo list, just haven't got around to them.
>
> But the biggest difference is the usage help. People have requested
> customizable help in JCommander for years but it's not happening.
> Picocli makes common customizations easy (annotations) and provides a Help
> API for any further customization.
>
> The icing on the cake is the ANSI colors, for example
> https://remkop.github.io/picocli/#_ansi_colors_and_styles
>
>
>
>
> On Sun, Apr 16, 2017 at 8:15 Gary Gregory <ga...@gmail.com> wrote:
>
> > I use JCommander a lot. Can you explain the difference? Most
> applications I
> > work on depend on other jars, so one more is no biggie.
> >
> > Thank you!
> > Gary
> >
> > On Apr 15, 2017 7:25 AM, "Remko Popma" <re...@gmail.com> wrote:
> >
> > > Everyone, I would love your feedback on this:
> > >
> > > https://remkop.github.io/picocli/
> > > https://github.com/remkop/picocli
> > >
> > > It is heavily inspired by JCommander and Args4j but has improved
> > > ergonomics, customizable help (with colors) and various other
> > improvements.
> > >
> > > I hope this will be useful in the log4j-tools module, but any kind of
> > > feedback would be great.
> > >
> > > Remko
> > >
> >
>

Re: Feedback request

Posted by Remko Popma <re...@gmail.com>.
JCommander is very, very good. Apart from the dependency thing, some
differences:

Picocli has:
- strongly typed positional parameters (in JCommander only options are
strongly typed, positional parameters are a list of Strings)
- support for POSIX short options (so you can say `<command> -xvfInputFile`
as well as `<command> -x -v -f=InputFile`, JCommander only supports the
latter)
- an arity model that allows a minimum,  maximum and variable number of
parameters, e.g, "1..*", "3..5"  (JCommander only has minimum _or_ variable
arity, and these are weakly typed - Strings only)

JCommander has:
- support for suppressing password echo to the console
- case-insensitive option name matching
- support for abbreviated options
- support for Map fields
- internationalization

All of these are on the todo list, just haven't got around to them.

But the biggest difference is the usage help. People have requested
customizable help in JCommander for years but it's not happening.
Picocli makes common customizations easy (annotations) and provides a Help
API for any further customization.

The icing on the cake is the ANSI colors, for example
https://remkop.github.io/picocli/#_ansi_colors_and_styles




On Sun, Apr 16, 2017 at 8:15 Gary Gregory <ga...@gmail.com> wrote:

> I use JCommander a lot. Can you explain the difference? Most applications I
> work on depend on other jars, so one more is no biggie.
>
> Thank you!
> Gary
>
> On Apr 15, 2017 7:25 AM, "Remko Popma" <re...@gmail.com> wrote:
>
> > Everyone, I would love your feedback on this:
> >
> > https://remkop.github.io/picocli/
> > https://github.com/remkop/picocli
> >
> > It is heavily inspired by JCommander and Args4j but has improved
> > ergonomics, customizable help (with colors) and various other
> improvements.
> >
> > I hope this will be useful in the log4j-tools module, but any kind of
> > feedback would be great.
> >
> > Remko
> >
>

Re: Feedback request

Posted by Gary Gregory <ga...@gmail.com>.
I use JCommander a lot. Can you explain the difference? Most applications I
work on depend on other jars, so one more is no biggie.

Thank you!
Gary

On Apr 15, 2017 7:25 AM, "Remko Popma" <re...@gmail.com> wrote:

> Everyone, I would love your feedback on this:
>
> https://remkop.github.io/picocli/
> https://github.com/remkop/picocli
>
> It is heavily inspired by JCommander and Args4j but has improved
> ergonomics, customizable help (with colors) and various other improvements.
>
> I hope this will be useful in the log4j-tools module, but any kind of
> feedback would be great.
>
> Remko
>

Re: Feedback request

Posted by Mikael Ståldal <mi...@magine.com>.
Looks nice!

Some feedback:

* I don't like to prefix interface names with "I", as you do in
ITypeConverter etc. Doing so is common in .Net, but not in Java.

* Why does CommandLine.parse() return List<Object>? This is not correctly
documentated in the Javadoc @return tag.

* Maybe CommandLine.usage() could be overloaded with Writer and
StringBuilder?



On Sat, Apr 15, 2017 at 4:25 PM, Remko Popma <re...@gmail.com> wrote:

> Everyone, I would love your feedback on this:
>
> https://remkop.github.io/picocli/
> https://github.com/remkop/picocli
>
> It is heavily inspired by JCommander and Args4j but has improved
> ergonomics, customizable help (with colors) and various other improvements.
>
> I hope this will be useful in the log4j-tools module, but any kind of
> feedback would be great.
>
> Remko
>



-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
mikael.staldal@magine.com
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Re: Feedback request

Posted by Remko Popma <re...@gmail.com>.


Sent from my iPhone
> On Apr 16, 2017, at 2:44, Christian Grobmeier <gr...@apache.org> wrote:
> 
> I agree with Matt.
> 
> What I love is the way you use annotations.
I can't claim credit for that idea: that's the "inspired by JCommander/Args4j" part. 
https://github.com/remkop/picocli/wiki/FAQ


> I can't tell you how I miss annotations when I work with PHP. 
> 
> 
>> On Sat, Apr 15, 2017, at 17:47, Matt Sicker wrote:
>> It looks pretty neat! The single source code file idea is an amusing
>> C-like
>> distribution mechanism, but it makes sense for this style of library. I'm
>> curious how you're making the docs as I've seen that format a lot and
>> think
>> it could possibly be useful for log4j-core or one of the other
>> subprojects
>> at least.
>> 
>> As for concrete use of this, being a single file, it could easily be
>> shaded
>> into log4j-core for the CLI classes. Very nice!
>> 
>>> On 15 April 2017 at 09:25, Remko Popma <re...@gmail.com> wrote:
>>> 
>>> Everyone, I would love your feedback on this:
>>> 
>>> https://remkop.github.io/picocli/
>>> https://github.com/remkop/picocli
>>> 
>>> It is heavily inspired by JCommander and Args4j but has improved
>>> ergonomics, customizable help (with colors) and various other improvements.
>>> 
>>> I hope this will be useful in the log4j-tools module, but any kind of
>>> feedback would be great.
>>> 
>>> Remko
>>> 
>> 
>> 
>> 
>> -- 
>> Matt Sicker <bo...@gmail.com>

Re: Feedback request

Posted by Christian Grobmeier <gr...@apache.org>.
I agree with Matt.

What I love is the way you use annotations. I can't tell you how I miss
annotations when I work with PHP. 


On Sat, Apr 15, 2017, at 17:47, Matt Sicker wrote:
> It looks pretty neat! The single source code file idea is an amusing
> C-like
> distribution mechanism, but it makes sense for this style of library. I'm
> curious how you're making the docs as I've seen that format a lot and
> think
> it could possibly be useful for log4j-core or one of the other
> subprojects
> at least.
> 
> As for concrete use of this, being a single file, it could easily be
> shaded
> into log4j-core for the CLI classes. Very nice!
> 
> On 15 April 2017 at 09:25, Remko Popma <re...@gmail.com> wrote:
> 
> > Everyone, I would love your feedback on this:
> >
> > https://remkop.github.io/picocli/
> > https://github.com/remkop/picocli
> >
> > It is heavily inspired by JCommander and Args4j but has improved
> > ergonomics, customizable help (with colors) and various other improvements.
> >
> > I hope this will be useful in the log4j-tools module, but any kind of
> > feedback would be great.
> >
> > Remko
> >
> 
> 
> 
> -- 
> Matt Sicker <bo...@gmail.com>

Re: Feedback request

Posted by Remko Popma <re...@gmail.com>.
> On Apr 16, 2017, at 0:47, Matt Sicker <bo...@gmail.com> wrote:
> 
> It looks pretty neat! The single source code file idea is an amusing C-like
> distribution mechanism, but it makes sense for this style of library. I'm
> curious how you're making the docs as I've seen that format a lot and think
> it could possibly be useful for log4j-core or one of the other subprojects
> at least.

Asciidoc. 
https://github.com/asciidoctor/asciidoctor.org/blob/master/docs/_includes/asciidoc-vs-markdown.adoc

> 
> As for concrete use of this, being a single file, it could easily be shaded
> into log4j-core for the CLI classes. Very nice!
> 
>> On 15 April 2017 at 09:25, Remko Popma <re...@gmail.com> wrote:
>> 
>> Everyone, I would love your feedback on this:
>> 
>> https://remkop.github.io/picocli/
>> https://github.com/remkop/picocli
>> 
>> It is heavily inspired by JCommander and Args4j but has improved
>> ergonomics, customizable help (with colors) and various other improvements.
>> 
>> I hope this will be useful in the log4j-tools module, but any kind of
>> feedback would be great.
>> 
>> Remko
>> 
> 
> 
> 
> -- 
> Matt Sicker <bo...@gmail.com>

Re: Feedback request

Posted by Matt Sicker <bo...@gmail.com>.
It looks pretty neat! The single source code file idea is an amusing C-like
distribution mechanism, but it makes sense for this style of library. I'm
curious how you're making the docs as I've seen that format a lot and think
it could possibly be useful for log4j-core or one of the other subprojects
at least.

As for concrete use of this, being a single file, it could easily be shaded
into log4j-core for the CLI classes. Very nice!

On 15 April 2017 at 09:25, Remko Popma <re...@gmail.com> wrote:

> Everyone, I would love your feedback on this:
>
> https://remkop.github.io/picocli/
> https://github.com/remkop/picocli
>
> It is heavily inspired by JCommander and Args4j but has improved
> ergonomics, customizable help (with colors) and various other improvements.
>
> I hope this will be useful in the log4j-tools module, but any kind of
> feedback would be great.
>
> Remko
>



-- 
Matt Sicker <bo...@gmail.com>