Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-04 Thread Jeff Nowakowski
On 06/03/2011 02:48 PM, Walter Bright wrote: In the beginning, God created tabs. Tab stops were 8 spaces It's 2011. The idea that some character means 8 spaces and should be used to layout code is ass-backwards, regardless if everybody actually followed that rule. It was a fine rule for 1960

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Walter Bright
On 6/3/2011 5:14 PM, Stewart Gordon wrote: On 03/06/2011 20:15, Timon Gehr wrote: Daniel Gibson wrote: If you use tabs for indentation and spaces for alignment the tabsize doesn't matter. http://www.emacswiki.org/emacs/SmartTabs Taken the words out of my mouth there. I've been faced with

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Stewart Gordon
On 03/06/2011 20:15, Timon Gehr wrote: Daniel Gibson wrote: If you use tabs for indentation and spaces for alignment the tabsize doesn't matter. http://www.emacswiki.org/emacs/SmartTabs Taken the words out of my mouth there. I've been faced with files that are a mishmash of tabs and spac

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Stewart Gordon
On 03/06/2011 19:06, Jonathan M Davis wrote: That sort of talk leads to things like this: http://xkcd.com/378/ I was told that Real Programmers use punch cards. Someone must've found some even realer programmers Stewart.

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Adam Richardson
On Fri, Jun 3, 2011 at 3:04 PM, Daniel Gibson wrote: > Am 03.06.2011 20:54, schrieb Walter Bright: > > On 4/11/2011 1:31 PM, Nick Sabalausky wrote: > >> In other words, *some* editors handle space-indentation intelligently > >> (and > >> do so by reinventing *tabs*), while *all* editors handle ta

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Timon Gehr
Daniel Gibson wrote: > Am 03.06.2011 20:54, schrieb Walter Bright: >> On 4/11/2011 1:31 PM, Nick Sabalausky wrote: >>> In other words, *some* editors handle space-indentation intelligently >>> (and >>> do so by reinventing *tabs*), while *all* editors handle tab-indentation >>> intelligently. >> >>

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Daniel Gibson
Am 03.06.2011 20:54, schrieb Walter Bright: > On 4/11/2011 1:31 PM, Nick Sabalausky wrote: >> In other words, *some* editors handle space-indentation intelligently >> (and >> do so by reinventing *tabs*), while *all* editors handle tab-indentation >> intelligently. > > There is no way to handle ta

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Adam D. Ruppe
8 space tabs are the One True Way. All other tabstops are evil.

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Walter Bright
On 4/11/2011 1:31 PM, Nick Sabalausky wrote: In other words, *some* editors handle space-indentation intelligently (and do so by reinventing *tabs*), while *all* editors handle tab-indentation intelligently. There is no way to handle tabs intelligently. Take a source file that has tab characte

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Walter Bright
On 4/11/2011 8:31 AM, Adam D. Ruppe wrote: Yeah, that's all that matters in the end. "When in Rome..." But it's trivial to do a find and replace all before submitting so really, it's just not a big deal. Before I check in, I run tolf and detab on the source files.

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Walter Bright
On 4/10/2011 10:58 PM, Daniel Gibson wrote: Am 11.04.2011 07:51, schrieb Jonathan M Davis: Yes. Phobos follows the convention of indenting with spaces and that levels of indentation are 4 spaces. So, anything which goes into Phobos needs to follow this convention. the only way that tabs work is

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Jonathan M Davis
On 2011-06-03 11:01, Andrej Mitrovic wrote: > I bet you wrote std.datetime with a call to a single Vim macro. > > Just kidding. :P That sort of talk leads to things like this: http://xkcd.com/378/ - Jonathan M Davis

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Andrej Mitrovic
I bet you wrote std.datetime with a call to a single Vim macro. Just kidding. :P

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Jonathan M Davis
On 2011-06-03 05:45, Bruno Medeiros wrote: > On 12/04/2011 20:49, Nick Sabalausky wrote: > >> Can we move along now? This argument was old 30 years ago. Perhaps we > >> should do VI vs. EMACS while we are at it. > > > > Pico rules them all! ;) > > Vi *and* Emacs suck. Argument settled :P Yeah, I

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-06-03 Thread Bruno Medeiros
On 12/04/2011 20:49, Nick Sabalausky wrote: Can we move along now? This argument was old 30 years ago. Perhaps we should do VI vs. EMACS while we are at it. Pico rules them all! ;) Vi *and* Emacs suck. Argument settled :P (yes, that was hyperbolic rhetoric) -- Bruno Medeiros - Softwa

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-14 Thread spir
On 04/14/2011 07:58 PM, "Jérôme M. Berger" wrote: spir wrote: Actually, I have never been pleased that func defs (1) look like func calls (2) have an exceptional syntax compared to other definitions. I'd like instead eg: square = function (int n) int { return n * n; }

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-14 Thread Jérôme M. Berger
spir wrote: > Actually, I have never been pleased that func defs (1) look like func > calls (2) have an exceptional syntax compared to other definitions. I'd > like instead eg: > > square = function (int n) int { > return n * n; > } > That is still different from other def

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-14 Thread spir
On 04/13/2011 11:44 PM, Andrei Alexandrescu wrote: On 4/13/11 4:17 PM, "Jérôme M. Berger" wrote: Well, standard (printed) typographic practices put spaces outside the parenthesis and none inside. And as opposed to a lot of typographic rules, that one is a constant across languages and variants.

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-13 Thread Andrei Alexandrescu
On 4/13/11 4:17 PM, "Jérôme M. Berger" wrote: Nick Sabalausky wrote: ""J�r�me M. Berger"" wrote in message news:io4sng$1p9b$1...@digitalmars.com... Nick Sabalausky wrote: ""J?r?me M. Berger"" wrote in message news:io230l$1ldc$3...@digitalmars.com... Well, I have worked in both environments,

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-13 Thread Jérôme M. Berger
Nick Sabalausky wrote: > ""J�r�me M. Berger"" wrote in message > news:io4sng$1p9b$1...@digitalmars.com... >> Nick Sabalausky wrote: >>> ""J?r?me M. Berger"" wrote in message >>> news:io230l$1ldc$3...@digitalmars.com... Well, I have worked in both environments, and I have seen a lot mor

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-13 Thread Nick Sabalausky
""Jérôme M. Berger"" wrote in message news:io4sng$1p9b$1...@digitalmars.com... >Nick Sabalausky wrote: >> ""J?r?me M. Berger"" wrote in message >> news:io230l$1ldc$3...@digitalmars.com... >>> Well, I have worked in both environments, and I have seen a lot >>> more mess ups with tabs than with sp

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-13 Thread Jérôme M. Berger
Nick Sabalausky wrote: > ""J�r�me M. Berger"" wrote in message > news:io230l$1ldc$3...@digitalmars.com... >> Well, I have worked in both environments, and I have seen a lot >> more mess ups with tabs than with spaces... Other than that (and the >> fact that almost *no* editors are able to do it p

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-13 Thread Bruno Medeiros
On 12/04/2011 21:08, Nick Sabalausky wrote: ""Jérôme M. Berger"" wrote in message news:io2396$1nuo$1...@digitalmars.com... spir wrote: A drawback is one cannot directly have different indent levels, for instance to indent collection contents more, or less, than blocks of code. This can also b

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-13 Thread Bruno Medeiros
On 11/04/2011 22:03, David Gileadi wrote: On 4/11/11 1:51 PM, "Jérôme M. Berger" wrote: Nick Sabalausky wrote: "Andrej Mitrovic" wrote in message news:mailman.3396.1302548836.4748.digitalmar...@puremagic.com... Smart editors also allow you to unindent with a single backspace regardless if you'

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-13 Thread Bruno Medeiros
On 11/04/2011 20:54, Steven Schveighoffer wrote: In most of the editors I use, the default is to use spaces for indentation. So what happens is someone opens a file that uses tabs for indentation, then adds some lines. However, their editor only uses spaces *for those lines they added*, which r

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Jonathan M Davis
> On 2011-04-12 05:19, Jonathan M Davis wrote: > >> On 04/11/2011 08:13 AM, Jonathan M Davis wrote: > >>> They mix tabs and spaces. On some lines, they use spaces and on others > >>> they use tabs. > >> > >> Never seen this, not even once. Messing can only happen when one > >> copy-pastes from mod

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread spir
On 04/12/2011 10:08 PM, Nick Sabalausky wrote: ""Jérôme M. Berger"" wrote in message news:io2396$1nuo$1...@digitalmars.com... spir wrote: A drawback is one cannot directly have different indent levels, for instance to indent collection contents more, or less, than blocks of code. This can als

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Kagamin
Nick Sabalausky Wrote: > So I've changed my style to this: > > if(blah) > { > -> foo( > -> -> bigLongArg1, > -> -> bigLongArg2, > -> -> bigLongArg3 > -> ); > } > > Much better. Of course, it would be even better still if Scintilla would be > willing to add elastic tabstops (I'm getting

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Adam D. Ruppe
Nick Sabalausky wrote: > So I've changed my style to this: > > if(blah) > { > -> foo( > -> -> bigLongArg1, > -> -> bigLongArg2, > -> -> bigLongArg3 > -> ); > } That's something I've started doing too. It's not just a matter of alignment either - I think the first argument on the same line

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Nick Sabalausky
""Jérôme M. Berger"" wrote in message news:io2396$1nuo$1...@digitalmars.com... >spir wrote: >> >> A drawback is one cannot directly have different indent levels, for >> instance to indent collection contents more, or less, than blocks of >> code. This can also be considered an advantage; and is s

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Nick Sabalausky
""Jérôme M. Berger"" wrote in message news:io230l$1ldc$3...@digitalmars.com... >Well, I have worked in both environments, and I have seen a lot >more mess ups with tabs than with spaces... Other than that (and the >fact that almost *no* editors are able to do it properly), I would >really prefer

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Nick Sabalausky
"Cliff Hudson" wrote in message news:mailman.3414.1302586393.4748.digitalmar...@puremagic.com... > Spaces *should* only be used within string constants (as needed), or when > the language otherwise requires them. The editor should format the code > according to user preferences. > > Absent that,

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Jérôme M. Berger
spir wrote: > In addition to those main reasons, they have a few nice side-effects: > > * No indent width issue (!), True > * 1 tab <--> 1 indent level conceptually, True > * deletion is 1 key press, even with stupid editors. False, not with some *really* stupid editors I

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Jérôme M. Berger
spir wrote: > On 04/12/2011 07:13 AM, Jonathan M Davis wrote: >> It's true that people occasionally end up inserting tabs in space-only >> environments, but in my experience, it's fairly rare. It's pretty much a >> guarantee, however, that _someone_ will insert spaces in an >> environment where >>

Re: simple display (from: GUI library for D)

2011-04-12 Thread Jérôme M. Berger
Nick Sabalausky wrote: > "teo" wrote in message > news:io00gq$5rc$1...@digitalmars.com... >> On Fri, 08 Apr 2011 20:26:07 +, Adam D. Ruppe wrote: >> >>> We discussed this first in the GUI library thread, but since it >>> meandered so much, I decided to split off into a new subject. Much of >>

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Jérôme M. Berger
Jérôme M. Berger wrote: > Nick Sabalausky wrote: >> "Andrej Mitrovic" wrote in message >> news:mailman.3396.1302548836.4748.digitalmar...@puremagic.com... >>> Smart editors also allow you to unindent with a single backspace >>> regardless if you're using tabs or spaces. >> In other words, *some*

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Jacob Carlborg
On 2011-04-12 05:19, Jonathan M Davis wrote: On 04/11/2011 08:13 AM, Jonathan M Davis wrote: They mix tabs and spaces. On some lines, they use spaces and on others they use tabs. Never seen this, not even once. Messing can only happen when one copy-pastes from modules using spaces. As Steve

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread spir
On 04/12/2011 09:24 AM, Jacob Carlborg wrote: Well, IMO, using spaces for indentation serves no useful purpose. At least tabs actually *mean* alignment and indentation. Spaces don't and never have. Plus, what's the use of being able place the cursor at arbtrary points within the "4 spaces" (or 8

Re: simple display (from: GUI library for D)

2011-04-12 Thread teo
On Mon, 11 Apr 2011 23:08:12 +, Adam D. Ruppe wrote: > teo wrote: >> XCB (http://xcb.freedesktop.org/) - aims to replace Xlib > > I've heard of it, but never used it before. Since I wanted to write this > quickly I stuck to what I knew (xlib on linux and gdi on windows). > > Replacing it lat

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread spir
On 04/12/2011 07:13 AM, Jonathan M Davis wrote: It's true that people occasionally end up inserting tabs in space-only environments, but in my experience, it's fairly rare. It's pretty much a guarantee, however, that _someone_ will insert spaces in an environment where it's supposed to be tabs.

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread spir
On 04/12/2011 05:19 AM, Jonathan M Davis wrote: Using only spaces and no tabs avoids the entire issue spaces <--> tabs works as fine Why are programmers so blindly unfair when discussing this point? and is one of the major reasons (if not _the_ major reason) why it is incredibly common for

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread spir
On 04/12/2011 05:15 AM, Jonathan M Davis wrote: So, how you format your code matters. Using tabs screws with that unless you're completely consistent, and while a single developer may be consistent, groups of developers rarely are. This is as true in the case of spaces. With the additional issu

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-12 Thread Jacob Carlborg
On 2011-04-11 22:09, Nick Sabalausky wrote: "Jonathan M Davis" wrote in message news:mailman.3371.1302508910.4748.digitalmar...@puremagic.com... Jonathan M Davis Wrote: Personally, I think that it's _horrible_ to use tabs Why would one fear tabs? They change depending on your editor settin

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Andrej Mitrovic
On 4/12/11, Cliff Hudson wrote: > Perhaps we > should do VI vs. EMACS while we are at it. Don't bring operating systems into this... ... just kidding. :P

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Cliff Hudson
Spaces *should* only be used within string constants (as needed), or when the language otherwise requires them. The editor should format the code according to user preferences. Absent that, spaces represent the lowest common denominator of formatting, so we can all use them and our text shows up

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Jonathan M Davis
> "Jonathan M Davis" wrote in message > news:mailman.3412.1302578409.4748.digitalmar...@puremagic.com... > > >> On 04/11/2011 08:13 AM, Jonathan M Davis wrote: > >> > They mix tabs and spaces. On some lines, they use spaces and on others > >> > they use tabs. > >> > >> Never seen this, not even

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.3412.1302578409.4748.digitalmar...@puremagic.com... >> On 04/11/2011 08:13 AM, Jonathan M Davis wrote: >> > They mix tabs and spaces. On some lines, they use spaces and on others >> > they use tabs. >> >> Never seen this, not even once. Messing can

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Daniel Gibson
Am 12.04.2011 05:15, schrieb Jonathan M Davis: > Using tabs screws with that unless you're completely > consistent, and while a single developer may be consistent, groups of > developers rarely are. > > - Jonathan M Davis Yeah that is why using spaces screws with that: While a single developer

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Jonathan M Davis
> On 04/11/2011 08:13 AM, Jonathan M Davis wrote: > > They mix tabs and spaces. On some lines, they use spaces and on others > > they use tabs. > > Never seen this, not even once. Messing can only happen when one > copy-pastes from modules using spaces. As Steve pointed out, it frequently happens

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Jonathan M Davis
> On 04/11/2011 10:01 AM, Jonathan M Davis wrote: > >> Jonathan M Davis Wrote: > >>> > > Personally, I think that it's _horrible_ to use tabs > >> > > >> > Why would one fear tabs? > > > > They change depending on your editor settings. > > That's precisely what they are meant for... unlike s

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Andrej Mitrovic
DigitalMarsTV Headlines: "Newlines: Why is Microsoft still ignoring the public's demand to eliminate the carriage return?" "Breaking News: Police investigators are on the lookout for the monster lunatic who originally designed the number system layout for PC-keyboards. As a reminder for the viewers

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Daniel Gibson
Am 11.04.2011 23:03, schrieb David Gileadi: > On 4/11/11 1:51 PM, "Jérôme M. Berger" wrote: >> Nick Sabalausky wrote: >>> "Andrej Mitrovic" wrote in message >>> news:mailman.3396.1302548836.4748.digitalmar...@puremagic.com... Smart editors also allow you to unindent with a single backspace >>

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Daniel Gibson
Am 11.04.2011 17:25, schrieb Kagamin: > Jonathan M Davis Wrote: > >> So, if >> you do use tabs, you will end up with mixed tabs and spaces unless everyone >> involved is very careful, which isn't going to happen. > > If no one is careful, you end up with mixed tabs and spaces, no matter what >

Re: simple display (from: GUI library for D)

2011-04-11 Thread Nick Sabalausky
"teo" wrote in message news:io00gq$5rc$1...@digitalmars.com... > On Fri, 08 Apr 2011 20:26:07 +, Adam D. Ruppe wrote: > >> We discussed this first in the GUI library thread, but since it >> meandered so much, I decided to split off into a new subject. Much of >> what I say here will be old to

Re: simple display (from: GUI library for D)

2011-04-11 Thread Adam D. Ruppe
teo wrote: > XCB (http://xcb.freedesktop.org/) - aims to replace Xlib I've heard of it, but never used it before. Since I wanted to write this quickly I stuck to what I knew (xlib on linux and gdi on windows). Replacing it later, if necessary, won't be hard (the target specific code is only about

Re: simple display (from: GUI library for D)

2011-04-11 Thread teo
On Fri, 08 Apr 2011 20:26:07 +, Adam D. Ruppe wrote: > We discussed this first in the GUI library thread, but since it > meandered so much, I decided to split off into a new subject. Much of > what I say here will be old to anyone who saw the previous thread. > There's some new stuff nearer to

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread David Gileadi
On 4/11/11 1:51 PM, "Jérôme M. Berger" wrote: Nick Sabalausky wrote: "Andrej Mitrovic" wrote in message news:mailman.3396.1302548836.4748.digitalmar...@puremagic.com... Smart editors also allow you to unindent with a single backspace regardless if you're using tabs or spaces. In other words,

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Jérôme M. Berger
Nick Sabalausky wrote: > "Andrej Mitrovic" wrote in message > news:mailman.3396.1302548836.4748.digitalmar...@puremagic.com... >> Smart editors also allow you to unindent with a single backspace >> regardless if you're using tabs or spaces. > > In other words, *some* editors handle space-indenta

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:mailman.3396.1302548836.4748.digitalmar...@puremagic.com... > Smart editors also allow you to unindent with a single backspace > regardless if you're using tabs or spaces. In other words, *some* editors handle space-indentation intelligently (and do so by

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Nick Sabalausky
"Kagamin" wrote in message news:inv6q0$1hmi$1...@digitalmars.com... > Jonathan M Davis Wrote: > >> Every place that I've ever worked >> at has gone for spaces only, and I've only ever heard of one place where >> it >> was required that tabs be used for indentation. I'm sure that there are >> oth

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Nick Sabalausky
"Jonathan M Davis" wrote in message news:mailman.3371.1302508910.4748.digitalmar...@puremagic.com... >> Jonathan M Davis Wrote: >> > Personally, I think that it's _horrible_ to use tabs >> >> Why would one fear tabs? > > They change depending on your editor settings. Indenting gets screwed up >

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Steven Schveighoffer
On Mon, 11 Apr 2011 06:17:58 -0400, spir wrote: On 04/11/2011 07:51 AM, Jonathan M Davis wrote: the only way that tabs work is if you use them consistently, which in my experience almost never happens. And How so? If you probably set your editor, inconsistency simply cannot happen... The s

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Andrej Mitrovic
Smart editors also allow you to unindent with a single backspace regardless if you're using tabs or spaces.

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread spir
On 04/11/2011 05:31 PM, Adam D. Ruppe wrote: bearophile: It's a module theoretically meant for Phobos, and the Phobos coding standard are spaces. Yeah, that's all that matters in the end. "When in Rome..." But it's trivial to do a find and replace all before submitting so really, it's just no

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Andrei Alexandrescu
On 4/11/11 10:30 AM, Kagamin wrote: Jonathan M Davis Wrote: Every place that I've ever worked at has gone for spaces only, and I've only ever heard of one place where it was required that tabs be used for indentation. I'm sure that there are others, but it's rare that I've heard of anyone think

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Adam D. Ruppe
bearophile: > It's a module theoretically meant for Phobos, and the Phobos coding > standard are spaces. Yeah, that's all that matters in the end. "When in Rome..." But it's trivial to do a find and replace all before submitting so really, it's just not a big deal.

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Kagamin
Jonathan M Davis Wrote: > Every place that I've ever worked > at has gone for spaces only, and I've only ever heard of one place where it > was required that tabs be used for indentation. I'm sure that there are > others, but it's rare that I've heard of anyone thinking that using tabs in > co

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Kagamin
Jonathan M Davis Wrote: > So, if > you do use tabs, you will end up with mixed tabs and spaces unless everyone > involved is very careful, which isn't going to happen. If no one is careful, you end up with mixed tabs and spaces, no matter what policies you're trying to enforce.

Re: simple display (from: GUI library for D)

2011-04-11 Thread Jacob Carlborg
On 2011-04-11 11:41, KennyTM~ wrote: On Apr 11, 11 15:43, Jacob Carlborg wrote: When using objc_msgSend and friends you need to cast the function to the right signature, to the same signature as the method you're calling via objc_msgSend, before calling it. See http://www.dsource.org/projects/ds

Re: simple display (from: GUI library for D)

2011-04-11 Thread Michel Fortin
On 2011-04-10 17:39:03 -0400, KennyTM~ said: On Apr 9, 11 04:26, Adam D. Ruppe wrote: We discussed this first in the GUI library thread, but since it meandered so much, I decided to split off into a new subject. Much of what I say here will be old to anyone who saw the previous thread. There's

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread spir
On 04/11/2011 10:01 AM, Jonathan M Davis wrote: Jonathan M Davis Wrote: > > Personally, I think that it's _horrible_ to use tabs > > Why would one fear tabs? They change depending on your editor settings. That's precisely what they are meant for... unlike space-indentation, tab-indentati

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread spir
On 04/11/2011 08:13 AM, Jonathan M Davis wrote: They mix tabs and spaces. On some lines, they use spaces and on others they use tabs. Never seen this, not even once. Messing can only happen when one copy-pastes from modules using spaces. Denis -- _ vita es estrany spir.wikido

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread spir
On 04/11/2011 07:51 AM, Jonathan M Davis wrote: the only way that tabs work is if you use them consistently, which in my experience almost never happens. And How so? If you probably set your editor, inconsistency simply cannot happen... The same is true for using spaces, anyway. Denis -- ___

Re: simple display (from: GUI library for D)

2011-04-11 Thread spir
On 04/11/2011 03:54 AM, Adam D. Ruppe wrote: 1. *Please use spaces instead of tabs.* Spaces are the spawn of Satan! I hate them, but when it comes time to submit to phobos, I'll run a find/replace of them so it's consistent with the prevailing style there. Until then though, I'll write it in my

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Jonathan M Davis
> Am 11.04.2011 10:01, schrieb Jonathan M Davis: > >> Jonathan M Davis Wrote: > >>> Personally, I think that it's _horrible_ to use tabs > >> > >> Why would one fear tabs? > > > > They change depending on your editor settings. Indenting gets screwed up > > if tabs and spaces are mixed. It's just

Re: simple display (from: GUI library for D)

2011-04-11 Thread KennyTM~
On Apr 11, 11 09:54, Adam D. Ruppe wrote: KennyTM~ wrote: Taking the version on that link, I have ported it to use the native Cocoa/Core Graphics in OS X, instead of X11 Thanks! 1. *Please use spaces instead of tabs.* Spaces are the spawn of Satan! I hate them, but when it comes time to su

Re: simple display (from: GUI library for D)

2011-04-11 Thread KennyTM~
On Apr 11, 11 15:43, Jacob Carlborg wrote: When using objc_msgSend and friends you need to cast the function to the right signature, to the same signature as the method you're calling via objc_msgSend, before calling it. See http://www.dsource.org/projects/dstep/browser/dstep/objc/message.d#L74

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Daniel Gibson
Am 11.04.2011 10:01, schrieb Jonathan M Davis: Jonathan M Davis Wrote: Personally, I think that it's _horrible_ to use tabs Why would one fear tabs? They change depending on your editor settings. Indenting gets screwed up if tabs and spaces are mixed. It's just plain annoying to have an inde

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Jonathan M Davis
> Jonathan M Davis Wrote: > > Personally, I think that it's _horrible_ to use tabs > > Why would one fear tabs? They change depending on your editor settings. Indenting gets screwed up if tabs and spaces are mixed. It's just plain annoying to have an indentation of multiple spaces which isn't a

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread Kagamin
Jonathan M Davis Wrote: > Personally, I think that it's _horrible_ to use tabs Why would one fear tabs?

Re: simple display (from: GUI library for D)

2011-04-11 Thread Jacob Carlborg
On 2011-04-10 23:39, KennyTM~ wrote: On Apr 9, 11 04:26, Adam D. Ruppe wrote: We discussed this first in the GUI library thread, but since it meandered so much, I decided to split off into a new subject. Much of what I say here will be old to anyone who saw the previous thread. There's some new

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-11 Thread bearophile
Jonathan M Davis: > Yes. Phobos follows the convention of indenting with spaces and that levels > of > indentation are 4 spaces. So, anything which goes into Phobos needs to follow > this convention. > ... > Regardless, Phobos doesn't use tabs. So, whatever someone may prefer in their > own co

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-10 Thread Jonathan M Davis
> Am 11.04.2011 07:51, schrieb Jonathan M Davis: > >> Nick Sabalausky: > >>> What, so that he can force his indentation size on everyone else that > >>> works on the code? Or so that using the left/right arrow keys within > >>> the indentation zone requires an unnessesaraly large number of > >>> ke

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-10 Thread Daniel Gibson
Am 11.04.2011 07:51, schrieb Jonathan M Davis: >> Nick Sabalausky: >>> What, so that he can force his indentation size on everyone else that >>> works on the code? Or so that using the left/right arrow keys within the >>> indentation zone requires an unnessesaraly large number of keypresses? >> >>

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-10 Thread Jonathan M Davis
> Nick Sabalausky: > > What, so that he can force his indentation size on everyone else that > > works on the code? Or so that using the left/right arrow keys within the > > indentation zone requires an unnessesaraly large number of keypresses? > > It's a module theoretically meant for Phobos, and

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-10 Thread bearophile
Nick Sabalausky: > What, so that he can force his indentation size on everyone else that works > on the code? Or so that using the left/right arrow keys within the > indentation zone requires an unnessesaraly large number of keypresses? It's a module theoretically meant for Phobos, and the Phob

Re: [OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-10 Thread Daniel Gibson
Am 11.04.2011 07:00, schrieb Nick Sabalausky: > "KennyTM~" wrote in message > news:int88l$uaf$1...@digitalmars.com... >> On Apr 9, 11 04:26, Adam D. Ruppe wrote: >>> We discussed this first in the GUI library thread, but since it >>> meandered so much, I decided to split off into a new subject. M

[OT] Spaces/tabs (Was: simple display (from: GUI library for D))

2011-04-10 Thread Nick Sabalausky
"KennyTM~" wrote in message news:int88l$uaf$1...@digitalmars.com... > On Apr 9, 11 04:26, Adam D. Ruppe wrote: >> We discussed this first in the GUI library thread, but since it >> meandered so much, I decided to split off into a new subject. Much >> of what I say here will be old to anyone who s

Re: simple display (from: GUI library for D)

2011-04-10 Thread Adam D. Ruppe
KennyTM~ wrote: > Taking the version on that link, I have ported it to use the native > Cocoa/Core Graphics in OS X, instead of X11 Thanks! > 1. *Please use spaces instead of tabs.* Spaces are the spawn of Satan! I hate them, but when it comes time to submit to phobos, I'll run a find/replace of

Re: simple display (from: GUI library for D)

2011-04-10 Thread KennyTM~
On Apr 9, 11 04:26, Adam D. Ruppe wrote: We discussed this first in the GUI library thread, but since it meandered so much, I decided to split off into a new subject. Much of what I say here will be old to anyone who saw the previous thread. There's some new stuff nearer to the bottom though. I,

Re: simple display (from: GUI library for D)

2011-04-10 Thread Cliff Hudson
> > Heh, I used to call it box in my DOS programs. But, the functions > > it forwards to are called Rectangle() and XDrawRectangle(), so > > I want to be consistent with them so it's not a surprise to > > someone already familiar with with the other APIs. > > I don't agree. line(), box(), circle(),

Re: simple display (from: GUI library for D)

2011-04-10 Thread bearophile
Adam D. Ruppe: > I believe so, yes, but I haven't tried it and wouldn't mind if > it didn't. If you need to use multiple windows at the same time, > it'd probably be better to use DFL, DWT, GTK, Qt, etc. etc. It's better to support multiple windows, otherwise you have to split the single window

Re: simple display (from: GUI library for D)

2011-04-10 Thread spir
On 04/10/2011 03:03 AM, Cliff Hudson wrote: One thing to consider, since I was impacted by this when writing a WPF app a while back, is the difference between a 2-Vector and a Point. In particular, Vectors typically have some very useful methods on them, like addition, rotation, transformations,

Re: simple display (from: GUI library for D)

2011-04-10 Thread spir
On 04/10/2011 02:58 AM, Adam D. Ruppe wrote: A note: since I posted last, I changed my mind on something, and bearophile, I rather doubt you'll like it... Before, it was drawRectangle(int x1, int y2, int width, int height); Now, it is drawRectangle(Point upperLeft, Size size); So, at the usage

Re: simple display (from: GUI library for D)

2011-04-10 Thread spir
On 04/09/2011 11:45 PM, Adam D. Ruppe wrote: There's still a handful of little things and a lot of error checking needed, but I'm pretty happy with this as the screen drawing base. It covers all the easy stuff. The hard stuff will be in platform independent images. Anyway, here's the updated si

Re: simple display (from: GUI library for D)

2011-04-10 Thread Jacob Carlborg
On 2011-04-09 02:11, Adam D. Ruppe wrote: bearophile wrote: I'd like something like this in Phobos Me too. It's still pretty far from good enough right now, but that's where I want ultimately want it. My only concern is I don't want Phobos to depend on Xlib unless the module is actually impor

Re: simple display (from: GUI library for D)

2011-04-09 Thread Adam D. Ruppe
bearophile wrote: > More little tasks for your module: > http://rosettacode.org/wiki/Fractal_tree#Python This one's use of recursion caused me to hit what I think is a compiler bug. Not in the recursion itself, but in a struct's copy constructor when it had a significant mixin. I worked around it

Re: simple display (from: GUI library for D)

2011-04-09 Thread Cliff Hudson
One thing to consider, since I was impacted by this when writing a WPF app a while back, is the difference between a 2-Vector and a Point. In particular, Vectors typically have some very useful methods on them, like addition, rotation, transformations, etc. which frequently are not associated with

Re: simple display (from: GUI library for D)

2011-04-09 Thread Adam D. Ruppe
bearophile wrote: > The length=150 too is better to be set as immutable. Yeah, I made that change after copy/pasting the code into my newsgroup post. win, painter, angle, and angular velocity were the only things left mutable in the end. > The delegate inside eventLoop doesn't need the (). I put

Re: simple display (from: GUI library for D)

2011-04-09 Thread bearophile
Adam D. Ruppe: > Here's the D version using the direct to screen functions. More little tasks for your module: http://rosettacode.org/wiki/Fractal_tree#Python http://rosettacode.org/wiki/Brownian_tree The JavaScript processing port site has some more examples in the Demos section: http://process

  1   2   3   4   >