News for hackers. Stuff that matters.
Re:Edward C++Hands by copx on Friday September 20, 2013 @02:28AM (#6416248)
The H.264 encoder I use is written in a mixture of C and ASM. It is damn fast and maxes out all cores.

I dare you to write a full-featured, functional H.264 encoder in Haskell with equal or superior performance. Once such a thing exist I will start believing the hype.

Until then I reserve the right to consider the current Haskell/FP craze the biggest amount of bullshit since the Java/OOP craze.

Sorry people, I already know that magic language/paradigm which solves all problems of software engineering. Which allows me to write 4 times less code, said code being robust and maintainable practically by default, yet as fast as C/C++ if not faster, all that thanks to this great new model of software engineering! It is the (only) future!

Yes, the Java/OOP/design patterns/UML crowd made exactly the same bullshit claims back then. Nobody talks like that about Java/OOP anymore because the bullshit eventually hit the fan known as reality.

Oh and before Sun's viral marketing campaign there were the Lisp weenies. Again, same bullshit. We already have a "30x less code" language which comes bundled with an insufferable sense of intellectual superiority not backed by practical results.

Oh, and I almost forgot the Python/Ruby "dynamic" and "human" craze. "Programming for human beings" - it's the (only) future! Back then the snake oil addicts paraded around dynamic typing and code which read like plain English as the salvation of the programmer. Nowadays they claim dynamic typing is the software engineering equivalent of the Holocaust and that good code must look like math!

I am so tired of it..

Re:Edward C++Hands by guygurari on Friday September 20, 2013 @08:50AM (#6417345)
> Until then I reserve the right to consider the current Haskell/FP craze the biggest amount of bullshit since the Java/OOP craze.

You make it sound as if the consensus following the 'Java/OOP craze' was that the naysayers had it right all along, and we should all go back to C/ASM. Well, it wasn't. Even though it was overhyped, I bet most developers (myself included) would still choose Java over C. Of course this means we would take a performance hit, but for the vast majority of jobs it wouldn't matter one bit.

At the tail end of most of these 'crazes' (Java, Python, Ruby, etc.), once the dust settled we ended up with something that is in many ways far superior to what came before it (certainly when compared with C).

Re:Edward C++Hands by runT1ME on Friday September 20, 2013 @03:34AM (#6416435)
The main micro blogging site I use is a mixture of scala, java, with ruby/iOS for the front end.

I dare you to write a fully featured, async web stack that handles many-core on the scale of hundreds of millions of users in C and ASM within equal or lesser man hours. Once such a thing exists i'll start believing the hype.

Re:Edward C++Hands by harrytuttle on Friday September 20, 2013 @04:35AM (#6416612)
BBC did this 15 years ago on tiny computers compared to now. They uploaded static HTML onto Sun boxes and served them.

If you did a submission somewhere, it'd do offline processing and upload new static pages.

Most of this was C and perl.

No Scala, no Java, no Ruby.

iOS does HTML too you know.

I agree with the OP - most of this new technology doesn't really solve any problems. All it does is create an ecosystem you can feel superior being a member of.

Re:Edward C++Hands by danielweber on Friday September 20, 2013 @10:27AM (#6417882)
Even better, it's a new ecosystem that interviewers will use as a screen to keep out people who don't know the new ecosystem, and so will require people to learn it, and then in 4 years it will be thrown away because no one does that any more. See, they've moved onto the even newer ecosystem.
Re:Edward C++Hands by chetanahuja on Friday September 20, 2013 @04:27AM (#6416582)
This challenge sounds a bit off because:

1) I'm struggling to wrap my head around twitter being cited as an example of software best practices.

2) How many man-hours are we talking about here? How do we get that data?

3) Once such a thing exists i'll start believing the hype. I think you got that the wrong way around. The "mainstream" programming world has always been imperative (C and C like language). The "hype" is the other way round, Scala/Haskell/Erlang will save us from certain doom etc.

Re:Edward C++Hands by MetaCosm on Friday September 20, 2013 @06:55AM (#6416982)
... to be fair, lumping Erlang (millions of production hours in the real world for decades) with Haskell and Scala is a bit silly.

Erlang is battle tested in the field since the late 80's. It just happened that the market (high-reliability, clusterable, multicore systems) came to it so it started to get hype.

Re:Edward C++Hands by fhd2 on Friday September 20, 2013 @04:20AM (#6416559)
I see your point, comparing languages created for robustness and programmer productivity with languages created for raw hardware access and performance doesn't make much of a point.

However, C++ tries to be both, that's what's special about it. It's also arguably the cause of most of its problems and it's complexity, but that is what makes it powerful and useful - for certain applications.

> The main micro blogging site I use is a mixture of scala, java, with ruby/iOS for the front end.

Twitter seems to use Scala for most of their backend (after growing too large for Ruby), but Google and Facebook (arguably operating at larger scale than Twitter) mostly use C++ there AFAIK.

Re:Edward C++Hands by mercurial on Friday September 20, 2013 @04:27AM (#6416581)
Facebook also uses Haskell (several well-known members of the Haskell community work there).
Re:Edward C++Hands by fhd2 on Friday September 20, 2013 @04:49AM (#6416654)
To transform PHP code, it seems [1]. That's not quite the same as the backend and infrastructure of Facebook and Google.

I'm not trying to start a flame war or anything, just pointing out that C++ is good at some things you cannot really do with friendlier languages.

[1] https://github.com/facebook/lex-pass

Re:Edward C++Hands by mercurial on Friday September 20, 2013 @05:38AM (#6416779)
Re:Edward C++Hands by mtdewcmu on Friday September 20, 2013 @12:19PM (#6418670)
You're probably talking about layers above the web server, but, interestingly, nginx is pure C, async, and scales massively, and it's taking over the web. The creator of nginx is probably a genius, but still...
Re:Edward C++Hands by static_typed on Friday September 20, 2013 @08:55AM (#6417361)
You gloat, standing atop a hill of technologies, all implemented in C or C. Fundamentally you built your blog in C and C++, you just to do so indirectly, much more slowly by inserting JVMS and other bits in the way.
Re:Edward C++Hands by effn on Friday September 20, 2013 @02:41AM (#6416282)
So, any programming language incapable of beating a heavily tuned C/ASm h.264 encoder is bullshit?
Re:Edward C++Hands by copx on Friday September 20, 2013 @03:17AM (#6416376)
No, that wasn't my point at all.

My point was that I mistrust all braggart claims about how language/paradigm X will turn water into wine.

Re:Edward C++Hands by polymatter on Friday September 20, 2013 @06:28AM (#6416907)
Can you point out where he claims where any language/paradigm will turn water into wine? It seems to me you are attacking a straw man.

The article claims things like "in C++ the bulk of resource management is memory management" and "In C++ ... there is no guarantee that another thread won’t modify it". These are the evidence he uses to backup his conclusion that C++ is in "direct conflict with the requirements of parallel programming".

So he is talking about more than raw computation speed. He is talking about having greater assurance that certain classes of bug are not present. He is talking about less permissiveness, more restrictions, more checks that the programmer. That hardly sounds like water to wine. More like seat belts and health & safety reviews to prevent accidents with power tools.

Re:Edward C++Hands by qznc on Friday September 20, 2013 @08:14AM (#6417183)
Which H.264 encoder is that? Would it be a feasable project to port it to D? Or maybe to Rust?
Re:Edward C++Hands by TheLegace on Friday September 20, 2013 @05:08AM (#6416699)
What happens when you compile your code into C, like how Vala is done, which now supports Python, Java and I think functional languages like Haskell and Clojure.

http://www.youtube.com/watch?v=6QrGmA_RR4E

What happens when you can compile Python using LLVM for embedded targets like Cortex-M CPUs?

I like C as much as the next guy, but I know how deeply complex, verbose and difficult it can be to program and debug it.

I don't think Python is a craze, I think it's a fundamental philosophy to make a certain subset of computing more approachable and what is wrong with that.

I can do some very simple things in Python and it won't be overwhelming.

Just the building, linking, preprocessor process alone in C is what makes the language almost to difficult to use.

Re:Edward C++Hands by mtdewcmu on Friday September 20, 2013 @12:56PM (#6418944)
I agree that C is rock solid. There's a reason it's the language of choice for large open source projects. There's no substitute for good programming.

Comparing Python and C is unfair, though. There's a right tool for every job.