Tuesday, November 22, 2011

Why Windows 95's GetVersion function returned 3.95 instead of 4.0

http://blogs.msdn.com/b/oldnewthing/archive/2004/02/13/72476.aspx

Version numbers. Very important. And so many people check them wrong.

This is why Windows 95's GetVersion function returned 3.95 instead of 4.0. A lot of code checked the version number like this:

UINT Ver = GetVersion();   
UINT MajorVersion = LOBYTE(uVer);   
UINT MinorVersion = HIBYTE(uVer);   
if (MajorVersion < 3 || MinorVersion < 10) {    
    Error("This program requires Windows 3.1");   
} 

Now consider what happens when the version number is reported as 4.0. The major version check passes, but the minor version check fails since 0 is less than 10.

This bug was so rife that we gave up shimming every app that had the problem and just decided, "Fine. If anybody asks, say that the Windows version is 3.95."

I suspect this is also why DirectX always reports its version as 4.x.

Tuesday, November 15, 2011

Japan’s K Computer Tops 10 Petaflop/s to Stay Atop TOP500 List

http://top500.org/lists/2011/11/press-release
Japan’s “K Computer” maintained its position atop the newest edition of the TOP500 List of the world’s most powerful supercomputers, thanks to a full build-out that makes it four times as powerful as its nearest competitor. Installed at the RIKEN Advanced Institute for Computational Science (AICS) in Kobe, Japan, the K Computer it achieved an impressive 10.51 Petaflop/s on the Linpack benchmark using 705,024 SPARC64 processing cores.
OS Distribution:
  • Linux - 457 (+2), 91,4%
  • Unix - 30 (+7), 6%
  • Windows - 1 (-5), 0.2%
  • BSD - 1, 0.2%
  • Mixed - 11 (-4), 2,2%

Tuesday, November 1, 2011

Howto: Ubuntu 10.04 LTS + Prosody 0.9 + SASL + LDAP

Sources:

Packages:

Add the following line to the /etc/apt/sources.list

deb http://packages.prosody.im/debian lucid main

and then issue the

wget http://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add -
apt-get update
apt-get install prosody-0.9 liblua5.1-cyrussasl0 libsasl2-modules-ldap sasl2-bin

SASL:

Modify the /etc/default/saslauthd and set

START=yes
MECHANISMS="ldap"

Create the /etc/sasl/xmpp.conf:

pwcheck_method: saslauthd
mech_list: plain login

Create the /etc/saslauthd.conf:

ldap_servers: ldap://127.0.0.1
ldap_search_base: ou=users,dc=example,dc=com

and issue the

/etc/init.d/saslauthd restart

Prosody:

Modify the /etc/prosody/prosody.cfg.lua:

-- Enable the cyrus backend
c2s_require_encryption = true
anonymous_login = false
allow_unencrypted_plain_auth = false
authentication = "cyrus"
cyrus_service_name = "xmpp" -- Optional, defaults to "xmpp"
cyrus_application_name = "xmpp"

and issue the

/etc/init.d/prosody restart

Go!