Thursday, November 30, 2006

Python Tip: Make Python & Emacs Play Nice on Windows

I've discovered that making Python 2.4.4 work well under Emacs 22 on Windows has a few speed bumps. I'm not sure if these problems apply to other combinations of versions, but they may. Here's a list of things I had to do to make for a happy working environment.

To Run Python in Emacs
To Run Using Pychecker
  • Download the pychecker package
  • Decompress it and go to the extracted folder in a Command Prompt
  • In that folder, run the command python setup.py install
  • Use C-c C-v to run the python code loaded in the current buffer with pychecker
Unresolved Problems (I'm Working on These, Be Patient)
  • It seems that the debugger (pdb) is set up differently with Python 2.4.4 under Windows than other configurations. Consequently, Emacs' calls to pdb are all wrong.
  • When the Python interpreter is loaded into Emacs, it appears to be in a text-only mode. Running programs with graphics does not seem to work.

Wednesday, November 29, 2006

I'm On Skype

I've finally jumped on the Skype bandwagon, though I'm not sure that I'm happy about it. I like the technology behind it, and it does fill a certain set of needs very well (in my case, I need it for work). But, the client is terrible. It's cluttered with buttons and features and labels and big shiny things. I'm having a bit of difficulty figuring out what it can and cannot do. In contrast, Google Talk, my preferred client, is clean, simple, and very easy to use. So, in the end, I'm now running both.

You can search for me on Skype either by my email, smithco@gmail.com, or by my account name, doctor_colin_smith. And as always, you can find me on Google Talk by my email.

Sunday, November 26, 2006

Crud, I've Lost My DS Stylus, Again

Somewhere between now and yesterday, I've lost my DS stylus. Unfortunately, this was my spare; I lost my first one in spring. So now, until I can find a place that sells replacement styli, I won't be playing certain games. Crud, that's no Metroid, no Meteos, and no Castlevania. At least, I still have Mario Kart and Tetris to enjoy.

Monday, November 20, 2006

Visual C++ Tip: Visual C++ is Broken

Once again, I feel the urge to severely beat the people responsible for Visual C++.

I've once again run into examples of severe stupidity in this compiler. It seems that somehow,
Visual C++ got released without someone checking to see if the standard libraries can actually be compiled at the highest warning levels (for Visual C++ 8, that's with the option /Wall).

It really is quite essential for best practices that a compiler can compile it's own standard libraries at the highest warning levels without producing warnings. Otherwise, it causes obfuscation and hides legitimate messages related to the users' code. What's worse, the warnings produced from the standard library are completely opaque.

Here's an example of the warnings I've been given by the compiler.
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\string.h(141) : warning C4619: #pragma warning: there is no warning number '4609'
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\wchar.h(116) : warning C4820: '_wfinddata64i32_t' : '4' bytes padding added after data member '_wfinddata64i32_t::attrib'
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\wchar.h(121) : warning C4820: '_wfinddata64i32_t' : '4' bytes padding added after data member '_wfinddata64i32_t::name'
The first one is a real gem. A warning that there's a warning that doesn't exist. And I think the second one is an indication that there's a nasty shortcut for memory initialisation somewhere. Ugh.

The only lesson here is that the compiler option /Wall is completely unusable. So, use /W4 instead. It's less rigorous, but at least, there's fewer strange warnings emitted from the compiler regarding the standard library at that level. Few enough that they can be disabled or filtered out.

Links to my CV

I've posted before that I've posted my curriculum vitae over at Emurse. However, I only just now realised that I never made a proper, easy to find link on side bar of this page after switching up to Blogger Beta. Now, my curriculum vitae is easily available on the side bar in several formats. Just click on the one you'd like, especially if you want to offer me a job.

Friday, November 17, 2006

I'm On Multiply

After all the hubbub about Multiply over at MOG, I figured I'd give it a try. I now have a page at smithco.multiply.com. If you're on that network, or want to give it a go, feel free to add me as a contact over there.

So far, I'm liking it. It has a bunch of nice aggregation features mashed up with a bunch of nice social network features. And, it does all that with a nice, clean, easy to use, stylish interface. And the best part is, it is an augmentation of my existing networks, not a replacement. There's a good chance that I'll stick with Multiply for a while.

Visual C++ Tip: How to Enable Standard C++ Keywords

The people at Microsoft responsible for Visual C++ need to beaten with a stick. Those responsible for the documentation should be beaten severely.

Once again, I just finished another round of frustration with the non-compliance problems of Visual C++ 8. One would think that by six years after the ISO standard, they would get around to having all the embarrassingly glaring compliance issues sorted out, but sadly, it is still the case that simple, conforming C++ programs will not easily compile.

My current frustration is that, by default, Visual C++ has the boolean operator keywords disabled. That's right, by default, Visual C++ has certain, standard C++ keywords disabled. And it isn't some obscure functionality that I'm referring to, it's the keywords for the logical boolean operators.

It is possible to enable them with the option /Za. To be clear on this, we can refer to the MSDN documentation for the /Za option,
/Za flags language constructs not compatible with either ANSI C++ or ANSI C as errors. /Ze enables Microsoft extensions.
Uh oh, it looks like Microsoft tied two bits of unrelated functionality together into one compiler option, and left one of the bits undocumented. I think I have the full story figured out now, but caveat lector! We've landed in an undocumented, side-effect territory. It seems that we can either have the standard keywords or the language extensions, but not both. Now, most of the language extensions are useless, losing them is no problem, but there is an exception here. The keyword "extern" is erroneously considered a language extension by Microsoft. If you need that very useful keyword, you may run into problems.

Like I wrote at the start of this post, the people at Microsoft responsible for Visual C++ need to beaten with a stick. Those responsible for the documentation should be beaten severely. The design choice here is a shining example as to just how bad the compiler actually is.

Thursday, November 09, 2006

Silver Vase Bromeliad

Silver Vase Bromeliad, originally uploaded by smithco.