From: Bruce Dubbs <bruce.dubbs@gmail.com>
To: "Aurélien Lajoie" <orel@melix.net>, "Karel Zak" <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: cal: column mode
Date: Wed, 15 Apr 2020 17:04:57 -0500 [thread overview]
Message-ID: <00b92978-b2a8-1ebb-8ede-a7745046d460@gmail.com> (raw)
In-Reply-To: <CAA0A08W8JjTYx-ymnsBvbRHBW+WxucobBWVfyt4XdXh7Of8wMA@mail.gmail.com>
On 4/14/20 3:18 PM, Aurélien Lajoie wrote:
> On Tue, Apr 14, 2020 at 1:38 PM Karel Zak <kzak@redhat.com> wrote:
>>
>> On Mon, Apr 13, 2020 at 10:41:34PM +0200, Aurélien Lajoie wrote:
>>> As I have announced few days ago, I have started to work on ncal like for cal.
>>> I have push a first working version on my github:
>>> https://github.com/utix/util-linux/commits/cal_column
>>
>> Is the option --column the best name? We use "column" pretty often to
>> address output in columns or number of columns, etc.
>>
>> What about --vertical?
>
> sure, no preference for me, ( -v is not used )
> How or who decides this kind of stuff (sorry I am a newbie)
>
>>> Does anyone know which locale can have some width issue ?
>>
>> LC_ALL=ja_JP.utf8 cal
>>
>> or another with multibyte letters.
> ja_JP seems very compact, I think mongolian locale is a good one with month like
> Арванхоёрдугаар сар
>
> ja_JP is:
> 2020
>
> 1月 2月 3月
> 日 月 火 水 木 金 土 日 月 火 水 木 金 土 日 月 火 水 木 金 土
> 1 2 3 4 1 1 2 3 4 5 6 7
> 5 6 7 8 9 10 11 2 3 4 5 6 7 8 8 9 10 11 12 13 14
> 12 13 14 15 16 17 18 9 10 11 12 13 14 15 15 16 17 18 19 20 21
> 19 20 21 22 23 24 25 16 17 18 19 20 21 22 22 23 24 25 26 27 28
> 26 27 28 29 30 31 23 24 25 26 27 28 29 29 30 31
>
> 4月 5月 6月
> 日 月 火 水 木 金 土 日 月 火 水 木 金 土 日 月 火 水 木 金 土
> 1 2 3 4 1 2 1 2 3 4 5 6
> 5 6 7 8 9 10 11 3 4 5 6 7 8 9 7 8 9 10 11 12 13
> 12 13 14 15 16 17 18 10 11 12 13 14 15 16 14 15 16 17 18 19 20
> 19 20 21 22 23 24 25 17 18 19 20 21 22 23 21 22 23 24 25 26 27
> 26 27 28 29 30 24 25 26 27 28 29 30 28 29 30
> 31
> 7月 8月 9月
> 日 月 火 水 木 金 土 日 月 火 水 木 金 土 日 月 火 水 木 金 土
> 1 2 3 4 1 1 2 3 4 5
> 5 6 7 8 9 10 11 2 3 4 5 6 7 8 6 7 8 9 10 11 12
> 12 13 14 15 16 17 18 9 10 11 12 13 14 15 13 14 15 16 17 18 19
> 19 20 21 22 23 24 25 16 17 18 19 20 21 22 20 21 22 23 24 25 26
> 26 27 28 29 30 31 23 24 25 26 27 28 29 27 28 29 30
> 30 31
> 10月 11月 12月
> 日 月 火 水 木 金 土 日 月 火 水 木 金 土 日 月 火 水 木 金 土
> 1 2 3 1 2 3 4 5 6 7 1 2 3 4 5
> 4 5 6 7 8 9 10 8 9 10 11 12 13 14 6 7 8 9 10 11 12
> 11 12 13 14 15 16 17 15 16 17 18 19 20 21 13 14 15 16 17 18 19
> 18 19 20 21 22 23 24 22 23 24 25 26 27 28 20 21 22 23 24 25 26
> 25 26 27 28 29 30 31 29 30 27 28 29 30 31
>
>>
>>> I have tried to keep the same structure of the code between the column
>>> mode and the row mode.
>>> It is impossible to keep line width lower than 80.
>>
>> Do you mean source code line? ... 80 is not a strict rule, keep it
>> readable.
> Yes speaking about code line, with tab width set to 8, 80 is quickly reached.
Don't use a tab width of 8. Research has shown that the most readable
level of code indentation is between 2 and 4 characters. Personally I
use 3.
-- Bruce
>>
>>> I can try to split the big function `cal_output_months` this will make
>>> it more readable, but will introduce a lot of change for no feature.
>>> Any advice on this ?
>>
>> Your cal_col_output_months() does not look like any huge monster.
>>
>> I have added one comment to your commits/cal_column at github.
> Thanks I will do the modification
>>
>> Karel
>>
>>
>> --
>> Karel Zak <kzak@redhat.com>
>> http://karelzak.blogspot.com
>>
>
next prev parent reply other threads:[~2020-04-15 22:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 20:41 cal: column mode Aurélien Lajoie
2020-04-14 11:38 ` Karel Zak
2020-04-14 20:18 ` Aurélien Lajoie
2020-04-15 22:04 ` Bruce Dubbs [this message]
2020-05-06 13:35 ` Karel Zak
2020-05-06 19:06 ` Aurélien Lajoie
2020-05-06 21:13 ` Aurélien Lajoie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00b92978-b2a8-1ebb-8ede-a7745046d460@gmail.com \
--to=bruce.dubbs@gmail.com \
--cc=kzak@redhat.com \
--cc=orel@melix.net \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).