Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-05-29 Thread Randell Jesup
On 3/30/15 6:08 PM, Kan-Ru Chen (陳侃如) wrote:
 Is there an hg or git equivalent to Perforce's Time-Lapse View tool? It
 shows a global view of a file's blame history and you can visually 
 scrub
 through the blame history.
 
 
 You mean like git log -p FILE? I'm sure there are fancier graphic ways to
 visualize it, but that's the way I usually scrub my way back through
 restyles etc.
 I think Chris might want to follow the history of a particular line,
 that is usually what we use flame for. I find |git gui blame file|
 very useful.

Just to clarify what I meant by visually scrub through blame history,
here is a video demo of Perforce's GUI:

https://youtu.be/r1Zk5IaHZBQ?t=1m4s

*WANT* :-)  Seriously, is anything close to this available for hg or git?

-- 
Randell Jesup, Mozilla Corp
remove news for personal email
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-31 Thread Trevor Saunders
On Mon, Mar 30, 2015 at 11:01:28AM -0700, Bobby Holley wrote:
 On Mon, Mar 30, 2015 at 10:54 AM, Chris Peterson cpeter...@mozilla.com
 wrote:
 
  On 3/29/15 3:35 PM, smaug wrote:
 
  Having the one commit in the blame doesn't really matter. Often one
  needs to go to the first commit of the code anyway.
 
 
  Is there an hg or git equivalent to Perforce's Time-Lapse View tool? It
  shows a global view of a file's blame history and you can visually scrub
  through the blame history.
 
 
 You mean like git log -p FILE? I'm sure there are fancier graphic ways to
 visualize it, but that's the way I usually scrub my way back through
 restyles etc.

 I've been finding git log -L works pretty well.

 Trev

 ___
 dev-platform mailing list
 dev-platform@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-platform
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-31 Thread Chris Peterson



On 3/30/15 6:08 PM, Kan-Ru Chen (陳侃如) wrote:

Is there an hg or git equivalent to Perforce's Time-Lapse View tool? It
shows a global view of a file's blame history and you can visually scrub
through the blame history.



You mean like git log -p FILE? I'm sure there are fancier graphic ways to
visualize it, but that's the way I usually scrub my way back through
restyles etc.

I think Chris might want to follow the history of a particular line,
that is usually what we use flame for. I find |git gui blame file|
very useful.


Just to clarify what I meant by visually scrub through blame history, 
here is a video demo of Perforce's GUI:


https://youtu.be/r1Zk5IaHZBQ?t=1m4s

chris
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-30 Thread Chris Peterson

On 3/29/15 3:35 PM, smaug wrote:

Having the one commit in the blame doesn't really matter. Often one
needs to go to the first commit of the code anyway.


Is there an hg or git equivalent to Perforce's Time-Lapse View tool? 
It shows a global view of a file's blame history and you can visually 
scrub through the blame history.


http://www.perforce.com/product/components/perforce-visual-client
http://www.perforce.com/sites/default/files/time-lapse-view-new-look.png


chris
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-30 Thread Bobby Holley
On Mon, Mar 30, 2015 at 10:54 AM, Chris Peterson cpeter...@mozilla.com
wrote:

 On 3/29/15 3:35 PM, smaug wrote:

 Having the one commit in the blame doesn't really matter. Often one
 needs to go to the first commit of the code anyway.


 Is there an hg or git equivalent to Perforce's Time-Lapse View tool? It
 shows a global view of a file's blame history and you can visually scrub
 through the blame history.


You mean like git log -p FILE? I'm sure there are fancier graphic ways to
visualize it, but that's the way I usually scrub my way back through
restyles etc.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-30 Thread 陳侃如
Bobby Holley bobbyhol...@gmail.com writes:

 On Mon, Mar 30, 2015 at 10:54 AM, Chris Peterson cpeter...@mozilla.com
 wrote:

 On 3/29/15 3:35 PM, smaug wrote:

 Having the one commit in the blame doesn't really matter. Often one
 needs to go to the first commit of the code anyway.


 Is there an hg or git equivalent to Perforce's Time-Lapse View tool? It
 shows a global view of a file's blame history and you can visually scrub
 through the blame history.


 You mean like git log -p FILE? I'm sure there are fancier graphic ways to
 visualize it, but that's the way I usually scrub my way back through
 restyles etc.

I think Chris might want to follow the history of a particular line,
that is usually what we use flame for. I find |git gui blame file|
very useful.

Kanru
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-29 Thread Karl Tomlinson
Bobby Holley writes:

 On Fri, Mar 27, 2015 at 2:04 PM, Mats Palmgren m...@mozilla.com wrote:

 So let's change the project-wide coding rules instead to allow 99
 columns as the hard limit, but keep 80 columns as the recommended
 (soft) limit.


 I think we should avoid opening up a can of worms on the merits of
 different styles, and instead focus on the most pragmatic ways to unify
 Gecko and JS style. Under that framework, Mats' proposal makes a lot of
 sense.

... in that it tolerates multiple different styles.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-29 Thread smaug

On 03/28/2015 02:32 AM, Nicolas B. Pierron wrote:

On 03/27/2015 11:51 PM, Bobby Holley wrote:

On Fri, Mar 27, 2015 at 2:04 PM, Mats Palmgren m...@mozilla.com wrote:

So let's change the project-wide coding rules instead to allow 99

columns as the hard limit, but keep 80 columns as the recommended
(soft) limit.



I think we should avoid opening up a can of worms on the merits of
different styles, and instead focus on the most pragmatic ways to unify
Gecko and JS style. Under that framework, Mats' proposal makes a lot of
sense.



I do not see the advantages of having huge patches to rewrite an entire project 
just for the benefit of having only one style guide.



My reviewer's hat on, having just one style speeds up reviewing and makes the 
code easier to read.
So much nicer to look at patches dealing with xpcom/ or docshell/ now that they 
have been converted to use the normal
coding style.

Having the one commit in the blame doesn't really matter. Often one needs to go 
to the first commit of the code anyway.


-Olli





What I see with such patches, is pain to rebase patches, pain to change habs of 
the developers, and security issues as contributors (including
employees) do not look for the original authors.

 From my point of view, the only time where such patches sounds acceptable, is 
when you are trying to take over a dead project, and as far as I know
SpiderMonkey is far from being a dead project.



___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-28 Thread Jan De Mooij
I just pushed this to inbound (rev 0c030f97a04f).

Jan

On Thu, Mar 26, 2015 at 11:52 PM, Jan De Mooij jdemo...@mozilla.com wrote:

 Hi all,

 After some discussion, we want to switch SpiderMonkey and XPConnect style
 for pointers/references from |T *p| to |T* p| (and |T ref| to |T ref|).
 This matches the rest of the project and will make life easier for
 developers working on multiple parts of the tree.

 Although this will break a lot of patches, you can run the script in bug
 1144366 [0] on patch files too and they should apply cleanly after that
 (make sure you have backups):

 restyle.py --files patch1 [patch2..]

 The plan is to land this change next weekend or early next week. We'll
 likely land this on aurora/beta/ESR as well, to avoid painful uplifts.

 Finally, a common argument for the current style is that it might be
 clearer when you declare multiple pointers, like this:

 int *x, *y;   // x and y are int*

 However, I think this is pretty confusing either way, and both our style
 guide [1] and Stroustrup [2] suggest sticking to one pointer per
 declaration. I'll write a separate patch to do this.

 I'm very sorry for the rebase and merge pain, but we think this is worth
 doing.

 Thanks,
 Jan

 [0] https://bugzilla.mozilla.org/show_bug.cgi?id=1144366
 [1]
 https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Declarations
 [2] http://www.stroustrup.com/bs_faq2.html#whitespace

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-27 Thread Nicolas B. Pierron

On 03/27/2015 12:19 AM, Bobby Holley wrote:

Can we switch from 4-space to 2-space indentation at some point too?


Yeah good idea, and we should probably scratch everything we have done so 
far and rewrite everything in whitespace.


--
Nicolas B. Pierron
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-27 Thread Bobby Holley
On Thu, Mar 26, 2015 at 10:37 PM, Birunthan Mohanathas 
birunt...@mohanathas.com wrote:

 On 27 March 2015 at 01:19, Bobby Holley bobbyhol...@gmail.com wrote:
  Can we switch from 4-space to 2-space indentation at some point too?
  Together, those would remove the most glaring formatting differences. The
  others (bracing single-line consequents, aNamingWarts, etc) might be
 harder.

 I've done all of that and more on a few directories (e.g. xpcom/ in
 bug 1046841). If we reach consensus regarding js/ style, I could take
 care of the conversion over the summer.


That would be awesome! I'm in favor, and I'm pretty sure that jorendorff
and jandem would be as well. Jason/Jan, can you confirm?

On Fri, Mar 27, 2015 at 4:16 AM, Nicolas B. Pierron 
nicolas.b.pier...@mozilla.com wrote:
On 03/27/2015 12:19 AM, Bobby Holley wrote:

 Can we switch from 4-space to 2-space indentation at some point too?


Yeah good idea, and we should probably scratch everything we have done so
far and rewrite everything in whitespace.

I don't follow the point you're trying to make.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-27 Thread Jan De Mooij
On Fri, Mar 27, 2015 at 5:12 PM, Bobby Holley bobbyhol...@gmail.com wrote:

 On Thu, Mar 26, 2015 at 10:37 PM, Birunthan Mohanathas 
 birunt...@mohanathas.com wrote:

 I've done all of that and more on a few directories (e.g. xpcom/ in
 bug 1046841). If we reach consensus regarding js/ style, I could take
 care of the conversion over the summer.


 That would be awesome! I'm in favor, and I'm pretty sure that jorendorff
 and jandem would be as well. Jason/Jan, can you confirm?


I don't have strong opinions on coding style, as long as we pick one and
use it consistently. MFBT is a good argument to switch: SpiderMonkey uses
Vector and some others in a ton of places and if eventually all MFBT
classes will have methods that start with an uppercase letter, it will get
a bit awkward. On the other hand, going from 99 columns to 80 will also be
annoying in a bunch of places.

It's up to Jason :)

Jan
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-27 Thread Botond Ballo
 and security issues as contributors (including employees)
 do not look for the original authors.

It would be really nice if there was a way to annotate whitespace-only
changesets as being such, and then configure tools such as hg blame
to look past them.

Cheers,
Botond
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-27 Thread Martin Thomson
On Fri, Mar 27, 2015 at 7:59 PM, Botond Ballo bba...@mozilla.com wrote:
 It would be really nice if there was a way to annotate whitespace-only
 changesets as being such, and then configure tools such as hg blame
 to look past them.


You mean `hg blame -w` ?
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-27 Thread Nicolas B. Pierron

On 03/27/2015 11:51 PM, Bobby Holley wrote:

On Fri, Mar 27, 2015 at 2:04 PM, Mats Palmgren m...@mozilla.com wrote:

So let's change the project-wide coding rules instead to allow 99

columns as the hard limit, but keep 80 columns as the recommended
(soft) limit.



I think we should avoid opening up a can of worms on the merits of
different styles, and instead focus on the most pragmatic ways to unify
Gecko and JS style. Under that framework, Mats' proposal makes a lot of
sense.



I do not see the advantages of having huge patches to rewrite an entire 
project just for the benefit of having only one style guide.


What I see with such patches, is pain to rebase patches, pain to change habs 
of the developers, and security issues as contributors (including employees) 
do not look for the original authors.


From my point of view, the only time where such patches sounds acceptable, 
is when you are trying to take over a dead project, and as far as I know 
SpiderMonkey is far from being a dead project.


--
Nicolas B. Pierron

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: [JS-internals] SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-26 Thread Nicholas Nethercote
On Fri, Mar 27, 2015 at 10:25 AM, Robert O'Callahan
rob...@ocallahan.org wrote:

 Switching method names to start with a capital letter would be helpful too
 ... especially where it's leaked into MFBT.

FWIW, here is the contents of mfbt/STYLE:

 MFBT uses standard Mozilla style, with the following exceptions.

 - Some of the files use a lower-case letter at the start of function names.
   This is because MFBT used to use a different style, and was later converted
   to standard Mozilla style. These functions have not been changed to use an
   upper-case letter because it would cause a lot of churn in other parts of 
 the
   codebase. However, new files should follow standard Mozilla style and use an
   upper-case letter at the start of function names.

 - Imported third-party code (such as decimal/*, double-conversion/*, and lz4*)
   remains in its original style.

Getting rid of that first exception would be a fine thing, IMO.

Nick
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-26 Thread Birunthan Mohanathas
On 27 March 2015 at 01:19, Bobby Holley bobbyhol...@gmail.com wrote:
 Can we switch from 4-space to 2-space indentation at some point too?
 Together, those would remove the most glaring formatting differences. The
 others (bracing single-line consequents, aNamingWarts, etc) might be harder.

I've done all of that and more on a few directories (e.g. xpcom/ in
bug 1046841). If we reach consensus regarding js/ style, I could take
care of the conversion over the summer.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-26 Thread Eric Shepherd (Sheppy)
Is the bug tasking this marked dev-doc-needed? We will have SD

A bunch of cleanup to do

On Thursday, March 26, 2015, Jan De Mooij jdemo...@mozilla.com wrote:

 Hi all,

 After some discussion, we want to switch SpiderMonkey and XPConnect style
 for pointers/references from |T *p| to |T* p| (and |T ref| to |T ref|).
 This matches the rest of the project and will make life easier for
 developers working on multiple parts of the tree.

 Although this will break a lot of patches, you can run the script in bug
 1144366 [0] on patch files too and they should apply cleanly after that
 (make sure you have backups):

 restyle.py --files patch1 [patch2..]

 The plan is to land this change next weekend or early next week. We'll
 likely land this on aurora/beta/ESR as well, to avoid painful uplifts.

 Finally, a common argument for the current style is that it might be
 clearer when you declare multiple pointers, like this:

 int *x, *y;   // x and y are int*

 However, I think this is pretty confusing either way, and both our style
 guide [1] and Stroustrup [2] suggest sticking to one pointer per
 declaration. I'll write a separate patch to do this.

 I'm very sorry for the rebase and merge pain, but we think this is worth
 doing.

 Thanks,
 Jan

 [0] https://bugzilla.mozilla.org/show_bug.cgi?id=1144366
 [1]

 https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Declarations
 [2] http://www.stroustrup.com/bs_faq2.html#whitespace
 ___
 dev-platform mailing list
 dev-platform@lists.mozilla.org javascript:;
 https://lists.mozilla.org/listinfo/dev-platform



-- 

Eric Shepherd
Senior Technical Writer
Mozilla
Blog: http://www.bitstampede.com/
Twitter: http://twitter.com/sheppy
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-26 Thread Jan De Mooij
Hi all,

After some discussion, we want to switch SpiderMonkey and XPConnect style
for pointers/references from |T *p| to |T* p| (and |T ref| to |T ref|).
This matches the rest of the project and will make life easier for
developers working on multiple parts of the tree.

Although this will break a lot of patches, you can run the script in bug
1144366 [0] on patch files too and they should apply cleanly after that
(make sure you have backups):

restyle.py --files patch1 [patch2..]

The plan is to land this change next weekend or early next week. We'll
likely land this on aurora/beta/ESR as well, to avoid painful uplifts.

Finally, a common argument for the current style is that it might be
clearer when you declare multiple pointers, like this:

int *x, *y;   // x and y are int*

However, I think this is pretty confusing either way, and both our style
guide [1] and Stroustrup [2] suggest sticking to one pointer per
declaration. I'll write a separate patch to do this.

I'm very sorry for the rebase and merge pain, but we think this is worth
doing.

Thanks,
Jan

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1144366
[1]
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Declarations
[2] http://www.stroustrup.com/bs_faq2.html#whitespace
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-26 Thread Bobby Holley
\o/

Can we switch from 4-space to 2-space indentation at some point too?
Together, those would remove the most glaring formatting differences. The
others (bracing single-line consequents, aNamingWarts, etc) might be harder.

On Thu, Mar 26, 2015 at 3:52 PM, Jan De Mooij jdemo...@mozilla.com wrote:

 Hi all,

 After some discussion, we want to switch SpiderMonkey and XPConnect style
 for pointers/references from |T *p| to |T* p| (and |T ref| to |T ref|).
 This matches the rest of the project and will make life easier for
 developers working on multiple parts of the tree.

 Although this will break a lot of patches, you can run the script in bug
 1144366 [0] on patch files too and they should apply cleanly after that
 (make sure you have backups):

 restyle.py --files patch1 [patch2..]

 The plan is to land this change next weekend or early next week. We'll
 likely land this on aurora/beta/ESR as well, to avoid painful uplifts.

 Finally, a common argument for the current style is that it might be
 clearer when you declare multiple pointers, like this:

 int *x, *y;   // x and y are int*

 However, I think this is pretty confusing either way, and both our style
 guide [1] and Stroustrup [2] suggest sticking to one pointer per
 declaration. I'll write a separate patch to do this.

 I'm very sorry for the rebase and merge pain, but we think this is worth
 doing.

 Thanks,
 Jan

 [0] https://bugzilla.mozilla.org/show_bug.cgi?id=1144366
 [1]

 https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Declarations
 [2] http://www.stroustrup.com/bs_faq2.html#whitespace
 ___
 dev-platform mailing list
 dev-platform@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-platform

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: SpiderMonkey and XPConnect style changing from |T *p| to |T* p|

2015-03-26 Thread Robert O'Callahan
On Fri, Mar 27, 2015 at 12:19 PM, Bobby Holley bobbyhol...@gmail.com
wrote:

 \o/

 Can we switch from 4-space to 2-space indentation at some point too?
 Together, those would remove the most glaring formatting differences. The
 others (bracing single-line consequents, aNamingWarts, etc) might be
 harder.


Switching method names to start with a capital letter would be helpful too
... especially where it's leaked into MFBT.

Rob
-- 
oIo otoeololo oyooouo otohoaoto oaonoyooonoeo owohooo oioso oaonogoroyo
owoiotoho oao oboroootohoeoro oooro osoiosotoeoro owoiololo oboeo
osouobojoeocoto otooo ojouodogomoeonoto.o oAogoaoiono,o oaonoyooonoeo
owohooo
osoaoyoso otooo oao oboroootohoeoro oooro osoiosotoeoro,o o‘oRoaocoao,o’o
oioso
oaonosowoeoroaoboloeo otooo otohoeo ocooouoroto.o oAonodo oaonoyooonoeo
owohooo
osoaoyoso,o o‘oYooouo ofolo!o’o owoiololo oboeo oiono odoaonogoeoro
ooofo
otohoeo ofoioroeo ooofo ohoeololo.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform