Are there books about C data structures?

K

Keith Thompson

user923005 said:
Probably, the best book to learn algorithms and data structures is the
CLR book.

I don't know what "CLR" means, though a Google search leads me to
guess that you mean "common language runtime". Can you be more
specific?

[...]
Every programmer on earth should own his own set of TAOCP.

That's The Art of Computer Programming, by Knuth (some people here
might not recognize the abbreviation).
 
C

Chris Torek

user923005 said:
[...]
Probably, the best book to learn algorithms and data structures is the
CLR book.

I don't know what "CLR" means, though a Google search leads me to
guess that you mean "common language runtime". Can you be more
specific?

I believe he means Cormen, Lieserson, and Rivest -- i.e., "Introduction
to Algorithms" (see <http://mitpress.mit.edu/algorithms/>). Technically
this would now be CLRS. :)
 
F

Flash Gordon

Malcolm McLean wrote, On 23/08/07 20:29:
If you use a very conservative subset of C then you solve most of the
problems, but not all of them, because standards committees sometimes
break perfectly good constructs.

It does not have to be very conservative since the committee generally
tries to avoid breaking too much existing code. Avoid things most people
would consider bad practice, and the mostly leaves the risk of new
keywords being added.
The snag with pseudocode is that it is much harder to get out bugs.

Implement the pseudocode and debug the implementation being sure to feed
bug fixes back up.
 
C

Christopher Benson-Manica

[comp.lang.c] Keith Thompson said:
Probably, the best book to learn algorithms and data structures is the
CLR book.
I don't know what "CLR" means, though a Google search leads me to
guess that you mean "common language runtime". Can you be more
specific?

Well, my first thought in response to "CLR" is that rust remover
stuff, which might actually be a good analogy for a book that I
thoroughly loathed as an undergrad. (I'm presuming that CLR refers to
the following text by Cormen, Leiserson, Rivest, and Stein:

http://mitpress.mit.edu/catalog/item/default.asp?tid=8570&ttype=2

, with apologies for the lack of url snippage.)
 
S

santosh

Richard said:
Clearly not the case and I have found many peer reviews on Amazon for
technical books to be very illuminating, What do you do when you are not
putting other people down and blowing up your own self importance?

But as the post by Kevin Bagust in this thread seems to show, the reviews
*were* wrong for at least this particular book. Not encouraging that a site
like amazon.com could make such an elementary error. Or maybe it's all
about marketing...
 
C

CBFalconer

Keith said:
I don't know what "CLR" means, though a Google search leads me to
guess that you mean "common language runtime". Can you be more
specific?

Well, barring other evidence, I would assume it refers to a
pushbutton or routine that initializes something to an 'empty'
condition, such as blanking a screen. :)
 
E

Eric Sosman

Keith said:
user923005 said:
Probably, the best book to learn algorithms and data structures is the
CLR book.

I don't know what "CLR" means, though a Google search leads me to
guess that you mean "common language runtime". Can you be more
specific?

[...]
Every programmer on earth should own his own set of TAOCP.

That's The Art of Computer Programming, by Knuth (some people here
might not recognize the abbreviation).

Those who don't can always ggl it.
 
R

Richard Heathfield

Malcolm McLean said:

The snag with pseudocode is that it is much harder to get out bugs.

Similarly, the snag with a hostile attitude to bug reports is that it is
much harder to get out bugs.
 
R

Richard Heathfield

santosh said:
But as the post by Kevin Bagust in this thread seems to show, the
reviews *were* wrong for at least this particular book. Not
encouraging that a site like amazon.com could make such an elementary
error. Or maybe it's all about marketing...

Please don't feed the trolls, santosh. It only encourages them.
 
U

user923005

I don't know what "CLR" means, though a Google search leads me to
guess that you mean "common language runtime". Can you be more
specific?
Every programmer on earth should own his own set of TAOCP.
That's The Art of Computer Programming, by Knuth (some people here
might not recognize the abbreviation).

Those who don't can always ggl it.

if u cn rd ths msg u cn bcm a sec & gt a gd jb.
 
C

Christopher Benson-Manica

[comp.lang.c] Eric Sosman said:
Those who don't can always ggl it.

Is that "giggle"? (That wouldn't be a bad name for a search engine
either, but alas, the domain has been appropriated by a purveyor of
infant paraphernalia.)
 
M

Malcolm McLean

Flash Gordon said:
Malcolm McLean wrote, On 23/08/07 20:29:

It does not have to be very conservative since the committee generally
tries to avoid breaking too much existing code. Avoid things most people
would consider bad practice, and the mostly leaves the risk of new
keywords being added.
But they can't make their decrees stick. In the end this can only lead to
the abandonment of the standard. My Microsoft compiler already deprecates
the string library.
 
F

Flash Gordon

Malcolm McLean wrote, On 24/08/07 22:15:
But they can't make their decrees stick. In the end this can only lead
to the abandonment of the standard. My Microsoft compiler already
deprecates the string library.

Make up your mind whether you are arguing that the standards committee
will break the code or whether implementations will break it.

The current version of MSVC still compiles C programs conforming to C90,
and if prodded appropriately will not generate those warnings. I think
that MS would find themselves forced to back off if they ever actually
removed the standard functions they generate those warnings for, just as
a few years back they were forced to add in proper backwards
compatibility for a version of Word that lacked it.
 
E

Eric Sosman

Christopher said:
[comp.lang.c] Eric Sosman said:
Those who don't can always ggl it.

Is that "giggle"? (That wouldn't be a bad name for a search engine
either, but alas, the domain has been appropriated by a purveyor of
infant paraphernalia.)

<off-topic>

When Google first appeared on the scene, I supposed that
the founders were aficionados of 1920's popular entertainment:
"Barney Google and Snuffy Smith," "Barney Google with the goo-
goo- googly eyes," and so on.

It came as a disappointment when I read somewhere that the
name originated as a misspelling of "googol."

But maybe that's just a cover story to prevent us from
realizing we're being taken over by Cossacks. Isn't one of
the founders named Sergei? Maybe his family hails from
Sorochyntsi.

</off-topic>
 
R

Richard Heathfield

Malcolm McLean said:

But [ISO] can't make their decrees stick. In the end this can
only lead to the abandonment of the standard. My Microsoft
compiler already deprecates the string library.

Then ditch your Microsoft compiler. There are plenty of other high
quality compilers available for your platform, some of them free. For
parochialism to triumph, it is necessary only for cross-platform
developers to do nothing.
 
M

Malcolm McLean

Richard Heathfield said:
Malcolm McLean said:

But [ISO] can't make their decrees stick. In the end this can
only lead to the abandonment of the standard. My Microsoft
compiler already deprecates the string library.

Then ditch your Microsoft compiler. There are plenty of other high
quality compilers available for your platform, some of them free. For
parochialism to triumph, it is necessary only for cross-platform
developers to do nothing.
I am seriously thinking of getting a Linux machine for hobby programming. I
already use one for science, when I don't use the cluster.
The problem is that users like graphical programs, and there just isn't a
good way of distributing them. Java won't link in C routines. Microsoft keep
on messing about with their compliers. Currently I've got something that
will link in the Windows API, but doesn't document it, so it's really hard
to use. X, well I'm writing a BabyX toolkit. I can't give something that
uses Motif or the gimp widget set to biochemists who are basically Fortan
programmers. Getting them to use C is hard enough. Really I want to give
priority to enhancing the book and fixing errors, so I haven't devoted much
time to Baby X, although it works in the sense that it puts a UI on screen.
 
B

Ben Bacarisse

Malcolm McLean said:
Richard Heathfield said:
Malcolm McLean said:

But [ISO] can't make their decrees stick. In the end this can
only lead to the abandonment of the standard. My Microsoft
compiler already deprecates the string library.

Then ditch your Microsoft compiler. There are plenty of other high
quality compilers available for your platform, some of them free. For
parochialism to triumph, it is necessary only for cross-platform
developers to do nothing.
The problem is that users like graphical programs, and there just
isn't a good way of distributing them. Java won't link in C
routines. Microsoft keep on messing about with their
compliers. Currently I've got something that will link in the Windows
API, but doesn't document it, so it's really hard to use. X, well I'm
writing a BabyX toolkit.

I probably have little credit in your bank, but if there is any left,
draw on it now and consider this question: does the world need yet
another X toolkit? I think not.

What would be hugely useful is a simple C API to a common abstraction
(a simple subset, presumably) of the basic GUI functionality with
small back ends that implement this natively in Gtk, Qt, Win32 and
anything else anyone fancies. I don't know if this is really
possible, but if it is it would benefit everyone doing cross-platform
development of GUI C programs.
 
M

Malcolm McLean

Ben Bacarisse said:
I probably have little credit in your bank, but if there is any left,
draw on it now and consider this question: does the world need yet
another X toolkit? I think not.
That's a good question. The idea of Baby X is that it is simple to use, at
the cost of not having much flexibility, and is also simple in code.
Initially it seemed to go very well, you can have scrollbars, buttons, edit
fields etc, all perfectly serviceable, in a few lines. Unfortunately adding
containers broke the premise that "each object is a window" of its own type,
whilst fonts and colours make things more complicated, and introduce
dependencies of the objects on each other. As I add functionality, it
becomes progressively more and more difficult to descibe how to write your
own BabyX component. Eventually it might end up as just another toolkit, so
the question becomes why not just use GTX?
What would be hugely useful is a simple C API to a common abstraction
(a simple subset, presumably) of the basic GUI functionality with
small back ends that implement this natively in Gtk, Qt, Win32 and
anything else anyone fancies. I don't know if this is really
possible, but if it is it would benefit everyone doing cross-platform
development of GUI C programs.
It is easy to define an interface. All you need is openwindow(width,
height), closewindow(), setpixel(x, y, colour), arguably getpixel(x, y),
querymouse(win, &x, &y), and squeaksqueak( void (*fptr)(int buttons, void
*ptr)), defiining a callback for mouse input, and kbhit() / getch() for the
keyboard.

In practise it is difficult to get this to work on all systems, because they
evilly take control of the main loop. That was another motive for writing
Baby X. Then you've got the problem of colour depth, not so severe now but a
real nuisance in the past. Finally you really need some hook into the
systems fonts. You can get output without it, but non-game users like to see
Ariel and Times New Roman.

Another problem again no longer as severe as it was, is that on some systems
there isn't enough memory to hold backing store for every window. So windows
need to be regenrated on demand.

The of course you can't write a non-trival GUI with just those functions,
you need sub-windows and other facilities on top. However you can implement
everythign in terms of simple pixel operations. Java's Swing does just
that - the previous approach, providing interfaces to native graphics calls,
failed.
 
R

Richard Bos

Malcolm McLean said:
But they can't make their decrees stick. In the end this can only lead to
the abandonment of the standard. My Microsoft compiler already deprecates
the string library.

Yes, but that's a politico-economical weapon, intended to lock you
deeper and deeper into M$'s broken "safe" extensions, not a rational
decision. It really has nothing to do with what the committee should and
should not do, except perhaps as an argument that the committee should
not give in to those bullies and should have nothing more to do with
that extension.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top