Project

General

Profile

Bug #5034

C Source Code formatting

Added by lazaridis.com (Lazaridis Ilias) almost 8 years ago. Updated almost 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
-
Backport:
[ruby-core:38109]

Description

=begin
The C sources use tab-4, tab-8 and spaces intermixed.

The tab-8 do not display correctly in several tools (displayed as tab-4).

The suggestion is that the use of tab8 is disallowed (two tab-4 instead of one tab-8).

((URL:http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto))

=end

History

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

  • ruby -v changed from 1.9.x to -

Hi,

At Sun, 17 Jul 2011 07:25:18 +0900,
Lazaridis Ilias wrote in [ruby-core:38109]:

The C sources use tab-4, tab-8 and spaces intermixed.

The tab-8 do not display correctly in several tools (displayed as tab-4).

What evil tools do you use?

The suggestion is that the use of tab8 is disallowed (two tab-4 instead of one tab-8).

I say "NO". Tab-4 is unacceptable at least.

--
Nobu Nakada

Updated by kosaki (Motohiro KOSAKI) almost 8 years ago

2011/7/17 Nobuyoshi Nakada nobu@ruby-lang.org:

Hi,

At Sun, 17 Jul 2011 07:25:18 +0900,
Lazaridis Ilias wrote in [ruby-core:38109]:

The C sources use tab-4, tab-8 and spaces intermixed.

The tab-8 do not display correctly in several tools (displayed as tab-4).

What evil tools do you use?

The suggestion is that the use of tab8 is disallowed (two tab-4 instead of one tab-8).

I say "NO".  Tab-4 is unacceptable at least.

I'll second. Almost code of ruby depend on tab-8 now. I'm not
convinced why we need
break it.

Updated by naruse (Yui NARUSE) almost 8 years ago

  • Status changed from Open to Rejected

see [ruby-core:36255]

Updated by lazaridis.com (Lazaridis Ilias) almost 8 years ago

Yui NARUSE wrote:

see [ruby-core:36255]

I don't see the relation of the linked message to this issue (which was ONCE MORE rejected much to fast).

What is going on with you people here?

Are you all blind?

Or are you kidding me?

You have a defect within the overall source-code base.

The sources are like crap, because you cannot use tab-8 when having indentation-level of 4. That's just insane. It looks to me that you have a tool that mixes automatically space-4 and tab-8. That's even more insane (setting up tools to produce inconsistency).

Within 20 years, I've never saw something like this, never.

Please, get serious.

Disallowing tab-8 is a necessity in a indent-4 project, simply because tab-4 has precedence.

Updated by naruse (Yui NARUSE) almost 8 years ago

We don't want to waste time with bikedhed like coding styles.

Updated by nobu (Nobuyoshi Nakada) almost 8 years ago

Hi,

At Sun, 17 Jul 2011 11:03:36 +0900,
Lazaridis Ilias wrote in [ruby-core:38118]:

Within 20 years, I've never saw something like this, never.

Then you should know the real world more, not only the bikeshed world.

--
Nobu Nakada

Updated by lazaridis.com (Lazaridis Ilias) almost 8 years ago

Nobuyoshi Nakada wrote:

Hi,

At Sun, 17 Jul 2011 11:03:36 +0900,
Lazaridis Ilias wrote in [ruby-core:38118]:

Within 20 years, I've never saw something like this, never.

Then you should know the real world more, not only the bikeshed world.

Explain me this "real world" please.

Why do I have to see continuously crap like this:

....code
------->code
------->....code
------->------->code
------->------->....code
....code

Can please anyone tell me one rationale behind the usage of tab-8 / space-4 combinations?

(if you say: "it's emac's default", then it's not a rationale)

Updated by naruse (Yui NARUSE) almost 8 years ago

see [ruby-core:36255]

Updated by duerst (Martin Dürst) almost 8 years ago

Lazaridis Ilias wrote:

[citing in pieces]

Are you all blind? > The sources are like crap, > That's just insane.
That's even more insane > Please, get serious.

Just some advice: If you hope to have some influence on Ruby, it would help
if you would give all the people who worked hard to get Ruby to the place it
is the benefit of the doubt. They truely deserve a lot more, but that's the
minimum level of courtesy. If you are not in the mood for it, just take a
break and wait a day to write or two before writing the next post. Thanks!

Updated by lazaridis.com (Lazaridis Ilias) almost 8 years ago

Martin Dürst wrote:

Lazaridis Ilias wrote:

[citing in pieces]

Are you all blind? > The sources are like crap, > That's just insane.
That's even more insane > Please, get serious.

Just some advice:

Please keep your advices for the juniors.

That I change to a harsher tenor does not mean that I've lost control or that I do no respect the people and their work (hint: a real friend will even hit you, if necessary to help you).

At least this issue here gives a good example of "how to NOT process issues":

Refine and Document the Issue Tracking Process
http://redmine.ruby-lang.org/issues/4963

-

Mr. Kosaki wrote: "I'm not convinced why we need break it."

It was my turn to come up with rationales.

But Mr. Naruse, disrespectfully (and incorrectly) rejected the issue in the middle of an open discussion.

That's why I switched to a harsher tone.

-

But is it harsh to state facts?

  • The C source quality is low, it's a fact
  • people have problems with the tab-8/space-4, (see the sources)
    • ignoring this is blindness - it's a fact
  • using automations to produce an inconsistency is insane, it's a fact.

-

The development happens on heterogeneous environments. Not all people use emacs or other "far-out-in-space" highly-configurable editors.

I use usually Kommodo IDE, but I go sometimes (e.g. during difficult refactoring) to very thin editors.

To make this issue productive again:

  • please state the rationale for the use of tab-8/space-4 for a indent-4 project.
  • please suggest a solution for simple tools, thus there's no need to use tab-8/space-4 manually.

Updated by shyouhei (Shyouhei Urabe) almost 8 years ago

Ilias you're challenging not only the ruby community but also the BSD kernel hackers,
where they also use 4-space and tabs mixed (google "BSD KNF"). So if you've never
seen this, you are just... innocent.

Indentation is a holly war. You have your religion. We have ours. I know you are
frustrated but, sorry we don't want to change it.

  • The C source quality is low, it's a fact

Show us scientific (or at least statistical) evidence for the "fact" you are talking
about.

  • people have problems with the tab-8/space-4, (see the sources)
    • ignoring this is blindness - it's a fact

A religion cannot last without a blind love.

  • using automations to produce an inconsistency is insane, it's a fact.

Just use a better editor.

Updated by wishdev (John Higgins) almost 8 years ago

Lazaridis Ilias wrote:

=begin
The C sources use tab-4, tab-8 and spaces intermixed.

The tab-8 do not display correctly in several tools (displayed as tab-4).

The suggestion is that the use of tab8 is disallowed (two tab-4 instead of one tab-8).

((URL:http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto))

=end

Could you be so kind as to point to a specific file (and possibly a line range) that you are having issues with? This is something that is really easier with a concrete example.

Updated by lazaridis.com (Lazaridis Ilias) almost 8 years ago

Shyouhei Urabe wrote:

Ilias you're challenging not only the ruby community but also the BSD kernel hackers,
where they also use 4-space and tabs mixed (google "BSD KNF"). So if you've never
seen this, you are just... innocent.

Motorola, Thomson, ARM, Intel, NSC and a few more electronic multinationals:

I have never seen in any C source-code of them tab-8/space-4 combinations to achieve indent-4.

Most possible, they all just use "bad" editors?

Or because they are not into the "We-FORCE-you-to-do-it-unix-like-despite-your-preferences-and-rationales".

Indentation is a holly war. You have your religion. We have ours. I know you are
frustrated but, sorry we don't want to change it.

I don't care about any religion - just about rationales. You don't want to listen to rationales, and "reject" this issue in the middle of the discussion. But it's ok.

  • The C source quality is low, it's a fact

Show us scientific (or at least statistical) evidence for the "fact" you are talking
about.

  • you don't know that your sources cannot be displayed/edited correctly/sanely in other environments? (due to the mix of tab-8/space-4? )
  • (off-context, but relevant to "quality")
    • you don't know that your sources are nearly undocumented?
    • you don't know that your sources lack structure and consistency of naming?

Do I really have to invest time to "proof" this?

  • people have problems with the tab-8/space-4, (see the sources)
    • ignoring this is blindness - it's a fact

A religion cannot last without a blind love.

tab-8/space-4 intermix cannot last without an automation.

  • using automations to produce an inconsistency is insane, it's a fact.

Just use a better editor.

You may tell this to the electronic giants, too.

-

"
To make this issue productive again:

  • please state the rationale for the use of tab-8/space-4 for a indent-4 project.
  • please suggest a solution for simple tools, thus there's no need to use tab-8/space-4 manually. "

At least, please let me know the rationale, thus I can write some documentation for people, thus they can accept it easier.

I've updated the project-documentation subjecting setup of Kommodo-IDE. Seems to be a "better editor", as it masters tab-space-insanity:

http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#For-Komodo-IDE-52

(and forgive my tone. I'm just frustrated about this issue-processing of yours)

Updated by shyouhei (Shyouhei Urabe) almost 8 years ago

Nice joke.

I repeat:

  1. Indentation is a holly war. It is not a matter of goodness. It is a point-of-view thing.
    1.1. I know you are frustrated.
    1.2. But we are not.

  2. I never said those electronic giants are doing wrong.
    2.1. But you are.
    2.2. Don't boycott something only because you cannot understand that.
    2.3. We are not against YOU to use 4 spaces FOR YOUR PROJECT so please DON'T FORCE US YOUR WAY.

If you wanna be respected by someone, you must first respect them.

Updated by lazaridis.com (Lazaridis Ilias) almost 8 years ago

=begin

"
To make this issue productive again:

  • please state the rationale for the use of tab-8/space-4 for a indent-4 project.
  • please suggest a solution for simple tools, thus there's no need to use tab-8/space-4 manually. "

At least, please let me know the rationale, thus I can write some documentation for people, thus they can accept it easier.

I've updated the project-documentation subjecting setup of Kommodo-IDE. Seems to be a "better editor", as it masters tab-space-insanity:

((URL:http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#For-Komodo-IDE-52))

=end

Updated by naruse (Yui NARUSE) almost 8 years ago

To make this issue productive again:

  • please state the rationale for the use of tab-8/space-4 for a indent-4 project.

Historical reason.
Additional to say Ruby has some codes ported from other projects like *BSD, Oniguruma and so on.
Such codes keep its style to ease merging a new code.

  • please suggest a solution for simple tools, thus there's no need to use tab-8/space-4 manually.

Use emacs or vim or some good editor.

At least, please let me know the rationale, thus I can write some documentation for people, thus they can accept it easier.

When you make a patch, the patch should be minimal.
It means not include cosmetic change; follow the style where you want to change.

I've updated the project-documentation subjecting setup of Kommodo-IDE. Seems to be a "better editor", as it masters tab-space-insanity:

((URL:http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#For-Komodo-IDE-52))

Good document; if Kommodo-IDE supports per project setting it should be better editor.

Anyway you seems you don't know GNU Coding Standards; projects under GNU uses the standard and
won't merge patches which aren't follow it.
http://www.gnu.org/prep/standards/standards.html

Updated by lazaridis.com (Lazaridis Ilias) almost 8 years ago

Yui NARUSE wrote:

To make this issue productive again:

  • please state the rationale for the use of tab-8/space-4 for a indent-4 project.

Historical reason.

ok, but why? Who decided and especially why (the rationale) to use tab-8/space-4 ?

I still believe it was a "hairy" developer, on drugs when he implemented/introduced it, and to lazy to correct it later.

Additional to say Ruby has some codes ported from other projects like *BSD, Oniguruma and so on.
Such codes keep its style to ease merging a new code.

I understand.

  • please suggest a solution for simple tools, thus there's no need to use tab-8/space-4 manually.

Use emacs or vim or some good editor.

I cannot write this as a suggestion, that's an user choice. I've added this to the document:

"
Simple Editor

Set the editor to tab-8, and indent manually as follows (-------> = tab-8, .... = space-4):

....
------->
------->....
------->------->
------->------->....

If you like to understand why you have to take this effort, see issue #5034.

In short: you must adopt the coding-style. If you don't have an editor which supports this kind of automated indenting, then you have to do it manually.
"

At least, please let me know the rationale, thus I can write some documentation for people, thus they can accept it easier.

When you make a patch, the patch should be minimal.
It means not include cosmetic change; follow the style where you want to change.

This is of course correct. See above to see what I meant with "rationale".

I've updated the project-documentation subjecting setup of Kommodo-IDE. Seems to be a "better editor", as it masters tab-space-insanity:

((URL:http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#For-Komodo-IDE-52))

Good document; if Kommodo-IDE supports per project setting it should be better editor.

I agree with you. I'm wondering that it does not allow per-project-indent settings (maybe I've just not found the way, but it seems to be not possible, at least in V5.2). Will see.

Anyway you seems you don't know GNU Coding Standards; projects under GNU uses the standard and
won't merge patches which aren't follow it.
http://www.gnu.org/prep/standards/standards.html

OMG that's really a very bad quality of presentation / documentation. That's why I really never can stay longer than 1 minute on a GNU site.

And what I understand is, that it's not only Microsoft that "forces" you into it's standards.

GNU does it, too.

But it's GNU that talks about freedom. So, Stallman & Co. are Hypocrites, and thus what they say has not so much relevance for me.

-

Independent of this, of course I obey to a project coding standard when sending a patch. That's a matter of courtesy.

Also available in: Atom PDF