A couple of years back, I come across a great and wasted friend of mine in the hallway of a recording studio; and while he was reciting some poetry to me that he’d written, I saw that he was about a step away from dyin’ and I couldn’t help but wonder why. And the lines of this song occurred to me. I’m happy to say he’s no longer wasted and he’s got him a good woman. And I’d like to dedicate this to John and June, who helped show me how to beat the devil.

It was winter time in Nashville, down on music city row.
And I was lookin’ for a place to get myself out of the cold.
To warm the frozen feelin’ that was eatin’ at my soul.
Keep the chilly wind off my guitar.

My thirsty wanted whisky; my hungry needed beans,
But it’d been of month of paydays since I’d heard that eagle scream.
So with a stomach full of empty and a pocket full of dreams,
I left my pride and stepped inside a bar.

Actually, I guess you’d could call it a Tavern:
Cigarette smoke to the ceiling and sawdust on the floor;
Friendly shadows.

I saw that there was just one old man sittin’ at the bar.
And in the mirror I could see him checkin’ me and my guitar.
An’ he turned and said: “Come up here boy, and show us what you are.”
I said: “I’m dry.” He bought me a beer.

He nodded at my guitar and said: “It’s a tough life, ain’t it?”
I just looked at him. He said: “You ain’t makin’ any money, are you?”
I said: “You’ve been readin’ my mail.”
He just smiled and said: “Let me see that guitar.
“I’ve got something you oughta hear.”
Then he laid it on me:

“If you waste your time a-talkin’ to the people who don’t listen,
“To the things that you are sayin’, who do you think’s gonna hear.
“And if you should die explainin’ how the things that they complain about,
“Are things they could be changin’, who do you think’s gonna care?”

There were other lonely singers in a world turned deaf and blind,
Who were crucified for what they tried to show.
And their voices have been scattered by the swirling winds of time.
‘Cos the truth remains that no-one wants to know.

Well, the old man was a stranger, but I’d heard his song before,
Back when failure had me locked out on the wrong side of the door.
When no-one stood behind me but my shadow on the floor,
And lonesome was more than a state of mind.

You see, the devil haunts a hungry man,
If you don’t wanna join him, you got to beat him.
I ain’t sayin’ I beat the devil, but I drank his beer for nothing.
Then I stole his song.

And you still can hear me singin’ to the people who don’t listen,
To the things that I am sayin’, prayin’ someone’s gonna hear.
And I guess I’ll die explaining how the things that they complain about,
Are things they could be changin’, hopin’ someone’s gonna care.

I was born a lonely singer, and I’m bound to die the same,
But I’ve got to feed the hunger in my soul.
And if I never have a nickle, I won’t ever die ashamed.
‘Cos I don’t believe that no-one wants to know.

To beat the devil, Johnny Cash

This time I wonder what it feels like
To find the one in this life
The one we all dream of
But dreams just aren’t enough
So I’ll be waiting for the real thing.
I’ll know it by the feeling.
The moment when we’re meeting
will play out like a scene straight off the silver screen
So I’ll be holdin’ my own breath
Right up to the end
Until that moment when
I find the one that I’ll spend forever with

‘Cause nobody wants to be the last one there.
‘Cause everyone wants to feel like someone cares.
Someone to love with my life in their hands.
There’s gotta be somebody for me like that.

‘Cause nobody wants to do it on their own
And everyone wants to know they’re not alone.
There’s somebody else that feels the same somewhere.
There’s gotta be somebody for me out there.

Tonight, out on the street out in the moonlight
And dammit this feels too right
It’s just like Deja Vu
Me standin’ here with you
So I’ll be holdin’ my own breath
Could this be the end?
Is it that moment when
I find the one that I’ll spend forever with?

‘Cause nobody wants to be the last one there
‘Cause everyone wants to feel like someone cares.
Someone to love with my life in their hands.
There’s gotta be somebody for me like that.

‘Cause nobody wants to do it on their own
And everyone wants to know they´re not alone.
There’s somebody else that feels the same somewhere
There’s gotta be somebody for me out there.

You can’t give up!
Lookin’ for that diamond in the rough
You never know but when it shows up
Make sure you´re holdin’ on
‘Cause it could be the one, the one you´re waiting on

‘Cause nobody wants to be the last one there.
And everyone wants to feel like someone cares.
Someone to love with my life in their hands.
There has gotta be somebody for me
Ohhhhhh.

Nobody wants to do it on their own
And everyone wants to know they’re not alone.
Is there somebody else that feels the same somewhere?
There’s gotta be somebody for me out there.

Nobody wants to be the last one there
‘Cause everyone wants to feel like someone cares.
Is there somebody else that feels the same somewhere?
There has gotta be somebody for me out there.

Gotta be somebody, Nickleback.

Oh what fun it would be: a compiler with useful error messages

the code:

#include "common.hpp"


template<typename ACHAR>
class GameException
: public std::exception
{
public:
GameException() throw();
GameException(const ACHAR*) throw();
GameException(const basic_string<ACHAR>&) throw();
virtual ~GameException() throw();
virtual const ACHAR* what() const throw();
protected:
const ACHAR *why;
};

the error:

s:visual studio 2008projectstacfpsgameprojectnamesourceincludegameexceptions.hpp(17) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

the solution:

fully qualify basic_string<> as std::basic_string<ACHAR>, or add ‘using std::basic_string’ to common.hpp along side std::string and std::wstring, like I thought I did last week !!!

simple fact: compiler errors usually suck, and C++ templates don’t help any.

Ahh I feel refreshed!

One of our clients was out of town for a few days, so we had to watch their dog over here; he just went home tonight. After ~6 hours of C++ this afternoon, I was kind of glad to be shifting out to a lit’ work.

Came home to a long hot shower and a close shave; threw everything in the wash and plopped down back in front of the computer lol. One nice thing about a C++ compiler, it doesn’t care if your favourite t-shirt probably has more holes in it then a slice of swiss cheese :-P.

I’ve been working on a file system library and a command console for my present project; comparing the Windows and POSIX APIs for file system operations, I’m in the mood to paste a comparison later… haha. Present prioriteres are mapping data into both the source and release trees, hooking up the game console, and maturing the file system interface. Really the prototype will have a few quake like qualities in that regard, but that is only because ID Tech engines kick ass hehe. What I really would like is to load data out of ZIP archives and use a mixture of XML and Python script to extend things. We’ll see where the future goes.

Maybe I’m just tired, or now I’m ready for a nap

compiler is pissed off:

1>pathsourcegameconsole.cpp(53) : error C2039: 'setPostiion' : is not a member of 'Ogre::OverlayElement'
1> pathsourceogreogremainincludeogreoverlayelement.h(104) : see declaration of 'Ogre::OverlayElement'

ogreoverlayelement.h

class _OgreExport OverlayElement : public StringInterface, public Renderable, public OverlayAlloc
{
// ...
public:
/** Sets the position of the top-left corner of the element, relative to the screen size (1.0 = screen width / height) */
void setPosition(Real left, Real top);


// ...
};

The header file and the API documentation both agree, the Ogre::OverlayElement class has a public member named setPosition. The compiler however seems to assert, that the header is wrong?

No, the compiler, the header, and the API docs are all right: I’ve just been sitting here for about 5 1/2 hours without break…. and can no longer tell the difference between ‘void setPosition(Real, Real);’ and ‘void setPostiion(Real, Real);’

!!! TIME TO TAKE A WALK !!!

Mating Vi IMproved with Visual C++, part I

Maybe it’s because it is an Integrated Development Environment, but Visual C++ seems to be a little lacking in its handling of external editors (at least in the express edition I have avail). It seems the best way to get MSVC to work with Vi IMproved for editing files, is to right click on a file in the solution explorer docklet, and click “Open with”. From there one can specify a program to open the file with and force it as the default editor; the down side is the bloody thing seems to reject the concept of command line arguments.

As such, I created a new win32 application in the IDE, and stripped the fundamental code down to the following

#define GVIM_EXE    _T("P:/Editors/Vim/vim-personal/gvim.exe")
#define GVIM_ARGS _T("--servername"), _T("MSVC"), _T("--remote-tab-silent")

int APIENTRY
_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(hInstance);
UNREFERENCED_PARAMETER(nCmdShow);

_texecl(GVIM_EXE, _T("gvim"), GVIM_ARGS, lpCmdLine, NULL);

return 0;
}

Which means I get one instance of Vim running and double clicking files in the solution explorer, will open a new tab in the GVim window; gotta love an editor with a client-server feature hehe.

I have Michael Graz’s visual_studio.vim installed along with the required python for windows extensions. The plugin loads and appears to be exactly the *first* vim plugin that I can actually find a purpose for using! Except for one small problem…. the plugin can’t seem to chatter with the running instance of Visual C++ 2008 Express Edition!

Of course, I could likely jerry rig vim’s :make command to invoke vcbuild for me without much trouble.

Heh, and just for the heck of it, I wonder if a similar plugin could be written for other IDEs, like Code::Blocks, XCode, and KDevelop?

The road I’m on

She said life’s a lot to think about sometimes
When you’re living in between the lines
And all the stars they sparkle and shine everyday

He said life’s so hard to move in sometimes
When it feels like I’m towin’ the line
And no one even cares to ask me why I feel this way

I know you feel helpless now and I know you feel alone
That’s the same road, the same road that I am on

He said life’s a lot to think about sometimes
When you keep it all between the lines
Of everything I want and I want to find, one of these days

What you thought was real in life somehow steered you wrong
Now you just keep drivin’ tryin’ to find out where you belong

I know you feel helpless now and I know you feel alone
That’s the same road, that same road that I am on

What you thought was real in life somehow steered you wrong
Now you just keep drivin’ tryin’ to find out where you belong

I know you feel helpless now and I know you feel alone
That’s the same road, that same road that I am on

The Road I’m On, 3 Doors Down

Building vim with support for Python and Perl on Windows

Previously:

install a suitable version of Visual Studio / Visual C++
install a suitable version of Python
install a suitable version of Perl
open a Visual Studio Command Prompt

I have VC Express 9.0, ActivePerl 5.10.0, and Python 2.6.2 installed from Python.org’s installer.

Check out the VIM source code, you can find directions here. I suggest using CVS or SVN to make the patching life easier. Precompiled binaries of CVS and SVN are available for Windows, and it is possible to build them yourself of course ;).

I use CVS and wish to keep the tree along side my regular vim:

> cd /d P:editorsvim
> cvs -z3 -d:pserver:anonymous@vim.cvs.sf.net:/cvsroot/vim checkout -Nd vim7-cvs-src vim7
> cd vim7-cvs-srcsrc

You should know read the Make_mvc.mak makefile to find the options you are interested in using. I’ll leave the viewing the file from the command line to a Windows users intelligence (hints: more, edit, notepad, wordpad, or gvim would be useful). We have to tell nmake.exe to use this file and our options, for asses who use Visual Studio all day but don’t remember nmake: we pass it VAR=value pairs.

> nmake /F Make_mvc.mak CPUNR=i686 FEATURES=HUGE GUI=yes OLE=yes CSCOPE=yes CTAGS=ctags POSTSCRIPT=yes PYTHON=P:DevelLanguagesPython2.6 PYTHON_VER=26 PERL=P:DevelLanguagesPerl PERL_VER=510

Obviously if you want same options, adjust the paths like a good little geek.

At least on my system, MSVCs compiler refuses to build the vimrun.exe, install.exe, uninstal.exe, and xxd/xxd.exe targets (and programs). As such, I build gvim and the gvimext.dll – the targets are in the makefile. if one wants to build a vim execuitable under a diffirent name, I suggest ‘nmake /e VIM=foo /f … OPTS=… foo.exe’ to create foo.exe (default is gvim).

As such we need a place to put vim so we can actually use it.


> MKDIR ....vim-personal
> FOR %F IN (*.dll *.exe) DO XCOPY /Y %F ....vim-personal
> XCOPY /Y P:DevelLanguagesPerlbinperl510.dll ....vim-personal
> XCOPY /I /E /Y ..runtime* ....vim-personal

and one can borrow the lost vimrun and diff files from a working install. If one also juggled the names so that vim-personal became vim72, one could also borrow the install.exe file most likely…

In doing all of this, I’ve written a batch script to use in automating the thing, which is not as good as my vimbuild shell script but still works lol. When I get some time I’ll make my script also update the spell files and what nots (hint: see spellreadme.txt)

Hahaha, here I am wondering ok, what the hell is wrong with

if (statement that will return false)
DEBUG(...);
do action;

and then I noticed, uncommenting the DEBUG() macro a few minutes ago changed the dohicky.

This is exactly why whenever I’ve written a ‘style’ file for any of the projects I’ve done (and in fact, usually follow) a note that it should *always* be if () { } and never if () just for this reason!!!

Ok, I’m so freaking stupid… I should just get some sleep and code when I can pay attention (and remember my old tool Perl).