6 ms·
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 en
by copx 13y ago
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..
- effn 13y agoSo, any programming language incapable of beating a heavily tuned C/ASm h.264 encoder is bullshit?
- deleted 13y ago[deleted]
- copx 13y agoNo, 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.
- polymatter 13y agoCan 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.
- runT1ME 13y agoThe 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.
- fhd2 13y agoI 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.
- mercurial 13y agoFacebook also uses Haskell (several well-known members of the Haskell community work there).
- fhd2 13y agoTo 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 https://github.com/facebook/lex-pass
- mercurial 13y agoNot only [1]. 1: http://www.reddit.com/r/haskell/comments/1le4y5/the_haxl_project_at_facebook_slides_from_my_talk/ http://www.reddit.com/r/haskell/comments/1le4y5/the_haxl_pro...
- TheLegace 13y agoWhat 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 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.
- deleted 13y ago[deleted]
- qznc 13y agoWhich H.264 encoder is that? Would it be a feasable project to port it to D? Or maybe to Rust?
- guygurari 13y ago> 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).
- mtdewcmu 13y agoI 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.