A C tutorial

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jacob navia

    A C tutorial

    There is a C tutorial at

    It is written to go with the compiler, available
    at the same URL.

    I have added quite a bit of material, and I would be
    glad if people in this group give it a try and tell me if
    I am saying nonsense somewhere.

    Beware that I am not very orthodox, hence my tutorial
    (and the associated compiler) is not just a tutorial about
    ANSI C, but covers things like operator overloading and
    other heresies :-)

    And since it is running in a specific OS, windows
    programming makes for quite a lot of pages. If you
    use another OS however, the first part is (almost)
    straight C.

    jacob





  • Sidney Cadot

    #2
    Re: A C tutorial

    jacob navia wrote:
    [color=blue]
    > There is a C tutorial at
    > http://www.cs.virginia.edu/~lcc-win32
    > It is written to go with the compiler, available
    > at the same URL.
    >
    > I have added quite a bit of material, and I would be
    > glad if people in this group give it a try and tell me if
    > I am saying nonsense somewhere.
    >
    > Beware that I am not very orthodox, hence my tutorial
    > (and the associated compiler) is not just a tutorial about
    > ANSI C, but covers things like operator overloading and
    > other heresies :-)[/color]

    This will attract some flak from this crowd. ANSI C and operator
    overloading do not go together; this has little to do with zealotry or
    heresy... It's more like saying: I'm writing something about soccer,
    which includes a section on how to properly use a tennis racket.

    If you're going to do a tutorial on C++, why not simply call it a C++
    tutorial?
    [color=blue]
    > And since it is running in a specific OS, windows
    > programming makes for quite a lot of pages. If you
    > use another OS however, the first part is (almost)
    > straight C.[/color]

    Unfortunately, the ftp server seems to be overloaded.

    Best regards, Sidney

    Comment

    • jacob navia

      #3
      Re: A C tutorial


      "Sidney Cadot" <sidney@jigsaw. nl> wrote in message
      news:bvs62v$njo $1@news.tudelft .nl...[color=blue]
      > jacob navia wrote:
      > This will attract some flak from this crowd. ANSI C and operator
      > overloading do not go together; this has little to do with zealotry[/color]
      or[color=blue]
      > heresy... It's more like saying: I'm writing something about soccer,
      > which includes a section on how to properly use a tennis racket.
      >[/color]

      The implementation is 100% compatible with the standard. As
      you may know, the standard doesn't forbid extensions.
      [color=blue]
      > If you're going to do a tutorial on C++, why not simply call it a[/color]
      C++[color=blue]
      > tutorial?[/color]

      Because is C. No object oriented programming, no namespaces
      no facets, no complexity. Just a few ideas from C++.
      [color=blue]
      >[color=green]
      > > And since it is running in a specific OS, windows
      > > programming makes for quite a lot of pages. If you
      > > use another OS however, the first part is (almost)
      > > straight C.[/color]
      >
      > Unfortunately, the ftp server seems to be overloaded.[/color]

      Yes, there are many people using it, I hope it is useful.
      Just try again later.
      [color=blue]
      >
      > Best regards, Sidney
      >[/color]

      Thanks
      jacob


      Comment

      • Arthur J. O'Dwyer

        #4
        Re: A C tutorial


        On Thu, 5 Feb 2004, Sidney Cadot wrote:[color=blue]
        >
        > jacob navia wrote:[color=green]
        > > There is a C tutorial at
        > > http://www.cs.virginia.edu/~lcc-win32
        > > It is written to go with the compiler, available
        > > at the same URL.[/color][/color]
        <snip...>[color=blue][color=green]
        > > Beware that I am not very orthodox, hence my tutorial
        > > (and the associated compiler) is not just a tutorial about
        > > ANSI C, but covers things like operator overloading and
        > > other heresies :-)[/color]
        >
        > This will attract some flak from this crowd. ANSI C and operator
        > overloading do not go together; this has little to do with zealotry or
        > heresy... It's more like saying: I'm writing something about soccer,
        > which includes a section on how to properly use a tennis racket.[/color]

        But as I understand it, Jacob *does* play soccer with a tennis
        racket... :)

        Re the actual content, I gave it a very cursory inspection. The
        text still has a higher-than-average number of typos (capitalize
        "Linux," for example, and the diagram on page 4, besides being
        slightly mis-laid-out with respect to the surrounding text, has
        a typo in the compiler message itself ("sucessfully"? )).
        The technical content of the text is so lcc-win32 specific as to
        make any review by comp.lang.c essentially pointless. From an ISO
        Standard point of view, you've got errors up the wazoo -- but as
        far as I can tell, at least the first few dozen pages are correct
        from an lcc-win32 point of view.
        I will also say that the typography needs some work. It's legible,
        but you haven't paid much attention to the consistent use of Courier
        for code snippets embedded in the text, the difference between ` and '
        and whatever TeX does with ", `` and '', and lots of other little
        typographical nits. Makes it somewhat more annoying to read than it
        really has to be, IMHO.

        my $.02,
        -Arthur

        Comment

        • Arthur J. O'Dwyer

          #5
          Re: A C tutorial


          On Wed, 4 Feb 2004, Bubba wrote:[color=blue]
          >
          > On Thu, 05 Feb 2004 02:51:18 +0100, jacob navia wrote:[color=green]
          > > "Sidney Cadot" <sidney@jigsaw. nl> wrote...
          > >[color=darkred]
          > >> If you're going to do a tutorial on C++, why not simply call it
          > >> a C++ tutorial?[/color]
          > >
          > > Because is C. No object oriented programming, no namespaces
          > > no facets, no complexity. Just a few ideas from C++.[/color]
          >
          > Then it isn't C. The code may be C++, which happens to have a lot in
          > common with C (though it is not truly a superset)
          > Operator overloading is without a doubt NOT ISO/ANSI C.
          >
          > So you're telling me that just because a program does not use class,
          > namespace, or templates means its not C++. I think you have flawed
          > reasoning.[/color]
          <snip>[color=blue]
          > Sorry, but your tutorial uses C++. It may use a restricted subset of C++,
          > but it is still C++, not C.
          >
          > Got it?[/color]

          You are mistaken. Jacob Navia's compiler is most definitely *NOT*
          a C++ compiler, and doesn't try to be (AFAIK). It *is* a C compiler
          with a whole bunch of non-standard extensions, including operator
          overloading and suchlike. But it's *NOT* C++!

          To use Sidney's analogy, just because Jacob likes to play soccer
          using a tennis racket doesn't mean he's playing tennis. He may not
          be playing tournament-rules soccer, but he's sure as heck not
          playing tennis, if he's still kicking around that big black-and-white
          ball!

          [Jacob's an off-and-on regular in c.l.c, which is how I know what
          his compiler is like, second-hand. I've never tried it myself: I
          prefer to play soccer with my feet, and tennis with my tennis racket.
          ;-) ]

          -Arthur

          Comment

          • E. Robert Tisdale

            #6
            Troll Alert: A C tutorial

            Arthur J. O'Dwyer wrote:
            [color=blue]
            > Something that calls itself Bubba wrote:[/color]

            [snip]
            [color=blue]
            > You are mistaken.[/color]

            [snip]

            Arthur,

            Please don't feed the trolls.

            Comment

            • Richard Heathfield

              #7
              Re: A C tutorial

              jacob navia wrote:
              [color=blue]
              > There is a C tutorial at
              > http://www.cs.virginia.edu/~lcc-win32
              > It is written to go with the compiler, available
              > at the same URL.[/color]

              Thanks. I'd love to have a look at it. Do you have a version available in a
              portable document format? The site says that "you need the Acrobat Reader
              to view it". You see, given a choice between using Acrobat Reader or not
              reading your tutorial, I will cheerfully give up the chance to read your
              tutorial.

              --
              Richard Heathfield : binary@eton.pow ernet.co.uk
              "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
              C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
              K&R answers, C books, etc: http://users.powernet.co.uk/eton

              Comment

              • Martin Ambuhl

                #8
                Re: A C tutorial

                Richard Heathfield wrote:[color=blue]
                > jacob navia wrote:
                >
                >[color=green]
                >>There is a C tutorial at
                >>http://www.cs.virginia.edu/~lcc-win32
                >>It is written to go with the compiler, available
                >>at the same URL.[/color]
                >
                >
                > Thanks. I'd love to have a look at it. Do you have a version available in a
                > portable document format? The site says that "you need the Acrobat Reader
                > to view it". You see, given a choice between using Acrobat Reader or not
                > reading your tutorial, I will cheerfully give up the chance to read your
                > tutorial.
                >[/color]

                What's wrong with Ghostview? Does his stuff _really_ need the Acrobat reader?


                --
                Martin Ambuhl

                Comment

                • Richard Heathfield

                  #9
                  Re: A C tutorial

                  Martin Ambuhl wrote:
                  [color=blue]
                  > Richard Heathfield wrote:[color=green]
                  >> jacob navia wrote:
                  >>
                  >>[color=darkred]
                  >>>There is a C tutorial at
                  >>>http://www.cs.virginia.edu/~lcc-win32
                  >>>It is written to go with the compiler, available
                  >>>at the same URL.[/color]
                  >>
                  >>
                  >> Thanks. I'd love to have a look at it. Do you have a version available in
                  >> a portable document format? The site says that "you need the Acrobat
                  >> Reader to view it". You see, given a choice between using Acrobat Reader
                  >> or not reading your tutorial, I will cheerfully give up the chance to
                  >> read your tutorial.
                  >>[/color]
                  >
                  > What's wrong with Ghostview?[/color]

                  Nothing at all, of course, although I don't particularly enjoy using it. I
                  use it for reading the Standard, because it's in my direct interest to be
                  able to read the Standard as a PDF. But when I have no particular reason to
                  read a document other than to review it in case I can help its author to
                  improve it, well, call me Mr Silly but I don't think it's the author's
                  place to insist that I use the software /he/ chooses.

                  [color=blue]
                  > Does his stuff _really_ need the Acrobat reader?[/color]

                  He says it does, and he should know, shouldn't he?


                  --
                  Richard Heathfield : binary@eton.pow ernet.co.uk
                  "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
                  C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
                  K&R answers, C books, etc: http://users.powernet.co.uk/eton

                  Comment

                  • Joona I Palaste

                    #10
                    Re: A C tutorial

                    Martin Ambuhl <mambuhl@earthl ink.net> scribbled the following:[color=blue]
                    > Richard Heathfield wrote:[color=green]
                    >> jacob navia wrote:
                    >>[color=darkred]
                    >>>There is a C tutorial at
                    >>>http://www.cs.virginia.edu/~lcc-win32
                    >>>It is written to go with the compiler, available
                    >>>at the same URL.[/color]
                    >>
                    >> Thanks. I'd love to have a look at it. Do you have a version available in a
                    >> portable document format? The site says that "you need the Acrobat Reader
                    >> to view it". You see, given a choice between using Acrobat Reader or not
                    >> reading your tutorial, I will cheerfully give up the chance to read your
                    >> tutorial.[/color][/color]
                    [color=blue]
                    > What's wrong with Ghostview? Does his stuff _really_ need the Acrobat reader?[/color]

                    I wouldn't be surprised if some web site authors write documents that
                    really _do_ require a particular (usually commercial) product to read.
                    Even if they don't use any proprietary features of that particular
                    product.

                    --
                    /-- Joona Palaste (palaste@cc.hel sinki.fi) ------------- Finland --------\
                    \-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
                    "As a boy, I often dreamed of being a baseball, but now we must go forward, not
                    backward, upward, not forward, and always whirling, whirling towards freedom!"
                    - Kang

                    Comment

                    • jacob navia

                      #11
                      Re: A C tutorial


                      "Arthur J. O'Dwyer" <ajo@nospam.and rew.cmu.edu> wrote in message
                      news:Pine.LNX.4 .58-035.04020421434 20.25649@unix42 .andrew.cmu.edu ...[color=blue]
                      > Re the actual content, I gave it a very cursory inspection. The
                      > text still has a higher-than-average number of typos (capitalize
                      > "Linux," for example, and the diagram on page 4, besides being
                      > slightly mis-laid-out with respect to the surrounding text, has
                      > a typo in the compiler message itself ("sucessfully"? )).[/color]

                      Oooops!
                      The typo is not in the tutorial but in the IDE. The tutorial just
                      contains a screen copy.

                      Thanks, I corrected that immediately.
                      [color=blue]
                      > The technical content of the text is so lcc-win32 specific as to
                      > make any review by comp.lang.c essentially pointless. From an ISO
                      > Standard point of view, you've got errors up the wazoo -- but as
                      > far as I can tell, at least the first few dozen pages are correct
                      > from an lcc-win32 point of view.
                      > I will also say that the typography needs some work. It's[/color]
                      legible,[color=blue]
                      > but you haven't paid much attention to the consistent use of Courier
                      > for code snippets embedded in the text, the difference between ` and[/color]
                      '[color=blue]
                      > and whatever TeX does with ", `` and '', and lots of other little
                      > typographical nits.[/color]

                      I didn't want to use Word, so I wrote it with Adobe Frame maker,
                      a very expensive and badly functioning software as I discovered
                      after buying it. The spell checker is inexistent almost. I will
                      spell check it with Word again.
                      [color=blue]
                      > Makes it somewhat more annoying to read than it
                      > really has to be, IMHO.
                      >
                      > my $.02,
                      > -Arthur
                      >[/color]
                      Thank you for your comments




                      Comment

                      • CBFalconer

                        #12
                        Re: A C tutorial

                        Richard Heathfield wrote:[color=blue]
                        > jacob navia wrote:
                        >[color=green]
                        > > There is a C tutorial at
                        > > http://www.cs.virginia.edu/~lcc-win32
                        > > It is written to go with the compiler, available
                        > > at the same URL.[/color]
                        >
                        > Thanks. I'd love to have a look at it. Do you have a version
                        > available in a portable document format? The site says that "you
                        > need the Acrobat Reader to view it". You see, given a choice
                        > between using Acrobat Reader or not reading your tutorial, I will
                        > cheerfully give up the chance to read your tutorial.[/color]

                        What we don't know is how highly his exposition depends on
                        graphics. Use of pdf is clearly more portable than (ugh) word
                        files. Text maximizes portability and minimizes graphics. I have
                        found that an amalgam of html and small graphics suffices quite
                        nicely to handle all of KandR2 and adapts quite nicely to most
                        page sizes.

                        Meanwhile let us give M. Navia proper credit for advancing from
                        word files. Unfortunately he is still delivering packages in .exe
                        files with all the attendant security risks, and he may repair
                        that also in the future.

                        --
                        Chuck F (cbfalconer@yah oo.com) (cbfalconer@wor ldnet.att.net)
                        Available for consulting/temporary embedded and systems.
                        <http://cbfalconer.home .att.net> USE worldnet address!


                        Comment

                        • Darrell Grainger

                          #13
                          Re: A C tutorial

                          On Thu, 5 Feb 2004, jacob navia wrote:
                          [color=blue]
                          > There is a C tutorial at
                          > http://www.cs.virginia.edu/~lcc-win32
                          > It is written to go with the compiler, available
                          > at the same URL.
                          >
                          > I have added quite a bit of material, and I would be
                          > glad if people in this group give it a try and tell me if
                          > I am saying nonsense somewhere.
                          >
                          > Beware that I am not very orthodox, hence my tutorial
                          > (and the associated compiler) is not just a tutorial about
                          > ANSI C, but covers things like operator overloading and
                          > other heresies :-)
                          >
                          > And since it is running in a specific OS, windows
                          > programming makes for quite a lot of pages. If you
                          > use another OS however, the first part is (almost)
                          > straight C.
                          >
                          > jacob[/color]

                          It is not bad. It is not great but it is no worse then my old lecture
                          notes. The title is appropriate. You call it "Programmin g with lcc-win32",
                          which I like. The main problem I have with it is the title and first
                          paragraph of chapter 1.

                          This is not an introduction to C. It is a tutorial for lcc-win32. I have
                          found a lot of new programmers make assumptions when things are not clear.
                          Could you make the first paragraph a little more clear? For example,

                          "This tutorial requires the lcc-win32 compiler. It uses many extensions to
                          the C programming language only available to the lcc-win32 compiler. This
                          compiler is available free for personal use. Please download and install
                          it before continuing."

                          I find it frustrating when students think they know C programming but the
                          reality is that they are lost if they are not using a specific compiler
                          with extensions. They often have more problems in our C programming course
                          then students with absolutely no programming experience.

                          Even as someone who has been programming for 20 years, there are questions
                          I know to ask but did not see the answer to. Is the lcc-win32 compiler C99
                          compliant? Is is C89 compliant with extensions? Are there things the
                          extensions have broken in regards to C89 compliance?

                          Finally, the second paragraph of chapter 1 has the sentence "There are
                          other, better books that do [full-fledged introduction to all of C] (see
                          the bibliography at the end of this book)." This bibliography appears to
                          be missing.

                          --
                          Send e-mail to: darrell at cs dot toronto dot edu
                          Don't send e-mail to vice.president@ whitehouse.gov

                          Comment

                          • jacob navia

                            #14
                            Re: A C tutorial


                            "Darrell Grainger" <darrell@NOMORE SPAMcs.utoronto .ca.com> wrote in
                            message news:Pine.GSO.4 .58.04020508384 60.13250@drj.pf ...[color=blue]
                            > On Thu, 5 Feb 2004, jacob navia wrote:
                            >[/color]
                            [snip][color=blue]
                            > Even as someone who has been programming for 20 years, there are[/color]
                            questions[color=blue]
                            > I know to ask but did not see the answer to. Is the lcc-win32[/color]
                            compiler C99[color=blue]
                            > compliant?[/color]

                            Yes
                            [color=blue]
                            > Is is C89 compliant with extensions?[/color]

                            Yes.
                            [color=blue]
                            > Are there things the
                            > extensions have broken in regards to C89 compliance?
                            >[/color]
                            No.

                            Note that you can avoid any extensions by invoking the compiler with
                            the -ansic flag. This can be selected in the IDE by checking the
                            ANSI C only button in the compiler configuration tab.

                            So all extensions "problems" disappear.

                            All extensions are properly labelled as such everywhere.
                            [color=blue]
                            > Finally, the second paragraph of chapter 1 has the sentence "There[/color]
                            are[color=blue]
                            > other, better books that do [full-fledged introduction to all of C][/color]
                            (see[color=blue]
                            > the bibliography at the end of this book)." This bibliography[/color]
                            appears to[color=blue]
                            > be missing.[/color]

                            Yes, Frame maker crashed and destroyed this part of the document.
                            I have to write it again.

                            jacob


                            Comment

                            • Sidney Cadot

                              #15
                              Re: A C tutorial

                              jacob navia wrote:
                              [color=blue]
                              > "Sidney Cadot" <sidney@jigsaw. nl> wrote in message
                              > news:bvs62v$njo $1@news.tudelft .nl...
                              >[color=green]
                              >>jacob navia wrote:
                              >>This will attract some flak from this crowd. ANSI C and operator
                              >>overloading do not go together; this has little to do with zealotry or
                              >>heresy... It's more like saying: I'm writing something about soccer,
                              >>which includes a section on how to properly use a tennis racket.[/color][/color]
                              [color=blue]
                              > The implementation is 100% compatible with the standard. As
                              > you may know, the standard doesn't forbid extensions.[/color]

                              Ok. I assumed a couple of things from your post that were unwarranted;
                              it didn't help that I didn't have your document at the time.

                              Having extensions is of course ok, as long as you document them and they
                              can be disabled, which you do.

                              I have now downloaded your document, it looks like quite a nicely
                              crafted piece of work on first browsing. I agree with the other comment
                              that it's really a combination of a C introduction with a
                              compiler-specific tutorial. This is of course perfectly ok, but perhaps
                              you could make that a bit cleaner.

                              If I have some time to spare I will look into it a bit more.

                              Best regards, Sidney

                              Comment

                              Working...