Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Lots (Score 1) 278

I feel like a school janitor sometimes...

3 (different) house keys, shed key, car key/dongle, minivan key, van key, carabiner, Gerber Curve, bottle opener, sparkplug gapper (AKA flat screwdriver which fits everything), nano LED light.

That's all I can remember, anyway.

Comment Re:it's a C idiom (Score 1) 264

I'm not sure I'm following. If we're non-POSIX, then what read(2) are we talking about? Also, that sizeof is by definition 1

POSIX defines sizeof(char)==1. But C itself doesn't necessarily *require* sizeof(char)==1, just that char is the smallest non-bitfield type. Theoretically, sizeof(char)==4 could be legit on some architectures. In practice, I doubt there's a non-trivial C program on the planet that would function on such a platform, but it's there.

The *point* of this being that the bug wasn't specifically that sizeof(char)==2, but that sizeof(char) was apparently variable within one trivial function in thousands of lines of code, and that throwing a trivial assertion in front of it was enough to change the value back to what it was supposed to be.

If a no-op changes behavior of your program, then yes, it's either a compiler bug

Exactly. In this case, it was the optimizer losing its shit. I wouldn't try to diff optimized and non-optimized ASM output from the compiler these days, but at the time it wasn't too horrible.

If that was indeed mid-late 90's MSVC++, then that makes it slightly easier to believe, yes ;)

It was still better than g++ on the DEC Alpha around that same time, but that's setting the bar pretty low.

Comment Re:it's a C idiom (Score 1) 264

I've been coding in C long enough to know the difference between unspecified/undefined behaviour and bona-fide bugs.

For example, I'm pretty darn sure that a chunk of code such as:


unsigned char inbyte;
read(fd,&inbyte,sizeof(inbyte));

should always read at most the same number of bytes (one byte would be nice, but let's pretend we're non-POSIX, here...). And if you *change* that chunk of code to something like, say:


unsigned char inbyte;
assert(sizeof(inbyte)==1);
read(fd,&inbyte,sizeof(inbyte));

It should *still* read at most the same number of bytes as the first chunk of code. If the second chunk of code reads 1 byte while the previous chunk of code was reading 2 bytes (and, incidentally, bashing the stack while dumping those 2 bytes into a 1 byte variable), I'm comfortable in calling that a compiler bug.

Mid-late 90's Visual C++, in case you weren't aware, was not a good vintage.

Submission + - Adventures in microchip repair

plcurechax writes: From Intel's own website, a "soft-news" or promotional pieces takes a high level look at technology behind fixing design mistakes in microprocessors, "Microscopic Adventures of a Chip Circuitry Repairman":

For nearly two decades, the pursuit of perfection has led Nikos Troullinos down minuscular rabbit holes to fix tiny design mistakes that can cause computer processor circuitry to malfunction..

While Slashdot regulars and IT veterans don't need to be reminded about well publicized follies of past processor flaws that have been discovered, from the infamous Pentium floating point division bug (FDIV) discovered in 1994, to the TSX flaw on Haswell to early Broadwell processors discovered in 2014. TSXTransactional Synchronization Extensions.

Given the complexity and vast number of processor models, few flaws are discovered outside of the manufacturer. I believe an average of less than 1.0 (flaw) per technology generation. While Intel's processor flaws are the best publicized, that is at least in part due to having the largest brand awareness amongst consumers. Non-Intel x86 and other non-x86 microprocessors have had flaws as well from classic 8-bit micros used in 1980s personal computers and game systems to the latest AMD and ARM offerings.

The Intel Pentium FDIV bug occurred at a time when the company had been spending considerable amounts of money and effort in mainstream advertising intended to build brand awareness, direct to average consumers, not just IT professors and computing enthusiasts. Bob Colwell, retired Intel engineer who worked on the Pentium Pro (P6) to the Pentium 4 (NetBurst / Willamette), discusses this in an appendix of his book, The Pentium Chronicles, Colwell discusses his own involvement in internal FDIV bug reporting, and Intel's surprise and poor handling of the public relations fiasco which perplexed top executives and engineers for quite some time.

Comment Re:it's a C idiom (Score 1) 264

"/* ugly hack to... */" is a modest expression of pride describing concise, functional, readable and elegant C code...

Speak for yourself.

I usually use the expression "ugly hack" to describe the stupid shit I need to do to get around compiler or library bugs.

Comment Re:File this under "NO SHIT" (Score 1) 264

Because it is by design able to access a hell of a lot more than other languages. How many languages have direct hardware access? Or inline ASM code?

Amen.

As a rule of thumb, any code (in any language) that deals directly with hardware and doesn't have at least a few commented hacks should be treated with suspicion. It likely either doesn't work, the hackery is too subtle for mortals to comprehend, or the person writing the code is so clueless that they don't recognize when they've transgressed into writing horrible hacks.

Comment Why a classroom? (Score 1) 352

So, basically, it's going to be just like school is today, except the teachers will be working remotely?

I suspect that veteran teacher has been doing it so like that he can't get outside of the box and imagine education without classrooms, schools, or even structured classes.

I think the future is going to look a lot more like home schooling (possibly in groups to get around the whole school-as-babysitter issue that allows parent to hold jobs) than anything close to the institutions teachers currently work in.

Comment Re:Protect the income of the creators or they can' (Score 1) 302

Copyright needs to (I reckon) end with the death of the creator; simple.

Given that we've established that the entertainment industry is a collection of sociopathic asshats, are you quite sure you want to give them a genuine monetary incentive to, say, kill copyright holders in order to plunder their now-orphan works?

Then there's the whole question of figuring out if/when a creator died.

A reasonable fixed term from publication/creation makes the most sense. Emphasis on "reasonable".

Comment Re:Wait, what? Even in offline mode? (Score 1) 117

34% of users can't tell their iPhones not to connect to a hotspot named attwifi. That sounds like the ability to force connection to a WiFi network to me.

I'm thinking that if a malicious hotspot cycled through the known pre-installed SSIDs like "attwifi", common open SSIDs like "linksys", "NETGEAR", "dlink", "default", etc, plus corporate branded/hotspot SSIDs such as whatever Starbucks or McDonald's use, they could easily increase the vulnerable population to well over 75%.

Comment Re:Why? (Score 1) 356

The only time I have ever been aware of hitting a mobile site is when you have that "gah, WTF is this crap?" moment where you can't find anything and the link you followed has been swallowed by the crap which has said :"hey, you're on a mobile, how about we fail to show you what you were looking for?".

Their guidelines suggest suggest this is one of those things that will be punished. Which makes this smartphone user quite happy.

Slashdot Top Deals

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...