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:Sigh (Score 1) 284

His argument is solid. What other PC operating system supports as many hardware devices, has as much software developed for it? Regardless of the OS being open, Windows as a platform has been a very open to anyone who wants to develop for it.

Most open though? More open than Linux? Seriously? Not a chance.

Vendors (hardware, software) supporting Windows is not the same as Windows supporting the vendors. Linux supports more hardware than Windows out of the box. Linux supports all those non-out of the box pieces of hardware just fine, the vendor just has to write the drivers for them.

Windows is proprietary to Microsoft and doesn't implement an open standards backed API. Linux supports proper open standards, such as POSIX, and provides all the source so it can be extended.

By any definition of open, Windows does not meet it.

Comment Re:Independentd ealerships=ineffective retail syst (Score 1) 261

Tesla is the automotive equivalent of Apple. Cheaper alternatives will come along (such as the Chevy Bolt).

Except Tesla probably have a significantly higher BOM than most car makers, due to low volume and new tech. Apple have no such excuse, using no more advanced tech than anyone else, and having massive volume to boot, yet still charging a massive premium.

A better analogy would be Ford charging Tesla prices for their everyday cars, and people still buying them.

Submission + - Philae Found! Rosetta Spies Dead Comet Lander (

astroengine writes: With only a month before its mission ends, the European Space Agency's Rosetta mission swooped low over Comet 67P/Churyumov–Gerasimenko to see the stranded Philae lander jammed in a crack. After months of searching for the lander, which made its dramatic touchdown on Nov. 14, 2014, mission scientists had a good idea as to the region the robot was in, but this is the first photographic proof of the lander, on its side, stuck in the craggy location called Abydos. "This wonderful news means that we now have the missing 'ground-truth' information needed to put Philae's three days of science into proper context, now that we know where that ground actually is!" said Rosetta project scientist Matt Taylor in a statement.

Comment Re:problems, lol (Score 1) 232

And because C++ is slightly more typesafe (strict aliasing), those optimizers can do more for C++ code than for C. So despite the more complex language, C++ can be marginally faster (~1%).

Probably not even that. In the tiny number of cases where strict aliasing buys you anything at all (which on modern out-of-order hardware it almost never does), it's around the same order of magnitude as the performance that you lose in C++ due to maintaining exception handling information. There's really nothing between C and C++ given the same code these days. In practice, most of the performance gains in C++ come from metaprogramming.

Exception handling in modern C++ compilers incurs no overhead other than a small amount of memory that isn't referenced until the exception is thrown. Search for table driven exception handling.

In fact, exception handling should improve performance in the common case, as you'll be reducing the constant "if (failed) {recover()}" operations employed by regular return code error handling. The non-error code path will be much more linear, with fewer pipeline busting branches.

Comment Re:problems, lol (Score 3, Informative) 232

Exceptions are possible in C. See the documentation for setjmp() and longjmp().

That said, exceptions are just "kicking the can down the road" for error handling. If a function call can fail, then you should check the return code. If you don't want to write with proper error reporting/recovery code immediately, there is always the assert() macro, e.g.:

if(func_which_might_fail() == ERROR_OCCURRED) assert(0);

If assert(0) gets called the program will stop immediately, and you can inspect the problem in detail with a debugger. Easy peasy.

Urgh, no. Never, ever do this. assert() usually becomes a no-op when compiling stuff without debug flags, so binaries shipped to the field will mysteriously ignore errors in ways that can't be reproduced in a debugger.

One thing that shouldn't change between debug and production code is error detection and handling. In this sense, exceptions are ideal, as handling only needs to happen as and when errors occur, and the common case of no errors incurs little (setjmp/longjmp) to no (exception tables) overhead.

Plus exceptions are less laborious to handle. You can have a single try/catch for a whole block of code, instead of testing and handling each and every function that could fail. If you write exception safe code, then that's all you need to do, and you can clean up failed operations in the exception handlers.

Comment Re:Goto (Score 1) 674

C doesn't have portable exceptions. And it's problematic to get this done efficiently while C is used in many environments where efficiency is necessary (no room for extra stuff on the stack, or no room for exception tables in code space, etc).

Single threaded exceptions with setjmp/longjmp can be implemented very cheaply and portably with just a fixed size static array, and a counter to track the nesting level. So long as you don't recursively try/catch, this should be good for small environments, and can be nicely wrapped in CPP goodness for syntactic sugar and easy portability to larger and/or threaded environments (which may require a more sophisticated exception stack.) While setjmp/longjmp can have a performance cost, if it makes error handling easier, then the cost may well be worth it in higher reliability. Make it work first, then make it fast.

You'd have to be very resource constrained or trivial to make it impractical to use an exception model for error handling.

In C++ I have seen that 99% of exception handling is all for error handling only, and throws to main() to do just print an error message then exit. Even many C++ books give examples where the arguments to throw are always error messages. In general, in most languages I see very few programmers who "handle" errors or exceptions in a more sophisticated way than just print an error and pop back to the main loop.

Which may be perfectly valid, so long as you don't leak resources. Just abandoning the current transaction and moving on to the next might be perfectly adequate so long as proper diagnostics are available so that someone can determine why the failure occurred if required. However, making code exception safe can be non-trivial.

Comment Re: Er (Score 1) 623

The only problem with the terminology is that there is a disconnect between what the common person on the street thinks the capabilities of an autopilot is versus its actual capabilities. An actual autopilot is not much more than an airplane cruise control that maintains a preset altitude, heading, and airspeed, while the common perception is that it is essentially an autonomous robot pilot that can do everything up to and including dogfighting while the human pilot takes a nap.

I'm not sure how that is Tesla's problem? They spell out what the autopilot is capable of, what the driver's responsibilities are etc.

Also, I assume the big rig driver is being taken to task in all this? He was essentially at fault for the whole incident, lets not forget.

Comment Re:the CO2 improvements are minor at best (Score 1) 64

Diesel engines emit 15-20% more CO2 per unit volume (liter/gallon) of fuel burned because the fuel contains more energy/carbon.

And they use less fuel, because they're more efficient.

And once the companies stop cheating, the fuel economy of the Diesel just isn't all that much better than a turbo gas engine.

Why put up with extra NOx and particulates (depending on the car you compare to) to save such a small amount of CO2? Just get a gas hybrid and do better all around. Or a plug-in hybrid like the Volt where you can do most of your driving burning no liquid fuel at all?

Or even better, have a plug in diesel hybrid, where you can trundle round town on the battery and so not emit NOx in built up areas (where NOx emissions matter) then fire up the diesel for extended journeys on open roads where NOx matters less.

Diesel engines are just more efficient than even turbo gasoline engines, largely due to not being throttled and being lean burn. At low loads (which is probably where engines spend most of their time) diesels have less pumping losses (due to unrestricted throttle-less induction) and direct fuel injection.

Comment Re:Really, this happens in America? How?? (Score 2) 180

>Seriously, if this happened in the UK there'd be a gigantic 'fuck off' from the customers

Wait, wait, are we talking about the same UK where the citizens have to pay for a 'TV license'?

The very same UK where that TV license funds an independent, unbiased and world renowned BBC. BTW, my phone, 50mbps broadband, cable TV and TV license still comes out less than the figures bandied about here from US ISPs (assuming the $130/month price I saw elsewhere).

Comment Re:Warning: Windows 10 is draining your battery (Score 1) 377

Warning: Windows 10 is draining your battery by being a poorly conceived and implemented operating system. You should install Linux immediately.

Actually, due to what I think is a gtk3/glib3 bug, firefox regularly spins up the CPU, heating up the machine to the point it burns my lap, as well as making firefox perform poorly, for extended periods of time. Have also noticed it in other applications, such as Eclipse based applications (Lotus Notes for my sins) but it makes my Ubuntu installations very battery hostile.

Comment Re:Yeah, but (Score 2) 136

Does UK enjoy the same amount of Freedom that America has?

Not even close!


Significantly more when you look at the details.

How so? If the local government wants to censor you in a European country, they just have to label what you said as hate speech, regardless of whether or not it actually is. For example, it's illegal to collect WWII memorabilia in Germany, because it's considered "hateful" to do so, along with walking in any manner resembling a goose step.

All the goose-stepping, WWII collecting Americans must be loving this thread....

In the US meanwhile, so long as you aren't calling for somebody to be physically injured or killed, you can do or say whatever you want without fear of adverse government action against you.

You must be so proud

Let's also not get into the fact that pretty much everywhere you go in a populated area, your actions are likely being recorded on camera, and you have no right to defend yourself in the event of a home invasion.

I'm not aware of a single CCTV camera within a 1 mile radius of my home. Plenty of council ones in the town centre, but not in the wider suburbia.

Oh, and how's that mass surveillance working out for you?

In the UK, at least, you can use "reasonable force" to defend yourself. But it's true, I can't use disproportionate force, like shooting someone dead for wanting to steal my TV. We grew out of that in the early 19th century.

Comment Clean install (Score 1) 982

I actually like Win10 (privacy/telemetry issues aside), and it's the first MS OS I've actually been (mostly) impressed with since NT 3.51 (which was solid as a rock.)

But the main reason I would want to upgrade any machine I can is that once installed and activated, you can re-install Windows with the download ISO image from Microsoft. That means you can take a crapware laden OEM piece of shit, upgrade to Windows 10, wipe it and reinstall a virgin Windows 10 with no further activation issues, no OEM crapware.

Comment Re:Famous last words... (Score 2, Informative) 231

How do you "prank" a theft from a portrait gallery? If they actually stole a portrait, then it's theft. It doesn't matter if they give it back and say "it's just a prank".

Actually, it does. From the Theft Act 1968:

"A person is guilty of theft, if he dishonestly appropriates property belonging to another with the intention of permanently depriving the other of it"

Therefore, with no intention to permanently deprive someone of the object, no theft has taken place.

From TFA though:

"All four pleaded guilty to two counts of using threatening, abusive, or insulting words or behaviour with intent to cause fear of, or provoke unlawful violence for their involvement in the two hoaxes."

Bloody hell, half of the MPs in the country could be done for that if they didn't hide behind their parliamentary privilege. The above words could be easily applied to the Brexit referendum FUD being spouted on both sides.

Slashdot Top Deals

To iterate is human, to recurse, divine. -- Robert Heller