Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Comment Accessing the data being deserialized (Score 1) 230

If you had a hard requirement such as "has to be ASCII-based" or "char must be 8 bits wide", then I'd wonder where it comes from.

The fact that Internet protocols use 8-bit bytes and either ASCII or its superset UTF-8.

For requiring char to be of some specific width, there's hardly a reason, unless you're improperly (de)serializing.

Last time I checked, the C standard offered no facility for networking, graphics, or even enumeration of the files in a directory. This means most nontrivial interactive programs will need to use POSIX or Windows functions, which are defined in the POSIX and Win32 specifications but are undefined behavior from the perspective of the C standard, in order to access the data that the program is (de)serializing in the first place. Or is there a portable way to do this that I'm somehow missing?

Submission + - GOG Announces Open Beta For New Game Platform (gog.com)

Donaithnen writes: Like many geeks I'm against the idea of DRM in general and have championed GOG.com's DRM-free approach to selling games online. Yet like many geeks I've also often succumbed to the temptation of Steam because of the convenience of tracking, installing, and playing my PC game purchases through the launcher, the compulsion of collecting achievements, and the OCD-ness of (and occasional dismay from) tracking the total playtime for my favorite games. Now GOG has announced the open beta for GOG Galaxy, an entirely optional launcher to allow those who want (and only those who want) to have all the same features when playing GOG games.

Comment Re:2-Butoxyethanol (Score 1) 328

And all it would take would be a home mechanic spilling a bottle of one of those products to get to that same parts-per-trillion levels in their own well water.

It would take a lot more than that, in all likelihood. It's usually not trivial for something you spill to wind up in your well unless you've got an open well, and you spill into it.

Comment Re:Why isn't the Water Dept filtering the water? (Score 2) 328

The reason these chemicals are expensive to dispose of is that they are difficult to destroy by any means other than sweet, cleansing flame — and a whole hell of a lot of it. Throwing it in your campfire won't do it. Anything that can't be gotten out of your water by relatively simple means isn't filtered out by your municipal water department.

Comment Re:Not BS. (Score 1) 164

I said, "I have a question about a charge on my bill," and it correctly connected me to the chargeback section.

it eliminated all but the keywords, and got "question", "charge" and "bill". It may only be scanning for about 20 keywords at the most at any given prompt. That's a very easy job compared to natural speech recognition which actually gets all the words. You could get that on a chip 20 years ago.

Comment Asserting implementation-defined behavior (Score 1) 230

You're not making it better by actively promoting horrible, non-portable, implementation-dependent and error-prone coding practices.

What's wrong with making assumptions about implementation-defined behaviors and using static assertions to verify them? For example, would it be poor form to assume (and assert) things like 8-bit bytes or that the character set is ASCII, and if so, why?

extern char assert_8bitbytes[(
    CHAR_BIT == 8 && sizeof(uint32_t) == 4
) ? 1 : -1];
extern char assert_ascii[(
    'A' == 0x41 && 's' == 0x73
) ? 1 : -1];

This way, the compiler will fail and kick out a diagnostic if the environment doesn't match the assumptions.

Slashdot Top Deals

One of the chief duties of the mathematician in acting as an advisor... is to discourage... from expecting too much from mathematics. -- N. Wiener

Working...