German as RPN

It should be noted that “Reverse Polish Notation” is named in honor of the Polish logician Jan Lukasiewicz, who developed prefix notation, wherein the operator comes before the operands. Postfix notation proved more useful for stack-based arithmetic computations, and so the opposite of prefix notation came to be known as “Reverse Polish Notation”. It was…

23

In defense of the German language

Some commenters deplored the inflectional complexity of the German language. I find the complexity reassuring rather than offputting, because it means that you always know where to find the functional parts of the sentence. The lack of inflectional complexity in English is made up for by its much more complicated structural form. English word order…

24

The white flash

If you had a program that didn’t process messages for a while, but it needed to be painted for whatever reason (say, somebody uncovered it), Windows would eventually lose patience with you and paint your window white. Or at least, that’s what people would claim. Actually, Windows is painting your window with your class background…

12

German, the language of love?

Love lures French kids to German: Come and learn German – a language of love! Hundreds of advertisements in France this week will promote the unusual message to try to woo teenagers to a language they often consider difficult and ugly. “Language is the key to understand a partner, his culture, working manners and lifestyle,”…

35

What happened to DirectX 4?

If you go through the history of DirectX, you’ll see that there is no DirectX 4. It went from DirectX 3 straight to DirectX 5. What’s up with that? After DirectX 3 was released, development on two successor products took place simultaneously: a shorter-term release called DirectX 4 and a more substantial longer-term release called…

19

What tools should I assume everybody has?

My code samples assume you are using the latest header files from the Platform SDK (free download), the one that includes support for Win64. If you have an older SDK then you won’t have various new data types like UINT_PTR and INT_PTR and should just use UINT and INT. I write code that is Win64-compliant…

24

Fixing security holes in other programs

Any crash report that involves a buffer overrun quickly escalates in priority. The last few that came my way were actually bugs in other programs that were detected by Windows. For example, there were a few programs that responded to the LVN_GETDISPINFO notification by overflowing the LVITEM.pszText buffer, writing more than LVITEM.cchTextMax characters. Another responded…

36

ia64 – misdeclaring near and far data

As I mentioned yesterday, the ia64 is a very demanding architecture. Today I’ll discuss another way that lying to the compiler will come back and bite you. The ia64 does not have an absolute addressing mode. Instead, you access your global variables through the r1 register, nicknamed “gp” (global pointer). This register always points to…

22

Uninitialized garbage on ia64 can be deadly

On Friday, we talked about some of the bad things that can happen if you call a function with the wrong signature. The ia64 introduces yet another possible bad consequence of a mismatched function signature which you may have thought was harmless. The CreateThread function accepts a LPTHREAD_START_ROUTINE, which has the function signature DWORD CALLBACK…

23