Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Thomas -Balu- Walter
On Mon, Nov 17, 2003 at 08:07:35PM +, Jonathan Dowland wrote: > Torvalds' position is that code that cannot be expressed using > 8-spaces-per-indent and wrap at 79 characters needs to be rewritten. Who is Thorvalds? SCNR Balu /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Darren Salt
I demand that Steve Lamb may or may not have written... [snip] > if foo > bar > else > baz fi -- | Darren Salt | linux (or ds) at | nr. Ashington, | woody, sarge, | youmustbejoking | Northumberland | RISC OS | demon co uk | Toon Army | Let's keep the pound sterling

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Steve Lamb
Julian Mehnle wrote: I call that readable, but I guess somebody won't. ;-) Actually it is quite readable and sensible in that it breaks down the regex into parts that a human can read. Oh, and the equivolant would be legal in Python. Which was kind of my point on asking H.S. the two questio

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Chad Walstrom
On Mon, Nov 17, 2003 at 06:02:40PM -0800, Tom wrote: > If whitespace mistakes are always caught at compile-time, then I > probably wouldn't care about them either. So I'm not bashing python; > having never used it: I'm bashing languages where syntatic mistakes > are not caught at compile-time. I

Re: Programming first steps.

2003-11-18 Thread David Palmer
Just like to thank everybody for their opinions. I think that I've probably got enough to think about for now. Aside from the recommendations for languages and editors, the idea of learning multiple languages to gain more comprehensive expression for programming concepts, and also learning an initi

Re: Programming first steps.

2003-11-18 Thread Hamish Moffatt
On Mon, Nov 17, 2003 at 08:49:31PM -0500, H. S. Teoh wrote: > Modal editors are Pure Evil(tm). > > ;-) But modeless editors are toys ;-) Hamish -- Hamish Moffatt VK3SB <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Cameron Patrick
On Tue, Nov 18, 2003 at 11:55:01AM +0100, Julian Mehnle wrote: | Steve Lamb wrote: | > 2: Can you provide an example of such free-style coding that you speak | > so highly of? | | # Split header into separate header lines, dropping any unneeded or | # spurious header lines: | @header_lines = grep(

RE: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Julian Mehnle
Steve Lamb wrote: > 2: Can you provide an example of such free-style coding that you speak > so highly of? # Split header into separate header lines, dropping any unneeded or # spurious header lines: @header_lines = grep( ( /^(?: # Wanted headers: X-Spam-Status

Re: Programming first steps.

2003-11-18 Thread Stephen M. Gava
On Tue, 18 Nov 2003 07:08 pm, Wouter Verhelst wrote: > Fact is, Python uses the concept of significant whitespace, which a lot > of us simply don't like. That's a personal opinion, and in most cases > probably not a rational thing, so providing arguments won't help. Can we > cut this thread here, p

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-18 Thread Wouter Verhelst
On Mon, Nov 17, 2003 at 11:08:44PM -0600, Gunnar Wolf wrote: > H. S. Teoh dijo [Mon, Nov 17, 2003 at 08:47:27PM -0500]: > > > >*chalks up one more reason to avoid Python like the plague...* > > > > > > Uh, care to rewrite that since Python is now on 2.3 and 1.5.2 is > > > several years ol

Re: Programming first steps.

2003-11-18 Thread Joshua Haberman
* Steve Greenland ([EMAIL PROTECTED]) wrote: > To clarify: AFAICT, Python is perfectly happy with any sort of > indentation you choose, so long as it's consistent in any given block. > You want to use '', fine. Just don't try to mix it > with '' in the same block. > > As a practical matter, since

Re: Programming first steps.

2003-11-17 Thread Gunnar Wolf
Steve Lamb dijo [Mon, Nov 17, 2003 at 05:40:18PM -0800]: > Python's diametrically opposed philosophy is much better. There should > ideally be only one obvious way to do something. With that in mind the > language itself is much smaller. Concepts are tied to one, maybe two > syntax. So in

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Gunnar Wolf
H. S. Teoh dijo [Mon, Nov 17, 2003 at 08:47:27PM -0500]: > > >*chalks up one more reason to avoid Python like the plague...* > > > > Uh, care to rewrite that since Python is now on 2.3 and 1.5.2 is > > several years old? > [snip] > > That doesn't negate the fact that I find significant w

Re: Programming first steps.

2003-11-17 Thread Glenn Maynard
On Mon, Nov 17, 2003 at 08:49:31PM -0500, H. S. Teoh wrote: > Modal editors are Pure Evil(tm). Lies! -- Glenn Maynard :wq

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Steve Lamb
Tom wrote: Do whitespace mistakes cause compile time errors? The frustrating thing about fortran was variable names that started with C could be interpreted as comments not indented correctly, which would just cause that line to be skipped. Integer literals not indented correctly could be int

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Tom
On Mon, Nov 17, 2003 at 05:53:54PM -0800, Steve Lamb wrote: > Tom wrote: > >Significant whitespace? Shudder, that brings back crusty old memories > >of Fortran. I have great fondness for fortran because of the wonderful > >mathematical algorithms in LinPack, but I have no fondness for > >signi

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Steve Lamb
H. S. Teoh wrote: That doesn't negate the fact that I find significant whitespace rather atrocious. I really rather use a language where I'm free to format the code the way I want it, to maximally convey its meaning, rather than to be forced to write it a certain way because some genius decided tha

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Steve Lamb
Tom wrote: Significant whitespace? Shudder, that brings back crusty old memories of Fortran. I have great fondness for fortran because of the wonderful mathematical algorithms in LinPack, but I have no fondness for significant whitespace. And? Does Fortran's rules map to Pythons? I often

Re: Programming first steps.

2003-11-17 Thread Steve Lamb
One of these days I'll also learn how to proofread before I hit send... Steve Lamb wrote: decade of Wordstar-esque editors ending with joe. I have vi. I love Hate, not have. mode when you want to be in command mode. When in edit mode ESC costs you nothing. It doesn't change modes. So

Re: Programming first steps.

2003-11-17 Thread H. S. Teoh
On Mon, Nov 17, 2003 at 05:47:22PM -0800, Steve Lamb wrote: [snip] > With that said let me give you the biggest hint on learning any vi > variant: When in doubt, slap the ESC key. The commands and controls will > come in time but all of that doesn't mean a thing if you're in edit mode > whe

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread H. S. Teoh
On Mon, Nov 17, 2003 at 05:14:04PM -0800, Steve Lamb wrote: > H. S. Teoh wrote: > >On Mon, Nov 17, 2003 at 02:29:52PM -0600, Chad Walstrom wrote: [snip] > >>Python did away with that requirement for scope in 2.x. If you want to > >>use blank lines for code logic separation in python < 2.0, you mus

Re: Programming first steps.

2003-11-17 Thread Steve Lamb
David Palmer wrote: (2) Perl or Python. This seems to be another divided camp. What are the capabilities of each? What are the applications of each? Python and Perl have basically the same capabilities and applications as the other. The major difference is Python doesn't look like warm-over

Re: Programming first steps.

2003-11-17 Thread Steve Lamb
Gunnar Wolf wrote: I strongly reccomend Perl. Why? Well, that's how I learnt (or more properly, how I picked up after years of inactivity) programming (I had only BASIC experience before that). Perl is a language meant to be easy to write - Yes, your first code will probably not be very maintainabl

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Tom
On Mon, Nov 17, 2003 at 05:21:23PM -0800, Steve Lamb wrote: > H. S. Teoh wrote: > >On Mon, Nov 17, 2003 at 11:47:34AM -0600, Chad Walstrom wrote: > >[snip] > > >>I have a love-hate relationship with the significant whitespace. > > >I have a hate-hate relationship with it. I much prefer free-style

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Steve Lamb
H. S. Teoh wrote: On Mon, Nov 17, 2003 at 11:47:34AM -0600, Chad Walstrom wrote: [snip] I have a love-hate relationship with the significant whitespace. I have a hate-hate relationship with it. I much prefer free-style syntax where the programmer is allowed to use his best judgment on how to inde

Re: Programming first steps.

2003-11-17 Thread Steve Kowalik
On Mon, Nov 17, 2003 at 01:17:10PM -0600, Gunnar Wolf wrote: > I found Python to be a very nice, elegant language. I have not yet > used it for any real project, but I am looking forward to give it a > spin. > Agreed. I used Linda as an excuse to learn Python, and it helped me _really_ understand

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Steve Lamb
H. S. Teoh wrote: On Mon, Nov 17, 2003 at 02:29:52PM -0600, Chad Walstrom wrote: On Mon, Nov 17, 2003 at 02:19:02PM -0500, H. S. Teoh wrote: Also, as an off-topic note, blank lines that contain tabs or spaces are Pure Evil(tm), especially in code. One of these days I should write a sed script to

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread H. S. Teoh
On Mon, Nov 17, 2003 at 02:29:52PM -0600, Chad Walstrom wrote: > On Mon, Nov 17, 2003 at 02:19:02PM -0500, H. S. Teoh wrote: > > Also, as an off-topic note, blank lines that contain tabs or spaces > > are Pure Evil(tm), especially in code. One of these days I should > > write a sed script to elimin

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread H. S. Teoh
On Mon, Nov 17, 2003 at 08:07:35PM +, Jonathan Dowland wrote: > On Mon, Nov 17, 2003 at 02:19:02PM -0500, H. S. Teoh wrote: > > > For personal pet projects, I use 2 spaces per nesting level. Some people > > think that's Pure Evil(tm), > > Most noteably perhaps, Linus Torvalds, although... >

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Chad Walstrom
On Mon, Nov 17, 2003 at 02:19:02PM -0500, H. S. Teoh wrote: > Also, as an off-topic note, blank lines that contain tabs or spaces > are Pure Evil(tm), especially in code. One of these days I should > write a sed script to eliminate all incarnations of this Pure Evil(tm) > from /usr/src. Python did

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Jonathan Dowland
On Mon, Nov 17, 2003 at 02:19:02PM -0500, H. S. Teoh wrote: > For personal pet projects, I use 2 spaces per nesting level. Some people > think that's Pure Evil(tm), Most noteably perhaps, Linus Torvalds, although... >although I fully agree with you about wasting > screen real estate in 80 colu

Re: Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread H. S. Teoh
On Mon, Nov 17, 2003 at 11:47:34AM -0600, Chad Walstrom wrote: [snip] > I have a love-hate relationship with the significant whitespace. I have a hate-hate relationship with it. I much prefer free-style syntax where the programmer is allowed to use his best judgment on how to indent the code. Of c

Re: Programming first steps.

2003-11-17 Thread Gunnar Wolf
Andrew M.A. Cater dijo [Sun, Nov 16, 2003 at 11:00:14PM +]: > > (2) Perl or Python. This seems to be another divided camp. > > What are the capabilities of each? What are the applications of each? > > Perl - wherever you used to use a shell script, consider Perl. Perl > also has concepts from

Re: Programming first steps.

2003-11-17 Thread Lars Wirzenius
ma, 2003-11-17 kello 18:49, Steve Greenland kirjoitti: > To clarify: AFAICT, Python is perfectly happy with any sort of > indentation you choose, so long as it's consistent in any given block. > You want to use '', fine. Just don't try to mix it > with '' in the same block. This topic is rather of

Re: Programming first steps.

2003-11-17 Thread Jonathan Dowland
On Sun, Nov 16, 2003 at 08:45:51PM +0800, David Palmer wrote: > Hello, > > I thought that I might make a beginning at learning. > I've searched the web, found information that goes beyond the definition > of plethora, so I thought that I'd ask here. > > (1) What is the best language to start with

Tabs v.s. spaces (was Re: Programming first steps.)

2003-11-17 Thread Chad Walstrom
On Mon, Nov 17, 2003 at 11:13:59PM +0800, Cameron Patrick wrote: > I believe that tabs aren't a problem with Python so long as they > really do indent to a multiple of 8 spaces. Editors which interpret > tabs differently are broken^W^W can cause problems when editing Python > code with tabs and sp

Re: Programming first steps.

2003-11-17 Thread Steve Greenland
On 17-Nov-03, 09:13 (CST), Cameron Patrick <[EMAIL PROTECTED]> wrote: > On Mon, Nov 17, 2003 at 08:49:03AM -0600, Steve Greenland wrote: > | As a long-time C coder, I agreed with you. But after doing a small > | python project, I was surprised at how quickly it became natural. It > | does help to

Re: Programming first steps.

2003-11-17 Thread Cameron Patrick
On Mon, Nov 17, 2003 at 08:49:03AM -0600, Steve Greenland wrote: | On 17-Nov-03, 05:15 (CST), Wouter Verhelst <[EMAIL PROTECTED]> wrote: | > I have one grudge against python, though: its mandated indentation looks | > very ugly and unstructured to me. Kinda reminds me of COBOL (and boy, do | > I h

Re: Programming first steps.

2003-11-17 Thread Steve Greenland
On 17-Nov-03, 05:15 (CST), Wouter Verhelst <[EMAIL PROTECTED]> wrote: > I have one grudge against python, though: its mandated indentation looks > very ugly and unstructured to me. Kinda reminds me of COBOL (and boy, do > I have nightmares of having to write COBOL code at school) As a long-time C

Re: Programming first steps.

2003-11-17 Thread Hamish Moffatt
On Mon, Nov 17, 2003 at 03:27:29AM +0200, David Starner wrote: > Pascal is traditional, but is seriously a toy language with at least a dozen > different groups of compiler-specific extensions. Ada is my personal favorite, Sure but if you pick one compiler you can get some work done. It's quite a

Re: Programming first steps.

2003-11-17 Thread Florent Rougon
Wouter Verhelst <[EMAIL PROTECTED]> wrote: > I have one grudge against python, though: its mandated indentation looks > very ugly and unstructured to me. Kinda reminds me of COBOL (and boy, do > I have nightmares of having to write COBOL code at school) Well, I often heared about this argument, b

Re: Programming first steps.

2003-11-17 Thread Tom
On Mon, Nov 17, 2003 at 12:15:45PM +0100, Wouter Verhelst wrote: > Op zo 16-11-2003, om 16:44 schreef Chad Walstrom: > > On Sun, Nov 16, 2003 at 08:45:51PM +0800, David Palmer wrote: > > > I thought that I might make a beginning at learning. I've searched > > > the web, found information that goes

Re: Programming first steps.

2003-11-17 Thread Wouter Verhelst
Op zo 16-11-2003, om 16:44 schreef Chad Walstrom: > On Sun, Nov 16, 2003 at 08:45:51PM +0800, David Palmer wrote: > > I thought that I might make a beginning at learning. I've searched > > the web, found information that goes beyond the definition of > > plethora, so I thought that I'd ask here. >

Re: Programming first steps.

2003-11-17 Thread Matthew Palmer
On Mon, Nov 17, 2003 at 03:36:05AM +, Scott James Remnant wrote: > I learnt C++ first, then switched to C later. Am I The Only One?(tm) No, that was the way it was taught at the University I've just managed to escape from. Still managed to produce a really crap crop of programmers, though.

Re: Programming first steps.

2003-11-16 Thread Scott James Remnant
On Mon, 2003-11-17 at 01:46, Eike Sauer wrote: > Andrew M.A. Cater schrieb: > > They may be right - but, as noted elsewhere, much C++ is written by > > C programmers who don't necessarily use all the features of C++ > > anyway. > > ...so don't become one of those and learn C++ _first_. > I learn

Re: Programming first steps.

2003-11-16 Thread Eike Sauer
Andrew M.A. Cater schrieb: > They may be right - but, as noted elsewhere, much C++ is written by > C programmers who don't necessarily use all the features of C++ > anyway. ...so don't become one of those and learn C++ _first_. Ciao, Eike PS: I hope I got the message references r

Re: Programming first steps.

2003-11-16 Thread David Starner
This may be somewhat contraversal, but I wouldn't start with C or C++. If you want to learn to program, start with something with bounds checking and other safety guards. To be a serious programmer, you will have to learn C and C++, but learning a programming language is only a small part of learni

Re: Programming first steps.

2003-11-16 Thread Andrew M.A. Cater
On Sun, Nov 16, 2003 at 08:45:51PM +0800, David Palmer wrote: > > I thought that I might make a beginning at learning. Good call :) > I've searched the web, found information that goes beyond the definition > of plethora, so I thought that I'd ask here. "Go not to Usenet - for you will be told Y

Re: Programming first steps.

2003-11-16 Thread David Palmer
Thank you Paul, Chad, Wesley and Bernhard. Regards, David.

Re: Programming first steps.

2003-11-16 Thread Chad Walstrom
On Sun, Nov 16, 2003 at 08:45:51PM +0800, David Palmer wrote: > I thought that I might make a beginning at learning. I've searched > the web, found information that goes beyond the definition of > plethora, so I thought that I'd ask here. C is useful, stable, has a huge following. C++ is useful,