Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


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

Comment Re: This again? (Score 1) 270

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

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

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

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

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:No, it's not reasonable (Score 1) 126

You realise that Kosovo fought a particularly bloody war of independence against Serbia in the 1990s after the breakup of Yugoslavia and, after a period of protectionism under UN administration, declared independence from Serbia in 2008 - that independence is recognised by 109 UN members, so it is not a pseudo-state, it is a state by recognition, and Serbia would most definitely want Kosovo back if it were to be allowed...

Comment Re:They HAD this service? (Score 1) 49

Start shooting in RAW mode. You'll hit a terabyte before you know it. Better yet, get a 5D Mark IV and use Dual-Pixel RAW so that 5% more image data can take 100% more space. I mean, you'd think they would have used sum-difference encoding, sign-magnitude encoding (with a single-bit right rotation so the sign bit is on the right), and bitwise run-length encoding (all the top-order bits first) to make that file format efficient, but instead, they encoded the sum of the two images followed by one of the two images by itself, both using lossless JPEG. I can't imagine what they were thinking. The impact of dual-pixel RAW should have been an order of magnitude less than it is.

Comment Re:Business Class With Static IP Force you to rent (Score 1) 65

With Business service, you're paying extra for a higher level of support, therefore, they get to dictate what hardware is used as CPE, so they can monitor it.

That's just a lame excuse. It has no basis in reality.

I have business-class DSL, and Covad (or whatever they're called now) doesn't dictate what hardware is used as a CPE, and they sure as h*** don't require me to rent it from them. They do provide recommendations. If you stray outside those recommendations, it becomes your problem if things don't work.

Besides, Comcast Business Internet service, unless you buy into one of their special high-end tiers, doesn't come with an SLA. They don't give you a higher level of support. They just give you a connection without port blocking, data caps, etc.

There's absolutely no reason for an SLA-free Internet service to require you to rent a modem. The problem is that Comcast uses a fundamentally broken and insecure technology for routing, wherein your cable modem has custom firmware with a crypto key in it that lets it do encrypted RIP for router advertisements upstream. Instead of setting up their network correctly, with a properly maintained centralized routing database, they propagate routing changes by sending an IP range to your cable modem and letting it propagate it upstream to the router.

I'm sure there's some advantage to Comcast in terms of being able to rewire things and your cable modem automatically being able to fix routes when it reaches a different head end or something, but it is a security nightmare, can potentially be abused easily by a malicious user to bring down their entire network (at least within a region), and on top of that, forces everyone to rent cable modems from them.

TL/DR, they force you to rent because they don't know what they're doing.

Comment Re:They do charge for the modem... (Score 2) 65

It was a great plan until they changed which docsis standard they were using and my modem was rendered useless, and along with it any savings I might have realized over the next few years.

Huh??? DOCSIS requires backwards compatibility, both for the head end and the modems themselves. Any DOCSIS n hardware is compatible with n+k and n-k for all values of k. There's absolutely no reason for your cable company's head end to not negotiate a connection with your existing cable modem. You just won't get the faster speeds provided by the newer standard.

Besides, at $6 a month, it doesn't take years to recover the cost. It takes just a few months. Unless you're doing something special, a cable modem typically costs only forty or fifty bucks. That's only about seven or eight months of service. Unless your cable company requires you to rent one (e.g. Comcast when using multiple static IPs), you're a chump if you rent from the cable company. The break-even point is probably about a dollar a month.

Comment Re:Bribery wins again (Score 1) 222

Correct. And this town's response should be to lease access to an ISP (ideally owned by a local) under the condition that they provide service under the same terms as the municipal service for at least 3 years, and with the condition that their exclusive access to the lines ends at the end of those three years.

Comment Re:so unbelievable its posted twice (Score 2) 180

This story is a couple of hours after the allegation story, if that story was updated with the denial and explanation now, there would be near zero discussion on the denial and explanation while the outrage about the allegation would stand in full.

That is why something as big as this is due two separate stories when the allegation and denial are that far apart - now go discuss the new "information" on the topic, does it change any viewpoints from the last story? Lets watch and find out.

Slashdot Top Deals

He keeps differentiating, flying off on a tangent.