Catch up on stories from the past week (and beyond) at the Slashdot story archive


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

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

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) 342

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) 342

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) 170

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; {
        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) 141

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) 170

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.

Comment Re:Just Another Symptom (Score -1, Redundant) 77

Just another symptom of a fundamentally fucked up system of justice.

If a peon employee does this he'd get dragged into court, but some fucked up high society brown nose asshole can fraudulently misrepresent his employment status and breach his contract with a small sideways glance.

Your description of an assistant editor at some half remembered website as 'high society' makes me wonder at just how far down the food chain you happen to be.

It must really suck to be you.

Comment Re: Echo chamber (Score 1) 847

Seriously, what is your financial situation today vs 2008? I'm really interested in the details here. I'll provide mine in the same way Trump WILL NOT. Provide details of how you were so oppressed over the last 8 years or shut the fuck up.

Gotcha, didn't I? But to answer your question. Worse off than if Obama wasn't "helping". Weaker job market and higher health insurance costs. But sure, I'm doing better than I was in 2008. But I could be doing better.

In 2008 my gross income was maybe ~130K. Last year it was 450K+. What possible fucking reason do I have to regret the last 8 years? I should love Trump's positions, but I have the extra personal burden of social MORALITY. Gotta admit, Obama was a reasonably socially liberal and pitifully financially conservative President. Based on his own statements Trump would be a horribly socially AND financially REGRESSIVE President.

Ah, the awesome burdens of the virtue signaler. Well, if you ever learn what "social MORALITY" is, you please let us too!

As to your money, do whatever you like with it as long as it doesn't hurt anyone. Donate it, hoard it, buy a shiny boat, same difference to me. I have yet to care. But what exactly did Obama do to get that money for you?

I probably could have dropped the mike there, but can't... I realize I have been extremely fortunate compared to the average in the last 8 years (I am not in the 1%, but definitely the 2-3%) and have donated significantly to various charities. Have you? We know Trump hasn't, outside of his charity that paid for various lawsuits...

Can't say I'm in the top 2-3%. And I'm not playing the charity game. I loathe this sort of grandstanding as I've indicated before.

I notice here that you are heavily implying that any economic progress, no matter how painfully slow is only due to Obama helping it along. This sort of reasoning ignores that the US could have done absolutely nothing about the latest recession and still see an economic recovery by now. I think it'd be better than present due to an absence of "help" from a certain president, but opportunity cost is invisible.

Comment Re: Echo chamber (Score 1) 847

We were not discussing getting AWAY from politics, but discussing IT intelligently. To be honest /. is in the 90th percentile in that compared to most other social media sites.

Sure, we were, Mr. "I listen to people who just so happen to agree with me". Out of curiosity, how many of those knowledgeable, international, coworking groupthinkers you like to brag about thought Obama was hot stuff in 2008 and not so hot today? There's a problem with listening to ignorant political opinion even when it's sincere. Maybe you could figure out what that problem is.

Also, we don't have the social status thing going on in game play which you do have in an office setting. What's going to happen to the sap who professes that Trump may not be entirely utter crap? How much respect is that coworker going to get from you or the rest of your office?

My view is that listening to the opinion of people who don't understand US politics and who don't share the interests of US citizens, is pretty iffy. When you throw in a groupthink situation like an office or online echo chamber, then it's pointless to try to get relevant opinion.

Comment Re: Yeah but there's a whole world out there (Score 1) 847

ONE IN FOUR AMERICANS still think the Sun revolves around the Earth. Same number believes magic and witchcraft is real. One in THREE believes in ESP.

And THREE IN FOUR believe whatever polls tell them. Polling results tell you nothing about whether the poll was accurate, games played with biased polling questions, issues with sample size, or the strength of any beliefs. And if ONE IN FOUR AMERICANS actually believed the Sun revolves around the Earth (for the particularly crackpot claim from your list, which would actually require a radically different viewpoint of the world), you'd think someone other than a pollster would have found them by now.

That's a lot of people who somehow can't be found. In comparison, I've had no problem finding people who would profess some vague and inconsequential belief in magic, ESP, or "something more out there".

Slashdot Top Deals

Never appeal to a man's "better nature." He may not have one. Invoking his self-interest gives you more leverage. -- Lazarus Long