RSS LJ

August 14, 2008

Documentation (, )

by fluffy at 5:33 PM
Quick poll: when you see this documentation in a cross-platform image-handling API:
width: Specifies the width of the image. All implementations support images that are at least 64 pixels wide.
what do you think that means in terms of valid parameters to be passed into the width parameter?

August 10, 2008

Hash tables (, , )

by fluffy at 12:33 AM
Lately I've noticed that a lot of people are confused about what a hash table is and how one goes about implementing it. (This often comes up when I'm interviewing candidates and I ask them how they'd implement an associative array without the use of std::map.)

A hash table is not using a hash function to distill a key into a value which is used to order it in an associative array/sorted list/etc.

A hash table is using a hash function to distill a key into a value which is used to index into a linear, non-sparse array.

May 15, 2008

Virtual inheritance weirdness ()

by fluffy at 5:01 PM
I was trying to see if I could emulate something like Java's final by changing the scope of an inheritance. I got some weird results.

August 10, 2007

Finally set up SVN ()

by fluffy at 11:13 PM
The recent discovery of AudioCompress being actively used prompted me to finally set set up an SVN repository. (Dreamhost made it mad easy, as always. Though it might take a little while for DNS to propagate, of course.)

What else should I put into SVN? SOLACE maybe? (Cleaning that up for release would take a lot of work though, and it's not really that useful anymore, except as a general reference on how to do things with geometry images...)

How circuitous ()

by fluffy at 10:38 PM
Remember AudioCompress, which started life as xmms-compress before I made it generic? Someone's made a "new" XMMS plugin called xmms-normalize using the AudioCompress core.

Meaning they've ported an XMMS plugin to XMMS.

I would have preferred if they'd just submitted a patch to make it compatible with XMMS2 so it could be part of the core AudioCompress distribution, but whatever...

8/11 03:15 This has inspired me to go through the code and basically rewrite it. It's amazing how something I wrote as a quick hack as a grad student is still algorithmically-good but of course several years of professional software engineering have given me a completely different perspective on code quality.

January 17, 2007

HOWTO: launch a web browser from a win32 app ()

by fluffy at 12:01 PM
I needed to know this for a simple app at work and, not being a Win32 programmer, I couldn't find it documented, so to hopefully save someone else a wild goose chase:
ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL);
where url is an ordinary char* string.

February 9, 2004

Random silly puzzle ()

by fluffy at 8:57 PM
So, the friend who hosts this site for me popped online and gave me a little code snippet:
rc(char*ni){char*n=ni;while(n&&*n){if(*n>='A'&&*n<='Z'){*n+=32;if(*(n+1)){*(n+1 )-=32;return;}else{*ni-=32;}}n++;}}main(int c,char**v){if(c<2)exit();while(1){printf("%s ",v[1]);rc(v[1]);}}
Basically, compile it and run it with something like "./a.out Foobar" and it'll output the string repeatedly, rotating the capitalization to the right. (With the caveat that it doesn't work with more than one capital letter.)

But it seemed rather bloated to me, so I rewrote it...

July 5, 2003

New AudioCompress release ()

by fluffy at 11:12 PM
Grab v1.5 while it's hot.

Also, this is the 28th entry. (Yes, I know the archive file isn't numbered 256. But trust me anyway, this is the 256th entry.)

July 3, 2003

New AudioCompress feature ()

by fluffy at 9:05 PM
Hopefully I'll be making an AudioCompress release soon, since someone submitted a patch to let it act as an esd plugin (so all esd-speaking apps can be processed by it, which makes me very happy indeed).

The only reason I'm not releasing it yet is that for some reason, it keeps on blocking on write after 31 fragments are processed. Anyone have any ideas? The patch submitter doesn't have any idea what's going on for me.

June 30, 2003

Ooh, Mac stuff I missed ()

by fluffy at 9:17 PM
It was mentioned on various weblogs but I never paid it any mind, but XCode looks awesome. It might be the impetus for me to finally write the windowing abstraction layer in Solace, which will finally give it Ultra Super Portability (and not just "pretty good portability to systems which can run an X11 layer).

June 13, 2003

Hardcore lighting stresstest ()

by fluffy at 5:45 PM
Haven't posted about my graphics engine in a while, so here's some pictures of my dynamic shadow stresstest running at 20fps.

May 18, 2003

Idea: Directory transaction logs ()

by fluffy at 10:10 PM
Something I've been thinking about recently.

Concept: Take advantage of underlying UNIXisms to make a file system which has complete, or at least pretty good, undo recovery.

May 6, 2003

dear fluffy, ()

by fluffy at 11:39 AM
Becky Burke asks,
I am very interested in learning more about video game designers. I am a Substitute Teacher who has met students who are "highly" interested and passionate about wanting to know how one educates themselves on how to design video games. I glanced through your ideas and think they are terrific. Any help would be greatly appreciated.
My (probably ill-informed) response follows.

April 4, 2003

I am disliking code right now ()

by fluffy at 8:06 PM
As I recently said in my k5 diary, I'm working on gathering timings for my paper for the IEEE Visualization conference, which is basically a rewrite of the rejected Siggraph paper with a much-improved algorithm...

But the algorithm isn't performing quite as predictably as I thought it would.

February 2, 2003

Switching the switch ()

by fluffy at 12:26 PM
After a recent heated discussion on the Apple-X11 mailinglist, someone emailed me privately to ask me why I run MacOS X if I dislike the limitations of the UI so much. My response was that I like the hardware and I like the OS, and there's a few apps I use in OSX which have no Linux equivalent.

My usage patterns of OSX is where I primarily run X11 applications (badly) but then have to put up with doing this under an environment it's not suited to (Quartz).

So, I've been thinking about going the other way around and running MacOnLinux under LinuxPPC.

Update

I've decided to just go back to XDarwin and stick with OSX.2, thanks to a few private emails and some comments on the Kuro5hin version of this entry.

January 26, 2003

Obvious in retrospect ()

by fluffy at 3:30 AM
Apparently, on the Radeon 9700, the overhead of compiling a displaylist is non-zero, so for displaylists which don't get cached very well (such as shadow volumes), it's a huge performance hit to try to cache them as displaylists.

Of course, I don't know why I ever figured otherwise.

Oh, right, it was because of the geForce 4.

January 23, 2003

Saddam Hussein importing PS2s (, )

by fluffy at 5:26 PM
BinaryTree pointed me to this cute article from December, 2000, during the height of the Playstation 2 shortage: Iraq Scores Hordes of PS2s at US Gamers' Expense

If anyone from the Iraqi government is reading this, let me point out some problems with the approach. (Same goes for anyone from IGN.)

January 22, 2003

Radeon 9700: First Impressions ()

by fluffy at 8:10 PM
I finally got my Radeon 9700 today, and installed it. Here's what I've found so far, in the hour or so that I've been playing with it. (I'm very thorough, yet very fast. I know exactly what to look for in order to break things.)