I think the comparison of bitcoin with gold is a better one than stocks. The value of gold today is not tied to the underlying precious metal any more. Gold is kept in vaults likely never to be looked at or touched. It might as well be a digital number. Instead gold is a place to store capital with a value agreed between buyers and sellers. It is limited in quantity and is very difficult to copy. Bitcoin is quite similar is many respects. It also doesn't have to be stored and corrupt governments cant easily steal it.
HN user
alpatters
I don't think the history of gold changes the argument here. As a store of capital gold has also been stolen by corrupt governments in history.
I don't know Scanner Darkly and I don't have the app. But I have done a lot of my own images using the same algorithm as that used in the app. And, yes, it can definitely render photos is anime or cartoon like styles.
On the waiting time point. I was putting together a similar service to yours (though you got there first). We managed to get our processing time down to under 50s for a 300x300 image. How do you cope with such long times? Or, how long is the waiting time?
"Practically, switching away from as many Google services as possible will help alleviate the most obvious issues like most of your personal data being in the hands of one company and the related issue of ads following you around the Internet."
Ads that follow you has absolutely nothing to do with Google services. These are retargeting companies using their cookies to track you. They use ad exchanges, so even that is not principally Google.
I'm surprised they do not reference GraphLab from Carnegie Mellon, http://graphlab.org/projects/index.html It's built for the same purpose and has been around for a number of years. The core is in C++ with python bindings. It has quite a few ready made applications built on top of it as well.
Well, the kernel does device, process and memory management and that is a likely culprit when looking into power usage.
You could use boost::range to make it even more succinct
So in no way did they copy Google's which is implemented in C++ ?
Though I agree with OP - these projects and Java are here to stay for the foreseeable future.
Stack allocation is irrelevant for most of what the application is doing.
Well I disagree with that. In C++ it is quite common for most objects to be allocated on the stack. I have never heard stack allocation being described as irrelevant. Of course if the language puts everything on the heap then that statement might be true.
"None of these libraries (or many others) have competing implementations written in other languages."
Except the ones they were written to copy. Each example you give is an open-sourced clone of an pre-existing version implemented in a different language.
C++ gives you the option to just put your objects on the stack and have them clean themselves up upon destruction. Enforcing the placement of small objects on the heap, even a garbage collected heap, seems such a waste of time and efficiency. You shouldn't really use the term "always" either. You have the option of implementing a garbage collector manually, or an object memory pool to remove the malloc/free new/delete overhead.
You're wrong. http://en.wikipedia.org/wiki/Profile-guided_optimization The method for C/C++ is just different to JIT. Compile program, collect profile information, optimize program guided by profile information.
You're a professional programmer, you use a keyboard all day, so you touch type right? hjkl sits right on the home row, where your fingers sit. It is just a natural place to put movement keys. Nothing to do with the number of keys on the authors keyboard.
Like you say when your jumping around a lot then it matters less. When you're typing a lot then it does matter to keep your fingers on the home row.
Well you have missed the point that they chose C over Pascal to implement Unix. I don't think that was by accident.
You could always let the compiler work it out for you.
template< typename Func > int escape(std::complex<double> c, int iter_max, Func& func)
> With C you can easily get better (that is, safer) than C++ native MM just building a reference counting system on top of your C "objects".
Why build your own when C++ has std::shared_ptr.
Avoiding its complexity does not mean avoiding it. E.g. you could avoid template metaprogramming due to its complexity whilst keeping to simpler areas of the language.
C++ is a large, multi-paradigm language. It gives you choices and one is free to abuse those choices. But having more options gives you more power to express.
I think with modern C++ style, boost and C++11 its "difficult-to-work-with" reputation is massively overstated. It is possible to write succinct code with good design and get massive performance benefits.
I often convert python code to C++ and you'd be surprised how often the difference in loc is not that much. Certainly no hassle to do so. Not that I'm suggesting that one always should.
Several boost libraries are inspired by python and C++11 features all help to write C++ code that is surprisingly similar to python, with a bit of extra type sepcification. If you think otherwise I'd suggest you're probably thinking of the C++ of the 90s - a more C with classes, and not modern C++.
I often find it useful to develop and prototype in python and convert to C++. Most often I'm doing this because my python simulations can take days and the C++ versions hours. Often I find it is not just the performance critical areas, but it is easy enough just to wholesale convert the lot.
Looking at the source, it looks like this lib uses boost:asio on non windows platforms.
I think the use of then() makes sense as this is an async call and not serial. So the function passed to then() is a completion handler, i.e. it is run when the call is complete.
So do this call, and then when its finsihed do this.
I like it.
I do wonder sometimes if google's own site would pass its site quality guidelines. Like duplicated content; the same content appearing on multiple pages, all pages should be linked from somewhere on the site or a site map, substantial original content.
I think it fails on all three of these, so in some sense it is anti-competitive to block other sites that fail these measures whilst it doesn't hold itself up to those same standards.
In the spirit of the article, boost range also has a reverse filter, so the following would return a reversed range similar to python's generator expression
using namespace boost::adaptors;
s | reversed
or reverse(s)The extra syntax is not there for nothing. It's adding type information. Thus allowing error checking or dispatching by type or optimisations at compile time. It is a cost in terms of syntax and readability but it's not for nothing.
So for correct programs the end result might be the same in terms of values. For buggy code and runtime speed that's not necessarily the case.
you might not like the syntax of this particular boost lib, but it bears no relation to macro abuse in C. For one it is strongly typed. Of course it is unreadable if you don't know C++ or boost range. But it is not more complex than a python map or filter with a lambda, if you don't know python.
I do both python and C++ in my job. They're both great at what they do IMO. Often, they are a good match for each other; several of the boost libs have been designed similarly to python equivalent. boost python also makes writing python extensions very easy.
For other reasons to write in C++ (or any static typed lang), I'd add type dispatching: calling different methods based on type. I also hate having a typo in a method name throwing at runtime.
I also often convert python implementations to C++, often using boost, usually for performance in one part of the code. You can quite often get the same implementation in a similar number of lines, especially since C++11 with boost.
presumably the result of the quake would have been the same if the scientists didn't give a reassuring message? And now they are in jail, if another quake strikes, the same will happen again. Surely it is better that scientists are at least trying to predict the quakes, even if they get it wrong sometimes?
Well, getting 1.7x speedup on a dual core box isn't so bad and makes some sense. Showing at least the context switching isn't crippling, if you can cope with the memory overhead.
Anthony William's book "C++ Concurrency in Action" gave me the impression that implementations of std::async would stop spawning new threads at some implementation defined limit based on harware concurrency levels. Instead, delay execution or switch to serial for extra tasks.
I think the best benchmark for this is to look at the industries where performance matters and see what they are using. Take high-frequency trading where lowest latency makes the most money. I don't see many using the JVM. AFAIK it's all assembly, C and C++. If they could use the JVM and have faster code, they would be doing so.
If Monsanto want their patent to cover future generations of seeds derived from a Monsanto seed. Would they also claim liability if one of those generations had a mutation that caused the plant to be toxic and kill people?