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

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Comment Re:What selfish bastards (Score 2) 119

There's millions of kids in this world who need adopting. How about they try that instead of passing on their hereditary disorders and polluting the gene pool even further.

I think you kind of missed the point, which is that this lets them pass on most of their genes without passing on their hereditary disorder....

Comment Re:Fiscally impossible (Score 1) 220

You could physically build a vacuum tube-based maglev train where the tube is at some depth in the ocean to avoid surface issues and plate boundary problems.

Yeah, in theory, you could design it to be neutrally buoyant at some depth, and you could make it thick enough to withstand the pressure while keeping the interior at survivable pressure levels. As for whether such a tube would be flexible enough to accommodate the two ends getting closer together or farther apart by three or four inches per year, though, I have my doubts.

Comment Re:Everything Trump does is bad (Score 1) 120

Did you know Hillary took nearly $600 million in bribes while Secretary of State? Haven't seen the media focus on that, and that is something most people would think is bad.

And Trump bragged about paying bribes.

It's hard to know which is worse. I wouldn't hire either of them to mow my lawn. I'd rather choose a President by random number generator than elect either of these choices. We'd have a better chance of picking a good candidate.

Comment Re:So sad (Score 1) 120

3) Overrode expert opinion and ordered military intervention into Libya that led to the downfall of Gaddafi

Last I checked, the Secretary of State has zero authority to order anything. Perhaps you misspelled "Obama"? :-)

All snark aside, she gave an opinion; others gave different opinions. Obama made the call. Right or wrong, the blame rests there. This is not to say that I trust Clinton's judgment in these matters, though. On the other hand, I explicitly distrust the judgment of the sort of person who would ask why we shouldn't use nuclear weapons. So there's that.

Comment Re:Name Calling (Score 1) 120

I rather suspect he won't release his tax records because he's the pot calling the kettle black. My gut says that if he didn't have anything to hide, he wouldn't need that bit of extraordinary privacy (extraordinary for a presidential candidate, anyway).

This is one of those rare exceptions where that phrase seems pretty accurate, particularly given how he has bragged about having politicians in his pocket. And, if convicted of bribery, that's grounds for automatic impeachment. Just saying.

Comment Re:This simply means we're succeeding. (Score 5, Insightful) 220

Air travel should be something that you do when you're crossing an ocean, because trains over water (and subduction zones) are physically impractical, and ships are too slow to be practical.

That said, we badly need a high speed rail network in the U.S.; Amtrak is kind of fun to ride, but it takes three days each way to get across the country. As such, it is a luxury that few can afford on a regular basis.

Comment Re: This again? (Score 1) 379

Why is it fair to group POSIX-C and MISRA-C together but not different assembly languages?

Because the difference between POSIX C and MISRA C is a large pile of custom headers to define type conversions. The difference between ARM64 assembly with Neon instructions and 6502 assembly is more like the difference between C++11 and the original 1983 version of Pascal.

Comment Re:This again? (Score 2) 379

He's not even right in a pedantic way. Assembly languages are programming languages.

No, the OP is right in a pedantic way. Assembly language isn't really a language, but rather a loose collection of related languages.

As for the other poster's comment that it is basically just human-readable machine language, so is C, but nobody argues that C isn't a programming language. :-D

Comment Re:Curly braces = good. Indents = bad. (Score 1) 171


Apologies in advance for the bad font, but Slashdot stopped allowing   because of the trolls, so this was the only way to get indentation.  Ugh.  There's some irony for you.

I've used GNU indent, and it is maybe 1% of the way to a complete solution, if that.  A complete solution needs crazy things like:

* Variable weights for indentation priority between the minimum indentation of a continuation line relative to the first line and colon alignment in Objective-C
* Rules on where whitespace can and can't be inserted to correct alignment (e.g. rules like "Don't put any space between the (strong, atomic) and the subsequent type name in an Objective-C property, in such a way that they can be outweighed by other rules if it makes the line too long
* Choosing whether to indent function parameters by the standard n spaces instead of indenting to the open parenthesis if the latter approach would result in a single parameter getting split across multiple lines and the former approach wouldn't
* Closing up space between certain types of tokens (arbitrarily)
* Adding space between certain types of tokens (arbitrarily)
* Proper handling of comment markup (e.g. HeaderDoc, Doxygen, JavaDoc, etc.) with knowledge of where newlines and whitespace matter
* Ability to handle programming languages other than C and related languages

And so on.  Basically, the set of rules would likely mean that everything on the left side of the language's BNF would be a named token type, and you could specify rules regarding whether spaces could be added before or after that token type.  For example, you might write rules like this:

my-if-statement-whitespace-ruleset  {
    weight 10000;
    if.token {
        space-after: 1;
    }
}
my-if-statement-whitespace-ruleset {
    weight 10000;
    function.name {
        space-after: close-up;
    }
}

To specify that an if statement should be followed by exactly one space before the opening parenthesis, but a function should not, and any such space should be removed.

You'd also need to be able to contextually describe specific tokens like braces.  For example, if you wanted to indent the opening brace of a function by 4 and every line nested inside it by 8, you might write something like:

my-function-body-indent-rule-set {
    weight: 100;
    function.body.first-matching-child("{") {
        min-indent: [previous-line] + 4;
        child-indent: [previous-line] + 8;
    }
}

So basically, something vaguely like CSS, but with weighting instead of order-based priority, plus the ability to define fallback rules with lower priority that get used if the higher-priority rule fails because it conflicts with another rule that has higher priority (e.g. an indent rule set that uses four-character indent if the first rule set for indenting to the open parenthesis gets overruled by a maximum line length rule).

Comment Re:Not buying it (Score 1) 142

Sure, it could be that. But it could also be:

  • A cleaning person plugging a vacuum cleaner into the power strip on the rack instead of into the wall outlet that's on an external circuit (combined with improper power filtering in the equipment).
  • Electrical noise caused by some other crappy piece of equipment in the rack (combined with improper power filtering in the equipment).
  • Errors caused by higher operating temperature.
  • Errors caused by emissions from natural Uranium or other radioactive elements in the soil.
  • A software bug.
  • A hardware bug.

And if it happens disproportionately on one class of equipment, unless there are material differences in the amount of shielding, any one of those five is probably much more likely than cosmic rays, IMO. :-)

Comment Re:Curly braces = good. Indents = bad. (Score 4, Interesting) 171

Agreed. And more importantly, if you have braces, it is possible for the IDE to programmatically fix the indentation so that it is easy to read. There's absolutely no sane reason to require a programmer to use whitespace for any reason other than between tokens that would otherwise be a single token if shoved together. All other use should be superfluous, and the IDE should make it readable for you without the need for a person to do it.

And the reason braces should be in every programming language, IMO, is that it makes it easier to jump to the end of a block. When I have nested blocks in a properly braced language, I can hit percent in vi, and I'm at the end of that block. I don't have to move the cursor to the beginning of the line and laboriously hit the down arrow key a line at a time until I find a line that isn't indented as far. Therein lies the path to madness.

Want to dramatically improve the programming world in a single project? Design a meta-language for code formatting so that a set of text-based rules can enforce everybody's own quirky code formatting standards. Make it handle at least the twenty or so most popular programming languages. Then open source it under a BSD license so that the interpreter can be readily built into every IDE on the planet. Then, we can finally dispense with all of these silly programming languages that use whitespace syntactically once and for all.

Slashdot Top Deals

If bankers can count, how come they have eight windows and only four tellers?

Working...