Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Comment: Re:Such is C (Score 1) 132

by dgatwood (#49636003) Attached to: C Code On GitHub Has the Most "Ugly Hacks"

I mean, a lot of code is only meant for one platform type. Not writing code compatible with obsolete processors is no great sin.

Fair enough. Ideally, you should include a generic version without any hackish optimizations, but it isn't strictly required if you don't think you'll ever change CPUs in the future. Either way, if you're writing code that you know is likely to break on a different architecture because of its unique characteristics, IMO, you should at least make it fail to build on any other architecture than the ones you've tested....

Comment: Re:Maybe C developers are more honest (Score 1) 132

by dgatwood (#49635891) Attached to: C Code On GitHub Has the Most "Ugly Hacks"

C developers are good enough to know when what they're doing is an ugly hack.

If PHP developers were at the same standard, every line would end with // Ugly Hack.

I think the reason PHP is #2 on the list is that the people who are still writing PHP are mostly pretty good. The ones who were awful have all moved on to Python or Ruby or whatever the scripting language of the week is these days.

In fact, I'd be willing to bet that a sizable percentage of the folks who are still actively using PHP are C programmers. I use it for all my web programming because it is exceptionally easy for me as a long-time C programmer. I basically write C with dollar signs and a few other minor tweaks, and it works. Even better, if there's some piece of code that has to be blisteringly fast, I can port it from PHP to C faster than you can say sed 's/\$//sg'. Okay, it really isn't quite that trivial, but it is pretty close.

And yes, I do occasionally take advantage of being able to mix PHP and HTML, but not very often. I mostly just use it as a compile-free web programming language with better string handling and basic support for classes.

Comment: Re:Cuz Minix Dude Was A Old Guy (Score 1) 321

by squiggleslash (#49635057) Attached to: Why Was Linux the Kernel That Succeeded?

I would counter it was that, and your history doesn't conflict with mine - it explains it.

It's true that MINIX was held back by the fact it had to be distributed as "Core system (from book) plus third party ports as patchsets", but that doesn't pertain as to why Torvalds wrote Linux, except in explaining why there was no ix386 version of MINIX to begin with.

The MINIX community maintained standard ports of MINIX to each architecture. To install MINIX you'd get the book, combine it with the port, and you'd have your system. Your WANG drive patch would have belonged in one of the ports, not in the core system (frustrating if the patch needed architectural changes as that meant there was no practical way to distribute it.)

It wasn't a particularly effective way of maintaining an operating system, and MINIX suffered as a result. And one way it suffered was in not having a standard ix386 kernel. Why Torvalds didn't port the MINIX kernel himself is something only he can answer - I'm sure there are valid technical reasons, and he may also have been frustrated with the community core+ports model, but I like to think he also wanted to scratch an itch, to figure out how a kernel worked and write one himself. And I'm glad he did.

Comment: Re:Brand? (Score 1) 203

by hey! (#49633499) Attached to: 17-Year-Old Radio Astronomy Mystery Traced Back To Kitchen Microwave

I'd like to know which brand of microwave lasts 17 years?

Any brand, so long as it was made more than 25 years ago or so.

My kids like to watch vintage TV shows, and in one sitcom from the early 80s there was a plot line involving a TV remote -- this was back when remotes were still an expensive novelty. I paused and pointed out the thing in question. It was huge blocky moster of metal and wood, and looked like it had been forged by Durin in the deeps of Mount Gundabad. While virtually everything they use is incomparably more sophisticated than that thing, nothing approaches the build quality; physically it's all injection-molded crap that's been designed to be discarded after two or three years and replaced.

We can thank Bill Clinton and his China trade deals for amazingly cheap consumer goods that are designed to fail after a couple of years and be impossible to repair.

Comment: Re:Cuz Minix Dude Was A Old Guy (Score 5, Informative) 321

by squiggleslash (#49633041) Attached to: Why Was Linux the Kernel That Succeeded?

I think the AC was just confused as Linux's origins are related to MINIX, even if it isn't a clone or shares any code.

From memory, Linux was Torvald's response to the fact MINIX remained a 16 bit operating system. Impatient, Torvald's created the Linux kernel presumably in part because he wanted to create a kernel, but in part to solve the missing 386 Minix issue.

The two were related, but no code from MINIX was present in Linux. As an example, the original Linux file system was a re-implementation of the MINIX file system. Linux's ext family of file systems came later. Early Linux based systems ran the MINIX userland, but this was replaced early on with GNU. It was the replacement with GNU that meant Linux could legally leave the MINIX community and become the kernel of a standalone operating system.

IIRC Linus's original announcement was on the MINIX mailing lists too.

Comment: Re:To think I once subscribed to this site (Score 1) 231

So actually bothering to read the government's account of what it has done makes you a "leftist" then? And then telling other people what you found is "harassment"?

It must be easy to whip up that old self-righteous anger when you're so -- let's say, "semantically flexible".

Comment: Re:Not my problem (Score 5, Interesting) 160

by hey! (#49631333) Attached to: Extreme Secrecy Eroding Support For Trans-Pacific Partnership

The issue isn't secrecy OR expansiveness, or even both. The problem comes when you add fast track to those two.

Fast track is intended to strengthen the US negotiator's hand in trade deals. Here's how it works. By granting the President "fast track", Congress agrees to vote on the treaty exactly as negotiated by the President within sixty days, only forty-five of which the bill is in the hands of the relevant committee.

Fast track developed in the Cold War era. The idea was for situations like this. Suppose we we are discreetly negotiating with the Kingdom of Wakanda for access to their vibranium reserves. But we're worried about the Soviets getting wind of this, so we keep everything on the DL and rush like hell to get the deal through Congress before they can stick their oar in and queer the deal.

And for a relatively simple quid-pro quo type deal negotiated on the side in a bi-lateral world where you're with the commies or not, this procedure makes sense. But not for a massive, complex, multi-lateral accord that will govern the economic relations between twelve nations, and which took ten years to draft. How the hell is Congress supposed to examine something like that in forty-five days?

Comment: Re:Laws that need to be made in secret (Score 2) 160

by hey! (#49630841) Attached to: Extreme Secrecy Eroding Support For Trans-Pacific Partnership

There's nothing wrong with drafting a treaty in secret, it's often necessary. But you can't make it so hard to examine the treaty and debate it during the ratification process.

That's because ratifying treaties puts more restrictions on Americans in the future than anything else Congress can do. Treaties pre-empt local law and pre-existing federal law. Congress can pass contradictory laws in the future but those would be considered unilateral abrogations under international law and undermine US demands that other countries live up to *their* treaty obligations.

So if there is something dodgy in a ratified treaty for practical purposes you're stuck with it. Anything which hinders the Senate's ability to examine and debate the treaty in detail undermines the Senate's constitutional role. It is not an exaggeration to call something like that a step toward tyranny.

Time to take stock. Go home with some office supplies.

Working...