spacer spacer spacer

2005-08-27

Fourth and Bitz

Well, after beating on ASSetPropFlags for sometime, I finally came to the conclusion that the flag table that everyone has been referencing is wrong

BLITZ Labs » Blog Archive » ASSetPropFlags - The correct flag table

Well, there must be something else missing from all the tables on the web: the real meaning of that fourth argument. Is it really just a boolean? If it is just a boolean, then setting the flags to 0 should make a property writable and deletable too. Clearly that is not the case:

lzx> foo.test = 'bar' 
"bar" 
lzx> ASSetPropFlags(foo, null, 6) 
lzx> delete foo.test 
false 
lzx> ASSetPropFlags(foo, null, 0, true) 
lzx> delete foo.test 
false

It’s pretty clear to me that the fourth argument is also a bitmask, and it is the mask of the bits to clear (before you set the bits in the third argument). That is why so many people are confused. If you pass true as the fourth argument, it is coerced to a number, 1, so only the enumerability bit is cleared. Here’s the proof:

lzx> ASSetPropFlags(foo, null, 0, 2) 
lzx> delete foo.test 
true
15:00 | Link | Reply | Track | Comments (7)

2005-08-17

Goose Bumps

My friend Dan has a blog on mogul skiing.

Because mogul skiing is not well understood by the general skiing masses, it’s surrounded by myths. Here’s my first blog attempt to debunk three of these myths.

Dan DiPiro’s Mogul-Skiing Blog

I’ll never ski moguls as well as Dan does, but I think mogul skiing is less effort than carving an alpine turn. And way more fun. Can’t wait.

10:45 | Link

2005-08-14

Musical Geniuses Strike Again

”CD burning is a problem that is really undermining sales,” Bainwol said in an interview prior to speaking before about 750 members of the National Association of Recording Merchandisers in San Diego Friday. Copy protection technology ”is an answer to the problem that clearly the marketplace is going to see more of,” he added.

Music Industry Worried About CD Burning - New York Times

Hello? Anybody home? People burn CD’s to put together a set of songs that they want to listen to, instead of having to put up with the dreck that you pack onto an album. Why do you think the individual song download is so popular?

Is there any other business that tries so hard to disappoint its customer?

19:01 | Link | Reply | Track

2005-08-04

AJAX and Netflix

Well, here’s one disadvantage to using AJAX over LZX. Your source is ‘open’ whether you like it or not. And your comments can be embarrassing:

// This function is fragile. Tinker with it at your own peril. "Optimizations" will cause you pain. - BK
function updateQueueDisplay(item) {

http://www.netflix.com/layout/jscript/miniqueue.js

Nonetheless, I am pleased that I can just drag and drop items in my queue to reorder them now.

08:03 | Link | Reply | Track