Friday, October 14, 2005

Old programs

I was thinking, not too long ago, that it would be nice if I had kept all of the programs I've written over the years. Whether in BASIC, Pascal, C, or C++, they were, if not actually useful, at least interesting. I recently bought Borland C++ Builder 6.0, and I think I'll try to recreate some of them. I don't know if I'll bother with the AD&D character generator (or any of the generators for other game systems that I've written. There was a time when writing a generator was almost more important than playing) since I'm not in an RPG group anymore. Some of the others might be fun as C++ refreshers. Some of them are fractal, like the root basin and Mandelbrot set. I'll have to brush up on differential equations to recreate my Runge-Kutta program. I think I'll start with Mr. Engleka's "Funky Chicken" program. Long story. Oh yeah: if anyone has the code for an equation parser (in C++, even a simple one will do) that they'd be willing to send, I'd appreciate it. I actually want to write my own, but I'm lazy.

Later,

5 people have spouted off:

tom said...

Yea, we talked about that, but half the fun of programming is re-creating the programs that you've already written several times. Wait a tic... No, that's not even 1/100th the fun, in fact, that's no fun at all.

phil said...

Equation parsers are pretty complicated. I had some code for a very simple one in C++ (from an advanced C++ programming book). It only handled the basic math functions (addition, subtraction, multiplication, division, and maybe exponents). I didn't understand how it worked at all and the code is pretty impossible to follow. I can probably find it if you want it.

phil said...

Or if you learn Python, you can get python bindings for C++ so that your C++ programs can use python code - read from files or imput at runtime. Python syntax is pretty simple. It's probably the easiest object oriented language.

Anonymous said...

You wonder why I never comment on your blogs... well here's a perfect example. The conversation is way above my head.

John said...
Hey phil, if you can find it, pass it along.
10/19/05, 5:53 PM