
Tenacious C: Cool C IDE - Maakuth
http://tenaciousc.com
======
SkyMarshal
Good top post on the blog page, made me lol:

 _'I like C, but I have to admit that, sometimes, “The Old Man of Programming”
can be a bit of a killjoy. This is one of the most exciting eras in computer
history, but lately, C’s acting like he doesn’t even want to have a good time.
While the cool kids like Ruby and Haskell are living it up, C’s over in the
corner obsessing over bits and bytes and memory alignment and pointers and the
stack and machine architecture and unreachable allocations and multiple
indirections…and it’s…kind of a buzzkill. You want to tell him, “Dude! Lighten
up! This is supposed to be fun!”

But of course C can’t relax. He’s holding the entire computing universe on his
shoulders, after all. It’s not turtles all the way down — it’s turtles all the
way down, _____then C__ __. _Not a lot of room for fun underneath that, is
there?

Is there?

Well. Here’s the secret: C does let loose sometimes. And after being bottled
up for so long, when the release finally does come, it’s pretty much an F5 of
crazy.'_

~~~
philbo
The blog post is excellent. It led me to this:

<http://www.lysator.liu.se/c/duffs-device.html>

I've programmed in C a fair amount, but I am incapable of understanding the
construct contained therein. Specifically, the interaction of the switch and
the loop and all those fall-through cases. I would absolutely love it if some
C-guru hn-er could describe it in layman's terms?

~~~
silentbicycle
The other two comments are right, but the context you might be missing is
_why_ you would unroll a loop. Due to cache behavior (and other low-level
details), doing something eight times and then checking if it needs to be done
_another eight times_ has less overhead than checking after each loop
iteration. Why eight? It was probably a sweet spot in time vs. code size, at
some point. (Processor caches are larger now.)

Duff's device just gets the (remainder of N/8) steps out of the way the first
time through, then drops down to looping eight at a time. If it seems more
complicated than that, you're probably overthinking it. It's "just" a creative
abuse of C syntax, a bunch of offsets and gotos.

Sometimes low-level optimization like this makes a huge difference, but make
sure it's a hotspot first, and that the compiler isn't _already_ doing those
things for you. Measurements will keep you objective.

Also, if you're doing a lot with C, check out Lua!

~~~
philbo
Thanks. Lua is on "my list" actually, Fortunately I am only forced to work in
C for one particular project (sorry if that sounds negative, C-heads, I'm just
a messy enough person to require garbage collection to stop me from messing up
too bad).

~~~
silentbicycle
Lua is, IMHO, "Javascript done right". It's nice to have the option of writing
C code but letting Lua do garbage-collection on common userdata.

Lua replaced Python for me - it's a great language on its own. TCO and pattern
matching (<http://github.com/silentbicycle/tamale>) go a long way.

------
Groxx
I've been waiting for _something_ to implement at least _something_ DDD has
done for years... and less fugly is nice. Any idea how it handles circular
references?

<http://www.gnu.org/software/ddd/all.png>

~~~
xtacy
What would be interesting is if someone made a web-based GUI wrapper around
such apps. I am sure it would be possible, considering that curses-based
wrappers have been around: <http://zemljanka.sourceforge.net/cursed/>.

~~~
ramchip
> a web-based GUI wrapper

...why would you want to do that for a C debugger?

~~~
xtacy
It's just that you write it once and it can run anywhere without "installing"
many dependencies other than a browser. No fugly GUIs, no inconsistencies,
etc.

By web-based I didn't mean it to be on the Internet.

~~~
silentbicycle
So basically, "web-based" is the new portable GUI library.

~~~
blasdel
Absolutely — you just open a high port on localhost and open the URL in a
browser. I've used this technique before on consulting projects with great
success.

~~~
VMG
That's not really web-based then, more HTML-based.

------
mx12
Just from the screenshots it looks like it might be a good tool for teaching
students learning about pointers.

~~~
stcredzero
This is probably one of the best things that's happened for programming
education in years! (In addition to a lot of other uses.)

------
rogerclark
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.

~~~
angrycoder
I dunno, I have a lot respect for people who take difficult concepts and try
to make them easier to grasp.

Teachers are more valuable than belittlers. "This isn't hard" is not a lesson
plan or a path to enlightenment.

~~~
rogerclark
I also have a lot of respect for people who are willing to teach. But I don't
respect teachers that speak of these concepts like they're magic that no mere
mortal can understand. This is stuff that everyone can know -- and should know
-- and needs to be treated like learning arithmetic, not tensor calculus.

------
dinkumthinkum
Neat, but I question the Windows only choice here. A lot of C programmers are
developing on a *nix platform. But I see this as being more useful for
students learning C and memory management. It's a neat project and might
recommend it to students but I'll stick to vim, myself.

~~~
TimMontague
They seem to be targeting the embedded market, which is mostly Windows based.

------
groaner
Now I know what Walter Bright should have named his software development
toolchain...

------
sliverstorm
Of course, if you learned assembly first instead of Java or somesuch, pointers
make 100% intuitive sense, and if you didn't grok them completely you wouldn't
have been able to write your first program.

------
bsk
Is this a port of <http://en.wikipedia.org/wiki/Tenacious_D> ? ;-)

~~~
ecounysis
yes

