Page: 0 ... 5 ... 10 ... 15 ... 20 ... 25 ... 30 33 34 35 36 37 38 39 40 41 ... 45 ... 50 ... 55 ... 60 ... 65 ... 70
Switching between the VC6 and VC7 JIT debuggers
Date: 20/6/2007
You can switch between debuggers using the following settings:

Set VC6 as the default JIT debugger:
Tools | Options | Debug | "Just-in-time debugging" (in VC6 IDE)

Set VS.NET as the default JIT debugger:
Tools | Options | Debugging | Just-in-time | "Native" (in VS.NET IDE)

Also usful for fixing the "jit debugging component registration is incorrect" error.
(0) Comments | Add Comment

Citarum River
Date: 7/6/2007
Citarum River in Indonesia (via kottke)

In light of my previous post about plastic... words fail me. *deep sigh*
(1) Comment | Add Comment

Translating Script Names
Date: 7/6/2007
So Scribe has script files stored in the "Scripts" sub-folder and at the moment they show up in the tools menu. There are several problems to be addressed. First of all the name of the command is currently just the file name. But then means it can't be translated into all the different languages that Scribe supports. Currently translations for the existing commands are in the Scribe.lr8 file which gets loaded at runtime. However there needs to be a mechanism that associates a given string resource with the Script file.

I'm considering several possibilies. None of which are particularly palettable.
  • Embed the translation ID in a header of the script. Pros: nothing specific, Cons: You have to read the file at startup. Lots of scripts could be slow. Bit fragile if the ID number changes (rare but possible).
  • Embed the translation ID in the filename of the script. Better than the first option but still can break if the ID changes.
  • Embed the symbol define in the filename. Pros: very unlikely to break, the symbol doesn't change. Cons: Current resource runtime code doesn't store the define symbol, so I'd have to store that and it'd take up memory.
  • Embed the translation directly into the script file. Pro: nice and self contained, never breaks. Con: Will get overlooked by translators and never updated.
  • Something else?

I'd like some feedback or ideas. The translation has a reference number (int), an ID (int) and a define (string name). The ref is unique, the ID is the same for all strings with the same define.
(1) Comment | Add Comment

Plastic Ocean
Date: 5/6/2007
Plastic Ocean (via jwz).

It began with a line of plastic bags ghosting the surface, followed by an ugly tangle of junk: nets and ropes and bottles, motor-oil jugs and cracked bath toys, a mangled tarp. Tires. A traffic cone. [...] Dragging a fine-meshed net he discovered minuscule pieces of plastic, some barely visible to the eye, swirling like fish food throughout the water. He and his researchers parsed, measured, and sorted their samples and arrived at the following conclusion: By weight, this swath of sea contains six times as much plastic as it does plankton.

The North Pacific gyre is only one of five such high-pressure zones in the oceans. There are similar areas in the South Pacific, the North and South Atlantic, and the Indian Ocean. Each of these gyres has its own version of the Garbage Patch, as plastic gathers in the currents. Together, these areas cover 40 percent of the sea. "That corresponds to a quarter of the earth's surface," Moore says. "So 25 percent of our planet is a toilet that never flushes."

BPA has been found in nearly every human who has been tested in the United States. We're eating these plasticizing additives, drinking them, breathing them, and absorbing them through our skin every single day. [...] "Findings suggest that developmental exposure to BPA is contributing to the obesity epidemic that has occurred during the last two decades in the developed world, associated with the dramatic increase in the amount of plastic being produced each year." Given this, it is perhaps not entirely coincidental that America's staggering rise in diabetes -- a 735 percent increase since 1935 -- follows the same arc.

"Except for the small amount that's been incinerated -- and it's a very small amount -- every bit of plastic ever made still exists." [...] "It's not the big trash on the beach. It's the fact that the whole biosphere is becoming mixed with these plastic particles. What are they doing to us? We're breathing them, the fish are eating them, they're in our hair, they're in our skin."

We are seriously screwing our planet up. I'm not doing nearly enough to help and it just makes me very deeply sad.

I thought I did the right thing by just getting rid of my offensively wasteful car and replacing it with a scooter but that just means someone else is polluting the environment with that car. But I couldn't afford to have it crushed, I needed the money to buy the scooter (and other things).

Constantly it seems that doing the right thing is more expensive in the short term financial sense. I'm sure there are ways where the free market can be bought to bear on the problem.

In some what related news I need to buy a new car for our family as our old one was written off last week. No one was seriously hurt but both the girls had some whiplash. Currently I'm thinking of getting a Corolla wagon as some compromise between our needs, resources and the environment. It's a whole lot more economical than our last car (8lt/100km city) has more space than a small sedan and has some air-bags. Not enough mind you, but as a stepping stone, it's what we can afford at the moment. I'd dearly love to get a Civic Hybrid but they start at 35k new or 25k 2nd hand. And we don't have that unless we want to go into [more] debt *shudder*.
(2) Comments | Add Comment

VC++ 6 hangs
Date: 22/5/2007
Oh yes. I've always wondered about these hangs you get in Visual C++ when debugging an application that crashes and then the debugger hangs and soon all your GUI hangs, or at least is going very very slowly. It takes about 5 minutes to open the task manager and kill MSDEV.EXE at which point your system returns to normal. Abeit without what you were working on.

So someone worked it out and posted a (possible?) fix for it: Turn off advanced text systems in the regional settings. Tuff luck if you need that I guess.

One less problem, 9 zillion to go.
(2) Comments | Add Comment

SVG Debug Output For Rendering
Date: 2/5/2007
I've got a bug in my GPath code where in more complicated vector art it misses a segment out and draws incorrectly. So because I can't come up with a simple case to help debug it I've added a lot of logging to the code that is #define'd in and out. I wanted a way to visualize the segments being passed into the rendering stage and so I made the logging output paths in SVG format which I can paste into a file for viewing:

What you see in that image is a lot of segments each making up a vertical part of the vector art. No segment can be horizontal or double back on itself, i.e. it's either purely upwards or purely downwards. The error is in the capital "C" where there is no vertical cap on the bottom ending of the stroke joining segment 32 to segment 37. Thus putting out the in/out segment count for those scan lines and creating a visual artifact to the right of that missing segment.

I created the random colours with:
printf("color=\"%06.6X\"", rand() % 0xffffff);

I just thought this method of creating visual debugging info was cute and might be useful to others working with graphical things.

Update: Bug is fixed. But man that code is a mess. I really never want to have to touch it again.
(0) Comments | Add Comment