On Tue, 28 Feb 2006, Dan Stromberg wrote:


python's the way of the future though :)  Agreed that shell (bash) and
make are important, and regular expressions of a (very powerful)
necessary evil.

Not just powerful, not just evil.  Regular expressions are one of the
things that give a systems administrator that je ne sais quoi, that
special little something, that aura of invincible power.

After all, to add aligned left-padded line numbers, which one looks more
impressive?

  sed = myfile | sed 'N; s/^/     /; s/ *\(.\{6,\}\)\n/\1  /'

or

  cat -n myfile

I rest my case.

As for the python... well, I just plain like delimiters in my code.  I
might even use it if the authors of python hadn't imposed two pieces of
religion on its users:

  No line terminator (e.g. ;)
  No {} -- all code grouping MUST be accomplished by indentation.

Violators will be shot.  News at 11.

Other than that, well, sure, way of the future and all for people who;
don't code much in C and hence don't mind bashing their head against;
the keyboard a bit when their fingers add ;'s to every line all by;
themselves and;
if((strcmp(lang,"C") == 0) || strcmp(lang,"perl") == 0)){
  while(codeblocking & bracketpairs & !indentations){love_2_delimit(';');}
}

(Note the lack of any real exit on that loop...;-)

   rgb


(I tend to code in python as my first choice, but some things just work
better as bash or C.  And hopefully someday I'll find time to resume
studying Haskell, since it and OCaml are apparently so good at adapting
to changes in a program's requirements)

On Tue, 2006-02-28 at 20:30 +0000, Andrew M.A. Cater wrote:
C first, last and always: somewhere or other, you'll come across C code
/ someone who only knows C and whose high-level pseudocode is all
"C like". Try hard to stick to portable C and follow the ANSI standards.
[Note: C99, though it is seven years old now, is not well supported
except in the newer compilers]

Shell scripting: quick and dirty hacks used to be done entirely in shell
script. It's worth knowing enough to be able to read good Bourne shell
scripts and, by extension, bash scripts - they crop up all over the
place in Linux and "classical" UNIX.

Perl: Swiss Army chainsaw - you can do anything script-y in Perl and a
whole lot more. It is easy to write poor-quality Perl: the canonical
books are published by O'Reilly and Co and known as "The llama book"
and "The camel book" aka learning Perl and programming Perl. Get the
latest editions.

Regular expressions and pattern matching crop up a lot in scripting and
Perl. The O'Reilly regexp book by Friedl [Mastering Regular Expressions]
is _extremely_ useful. This also covers enough that you'll need to know
in order to cope with minimal sed and awk.

Some knowledge of make and makefiles may also be useful if you do a lot
of programming (possibly of autoconf/automake) but that can be left
until you know enough C to be dangerous :)

All IMHO,

Andy


_______________________________________________
Beowulf mailing list, Beowulf@beowulf.org
To change your subscription (digest mode or unsubscribe) visit 
http://www.beowulf.org/mailman/listinfo/beowulf


_______________________________________________
Beowulf mailing list, Beowulf@beowulf.org
To change your subscription (digest mode or unsubscribe) visit 
http://www.beowulf.org/mailman/listinfo/beowulf


--
Robert G. Brown                        http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:[EMAIL PROTECTED]


_______________________________________________
Beowulf mailing list, Beowulf@beowulf.org
To change your subscription (digest mode or unsubscribe) visit 
http://www.beowulf.org/mailman/listinfo/beowulf

Reply via email to