[SLUG] C newbie seeks directions

2005-02-16 Thread Rod Butcher
Hello Sluggers, I'm having to teach myself some C so I can deal with
debugging problems with C modules used by perl (my primary interest is
the perl scripts, but I'm tired of feeling helpless when C programs
won't build or just die).

I've found an online university course tutorial which covers basic data
types, operators, functions, prototyping, structures, pointers,
malloc :-
http://www.cs.cf.ac.uk/Dave/C/
 It's dated 1999. Should this be enough, any major changes since then,
any recommended tutorials out there ?
Also - am I OK just working with a text editor like Gedit, or do I
really need to use some API to do things properly ?
Recommended newbie-friendly C mailing lists ?
Anything else I should study to do this properly ? - I'm finding things
like foo.xs which are used to generate  foo.c for instance, so is there
some tutorial on typical methods used for generating C sources 
modules ? 
thanks
Rod
-- 
---
Brought to you by a penguin, a gnu and a camel

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] C newbie seeks directions

2005-02-16 Thread Benno
On Thu Feb 17, 2005 at 14:32:14 +1100, Rod Butcher wrote:
Hello Sluggers, I'm having to teach myself some C so I can deal with
debugging problems with C modules used by perl (my primary interest is
the perl scripts, but I'm tired of feeling helpless when C programs
won't build or just die).

I've found an online university course tutorial which covers basic data
types, operators, functions, prototyping, structures, pointers,
malloc :-
http://www.cs.cf.ac.uk/Dave/C/
 It's dated 1999. Should this be enough, any major changes since then,
any recommended tutorials out there ?

That will be fine. Unlike all these new languages C hasn't really changed
much. The latest spec was in 1999, however justa bout any tutorial out
there will be ok.

Also - am I OK just working with a text editor like Gedit, or do I
really need to use some API to do things properly ?

I'm confused by what you mean here. An application programming interface
(API) has little to do with a text editor. But basically the answer is yes,
any text editor is fine for writing C, however i would recommend an editor
that does syntax hilighting. (E.g: emacs, vim, nedit, thousands of others).

Recommended newbie-friendly C mailing lists ?

There are plently of C coders on this mailing list who would be happy
answering questions.

Anything else I should study to do this properly ? - I'm finding things
like foo.xs which are used to generate  foo.c for instance, so is there
some tutorial on typical methods used for generating C sources 
modules ? 

I'm not sure what a .xs file is, generally you don't generate .c files, 
you write them.

Benno
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] C newbie seeks directions

2005-02-16 Thread James Gregory
On Thu, 2005-02-17 at 14:32 +1100, Rod Butcher wrote:
 Hello Sluggers, I'm having to teach myself some C so I can deal with
 debugging problems with C modules used by perl (my primary interest is
 the perl scripts, but I'm tired of feeling helpless when C programs
 won't build or just die).
 
 I've found an online university course tutorial which covers basic data
 types, operators, functions, prototyping, structures, pointers,
 malloc :-
 http://www.cs.cf.ac.uk/Dave/C/
  It's dated 1999. Should this be enough, any major changes since then,
 any recommended tutorials out there ?

There hasn't been too many changes since then. I believe C99 is still
the accepted standard standard (can anyone verify that?)

 Also - am I OK just working with a text editor like Gedit, or do I
 really need to use some API to do things properly ?

I assume you mean IDE. If you're happy with Gedit, then that's great. I
like vim personally. Two tools I find invaluable in navigating C code
(and are largely editor agnostic) are ctags and cscope. If you're on
debian you want the exuberant-ctags package. Then you run 'ctags -R' on
your C source to build a database out of it, and anything you want to
see the definition of (functions, structs etc), you put the cursor on
and hit ctrl-] and you'll be jumped straight to it. ctrl-t takes you
back to where you were.

cscope is useful essentially as the inverse of ctags, and there's vim
bindings for it too, but it's perfectly usable as a stand-alone app.

Presumably other-editor-experts can tell you the equivalents in other
editors.

 Recommended newbie-friendly C mailing lists ?

slug-chat?

 Anything else I should study to do this properly ?

Probably, but most of it is just practice.

HTH,

James.

-- 
There is no I in TEAM but there is an i in Ninja
  -- http://www.ninjaburger.com/sekrit/



signature.asc
Description: This is a digitally signed message part
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: [SLUG] C newbie seeks directions

2005-02-16 Thread QuantumG
Rod Butcher wrote:
Recommended newbie-friendly C mailing lists ?
 

If you have the time I'd recommend #c on undernet.
Trent
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] C newbie seeks directions

2005-02-16 Thread Rod Butcher
I'm confused by what you mean here. An application programming
interface
 (API) has little to do with a text editor. 
d'uh... I meant IDE or programmers workbench.
thanks for responding Benno, James, Trent .
cheers
Rod

On Thu, 2005-02-17 at 14:39 +1100, Benno wrote:
 On Thu Feb 17, 2005 at 14:32:14 +1100, Rod Butcher wrote:
 Hello Sluggers, I'm having to teach myself some C so I can deal with
 debugging problems with C modules used by perl (my primary interest is
 the perl scripts, but I'm tired of feeling helpless when C programs
 won't build or just die).
 
 I've found an online university course tutorial which covers basic data
 types, operators, functions, prototyping, structures, pointers,
 malloc :-
 http://www.cs.cf.ac.uk/Dave/C/
  It's dated 1999. Should this be enough, any major changes since then,
 any recommended tutorials out there ?
 
 That will be fine. Unlike all these new languages C hasn't really changed
 much. The latest spec was in 1999, however justa bout any tutorial out
 there will be ok.
 
 Also - am I OK just working with a text editor like Gedit, or do I
 really need to use some API to do things properly ?
 
 I'm confused by what you mean here. An application programming interface
 (API) has little to do with a text editor. But basically the answer is yes,
 any text editor is fine for writing C, however i would recommend an editor
 that does syntax hilighting. (E.g: emacs, vim, nedit, thousands of others).
 
 Recommended newbie-friendly C mailing lists ?
 
 There are plently of C coders on this mailing list who would be happy
 answering questions.
 
 Anything else I should study to do this properly ? - I'm finding things
 like foo.xs which are used to generate  foo.c for instance, so is there
 some tutorial on typical methods used for generating C sources 
 modules ? 
 
 I'm not sure what a .xs file is, generally you don't generate .c files, 
 you write them.
 
 Benno
 
-- 
---
Brought to you by a penguin, a gnu and a camel

-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] C newbie seeks directions

2005-02-16 Thread Taryn East
Take below with a pinch of salt - I'm not a highly experienced
C-programmer, but hey.

* Rod Butcher [EMAIL PROTECTED] spake thus:
 I've found an online university course tutorial which covers basic data
 types, operators, functions, prototyping, structures, pointers,
 malloc :-
 http://www.cs.cf.ac.uk/Dave/C/
  It's dated 1999. Should this be enough, any major changes since then,

LOL.. no - and this is one of the big advantages of C - it doesn't
change year-to-year but is instead quite stable...

I learned some of the basic aspects of C in various dodgy ways but the
first time I really understood it was after reading through (and working
through the exercises in) C programming language written by none other
than KR themselves... 

It doesn't give you much about the practical aspects of compiling (for
which you should maybe have a look at makefile stuff - it's all I ever
use) - but all other aspects of the language (and very good programming
style) seem to be gained through it. It also has some really good
references for the basic libraries in the back.

It doesn't have how to program stuff in there, but from the sound of
it you've done that before and I found it an exceptional book for C as
a second language.

 Also - am I OK just working with a text editor like Gedit, or do I
 really need to use some API to do things properly ?

I use gvim - which has a fairly reasonable c-syntax highlighter - though
it can get a bit broken at times...
but c has been written for many years before special editors were around
- they're not necessary, just your preference.

 Recommended newbie-friendly C mailing lists ?

don't know any of them, I'm afraid. I tend not to find much use out of
specific mailling lists unless searching the archives. YMMV

 Anything else I should study to do this properly ? - I'm finding things
 like foo.xs which are used to generate  foo.c for instance, so is there
 some tutorial on typical methods used for generating C sources 
 modules ? 

no idea what an  .xs is - I've never come across one of them.

 
-- 
This .sig temporarily out-of-order.
We apologise for any inconvenience
- The Management
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] C newbie seeks directions

2005-02-16 Thread Steve Kowalik
On Thu, 17 Feb 2005 14:32:14 +1100, Rod Butcher uttered
 Anything else I should study to do this properly ? - I'm finding things
 like foo.xs which are used to generate  foo.c for instance, so is there
 some tutorial on typical methods used for generating C sources 
 modules ? 

A .xs file is a perl thing. Unfortunately, writing Perl modules in C 
requires knowledge in C, and the guts of Perl. man perlxs, along with 
perlguts and perlapi.

Cheers,
-- 
Steve
Russian roulette in bash(1): $((RANDOM%6)) || rm -rf ~
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html


Re: [SLUG] C newbie seeks directions

2005-02-16 Thread Erik de Castro Lopo
On Thu, 17 Feb 2005 14:39:53 +1100
James Gregory [EMAIL PROTECTED] wrote:

 There hasn't been too many changes since then. I believe C99 is still
 the accepted standard standard (can anyone verify that?)

Verified. Many compilers are still not fully C99 compliant.

Erik
--
+---+
  Erik de Castro Lopo  [EMAIL PROTECTED] (Yes it's valid)
+---+
The difference between genius and stupidity is that
  genius has its limits.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html