Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×

Comment Re:Write-only code. (Score 1) 757

> The sample code will copy a and b twice, once to put them in the lambda closure, and then to pass them as arguments to do_something. Some may consider this wasteful (the easiest fix is to modify do_something to take the values as const references).

No, the easiest fix is for a & b to be moveable types, which they may well be, in which case one of those copies becomes a move, and all is right in the universe.

Comment Re:Write-only code. (Score 1) 757

> So we all program in different dialects, and then scratch our heads when we read other peoples' code.

The practice of programming in dialects is more a function of the origins of the language than the size of the language. Stroustrup's most recent book does a marvelous job of demonstrating how little you have to know to program in C++ effectively: http://www.stroustrup.com/prog...

C++'s C compatibility is both its strength and its weakness, and the weakness primarily comes from people treating it as a bunch of add ons to C. If you scrap that attitude, it is entirely possible to be proficient in the language after a year of use and capable of reading most anyone's code (assuming they aren't shooting for obscurity) in another year or two. That's longer than some simpler languages, but it is hardly sufficient to excuse people's ignorance.

Comment Re:C++ Downfalls, Compiler and Internationalizatio (Score 1) 757

Regarding repeatability: the language is fully deterministic, and compilers have as much of an incentive to be consistent as they do otherwise. If you can't get repeatable builds, then the problem is with your build environment/process more than anything else. Aside from hardware entropy sources, computers are, by design, deterministic, so if you can't reproduce a build it is because you haven't constructed a proper build closure. Certainly there is nothing about C++ that makes builds any more non-deterministic than say, C. Debian actually has a project for this: https://wiki.debian.org/Reprod..., and you may find some helpful information there. You'll notice nothing they've run in to is specific to C++.

Regarding code-to-binary structural coverage analysis. Certainly I can imagine the argument that as you get to higher and higher levels of abstraction, it becomes harder for humans to track all the transformations all the way through to assembly. One solution is to restrict the levels of abstraction you work with. I would argue that is still error prone and you are better off with using theorem prover type automated solutions (and in general, languages built around provability like ML or Coq) rather than manual verification. Even better would be to perform the verification on the compiler itself rather than the code it compiles. That said, C++ compilers do a pretty good job of tracking the origin of each bit of code they generate, which ought to make it easy to have the machine inform you of the origin of any particular code block, and C++ also does a great job of letting the programmer decide what level of abstraction they want to work with and only making the runtime pay for the abstractions they are using. Its stronger type safety also helps ensure that there aren't "hidden" code paths do to programmer error. Of course, optimizers really complicate this, so you may need to turn them off as you mentioned.

Internationalization. That sounds like an old project... one that predates the C++ standard (which means a lot of bad C habits are involved). C++ is actually very well set up for internationalization, particularly because it is so agnostic about how stings are handled. Languages like Python, Perl & surprisingly Ruby have made all kinds of unfortunate decisions around internationalization that make it look like you are fine with internationalization, but it actually blows up in your face. As an example, ICU is probably one of the foremost libraries out there, and its primary language targets are C++ & Java. The C++ target has the virtue that you can pretty much just drop in ICU strings in to a well structured C++ program and all is well in the world, where as the Java one is a bit of a pain to take advantage of (fortunately, Oracle periodically syncs the ICU code in with the JDK, but that means you have to wait for a JDK update to get the latest ICU solution).

Image

Wired Writer Disappears, Find Him and Make $5k 135

carp3_noct3m writes "A freelance Wired magazine journalist has decided to see what it is like to disappear from normal life, all while staying on the grid. The catch, is that he is challenging anyone and everyone to find him, take a picture, and speak a special codeword to him. If you can do that, you can make 5000 dollars, which happens to come out of his paycheck for the article he'll be writing. Oh, and to top it all off, whoever finds him gets pictures and interviews in Wired. He has been posting to his Twitter, using TOR for internet, and the Wired website will be posting his credit card transactions."
Perl

perl6 and Parrot 0.5.2 Released 229

mAriuZ writes "Bob Rogers just released Parrot 0.5.2. This monthly release includes a couple of interesting new features. First, we've bundled Patrick Michaud's Rakudo (thats the implementation of Perl 6 on Parrot) such that you can type make perl6 on Unixy platforms and make perl6.exe on Windows and get a working standalone Perl 6 binary. This is experimental and we hope to iron out some installation and deployment issues by next months release, but it was important to demonstrate our progress. The second new feature is a toolkit for starting your own compiler. Max Mohun built a prototype several months ago, and we've added a stripped-down version for now that builds the skeleton of a compiler for you using the Parrot Compiler Tools. I mentioned the LOLCODE compiler in What the Perl 6 and Parrot Hackers Did on Their Christmas Vacation; this is how Simon and Company were able to get LOLCODE up and running so quickly."
Databases

Sun Buys MySQL 588

Krow alerted me that MySQL has been bought by Sun. Right now there is only a brief announcement but it discusses what the acquisition will mean for the core developers, community etc.
PC Games (Games)

Submission + - Nearly Entire id Back Catalog Now on Steam

Pluvius writes: "The constantly growing list of games available on Valve's online-gaming network Steam has become even more impressive with a contribution from id software. With the exception of the relatively new Quake IV and a few early games, every PC game released by id is now available, including the first five Commander Keen episodes, the Wolfenstein games, the Doom series, most of the Quake series, Heretic and HeXen, and all of the addons and expansions thereof. Better yet, all of these games can be bought together at the low price of $70, minus a 10% discount if you buy before August 10. Other packages are also available."
Power

Submission + - Untapped Energy Below Us (yahoo.com) 1

EskimoJoe writes: "BASEL, Switzerland — When tremors started cracking walls and bathroom tiles in this Swiss city on the Rhine, the engineers knew they had a problem. "The glass vases on the shelf rattled, and there was a loud bang," Catherine Wueest, a teashop owner, recalls. "I thought a truck had crashed into the building." But the 3.4 magnitude tremor on the evening of Dec. 8 was no ordinary act of nature: It had been accidentally triggered by engineers drilling deep into the Earth's crust to tap its inner heat and thus break new ground — literally — in the world's search for new sources of energy. On paper, the Basel project looks fairly straightforward: Drill down, shoot cold water into the shaft and bring it up again superheated and capable of generating enough power through a steam turbine to meet the electricity needs of 10,000 households, and heat 2,700 homes. Scientists say this geothermal energy, clean, quiet and virtually inexhaustible, could fill the world's annual needs 250,000 times over with nearly zero impact on the climate or the environment. A study released this year by the Massachusetts Institute of Technology said if 40 percent of the heat under the United States could be tapped, it would meet demand 56,000 times over. It said an investment of $800 million to $1 billion could produce more than 100 gigawatts of electricity by 2050, equaling the combined output of all 104 nuclear power plants in the U.S."
Security

Submission + - Your media player could be a hacker's playground (theglobeandmail.com)

Tech.Luver writes: "Theglobeandmail reports, " Media players in personal computers have serious vulnerabilities that could allow online criminals to attach malicious code and infect computers without the user's knowledge, a researcher said Thursday. Mr. Thiel, who exposed the flaws on relatively obscure open-source media players during a presentation at the Black Hat hacker conference, said he has found several flaws in popular commercial players. But he declined to provide their brand names because, he says, he is still disclosing the exploits to the companies so they can issue fixes. ""
GUI

Submission + - Automatix Activly Dangerous to Ubuntu

exeme writes: Ubuntu developer Matthew Garrett has recently analysed famed Ubuntu illegal software installer Automatix and found it to be actively dangerous to Ubuntu desktop systems. In a detailed report which only took Garrett a couple of hours he found many serious, show-stopper bugs and concluded that Ubuntu could not officially support Automatix in its current state. Garrett also goes on to say that simple Debian packages could provide all of the functionality of Automatix without any of the problems it exhibits.
Data Storage

Submission + - WD's New Caviar SE16 750G Hard Drive, Huge, Fast (hothardware.com)

MojoKid writes: "Western Digital took a bit longer than expected to finally release a desktop drive larger than 500 Gig, but their first release, the Caviar SE16 WD7500AAKS looks to be an impressive rendition of new advancements in hard disk perpendicular recording technology. This new 750G WD drive gave Seagate's 7200.10 equivalent a run for its money and beat it in every performance test shown at HotHardware. Also, with storage prices so low right now, the 750G monster weighs in at a svelte $0.33/GB or better, with current street prices falling below the $250 range.""
Power

Submission + - Hydrogen turbines generate clean electricity

Roland Piquepaille writes: "The Lawrence Berkeley National Laboratory (LBL) has developed near-zero-emission gas turbines using pure hydrogen as a fuel. But because this LSI (low-swirl injector) technology also can use other fuels, it has the potential to help eliminate millions of tons of carbon dioxide and thousands of tons of nitrous oxides (NOx) from power plants each year. In fact, burners with the LSI emit 2 parts per million of NOx, more than five times less than conventional burners. The multi-patented technology is currently available for licensing. I sure hope that a utility company will be interested. But read more for many additional references and photographs comparing a high-swirl injector (HIS) and a low-swirl injector (LSI)."
Announcements

Submission + - World of Warcraft Expansion info leaked (mmo-champion.com)

reddcell writes: *The dark, necromatic Death Knight — the first new character class added to World of Warcraft since its launch.

*Northrend, the harsh, icy continent where the Lich King holds rule, complete with new zones, quests, items and monsters.

*New level cap of 80 providing access to mighty new powers and talents

*New battlegrounds featuring siege engine warfare and destructable buildings

*Expanding character customisation options including new hairstyles & dances, the ability to change the hairstyles of existing characters, and new skin color variants.

Slashdot Top Deals

It is easier to write an incorrect program than understand a correct one.

Working...