Forgot your password?
typodupeerror

Comment: Re:Sad, if true (Score 1) 376

by kafka.fr (#44370837) Attached to: The Last GUADEC?

"moc" provides introspection you would hardly get another way

Not true. You can get it with plenty of other ways, including normal usage of the embedded preprocessor.

I wrote "hardly", not "impossible". Now you may be of the elitist kind of people which assume everyone should be able to write and use something like Boost::MPL for breakfast, but in the real world easy tools are sometimes welcome.

That's still OOP and C++.

Associating C++ with OOP is a problem. It's a multi-paradigm language. OOP has very few valid use cases. If you want OOP abused everywhere, use Java.

Notice I said "OOP and C++": I did not say "OOP is C++" nor the other way around.

Qt does not duplicate the STL, it provides similar functionalities

It has its own set of containers, strings, iterators, all of which use are not conforming to the standard concepts. They might have better implementations in some cases (for example a custom hash map implementation optimized for a given usage pattern might be faster than the general-purpose one of your standard library implementation), but the design is not as well-crafted and is significantly less flexible.

Less flexible, quite true. But again, overall easier to use. Now their containers provide the usual "::iterator" and "::const_iterator", making them looking quite similar to STL containers. Even QString provides begin() and end().

Indeed it uses COW almost everywhere it might make sense.

COW never makes sense unless it's used to implement partial data sharing within a larger data collection. That's not the case in Qt. In Qt it's just used because the bad design forces the framework to copy many objects even though it's not needed.

The thing is, quite often data is shared in a heavyweight GUI app. It may be mostly useless in Qt itself, but it's quite usefull when you *use* Qt. Now we can talk about "good" or "bad" design: I tend to prefer a design which may not be academically perfect, but clean and easy to read and use. When you have to maintain several millions LOC, perfection may have different meanings.

Sometimes it's a real nice thing to be able to return a QString by value for (almost) free

I don't understand how that's related. Returning a local variable or temporary variable by value is always "free" (doesn't call copy constructors) regardless of COW. It's called NRVO, though that it is a silly name. It's not really an optimization. It's more a matter of ABI.

ABI which is not standardized, last time I checked. Here the optimization is provided by the framework, not relaying on the compiler. That said, if you don't like it, then don't use it... as simple as that.

don't forget all of this was created long before we had rvalues and move semantic in C++.

rvalue references allow to distinguish lvalues and rvalues at the language level. There was no problem implementing move semantics by handling rvalues explicitly. Before C++11, people used swap when they needed to move. Qt containers didn't even have swap before 4.7 (2010).

Don't take my poor example for more than it is... There's more in sharing data than just moving. Granted, it's pretty useless for a "Hello world" label.

"Good" language features are usually "modern" language features (sure, not always, I know). Because Qt tries to be available for older compilers, even awful proprietary ones (Visual C++ anyone?), it has to do tradeoffs here and there.

Current Qt only works with Visual C++ 9 (2008) and higher, Visual C++ 10 (2010) or higher is even highly recommended. Decent C++ support has been available since Visual C++ 7.1 (2003).

I wouldn't call "decent" the C++ support in Visual 7.1. Not even in Visual 2010. Visual 2012 is getting close to be "decent", although "decent" is pretty far from "good".

About typesafety, well... I won't really disagree on this one ;-) but it's a real minor concern really

Type safety, a minor concern!? The point of C++ is that it has a powerful type system that can catch errors. Type errors are ones of the worst type of errors you can have in a program.

It's a minor concern in the context of using Qt. Feel free to write typesafe code around it.

Comment: Re:Sad, if true (Score 1) 376

by kafka.fr (#44370005) Attached to: The Last GUADEC?

"moc" provides introspection you would hardly get another way, at the cost of a single macro (Q_OBJECT) and automatically generated code. That's still OOP and C++.

Qt does not duplicate the STL, it provides similar functionalities, but arguably simpler to use. Indeed it uses COW almost everywhere it might make sense. Sometimes it's a real nice thing to be able to return a QString by value for (almost) free - don't forget all of this was created long before we had rvalues and move semantic in C++.

"Good" language features are usually "modern" language features (sure, not always, I know). Because Qt tries to be available for older compilers, even awful proprietary ones (Visual C++ anyone?), it has to do tradeoffs here and there.

About typesafety, well... I won't really disagree on this one ;-) but it's a real minor concern really, given the enormous benefits the whole framework provides.

By the way, I've been using Qt for... oh my, 16 years already??

Comment: New name for old idea (Score 1) 95

by kafka.fr (#35675230) Attached to: Gamification — How Much of It Is Really New?
The Go game is supposed to have been invented to train an emperor's son in better strategy/military skills... and that was a big pair of thousands years ago (see Wikipedia).
Again and again, a new name on an old idea, someone is trying to sell something to people not needing nor wanting to buy it.
Transportation

Solar Car Speed Record Smashed 72

Posted by timothy
from the hats-are-off-to-you dept.
An anonymous reader writes with word from Australia that "There's a new world record for the fastest solar-powered land vehicle: 88 km/h average speed over one kilometre in a lightweight car that uses about the same power as a toaster." As the article goes on to explain, this solar racer, built last year by students from the University of New South Wales, managed to nab that speed record earlier this month on an Australian navy base airstrip.
Facebook

Sex Drugs and Texting 287

Posted by samzenpus
from the busy-hands-are-happy-hands dept.
statesman writes "The Associated Press reports that teens who text frequently are three and a half times more likely to have sex. A survey of 4,200 public high school students in the Cleveland area found that one in five students sent more than 120 text messages a day or spent more than 3 hours a day on Facebook. Students in this group were much more likely to have sex. Alcohol and drug use also correlate with frequent texting and heavy Facebook use."
Earth

Officials Sue Couple Who Removed Their Lawn 819

Posted by kdawson
from the revenge-of-the-lawn dept.
Hugh Pickens writes "The LA Times reports that Orange County officials are locked in a legal battle with a couple accused of violating city ordinances for replacing the grass on their lawn with wood chips and drought-tolerant plants, reducing their water usage from 299,221 gallons in 2007 to 58,348 gallons in 2009. The dispute began two years ago, when Quan and Angelina Ha tore out the grass in their front yard. In drought-plagued Southern California, the couple said, the lush grass had been soaking up tens of thousands of gallons of water — and hundreds of dollars — each year. 'We've got a newborn, so we want to start worrying about her future,' said Quan Ha, an information technology manager for Kelley Blue Book. But city officials told the Has they were violating several city laws that require that 40% of residential yards to be landscaped predominantly with live plants. Last summer, the couple tried to appease the city by building a fence around the yard and planting drought-tolerant greenery — lavender, rosemary, horsetail, and pittosporum, among others. But according to the city, their landscaping still did not comply with city standards. At the end of January, the Has received a letter saying they had been charged with a misdemeanor violation and must appear in court. The couple could face a maximum penalty of six months in jail and a $1,000 fine for their grass-free, eco-friendly landscaping scheme. 'It's just funny that we pay our taxes to the city and the city is now prosecuting us with our own money,' says Quan Ha."
Crime

Examining Virtual Crimes 85

Posted by Soulskill
from the too-much-time-on-your-hands dept.
GamePolitics has an article about a research paper issued by the AU government's Institute of Criminology titled "Crime Risks of Three-Dimensional Virtual Environments." The paper discusses the legal questions raised by game worlds and avatars, ranging from regulation of in-game currency to a report of virtual rape. "A person controlling an avatar that is unexpectedly raped or assaulted might experience the physical reaction of 'freezing,' or the associated shock, distrust and loss of confidence in using [3D virtual environments]. While civil redress for psychological harm is conceivable, the 'disembodied' character of such an incident would invariably bar liability for any crime against the person. However, Australian federal criminal law imposes a maximum penalty of three years imprisonment for using an internet carriage service to 'menace, harass or cause offence' to another user. Further, US and Australian laws ban simulated or actual depictions of child abuse and pornography. Therefore, any representations of child avatars involved in virtual sexual activity, torture or physical abuse are prohibited, regardless of whether the real-world user is an adult or child."
Math

Man Uses Drake Equation To Explain Girlfriend Woes 538

Posted by samzenpus
from the less-math-more-social-science dept.
artemis67 writes "A man studying in London has taken a mathematical equation that predicts the possibility of alien life in the universe to explain why he can't find a girlfriend. Peter Backus, a native of Seattle and PhD candidate and Teaching Fellow in the Department of Economics at the University of Warwick, near London, in his paper, 'Why I don't have a girlfriend: An application of the Drake Equation to love in the UK,' used math to estimate the number of potential girlfriends in the UK. In describing the paper on the university Web site he wrote 'the results are not encouraging. The probability of finding love in the UK is only about 100 times better than the probability of finding intelligent life in our galaxy.'"
Science

Antarctic's First Plane, Found In Ice 110

Posted by timothy
from the ice-tractor-cometh dept.
Arvisp writes "In 1912 Australian explorer Douglas Mawson planned to fly over the southern pole. His lost plane has now been found. The plane – the first off the Vickers production line in Britain – was built in 1911, only eight years after the Wright brothers executed the first powered flight. For the past three years, a team of Australian explorers has been engaged in a fruitless search for the aircraft, last seen in 1975. Then on Friday, a carpenter with the team, Mark Farrell, struck gold: wandering along the icy shore near the team's camp, he noticed large fragments of metal sitting among the rocks, just a few inches beneath the water."
Image

Game Design: A Practical Approach 85

Posted by samzenpus
from the read-all-about-it dept.
Aeonite writes "As the title suggests, Game Design: A Practical Approach presents a practical approach to game design — one that is almost too practical in places. The book does a good job of covering many of the foundational elements of game design (called "atoms" by the author), but in places the level of practical detail — and the heavy focus on Lua code examples — is a bit hard to work through. Readers allergic to code may find themselves skipping over swaths of text instead of actually reading it." Read below for the rest of Michael's review.

Comment: Why new language, while there are good'old ones... (Score 1) 321

by kafka.fr (#28247711) Attached to: New Languages Vs. Old For Parallel Programming
Can someone explain me why we would need a new language... There are languages designed from the ground-up to allow parallel processing. Yes, structures inside de core language, not some extra libs. Just to name one: Ada, designed to allow parallel computing since before 1979 (yes, that's 30 years ago). Reference: http://www.adaic.org/whyada/multicore.html. Even on a single processor, doing stuffs memory-bound (such as a sort on a huge amount of data) parallelized can show significant improvement.

Brain off-line, please wait.

Working...