Archive for Uncategorized
09.11.05
Posted in Uncategorized at 1:06 pm by UnwashedMeme
This article gives me a lot of hope. I was kind of worried when I read about cutting down the length of gameplay. I was worried that they were going to remove interesting complexity. However it seems that they are trying to make the game more fluid and easier to control; eg. give the same build orders to several different cities at once.
Permalink
08.17.05
Posted in Uncategorized at 12:34 pm by UnwashedMeme
I came across what appears to be a minor bug in Opera’s handling of javascript and character encoding. If I send it a stream of text that is accurately described by the header “Content-Type: text/javascript; charset=utf-8″ Opera (at least 8.02) is at a loss for what to do.
When loadng the address directly it just tries to find an external handler for that mime type (and fails for me). If I try to load this bit of javascript through the XMLHttpRequest I get something, however I am not familiar enough with the different east-asian languages to determine what character of beast this is. Suffice it to say that it is not what I intended to get back.
If I change the mime-type to “Content-Type: application/x-javascript; charset=utf-8″ or ‘text/plain’ or ‘text/html’ it works just dandily. Not to difficult of a workaround, but is this really a workaround or “The Proper Way”?
Safari, Firefox, and Internet explorer did not have any problems digesting the ‘text/javascript’. So for trying to follow a de facto standard, which from what I know of Opera they generally try to do, not very good. Most webservers serve ‘application/x-javascript’ so they do have that one in the bag.
This really comes down to: There is no standard javascript mime-type.
A script block with type=”text/javascript” writes: ”
document.write(”foo”);
”
A script block with type=”application/x-javascript” writes: ”
document.write(”bar”);
”
My test showed that both of those work in Mozilla and Opera, and I only get “foo” when in IE.

Permalink
08.16.05
Posted in Uncategorized at 12:27 pm by UnwashedMeme
YACaNTS (Yet Another Carbon Nanotube Story). Constantly reading more stories of how carbon nanotubes are awesome.
Still looking for the story about carbon nanotube stem cells.

Permalink
08.12.05
Posted in Uncategorized at 8:36 pm by UnwashedMeme
I’ve been working for the past couple of days to improve our framework for doing partial post-back.
It’s more or less standard AJAX fare, I’m just trying to make it easy to do partial page rendering and replacement that uses our existing ASP.Net control structure.
Works great and was easy to do in Mozilla, but of course Inappropriate Expletive has to make life difficult.
I’ve been trying to make this as resilient to errors as possible. If the AJAX request gets a 400 series error, bail out and try a standard postback. If the server did not send back javascript or gives a 500 series error then print whatever it did get back to the screen.
Replacing the current page with new html in javascript turned out to be more difficult than I expected. According to MSDN you can open the current document, write to it and close it again.
Indeed their sample page does work (in Firefox as well), but when I tried to do the same function through the shell or from the partial postback code it leaves the browser in an inconsistent state at best, and sometimes just crashes it. I ended up clearing the body’s innerHTML, adding an IFrame to the body, and writing everything to that. Not exactly a ‘pretty’ solution.
The communication with the server really needs to be done asynchronously so the browser isn’t blocked while waiting for the server.
With XMLHttpRequest this isn’t to bad.
I’m not as much of a fan of MSXML though. The problem comes from the readyState variable that reports what stage the request is currently on.
From the Mozilla docs:
readonly PRInt32 readyState
The state of the request.
Possible values:
- 0 UNINITIALIZED open() has not been called yet.
- 1 LOADING send() has not been called yet.
- 2 LOADED send() has been called, headers and status are available.
- 3 INTERACTIVE Downloading, responseText holds the partial data.
- 4 COMPLETED Finished with all operations.
That makes sense to me. Once 2 roles around I can start querying the headers to make sure I am getting what I expect. If it was set up to deal with a stream, that could start processing at step 3, and then everything is completely available in step 4.
The only change I could see is that it might be useful to someone to have a stage immediately after the request is sent but no part of the response has been received yet. Not entirely sure where this would be useful though.
It seems that the IE developers felt that this was the most important step though. “I’ve sent a request but don’t have any data back yet.”
From MSDN (parentheses theirs):
- 0 (UNINITIALIZED) The object has been created, but not initialized (the open method has not been called).
- (1) LOADING The object has been created, but the send method has not been called.
- (2) LOADED The send method has been called, but the status and headers are not yet available.
- (3) INTERACTIVE Some data has been received. Calling the responseBody and responseText properties at this state to obtain partial results will return an error, because status and response headers are not fully available.
- (4) COMPLETED All the data has been received, and the complete data is available in the responseBody and responseText properties.
Not only does state 2 implement that, but state 3 is functionally equivalent as well. Since you can’t query any of the headers or even start processing a partial stream in state 3, from my perspective it isn’t really providing anything extra. The only thing worth hooking here is state 4.
Well, there goes my attempt to speed up the processing by doing as much work as possible in the early states while it is still receiving data. Thanks IE.

Permalink
08.05.05
Posted in Uncategorized at 9:26 pm by UnwashedMeme
Shweeet.
If you haven’t seen The Venture Bros. you really should try and catch it. It’s awesome.

Permalink
07.28.05
Posted in Uncategorized at 1:56 pm by UnwashedMeme
Most of the people around here have heard me cursing at CSS, HTML, and browsers. I think PPK is spot on though.
Go read.

Permalink
07.12.05
Posted in Uncategorized at 4:37 pm by UnwashedMeme
There are some other out there that are speaking well of it. However, I definately didn’t take to it, Russ was of the opinion that it was terrible, and Chris made the excellent point that “The whipped cream on top is pretty good; you could finish that off.”
Permalink
07.11.05
Posted in Uncategorized at 8:42 pm by UnwashedMeme
The bottle of Glenfiddich costs about $42 around here.
Another place we like to drink is the great Stubbie Shirt Pub in downtown Gainesville. At some point she might want to finish her website that she had us start a long time ago.
A drink there probably averages about 5 bucks. $5 * 16 = $80. So drinking really good scotch at home is twice is cheap as drinking really good beer out.

Permalink
07.04.05
Posted in Uncategorized at 9:43 pm by UnwashedMeme
Here.
You want more? Ok, Practical Common Lisp by Peter Seibel is a great Lisp book that I (and many others) have been reading recently. However the online version doesn’t linkthe note reference in the text to the footnote at the bottom. This takes care of that.

Permalink
Posted in Uncategorized at 12:35 pm by UnwashedMeme
If you were in NW gainesville near I-75 and SFCC last night and you saw some fireworks W of I-75 it might have been us ;-)
The launching site.
We’ve had a reliable report of spotting from about here:
1.6 Miles away.
Hopefully some of the people driving by on I-75 got to see a bit. Let me know if you spotted any.

Permalink
Next entries » · « Previous entries