A humorless anecdote about code kicking me in the nuts
by Tom Bampton · 08/03/2006 (4:49 am) · 9 comments
When I look back over some of the things I've done with Torque over the years, the overwhelming theme is that I am totally insane. There is method to my madness, but there is often extreme madness to my method.
One of my most often quoted completely useless Torque code has to be TorqueBASIC. This incredibly silly idea started out as a joke due to this long thread. As with a lot of threads, that thread is long and rambling and it had been going on for quite some time. So, I decided that I'd make TorqueBASIC mostly as a joke to see what they would do.
Today, TorqueBASIC lives on in TGE 1.4. Admittedly, there are some generally useful improvements such as the flex/bison source getting fixed up to work with the GNU tools. There is also some educational value for those wishing to figure out the script compiler.
What's the point to this rather wordy introduction ? Well, can your Torque do this ?

For reasons I am far too lazy to go into, we needed this fix on a 1.3 era codebase. I found the actual solution within 5 seconds of looking in scan.l and it took not 30 seconds to verify the fix worked in 1.4. Unfortunately, the console parser in this codebase was the old broken version and the TGE 1.4 code was too far along for an easy merge to be viable.
TorqueBASIC saved the day by being the closest codebase to the one I was working on with a working scan.l. In total it took about 3 hours to actually get working, all for the first fix I thought of 5 seconds after looking at the first file I thought of.
The worst part of all this, is I can no longer realistically claim that TorqueBASIC was useless. TorqueBASIC is in fact evil. It bided it's time. Lulled me in with a false sense of security. 2 years and 2 weeks pretty much exactly it waited ... then from nowhere it pulled it's trump card. "Ha!" it said. "I am in fact incredibly useful! Take that, insane code surgeon!"
Damn code. It really kicks you in the nuts some days.
One of my most often quoted completely useless Torque code has to be TorqueBASIC. This incredibly silly idea started out as a joke due to this long thread. As with a lot of threads, that thread is long and rambling and it had been going on for quite some time. So, I decided that I'd make TorqueBASIC mostly as a joke to see what they would do.
Today, TorqueBASIC lives on in TGE 1.4. Admittedly, there are some generally useful improvements such as the flex/bison source getting fixed up to work with the GNU tools. There is also some educational value for those wishing to figure out the script compiler.
What's the point to this rather wordy introduction ? Well, can your Torque do this ?

For reasons I am far too lazy to go into, we needed this fix on a 1.3 era codebase. I found the actual solution within 5 seconds of looking in scan.l and it took not 30 seconds to verify the fix worked in 1.4. Unfortunately, the console parser in this codebase was the old broken version and the TGE 1.4 code was too far along for an easy merge to be viable.
TorqueBASIC saved the day by being the closest codebase to the one I was working on with a working scan.l. In total it took about 3 hours to actually get working, all for the first fix I thought of 5 seconds after looking at the first file I thought of.
The worst part of all this, is I can no longer realistically claim that TorqueBASIC was useless. TorqueBASIC is in fact evil. It bided it's time. Lulled me in with a false sense of security. 2 years and 2 weeks pretty much exactly it waited ... then from nowhere it pulled it's trump card. "Ha!" it said. "I am in fact incredibly useful! Take that, insane code surgeon!"
Damn code. It really kicks you in the nuts some days.
About the author
Recent Blogs
• A Game in 2750 Days• GID23 and NPC Editor
• Fun with Lua
• How NOT to make a game
• Thinking Outside the Box
#2
08/03/2006 (9:58 am)
Tis coz him Mad Hatter, mon
#3
08/03/2006 (10:37 am)
I kind of liked TorquBasic, I even used it for awhile.. I'm not sure what good all the extra syntax really does for regular Torquescript, besides confuse people who don't know C/C++ that well.
#4
It's not REAL basic if you don't have line numbers.
08/03/2006 (10:56 am)
All I got to say is, that TorqueBASIC looks really cool and all, but WHERE ARE THE LINE NUMBERS???It's not REAL basic if you don't have line numbers.
#5
TorqueBASIC may be evil, but at least it was there to give you the smack down. Now isn't a little evil better than cold codeless loneliness?
08/03/2006 (2:56 pm)
Oh, now this just makes me laugh! Laugh in that incredibly insane "no, no, no....really!??!" kind of way.TorqueBASIC may be evil, but at least it was there to give you the smack down. Now isn't a little evil better than cold codeless loneliness?
#6
08/03/2006 (3:08 pm)
I would like to know how you made it assume the 0 is there, I was too drunk the other night on IRC to even begin to fathom the intricate evil this represents.
#7
T.
08/03/2006 (10:38 pm)
I never claimed it was real BASIC! It's just TorqueScript wearing different clothes :)T.
#8
TorqueBASIC will never die, it will just GOSUB without RETURN.
08/03/2006 (11:16 pm)
Obligatory bad joke time...TorqueBASIC will never die, it will just GOSUB without RETURN.
#9
I smell a new product!!
08/04/2006 (12:36 am)
so we have T3D (TGE) and T2D (TGB), this is what, T1D???I smell a new product!!
Torque Owner Robert Norris