Wolfram|Alpha: Systematic knowledge, immediately computable.

Wednesday, April 28, 2010

“Yields falsehood when preceded by its quotation” yields falsehood when preceded by its quotation.

Quine's Paradox. Named after the brilliant Willard Van Orman Quine, author of a favorite book of mine titled Quiddities: An Intermittently Philosophical Dictionary. The sentence is intended to show a paradox similar to The Liar Paradox can be had even without self-reference.

Named after him is the Quine Program, denoting a program that can reproduce itself as output, given no input (which makes the problem trivial, and is considered 'cheating'.)

It is effectively the Fixed Point of the execution environment. An example in Scheme looks like this:

((lambda (x)
   (list x (list (quote quote) x)))
   (quote
      (lambda (x)
         (list x (list (quote quote) x)))))

For a mind-opening exposition on all things recursive and self-referential, I highly recommend a read of the amazing work by Douglas Hofstadter: Gödel, Escher, Bach: An Eternal Golden Braid

Monday, April 26, 2010

Bashing and Slashing with Jockyitch

Kind of sounds like a cage match with knife wielding unhygienic foes...

I had the pleasure of spending some time with the founder, CEO, webmaster, and on-the-web-air personality 'Jockyitch' from the popular FPS news and opinion site BASHandSlash.

The host, a real honest-to-goodness rocket scientist, was hands down the most fun I've had doing any kind of broadcast show. 'Jock' asked me to do a show to discuss my guide for gamers with game connectivity issues. I think he made the subject matter and the discussion that ensued funny as heck.

Look for the webcast soon at the site, visit it regardless: there are a myriad of interesting webcasts, and tons of interesting things to be found wandering the forums and other parts of the site. The webcasts are also hosted on iTunes, if you're a fan of the poison apple. (Update: Thar She Blows!: BASH 147: PC Gaming Connectivity)

Of particular recent interest, BASH 146: Client is King has an interesting discussion on the state of PC gaming in relation to consoles, and the growing lack of modding and other tools for recent games. The host invited several expert guest commentators with some serious gaming background to participate, and the conversation is interesting to hear as it unfolds.

Pings? We Don't Need No Stinking Pings!

The popular new online FPS Battlefield Bad Company 2 has had its share of teething pains. Among those most bothersome to players is the inability to see 'pings' for servers in the online server browser. The developers, EA/DICE, have stated the solution to this issue is to run the game with elevated privileges, either by running in a full administrator account, or by using RunAs or compatibility mode changes to accomplish this.

Poppycock! The fix is to get rid of the poor coding choices that get this kind of result from my debugging traces of over a month ago:

socket: 0: Process 0xfffffa8005375060 (0x768 ), Endpoint 0xfffffa8005c49420, Family 2, Type SOCK_RAW, Protocol 1, Seq 1006, Status 0x0
(FAM: AF_Inet/IPv4) (SOCK: Raw) (PROTO: Stream)

The game is opening (or attempting to open) a Windows socket of  type (3) sock_raw. The use of raw sockets has become increasingly restricted with each new version of Windows, and for good reason.

This is the reason the BFBC2 game executable must be run as an administrator, or have its privileges elevated, for the player to see pings properly in the server browser.

Readers having this issue, either run the game from a 'real' administrative account, or right-click on the game executable and mark it for compatibility mode "Run this program as an administrator". Do note, there can be other issues such as firewall, ISP, or PC configuration that may still prevent pings showing properly.

There is no reasonable reason I can think of that an application like this game needs to use raw sockets, forcing the user to compromise the security and functionality of their system to make the application work the way it should. There are several proper solutions to accomplish the goal of getting the needed data that do not require unneeded privilege use or elevation by the user.

That this information was handed to the devs, and nothing has been done to remedy it, despite a patch in the intervening time being released, is puzzling to say the least. A lunch hour's worth of coding changes should fix this amateur mistake that should never have been made. (How hard is it to get to the server without raw sockets? See "I Scream, You Scream, We All Scream for DICE Scream!" for an answer).

Fix this, DICE!

A Most Interesting Development in Graphics and Rendering

Check out the stuff at Unlimited Detail Technology.

Most fascinating, an amazing start for an autodidact. It is so good, I wonder if it is some elaborate April Fools' joke...

It will be quite interesting to follow the progress of this project, even more so the reactions of Nvidia and ATI. If they're smart, and this is the 'real deal', one should buy the technology outright, and utilize the GPGPU functionality available in their products to speed computation.

Thursday, April 22, 2010

In the SCHEME of Things

One of the startups I was involved in (Ariba - one of the few survivors of the Internet bubble of 2000, and home to some of the most brilliant people I've had the pleasure of working with) utilized Scheme for the underlying configuration, display, data definition, and process control system. Scheme is one of the two languages widely used based on the lambda calculus, homoiconic with mind-altering features like first-class continuations. Think of it as a 'cleaned-up' Lisp-1.

A hugely powerful language, perhaps, along with Common Lisp, my favorite. It allowed us to be unbelievably agile in response to customer needs: While the competition would have to take engineers off of pressing projects to have them do quick-and-dirty coding to add some deal-breaking feature, more often than not the Ariba field tech giving a demo could add it on-the-fly. Blew the minds of prospective customers (not to mention keeping the competition wondering what kind of voodoo magic we had), and resulted in a hugely successful company.

I was reminded of the elegance and conciseness of the language from a blog post I recently read. The poster wanted to dump the logs of an IRC they frequented. Need to setup the underlying network, connections, open the log, display it. The code?

(require net/url)
(display-pure-port (get-pure-port (string-url "http://ccl.clozure.com/irc-logs/lisp/2009-12/lisp-2009.12.28.txt")))

From Lam Luu, a student and lover of the language, Quicksort for any data type, with a user supplied comparator:

(define (filter list get?)
(cond ((null? list) '())
((get? (car list)) (cons (car list) (filter (cdr list) get?)))
(else (filter (cdr list) get?))))

(define (qsort list compare)
(if (null? list)
'()
(let ((pivot (list-ref list (random (length list)))))
(append (qsort (filter list (lambda (x) (< (compare x pivot) 0))) compare) (filter list (lambda (x) (= (compare x pivot) 0))) (qsort (filter list (lambda (x) (> (compare x pivot) 0))) compare)))))

What a beautiful languge!