Re: [sage-devel] Re: Code style guidelines

2011-10-28 Thread Florent Hivert
On Wed, Oct 26, 2011 at 11:18:21PM -0700, Simon King wrote: > Hi Florent, > > On 26 Okt., 17:58, Florent Hivert wrote: > > If you want some example of what has been painful in the past, here they > > are. Note: I don't intend any offense against the responsible of those > > changes, I'm just aski

Re: [sage-devel] Re: Code style guidelines

2011-10-27 Thread Robert Bradshaw
On Thu, Oct 27, 2011 at 3:25 PM, Robert Bradshaw wrote: > On Tue, Oct 25, 2011 at 11:44 AM, William Stein wrote: >> On Tue, Oct 25, 2011 at 11:06 AM, leif wrote: >>> On 25 Okt., 12:04, Jeroen Demeyer wrote: On 2011-10-25 09:51, Dan Drake wrote: > I think that would be a good idea, alt

Re: [sage-devel] Re: Code style guidelines

2011-10-27 Thread Robert Bradshaw
On Tue, Oct 25, 2011 at 11:44 AM, William Stein wrote: > On Tue, Oct 25, 2011 at 11:06 AM, leif wrote: >> On 25 Okt., 12:04, Jeroen Demeyer wrote: >>> On 2011-10-25 09:51, Dan Drake wrote: >>> > I think that would be a good idea, although if you're just running that >>> > through sed, the exact

Re: [sage-devel] Re: Code style guidelines

2011-10-27 Thread Ivan Andrus
On Oct 27, 2011, at 2:38 AM, Keshav Kini wrote: > Would it be possible to configure emacs to pretend there is space there, or > something like that? I imagine it should be easy to add something to ~/.emacs > which upon loading a .py or .pyx file searches for blocks of empty lines, > checks previ

Re: [sage-devel] Re: Code style guidelines

2011-10-26 Thread Keshav Kini
Well, the kernel devs try to remove trailing whitespace where it is found (and while in the process of doing something more meaningful) [1] and avoid introducing it in the first place at all [2] but do not create patchbombs by going out of their way to do so. I mean, this just makes sense anyway

Re: [sage-devel] Re: Code style guidelines

2011-10-26 Thread William Stein
Hi, [whitespace] What do other major open source projects (e.g., the Linux kernel) do regarding whitespace and patches? What are their policies? William -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr

Re: [sage-devel] Re: Code style guidelines

2011-10-26 Thread Florent Hivert
Hi Keshav, My last answer was a little rude or at least very short. Since Nicolas is on vacation I'm the only sage-combinat coordinator keeping an eye here this week. Anyway, we are both currently completely buried under the teaching load (eg: for me 15 hours new lectures since Monday). So p

Re: [sage-devel] Re: Code style guidelines

2011-10-26 Thread Keshav Kini
Ah, I'm sorry, I misunderstood your question. Yes, that is a problem. I see no way around it in general. The only way to mitigate this is to try to avoid changing files that sage-combinat is working on. But I doubt that Sage developers want to commit to such a promise, unless sage-combinat want

Re: [sage-devel] Re: Code style guidelines

2011-10-26 Thread Florent Hivert
On Tue, Oct 25, 2011 at 11:42:05PM -0700, Keshav Kini wrote: > Since we would know where those lines are, we could search for the rest of > the line (i.e. the part that's not the trailing spaces) in your patch and > replace it with a line missing the whitespace. Voila, it is rebased, and > the p

Re: [sage-devel] Re: Code style guidelines

2011-10-25 Thread Keshav Kini
Since we would know where those lines are, we could search for the rest of the line (i.e. the part that's not the trailing spaces) in your patch and replace it with a line missing the whitespace. Voila, it is rebased, and the patch now applies to the new, whitespace-stripped file. If the line t

Re: [sage-devel] Re: Code style guidelines

2011-10-25 Thread Florent Hivert
> > Trailing white space on a non-empty line is another story. > > I think it would be ok to once remove all trailing whitespace from > *non-empty* lines of all Sage library files (preferably right before a > release is made); "rebasing" patches which due to that do no longer > apply is pretty tri

Re: [sage-devel] Re: Code style guidelines

2011-10-25 Thread William Stein
On Tue, Oct 25, 2011 at 11:06 AM, leif wrote: > On 25 Okt., 12:04, Jeroen Demeyer wrote: >> On 2011-10-25 09:51, Dan Drake wrote: >> > I think that would be a good idea, although if you're just running that >> > through sed, the exact patches applied would be different from the ones >> > on the t

Re: [sage-devel] Re: Code style guidelines

2011-10-25 Thread Ivan Andrus
On Oct 24, 2011, at 7:14 PM, Jason Grout wrote: > On 10/24/11 12:07 PM, leif wrote: >> On 24 Okt., 17:33, Jason Grout wrote: >>> Here is one of the big situations when I like trailing spaces: >>> >>> def hello():$ >>> print 'hi'$ >>> $ >>> print 'bye'$ >>> >>> To me, it's annoying

Re: [sage-devel] Re: Code style guidelines

2011-10-25 Thread Florent Hivert
On Tue, Oct 25, 2011 at 01:53:31AM -0400, daly wrote: > diff has options to deal with whitespace. > -b --ignore-space-change > -w --ignore-all-space I'm well aware of that... Mercurial has some extension as well... Or else, I can rewrite a script to do it... The question is: - is there a simple

Re: [sage-devel] Re: Code style guidelines

2011-10-24 Thread daly
diff has options to deal with whitespace. -b --ignore-space-change -w --ignore-all-space Tim Daly On Tue, 2011-10-25 at 07:35 +0200, Florent Hivert wrote: > On Mon, Oct 24, 2011 at 11:20:47AM -0700, Keshav Kini wrote: > > Hmm. I have to say I'm surprised that people are advocating for using > >

Re: [sage-devel] Re: Code style guidelines

2011-10-24 Thread Florent Hivert
On Mon, Oct 24, 2011 at 11:20:47AM -0700, Keshav Kini wrote: > Hmm. I have to say I'm surprised that people are advocating for using > trailing whitespace at all, as it seemed to me to be quite universally > reviled in the programming world. But on some reflection, the only real > problem with t

Re: [sage-devel] Re: Code style guidelines

2011-10-24 Thread Keshav Kini
Hmm. I have to say I'm surprised that people are advocating for using trailing whitespace at all, as it seemed to me to be quite universally reviled in the programming world. But on some reflection, the only real problem with trailing whitespace - other than that it bloats files and that it, er

Re: [sage-devel] Re: Code style guidelines

2011-10-24 Thread William Stein
On Mon, Oct 24, 2011 at 9:31 AM, Jason Grout wrote: > On 10/24/11 11:14 AM, John Cremona wrote: >>> >>> To me, it's annoying to have the cursor jump back to column 0 when >>> scrolling >>> down through the function.  I think that is the only situation where I >>> get >>> annoyed with my emacs sett

Re: [sage-devel] Re: Code style guidelines

2011-10-24 Thread John Cremona
> To me, it's annoying to have the cursor jump back to column 0 when scrolling > down through the function.  I think that is the only situation where I get > annoyed with my emacs settings of deleting trailing whitespace. > > Thanks, > > Jason > If you tell me how to make emacs do that, I'll stop