Re: Indentation (was Re: invalid installdirs values)
On Sep 28, 2008, at 11:18, Michael G Schwern wrote: Ken Williams wrote: So, 2-char column indents is right out? That's what most of the code is using now, because it's the default default for cperl-mode, which I use. I'd like to keep that unless it's going to make everyone jump infrontof trains. If that's the only reason you're using 2-character tabs, and if anyone is going to define coding style it is not Ilya, I will happily provide you with a new cperl configuration! (setq indent-tabs-mode nil) (require 'cperl-mode) (setq cperl-indent-level 4) (setq cperl-label-offset 0) (setq cperl-continued-statement-offset 2) For _PBP_ compliance, this should be 4. (setq cperl-close-paren-offset -4) FWIW, my settings: (setq-default indent-tabs-mode nil) (setq cperl-hairy t) (setq cperl-electric-keywords t) (setq cperl-highlight-variables-indiscriminately t) (custom-set-variables '(cperl-close-paren-offset -4) '(cperl-continued-statement-offset 4) '(cperl-indent-level 4) '(cperl-indent-parens-as-block t) '(cperl-label-offset 0) '(cperl-merge-trailing-else nil) '(cperl-tab-always-indent t)) If the argument is "that's what emacs defaults to so we shouldn't rock the boat", looking at all the ratio of 2 to 4 character indent code out there I think the boat is sufficiently rocked. Agreed. I'm fine with 2 spaces…when I program Ruby. That's because it's the Ruby community style to use 2 spaces. The Perl community style, however, is 4. So that's what I urge. Most important, though, is eliminating the tabs. Best, David
Re: Indentation (was Re: invalid installdirs values)
Ken Williams wrote: > So, 2-char column indents is right out? That's what most of the code > is using now, because it's the default default for cperl-mode, which I > use. I'd like to keep that unless it's going to make everyone jump > infrontof trains. If that's the only reason you're using 2-character tabs, and if anyone is going to define coding style it is not Ilya, I will happily provide you with a new cperl configuration! (setq indent-tabs-mode nil) (require 'cperl-mode) (setq cperl-indent-level 4) (setq cperl-label-offset 0) (setq cperl-continued-statement-offset 2) (setq cperl-close-paren-offset -4) If the argument is "that's what emacs defaults to so we shouldn't rock the boat", looking at all the ratio of 2 to 4 character indent code out there I think the boat is sufficiently rocked. -- I have a date with some giant cartoon robots and booze.
Re: Indentation (was Re: invalid installdirs values)
So, 2-char column indents is right out? That's what most of the code is using now, because it's the default default for cperl-mode, which I use. I'd like to keep that unless it's going to make everyone jump infrontof trains. Avoiding tabs is fine with me, I can change my emacs somehow. -Ken
Re: Indentation (was Re: invalid installdirs values)
On Sep 27, 2008, at 22:25, Michael G Schwern wrote: no no no no no no no no no no no no no no no no no no no no no no no no no no At least, until we upgrade to widescreen SMTP. You have complete control over where your mail client wraps. If you can have 40 terminal windows open you can have a slightly wider mail client. Right, that's not an SMTP issue, it's a client issue and a content- type issue. See http://joeclark.org/ffaq.html That's not to say that Mail.app doesn't piss me off by letting me set hard line lengths, but I could change clients if I really needed something different (or use HTML mail). Best, David
Re: Indentation (was Re: invalid installdirs values)
On Sep 27, 2008, at 22:01, Michael G Schwern wrote: I don't understand the question. A blanket indentation change like running perltidy for the first time creates a "history sheer", all lines will have been changed at that revision. So when you run "svn blame" you don't see the last significant change, you see when perltidy was run. It's annoying and means you have to do more manually history searches. Ah, I see. I always forget about that. Fortunately, svn blame can take diff arguments! I did not know this. svn blame -x '-buw' will work to ignore whitspace. Oh, neat trick! It always prompts me, but doesn't seem to make any difference. Yeah, it doesn't do anything for me either. Probably need to frobnitz the right variables. Right. Um, can we have --indent-columns 4 please? And no tabs? Also, ---maximum-line-length=78 is probably the minimum it should be, not 72. Agreed, this is all for naught if it's not set at some semi-standard style. Yep. See _Perl Best Practices_, p 19. Best, David
Re: Indentation (was Re: invalid installdirs values)
Eric Wilhelm wrote: > # from David E. Wheeler > # on Saturday 27 September 2008 20:45: > >> Um, can we have --indent-columns 4 please? And no tabs? Also, --- >> maximum-line-length=78 is probably the minimum it should be, not 72. > > So, we can't use tabs because emacs didn't bring enough for everyone. > Fine. I accepted that years ago at which point I adopted 2-space > indent. If we *could* use tabs, you could look at them however you > like, because they would be adjustable. Sigh. I don't believe it, it's 2008 and we're still arguing about hard tabs. It doesn't work. It requires too much careful coordination and per-project editor tweaking. I set 4-character tabs to work on one project that's doing the "use hard tabs as configurable indentation" trick and then another project uses hard tabs, but they mean 8-character tabs (like in the perl source). It's just not worth it. 4-character indentation, no tabs. It's simple. It's common. It's hard to screw up. Then we don't have to rewrite every patch we get in. > no no no no no no no no no no no no no no no no no no no no no no no no > no no > > At least, until we upgrade to widescreen SMTP. You have complete control over where your mail client wraps. If you can have 40 terminal windows open you can have a slightly wider mail client. -- Stabbing you in the face for your own good.
Re: Indentation (was Re: invalid installdirs values)
David E. Wheeler wrote: > On Sep 27, 2008, at 19:28, Eric Wilhelm wrote: > >> I don't think I've ever gotten perltidy to do what I want. Well, what do you want? Maybe we can figure it out. >> I'm also not >> looking forward to having a "we needed to run perltidy" discontinuity >> in `svn blame` -- does '-w' work for that or is there some way around >> that? > > I don't understand the question. A blanket indentation change like running perltidy for the first time creates a "history sheer", all lines will have been changed at that revision. So when you run "svn blame" you don't see the last significant change, you see when perltidy was run. It's annoying and means you have to do more manually history searches. Fortunately, svn blame can take diff arguments! I did not know this. svn blame -x '-buw' will work to ignore whitspace. So we have a solution to ignore history sheer. I'm also looking at some SVN GUIs to see if any of them have an annotate browser like the Perl Repository Browser does. >> BTW, the emacs/vim lines at the start of the file should be an indicator >> as to how things are intended to be, but I'm not sure we ever even got >> emacs to pay any attention to them, let alone textmate or notepad or >> whatever. > > It always prompts me, but doesn't seem to make any difference. Yeah, it doesn't do anything for me either. Probably need to frobnitz the right variables. > Um, can we have --indent-columns 4 please? And no tabs? Also, > ---maximum-line-length=78 is probably the minimum it should be, not 72. Agreed, this is all for naught if it's not set at some semi-standard style. -- 91. I am not authorized to initiate Jihad. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
Re: Indentation (was Re: invalid installdirs values)
# from David E. Wheeler # on Saturday 27 September 2008 20:45: >Um, can we have --indent-columns 4 please? And no tabs? Also, --- >maximum-line-length=78 is probably the minimum it should be, not 72. So, we can't use tabs because emacs didn't bring enough for everyone. Fine. I accepted that years ago at which point I adopted 2-space indent. If we *could* use tabs, you could look at them however you like, because they would be adjustable. Sigh. 78: see: perl -le 'print " no"x(78/3)' no no no no no no no no no no no no no no no no no no no no no no no no no no At least, until we upgrade to widescreen SMTP. --Eric -- We who cut mere stones must always be envisioning cathedrals. --Quarry worker's creed --- http://scratchcomputing.com ---
Re: Indentation (was Re: invalid installdirs values)
On Sep 27, 2008, at 19:28, Eric Wilhelm wrote: I don't think I've ever gotten perltidy to do what I want. I'm also not looking forward to having a "we needed to run perltidy" discontinuity in `svn blame` -- does '-w' work for that or is there some way around that? I don't understand the question. BTW, the emacs/vim lines at the start of the file should be an indicator as to how things are intended to be, but I'm not sure we ever even got emacs to pay any attention to them, let alone textmate or notepad or whatever. It always prompts me, but doesn't seem to make any difference. With the perltidyrc I have thus far managed to hate least, it looks like about a 5k patch. Which is smaller than the 7k from schwern's, so I'll check this in while you all discuss it and then I guess mess with actually applying some patches or something. /me updates… Um, can we have --indent-columns 4 please? And no tabs? Also, --- maximum-line-length=78 is probably the minimum it should be, not 72. And first to bump the version number. At least, I think we should be bumping it first thing post-release such that any changes will appear in the META.yml, etc. Yeah, makes sense to me. Best, David
Re: Indentation (was Re: invalid installdirs values)
On Sep 27, 2008, at 18:18, Michael G Schwern wrote: David E. Wheeler wrote: On Sep 27, 2008, at 14:42, Michael G Schwern <[EMAIL PROTECTED]> wrote: You can set SVKDIFF='diff -bu' to do that all the time. I've sometimes even thrown in -w, -B and -E. I don't so SVK. I should try it again one of these days. Those are GNU diff switches. SVKDIFF overrides SVK's internal diff to use an external one (GNU diff). Nice. To make it clear, that's perltidy tweaked to my style. Eric and Ken can tweak it as they like, but it's a good place to start from. Of course. Works for me. Best, David
Re: Indentation (was Re: invalid installdirs values)
# from Michael G Schwern # on Saturday 27 September 2008 18:18: >To make it clear, that's perltidy tweaked to my style. Eric and Ken > can tweak it as they like, but it's a good place to start from. I don't think I've ever gotten perltidy to do what I want. I'm also not looking forward to having a "we needed to run perltidy" discontinuity in `svn blame` -- does '-w' work for that or is there some way around that? Or maybe I just need a better tool for tracing the history -- since refactoring into the ::Utils is going to introduce similar data loss? BTW, the emacs/vim lines at the start of the file should be an indicator as to how things are intended to be, but I'm not sure we ever even got emacs to pay any attention to them, let alone textmate or notepad or whatever. With the perltidyrc I have thus far managed to hate least, it looks like about a 5k patch. Which is smaller than the 7k from schwern's, so I'll check this in while you all discuss it and then I guess mess with actually applying some patches or something. And first to bump the version number. At least, I think we should be bumping it first thing post-release such that any changes will appear in the META.yml, etc. --Eric -- Don't worry about what anybody else is going to do. The best way to predict the future is to invent it. --Alan Kay --- http://scratchcomputing.com ---
Re: Indentation (was Re: invalid installdirs values)
David E. Wheeler wrote: > On Sep 27, 2008, at 14:42, Michael G Schwern <[EMAIL PROTECTED]> wrote: >> >>> >> You can set SVKDIFF='diff -bu' to do that all the time. I've >> sometimes even >> thrown in -w, -B and -E. > > I don't so SVK. I should try it again one of these days. Those are GNU diff switches. SVKDIFF overrides SVK's internal diff to use an external one (GNU diff). >> FWIW I ran perltidy over the source and the tests passed. This is the >> perltidy from Test::More which would be a good place to start. >> >> http://test-more.googlecode.com/svn/trunk/.perltidyrc To make it clear, that's perltidy tweaked to my style. Eric and Ken can tweak it as they like, but it's a good place to start from. -- 31. Not allowed to let sock puppets take responsibility for any of my actions. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/
Re: Indentation (was Re: invalid installdirs values)
On Sep 27, 2008, at 14:42, Michael G Schwern <[EMAIL PROTECTED]> wrote: You can set SVKDIFF='diff -bu' to do that all the time. I've sometimes even thrown in -w, -B and -E. I don't so SVK. I should try it again one of these days. FWIW I ran perltidy over the source and the tests passed. This is the perltidy from Test::More which would be a good place to start. http://test-more.googlecode.com/svn/trunk/.perltidyrc Once the code is tidy one can play the "tidy with our own personal settings, edit, tidy with project settings, commit" game if the project style is that bothersome. Works for me. Ken? Eric? Beat, David
Re: Indentation (was Re: invalid installdirs values)
David E. Wheeler wrote: > On Sep 27, 2008, at 14:11, Michael G Schwern wrote: > >> Try using diff -b. It filters out whitespace changes making it easier >> to see >> the significant changes. > > I used `svn diff -x '-ub'. Attached. You can set SVKDIFF='diff -bu' to do that all the time. I've sometimes even thrown in -w, -B and -E. >> At the risk of starting a flamewar, can we reindent the whole thing at 4 >> characters? The 2 char indent means we're constantly going to have to >> reindent submissions. > > +1 YES, PLEASE! This is the indentation I always use. Also, no tabs > (there are lots in the source). FWIW I ran perltidy over the source and the tests passed. This is the perltidy from Test::More which would be a good place to start. http://test-more.googlecode.com/svn/trunk/.perltidyrc Once the code is tidy one can play the "tidy with our own personal settings, edit, tidy with project settings, commit" game if the project style is that bothersome. -- If at first you don't succeed--you fail. -- "Portal" demo
Re: Indentation (was Re: invalid installdirs values)
On Sep 27, 2008, at 14:11, Michael G Schwern wrote: Try using diff -b. It filters out whitespace changes making it easier to see the significant changes. I used `svn diff -x '-ub'. Attached. At the risk of starting a flamewar, can we reindent the whole thing at 4 characters? The 2 char indent means we're constantly going to have to reindent submissions. +1 YES, PLEASE! This is the indentation I always use. Also, no tabs (there are lots in the source). Thanks, David add_property.patch Description: Binary data