×

Announcing: Slashdot Deals - Explore geek apps, games, gadgets and more. (what is this?)

Thank you!

We are sorry to see you leave - Beta is different and we value the time you took to try it out. Before you decide to go, please take a look at some value-adds for Beta and learn more about it. Thank you for reading Slashdot, and for making the site better!

Comments

top

How Relevant is C in 2014?

GiganticLyingMouth Re:The C family is more than C/C++/Objective-C/C# (641 comments)

I expect OpenCL will move more and more towards C++ -- CUDA (the NVidia proprietary counterpart) also started off as C, but is now much closer to C++. (e.g. uses C++ compiler for host-side code, templated kernels, etc).

about two weeks ago
top

How Relevant is C in 2014?

GiganticLyingMouth Re:one of a kind (641 comments)

C++ might not end up being faster, but it certainly has no reason to be slower*. Well-written C++ and C should run at about the same speed. However, C++ has the advantage of allowing you to use high-level constructs when performance isn't as much of an issue.

* this is contingent on your compiler -- if you're using some compiler from a decade ago, some constructs (e.g. templates) may emit shockingly poor code

about two weeks ago
top

How Relevant is C in 2014?

GiganticLyingMouth Re:Very relevent for small target embedded stuff. (641 comments)

Off topic: But I really don't know why so many people use C++ for non-embedded. It's perfectly valid for many - maybe most - applications to trade efficiency for safety, so use a different language. Why pick one that accommodates all the power of C then constantly beat on the developers with a giant list of coding guidelines? When the greatest attribute you seek in a developer is pedantry then something's wrong.

C++ is great anywhere you need performance. Numerical computing, scientific computing, image processing, computer vision, machine learning, etc -- all of these benefit greatly from C++, as you can use it as a high-level language in the non-performance critical parts, but at the same time, be able to optimize effectively in the places where it matters.

about two weeks ago
top

How Relevant is C in 2014?

GiganticLyingMouth Re:C is very relevant in 2014, (641 comments)

So why isn't there a _standard_ library for safe string handling? (I know there may be several third party libraries) A library could abstract away the management of pointers to chars, things like growing and shrinking storage of the strings, creating string objects, destroying them, etc. without programmer ever touching a raw pointer to memory containing the string data.

Sounds like you're looking for C++ and std::string

about two weeks ago
top

How Relevant is C in 2014?

GiganticLyingMouth Re:C is very relevant in 2014, (641 comments)

Actually, it's still possible to have some bugs if you improperly use auto_ptr and shared_ptr, etc, but it's still much better than the classic method of allocation.

Of course, you're not using auto_ptr anymore, right? It's been deprecated in C++11, and there's little to no reason to use it in favor of unique_ptr. auto_ptr was the attempt at implementing unique_ptr semantics prior to having rvalue references as part of the language. As for the possible pitfalls... shared_ptr can still fall prey to cyclical dependencies, but unique_ptr is very good for enforcing ownership semantics.

about two weeks ago
top

Former HP CEO Carly Fiorina Considering US Presidential Run

GiganticLyingMouth Re:Can Iowa handle a circus that large? (433 comments)

And his birth certificate is not a sloppy forgery.

I find it amazing that there are still birthers out there.

about three weeks ago
top

Tor Project Mulls How Feds Took Down Hidden Websites

GiganticLyingMouth Re:She? (135 comments)

Not sure if you're trolling, but I'll bite. This is very common in security literature -- it's always Eve, Alice and Bob, with Eve trying to intercept/subvert Alice and Bob's communications. Nothing to do with PC. That's just how it's done.

about a month ago
top

Statistician Creates Mathematical Model To Predict the Future of Game of Thrones

GiganticLyingMouth Re:Why use statistics? (127 comments)

Sure, but you'll need a time machine

about 3 months ago
top

Rosetta Code Study Weighs In On the Programming Language Debate

GiganticLyingMouth Re:C++ = Clear Language Choice. (165 comments)

Fortran doesn't have pointer aliasing. This allows the compiler to perform more aggressive optimizations

about 3 months ago
top

Ask Slashdot: Finding a Job After Completing Computer Science Ph.D?

GiganticLyingMouth Re:List the STL? Seriously? (479 comments)

Of course, the STL was written by Stepanov before C++ was standardized. What the interviewer probably meant to ask about is the C++ standard library, which is similar but different. Or maybe they really were asking about the STL, in which case I wholeheartedly agree that bullets were dodged.

about 3 months ago
top

The Growing Illusion of Single Player Gaming

GiganticLyingMouth Re:No trouble finding single player games.... (292 comments)

Most of those games you quoted are very old and OP has probably played them all and is looking for something new.

Wasteland 2 comes out this Friday (9/19) and Pillars of Eternity is still in Beta. Unless you've got a time machine that's about as new as it gets.

about 3 months ago
top

This 'SimCity 4' Region With 107 Million People Took Eight Months of Planning

GiganticLyingMouth Re:Los Angeles (103 comments)

If only, Los Angeles has a vanishingly small subway system. One subway line that goes from downtown LA to North Hollywood, and an aborted line that was meant to go to Santa Monica but only made it to Wilshire.

about 4 months ago
top

If Java Wasn't Cool 10 Years Ago, What About Now?

GiganticLyingMouth Re:Just don't try to write an OS in Java (511 comments)

Except that the original question only specified the parameter to be an integer, not whether it was signed or not (nor what range of values it could take)

about 4 months ago
top

The Grumpy Programmer has Advice for Young Computer Workers (Video)

GiganticLyingMouth Re:Programming: You're doing it completely wrong (120 comments)

lambdas can be faster than say, function pointers, mostly because the compiler can have more information about pointer aliasing. They should be a wash speed-wise relative to loops. Also, you say functors, which can take a few forms; this can be a callable object (e.g. a struct with its operator() overloaded, no templates needed), a stored lambda function, or a std::function object (e.g. as created through std::bind, lambdas, etc). They all look rather different; do you find all of them unreadable? Not all of them require 'enormous' header files

about 4 months ago
top

Researchers Find Security Flaws In Backscatter X-ray Scanners

GiganticLyingMouth Re:hehe (146 comments)

It was stated in a different article that they were unable to procure the current ones used in airports (millimeter wave), and that it was already rather difficult for them to acquire this one -- perhaps now you know why

about 4 months ago
top

Interviews: Ask Bjarne Stroustrup About Programming and C++

GiganticLyingMouth Re:Templates all over again (427 comments)

Don't you think that implies at least some sort of effort to understand them?

Well apparently not, because you stated multiple points that are, as of today, patently false. Perhaps it was different in C++98, but (in case you didn't know), it's not 1998 anymore.

about 4 months ago
top

Interviews: Ask Bjarne Stroustrup About Programming and C++

GiganticLyingMouth Re:Templates all over again (427 comments)

Not as many as possible. Use the right tool for the right job, as always. But don't rule out libraries because they use templates -- that's downright silly. Templates are made for writing generic code, which maps very well to libraries. Lastly, I don't claim to be a *good* programmer, but I do at least make an effort to understand the language that I'm using.

about 4 months ago
top

Interviews: Ask Bjarne Stroustrup About Programming and C++

GiganticLyingMouth Re:Is the complexity of C++ a practical joke? (427 comments)

Might I ask what you feel to be unpleasant about C++11's additions? Do you have any specific cases in mind?

A lot of people will (and do) use the =delete syntax. Prior to that you would have to declare the method as being private, but this wasn't perfect. Class friend and member functions could still access them, and the errors would only be detected at link time. Alternately you could use boost noncopyable, but you can't always use boost. With the =delete syntax, errors are detected at compile time, and provide some semantic information about your code to anyone reading it.

Also, it's actually 6 implicit functions that compilers generate; you forgot about the copy-assignment and move-assignment operators.

about 4 months ago
top

Interviews: Ask Bjarne Stroustrup About Programming and C++

GiganticLyingMouth Re:Templates all over again (427 comments)

Sorry but this is nonsense. Templates aren't any slower than hand-written code. Compilers may have had problems with templates a decade ago, but template support among the major compilers nowadays are very solid and consistent.

You say "many programmers minimize their use of templates, both in their own code and in their use of templated library code" -- are you saying "many" programmers writing C++ don't use boost or the standard library? Because that too is nonsense. Many bad programmers perhaps?

Lastly, partial specialization is very convenient for performing compile time recursion, which is pretty essential to template metaprogramming.

about 4 months ago
top

Interviews: Ask Bjarne Stroustrup About Programming and C++

GiganticLyingMouth Re:Multiple Return Types? (427 comments)

When is C++ going to natively support multiple return types? i.e.

float sin, cos, angle; sin, cos := SinCos( angle );

Right now we can use a struct hack, but native support would be appreciated.

You could always just return a tuple, then use tie on the caller side. To use your example,

std::tuple SinCos(float angle) {
...
return std::make_tuple(sin, cos);
}

float sin, cos;
std::tie(sin, cos) = SinCos(angle);

Also, your last question isn't really a question, is it?

about 4 months ago

Submissions

GiganticLyingMouth hasn't submitted any stories.

Journals

GiganticLyingMouth has no journal entries.

Slashdot Login

Need an Account?

Forgot your password?