My question is: If I to start right now, how quickly can I get up to
speed?
Is all that stuff really as complicated as it looks?
And, most important - where do I start? I have the C programming book,
so that is not a problem. Were do I start with all the other stuff?
I would appreciate any/all suggestions.
I would pick a side project to get up to speed. I know that the Gnocl
project would love another C coder.
Robert
Sid: Wait? Why do I have to be the platypus? Why not make him the
platypus?!
-- From "Ice Age" -- :) :) :)
I will keep it in mind. It seems like a good candidate for Google
Summer Of Code though. Not an easy project to start with.
I am also looking for a good book on improving the source code reading
skills.
Note that make/makefile/automake is not C programming, but one
particular method used for building a C application in a manner to
reduce what a person building the application has to do to get the C
program to build during deployment. Originally, each person who
wanted to build an application would get a note saying "type cc file.c
-Ipath -llibrary -o file" to build the application. However as C ran
on new platforms, people had to make changes to the applications, to
the build commands, etc. the process became more and more complicated.
The make command was created to allow a pseudo scripting of the build
process so that a person wanting to build an application could just
type "make" and not have to worry about the various steps and flags
needed. As time went along, the people writing the code found it more
and more difficult to know all the variations they needed to think
about when creating code that would build and execute the same on
different platforms. The GNU project created a framework with automake
and other tools to help code builders (who have intention on their
code building on many platforms) generate code to do so.
>
> My question is: If I to start right now, how quickly can I get up to
> speed?
Writing C code, particular after having been exposed to C coding
before, isn't bad. Writing C code that interacts with Tcl is learning
about a variety of C functions to call in libtcl. Writing C code that
interacts with Tk is learning another set of library functions (of
course, if you don't know Tk yet, there is also the learning of event
programming that you need to learn).
> Is all that stuff really as complicated as it looks?
> And, most important - where do I start? I have the C programming book,
> so that is not a problem. Were do I start with all the other stuff?
I think this is a great question.
I recommend that you first learn to program Tcl at the script level.
Become comfortable with that. Then if you are thinking about writing
software involving Tk, learn to make use of that as well.
Next, take the Tcl and Tk source distribution. Use these to learn
about using make. Read the included files and follow their
directions.
Next, get the "sample" Tcl extension. This is an example of how to
write some simple C code to interact with Tcl. Take a look at the
actual code. This demonstrates a Tcl extension framework called TEA,
which is a set of defined standards for putting together code so that
it would build and interact with Tcl in an expected manner.
You likely have a book teaching C, after having taking a class in it.
I've seen two books that have talked a bit about building C apps - the
"Tcl and Tk toolkit" book initially written by John Ousterhout and now
recently released with additional material by Ken Jones, and a group
effort book by Welch, Hobbes, and others. I suspect there are other
printed books which cover similar topics.
Of course that depends on what you want to do. A simple hello-world
extension should run in less than 15 minutes. Maybe start at
http://wiki.tcl.tk/11153
Also a search on http://wiki.tcl.tk/ for "C extension" shows some more
resources.
HTH
R'
Another approach would be to learn from the Tcl core itself, and in an
useful manner: by tackling bugs !
To do that, just go to the SourceForge project for Tcl (or even Tk),
Trackers -> Bugs, sort by priority, pick one in a field you're
interested in, and dive !
It may feel a bit steep at first sight, but quickly familiarity will
seep in. And you'll be simultaneously learning from (mostly) brilliant
code and helping the community. (Much better than by writing an N+1th
extension doing something a 3-line script can do).
-Alex
TCC and CRITCL look interesting as a way to create and use C code
quickly.
You might want to check out the iCanProgram Intro to Linux Programming
nofee course at:
http://www.icanprogram.com/linuxProgramming.html
It offers a mixture of Tcl/Tk and C examples along with simple
explanations of build tools like Makefiles etc.
bob