Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Rafael Kassner
AFAIK, PHP files are transformed in bytecode before the execution, so
white spaces will not interfere in nothing except more time to
transfer the file over SFTP.

It's pretty good to implement on our IDEs (and a lot of them is doing
it), once trailing white spaces are annoying while we are developing.

On Sat, Dec 24, 2011 at 4:21 AM, Laruence larue...@php.net wrote:
 Hi:
    I noted there are a lot of tail white spaces in our codes,

    it is better to remove them all,  and we also should watch such ws
 in furture.

    a simple way to erase such ws in vim, use :%s /\s\+$//g

 thanks

 --
 Laruence  Xinchen Hui
 http://www.laruence.com/

 --
 PHP Internals - PHP Runtime Development Mailing List
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Atenciosamente,
Rafael Kassner

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Pierre Joye
hi!

Laruence refers to the PHP C source code and removing trailing white
spaces is a good thing as it is part of our CS.

Go ahead Laruence :)

On Sat, Dec 24, 2011 at 12:09 PM, Rafael Kassner kass...@gmail.com wrote:
 AFAIK, PHP files are transformed in bytecode before the execution, so
 white spaces will not interfere in nothing except more time to
 transfer the file over SFTP.

 It's pretty good to implement on our IDEs (and a lot of them is doing
 it), once trailing white spaces are annoying while we are developing.

 On Sat, Dec 24, 2011 at 4:21 AM, Laruence larue...@php.net wrote:
 Hi:
    I noted there are a lot of tail white spaces in our codes,

    it is better to remove them all,  and we also should watch such ws
 in furture.

    a simple way to erase such ws in vim, use :%s /\s\+$//g

 thanks

 --
 Laruence  Xinchen Hui
 http://www.laruence.com/

 --
 PHP Internals - PHP Runtime Development Mailing List
 To unsubscribe, visit: http://www.php.net/unsub.php




 --
 Atenciosamente,
 Rafael Kassner

 --
 PHP Internals - PHP Runtime Development Mailing List
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Rafael Kassner
Oh, shame on my, I was thinking about PHP code. Even so, this is
coding standards for PHP C code. Have we this? This can be a good one.

On Sat, Dec 24, 2011 at 9:11 AM, Pierre Joye pierre@gmail.com wrote:
 hi!

 Laruence refers to the PHP C source code and removing trailing white
 spaces is a good thing as it is part of our CS.

 Go ahead Laruence :)

 On Sat, Dec 24, 2011 at 12:09 PM, Rafael Kassner kass...@gmail.com wrote:
 AFAIK, PHP files are transformed in bytecode before the execution, so
 white spaces will not interfere in nothing except more time to
 transfer the file over SFTP.

 It's pretty good to implement on our IDEs (and a lot of them is doing
 it), once trailing white spaces are annoying while we are developing.

 On Sat, Dec 24, 2011 at 4:21 AM, Laruence larue...@php.net wrote:
 Hi:
    I noted there are a lot of tail white spaces in our codes,

    it is better to remove them all,  and we also should watch such ws
 in furture.

    a simple way to erase such ws in vim, use :%s /\s\+$//g

 thanks

 --
 Laruence  Xinchen Hui
 http://www.laruence.com/

 --
 PHP Internals - PHP Runtime Development Mailing List
 To unsubscribe, visit: http://www.php.net/unsub.php




 --
 Atenciosamente,
 Rafael Kassner

 --
 PHP Internals - PHP Runtime Development Mailing List
 To unsubscribe, visit: http://www.php.net/unsub.php




 --
 Pierre

 @pierrejoye | http://blog.thepimp.net | http://www.libgd.org



-- 
Atenciosamente,
Rafael Kassner

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Derick Rethans
On Sat, 24 Dec 2011, Pierre Joye wrote:

 Laruence refers to the PHP C source code and removing trailing white
 spaces is a good thing as it is part of our CS.
 
 Go ahead Laruence :)

Please don't. Changing whitespace en-masse makes it a royal pain to do 
merges later. Please just fix them when you change the code on that line 
only.

Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Johannes Schlüter
On Sat, 2011-12-24 at 11:56 +, Derick Rethans wrote:
 On Sat, 24 Dec 2011, Pierre Joye wrote:
 
  Laruence refers to the PHP C source code and removing trailing white
  spaces is a good thing as it is part of our CS.
  
  Go ahead Laruence :)
 
 Please don't. Changing whitespace en-masse makes it a royal pain to do 
 merges later. Please just fix them when you change the code on that line 
 only.

It's not only bad for merges, also confusing with blame/annotate while
identifying the reason for bug.

johannes

 Derick
 
 -- 
 http://derickrethans.nl | http://xdebug.org
 Like Xdebug? Consider a donation: http://xdebug.org/donate.php
 twitter: @derickr and @xdebug
 



-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Laruence
2011/12/24 Johannes Schlüter johan...@schlueters.de:
 On Sat, 2011-12-24 at 11:56 +, Derick Rethans wrote:
 On Sat, 24 Dec 2011, Pierre Joye wrote:

  Laruence refers to the PHP C source code and removing trailing white
  spaces is a good thing as it is part of our CS.
 
  Go ahead Laruence :)

 Please don't. Changing whitespace en-masse makes it a royal pain to do
 merges later. Please just fix them when you change the code on that line
 only.

 It's not only bad for merges, also confusing with blame/annotate while
 identifying the reason for bug.

hmm, yes, you are right :),

actually,  I am not saying that I am going to do such behavior, just
remind us that we should watch such CS,

since there have been lots of tail ws now... :)

thanks
 johannes

 Derick

 --
 http://derickrethans.nl | http://xdebug.org
 Like Xdebug? Consider a donation: http://xdebug.org/donate.php
 twitter: @derickr and @xdebug






-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Pierre Joye
On Sat, Dec 24, 2011 at 12:56 PM, Derick Rethans der...@php.net wrote:
 On Sat, 24 Dec 2011, Pierre Joye wrote:

 Laruence refers to the PHP C source code and removing trailing white
 spaces is a good thing as it is part of our CS.

 Go ahead Laruence :)

 Please don't. Changing whitespace en-masse makes it a royal pain to do
 merges later. Please just fix them when you change the code on that line
 only.

There is no deal or pain to fix them in all branches at once. There is
no need either to do it all at once, but doing them while working on a
file in a separate commit before the actual change is just fine and is
a good practice.

-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Pierre Joye
2011/12/24 Johannes Schlüter johan...@schlueters.de:

 It's not only bad for merges, also confusing with blame/annotate while
 identifying the reason for bug.

Huh, since when do we commit or recommend to commit WS changes with
actual changes?


-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Laruence
Hi:

It is necessary that highlight the tail ws in view svn. that can help
us avoid adding more tail ws ..

:)

thanks

2011/12/24 Pierre Joye pierre@gmail.com:
 2011/12/24 Johannes Schlüter johan...@schlueters.de:

 It's not only bad for merges, also confusing with blame/annotate while
 identifying the reason for bug.

 Huh, since when do we commit or recommend to commit WS changes with
 actual changes?


 --
 Pierre

 @pierrejoye | http://blog.thepimp.net | http://www.libgd.org



-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Lester Caine

Pierre Joye wrote:

Laruence refers to the PHP C source code and removing trailing white
  spaces is a good thing as it is part of our CS.

  Go ahead Laruence:)


  Please don't. Changing whitespace en-masse makes it a royal pain to do
  merges later. Please just fix them when you change the code on that line
  only.

There is no deal or pain to fix them in all branches at once. There is
no need either to do it all at once, but doing them while working on a
file in a separate commit before the actual change is just fine and is
a good practice.


I'm with Derek ... having commits that are just WS corrections can be irritating 
when tracking changes ... but it would most definitely better to get them fixed 
before moving to git which would lump mass commits like that together in a 
change set and make rolling back changes a nightmare.


Logically it makes a lot more sense simply to leave them alone until such time 
as a file is touched for other reasons ... and at that time then a separate 
commit of the WS prior to the bug fix IS good practice. Bundling a whole array 
of WS fixes across unrelated sections of code is not once you move to any DVCS 
system.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Stas Malyshev

Hi!


It's not only bad for merges, also confusing with blame/annotate while
identifying the reason for bug.


As soon as we move to git, IIRC git has ability to separate ws-changes 
from non-ws ones and do diffs/history while ignoring ws. I didn't figure 
out if you can do non-ws merge (I suspect you can since you can do 
non-ws diff manually and then apply it).

So I'd suggest at least waiting till we get git running.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-24 Thread Ángel González
On 24/12/11 15:55, Lester Caine wrote:
 I'm with Derek ... having commits that are just WS corrections can be
 irritating when tracking changes ... but it would most definitely
 better to get them fixed before moving to git which would lump mass
 commits like that together in a change set and make rolling back
 changes a nightmare.

Perform that as the last svn commit?


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] [Proposal] Remove the tail ws in codes

2011-12-23 Thread Laruence
Hi:
I noted there are a lot of tail white spaces in our codes,

it is better to remove them all,  and we also should watch such ws
in furture.

a simple way to erase such ws in vim, use :%s /\s\+$//g

thanks

-- 
Laruence  Xinchen Hui
http://www.laruence.com/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php