Live data from Hacker News

Tenacious C: Cool C IDE

tenaciousc.com

41–43 of 43 posts

Re: Tenacious C: Cool C IDE

#41

What a joke. Things like this – and the rhetoric on his site – make systems programming look like more of a dark art than it actually is. If you're a programmer, should know how your computer works; if pointers are too "hard" for you, you're in the wrong business. You're settling for mediocrity and belittling your own intelligence by assuming you're not capable of tackling this stuff the same way everyone else has.

My thoughts exactly. Pointers are one of the easier "computer science concepts". Instead of storing the entire value right here, we just store where in memory that is. That's all. The side-effects are also relatively simple. Since we're just passing around memory addresses, anything (including called functions) can modify it, since they just write to that memory.

If you can't understand that, I don't see how you are going to write a computer program. The deeper issues are things like object lifetimes, call-by-value versus call-by-reference semantics, and so on.

Re: Tenacious C: Cool C IDE

#42
post #18
post #14

Earlier quoted context omitted.

> a web-based GUI wrapper ...why would you want to do that for a C debugger?

I've actually thought about making something like this. My reasons: collaborative coding + debugging, and IDEs without needing an environment aside from your browser (coding + compiling + debugging code on the device it's made for).

We actually tried to make something like that with a friend a few years ago. It didn't end well but it was an interesting experience.

What's left of it today: http://www.gravytea.com/labs/metacoding/

Re: Tenacious C: Cool C IDE

#43
post #29
post #23

Earlier quoted context omitted.

I made you a crappy flowchart that demonstrates Duff's Device (with 4 cases rather than 8 since I'm lazy): http://i.imgur.com/L73ai.png The basic idea is that the switch jumps into the body of the loop somewhere, after that it can do blocks of the same function over and over without having to do the conditional check to exit the loop as often. For example, if you're copying memory, and you want to copy say, 9 bytes t…

That is a really good description (and I love the `crappy flowchart`, thanks). But I think what I'm mostly taking away from this is that my brain struggles with the more serious aspects of C-style imperative programming.

It's really just sort of a weird optimization trick. You shouldn't use it in a regular program unless you have a very, very good reason. The fact that it works at all (ie, that you can inject the start of a loop into the middle of a switch statement) is surprising to most people. I've shown this to people who've been programming since before I was born, and they struggled to understand it at first since they had no idea that it was syntactically possible to do that -- it's not the kind of thing you normally think of when writing a program in C. If you know an assembly language and how C maps onto assembly, it's pretty easy to make sense of though, after you get over the shock of the syntax permitting this particular construction.
Post reply on HN