skysight-inc/HackerNews huggingface dataset:
RAII solves this. Allocate all you need in the constructor, tidy up in the destructor. So when the parent item gets cleaned up, the child items get cleaned up too (so lifetime is sorted for you, and ownership is done too as the parent that owns it is getting cleaned up). You will eventually only have one parent item but if you tidy everything up for that in its destructor, the lifetimes of everything is sorted.

If your acquisition of a resource fails or initialisation fails, throw an exception in the constructor.

C++11's threading support library in the STL should help your threaded problems.

If you need containers of items, put them into an STL container. Don't allocate them with new - write a move constructor for your item and it'll be moved. Or a copy constructor; follow the "rule of 5" if you have pointer-held items in your object (probably best not to), or "rule of 0" and let the compiler do it for you. std::move your items into the container.

Use const references if you want to let something else use it, ordinary references if you want them to modify it. Or if you must use naked pointers, put them in a unique_ptr so it gets cleaned up eventually (http://en.cppreference.com/w/cpp/memory/unique_ptr). Or shared_ptr in other areas (see Stroutrup 5.2.1 in C++ 4th edition).

If you need naked pointers, allocate them on the heap but wrap them in std::unique_ptr or have a vector of unique_ptr. If your objects are child items in a class hierarchy (e.g.. ChildClass : public BassClass) or the base class is an abstract class and you want to have a generic STL container (like std::vector<BaseClass* >) to store all base and child items in one neat place, you will have to use pointers (as you can't have std::vector<MyAbstractBaseClass> but you can have std::vector<MyAbstractBaseClass* >), you will need to take care in the containing object's destructor to clean up this container, eg. while(!vector.empty()) { delete vector.back(); vector.pop_back(); }

You shouldn't need reference counting. A read of Stroustrup's C++ Fourth Edition book and the "tour of C++" section toward the beginning will help you immensely.
How wonderful is that site...

https://18f.gsa.gov/2016/01/12/hacking-inclusion-by-customiz...

I can't tell what's more wrong here. The passive-aggressiveness of writing a bot to correct people, or the fact it's going on on a .gov.

(And before you scream at me for being a heartless sexist bastard or some such, this would be just as messed up if it were a bot that corrects your->you're. Passive aggressiveness certainly does not improve workplace health.)
I call this the "black boxes survive plane crashes, so why don't we make the whole plane out of that stuff?" argument.

The more code that goes into the box, the more opportunities there are for exploits. That's why it's important to put as little as possible in the box and make carefully defined interfaces to it.

iOS is supposedly cryptographically verified from the boot upwards, to inhibit jailbreaking of phones and people sneaking past the platform holder's tax, but it's not entirely hackproof. So it has an enclave within the enclave: an ARM TrustZone secure enclave running the sel4 formally verified microkernel.

Similarly hypervisor systems are trying to divide a system into segregated apps that can't interfere, but are vulnerable to (rare) hypervisor exploits.

It can't be crypto-turtles all the way down, there has to be a root of privilege. And there's always the hardware; have you seen how long the Intel errata list is?
Any good map solution for Android? I used Baidu Maps a bit but it was painful because I don't read Chinese. Everything else I tried (Bing Maps, Yahoo Maps) was terrible; searches couldn't find some of my hotels; directions couldn't give me subway instructions. I had to revert to using paper/PDF maps most of the time which was annoying.

"The OP is missing the point of the GFW"

Perhaps I did not explain myself well. What confuses me is why does the GFW goes to great lengths to very effectively block some VPN solutions (such as an SSH SOCKS tunnel), while it lets other VPNs operate (such as ExpressVPN). Or maybe this is a question I answered already at the end of the post: they can monitor ExpressVPN but not SSH, so they block the latter.

"Finally I find it a bit odd that someone so concerned with privacy uses so many Google Apps."

Simple: I am an ex-Google employee (Security & Privacy Engineering). I saw from the inside how serious and obsessed they are about privacy and protecting people's data, and this made me trust Google more than ever.
Didn't Alex Schultz, VP of Growth at Facebook, already say this...

https://www.youtube.com/watch?v=n_yHZ_vKjno&feature=youtu.be...
> My reasoning there is that those who want to use DRM are not going to accept any alternative that is not DRMd.

The way to deal with them is by not accepting them in return, and only using alternatives. Losing money bites, and they can quickly straighten their crooked ways out of fear for competition. That's the only method that works for curing DRM disease.
Nope. They're literally measuring two different things, return rates vs "would tell a friend" rates.

Whether those two happen to coincide is quite product-dependent. Finding examples where they significantly
diverge is trivial.
Awful example. People can't barely get by with those govt checks (at least in the US).
I can't stand brown-nosing...
Placebo only affects subjective outcomes. http://www.nejm.org/doi/full/10.1056/NEJMoa1103319#t=article...
I was a scientist until a few months ago (until I finished my PhD, essentially), so - believe me - I know the value of studies which "state the obvious", even when the conclusion seems "small" (which isn't the case, anyway).

My previous comment wasn't meant as a "no, duh", really. I'm sorry it came out that way. I'm highly favourable to studies which prove "common sense" (or disprove: those I live even better!). The comment was just to share my opinion: the fact that this kind of studied is shared (here, and in other media) highlights how dualism is still basically the common sense view.
I disagree. The passive aggressive nature of the post needed to be pointed out. It is at the heart of what is wrong with this post. This was not just another letter that "pretty much anyone signing the Dear Github letter would also feel comfortable signing" as the OP would now like you to believe, but a passive aggressive response to the constructive criticism of the original, as evidenced by its tone, timing, and context.
From the article:

"But hardly any founder, VC, or big tech employee was aware of the issue, even when they used or benefitted directly from these projects."

I just can't wrap my mind around this. As a former "big tech employee" and current founder I am constantly cognizant of the free software that shapes my working day and every solution I implement. From kernels and userspace tools to compilers and interpreters to IDEs and VCS to frameworks and protocols to online services and communication tools... it's nuts how much stuff we all use. I'm living on ramen now but one of my personal goals is to be successful enough to give back in a substantial way to these developers and projects that have been so instrumental to everything we're doing.

Do people really take all this for granted? Are we as a community not doing a good enough job of teaching/explaining it?
Not nearly as cool as OP's post, but I once created a 'game' with only CSS and HTML as well:

Street fighter rock paper scissors

http://codepen.io/Andygmb/full/EVbRqP/
It's worse in the US. It's essentially beer money.
Hopefully, Firefox Accounts[1] will have delegated authentication[2] available in time for users to do an automatic migration from persona.org before the shutdown.

[1] https://wiki.mozilla.org/Identity/Firefox_Accounts

[2] https://wiki.mozilla.org/Identity/Persona_Shutdown_Guideline...
I think the rules are quite different, or at least they used to be.

For instance as a French citizen if I find a job in Finland and want to move there, all I have to do is fill a EU form, and there I go. Finnish immigration is not allowed to throw me out of Finland, or deny me the right to work there, because it is my right as a European citizen to work wherever I want in the EU.

But, if I were to simply want to go live in Finland (without a job), I do think Finland is allowed to treat me as a perpetual tourist, that is to say not as a Finnish resident: no state benefits, etc. It might even be allowed to send me back to France, but I am not quite sure about it...
Normally higher income would spur housing construction (if the cost of construction is mostly in the cost of the labor/materials), but in areas where land is naturally or artificially scarce (through exclusionary zoning and arduous "process"), it's likely prices would just rise to compensate.
I may have been too generous. By an order of magnitude.

The US has 320 million people living in it. $1000/month * 320 million is $3.8 trillion/year.

That, weirdly enough, is the size of the entire US budget for 2016.

http://www.ndtv.com/world-news/us-republicans-pass-3-8-trill...
Your own link explains how easy it is to get different results even on the same hardware depending on compiler flags.
> This is taking the objective of taxes to an extreme: redistribution of resources from the wealthiest to the poorest.

You say that like it's a bad thing. Would you prefer to have poor people dying in the streets? The measure of civilization since the French Revolution has not been how a country treats its wealthy, but how it treats the poorest. As societies, we have agreed that humans have a right to life and happiness but for the most part we're still too much in love with the myth of merit to follow the consequences of this idea -- and it is certainly in the interest of the wealthy and powerful that this should continue. It flatters a man's self-love to believe that he has earned his place in life by his own sweat and toil, when the reality is that if divested of social relations and one's normal milieu very few of us would rise to any degree of prominence. We have slowly accepted the idea that hardship, debility, or infirmity should not necessarily be a judgement against a person's worth, but we are too infatuated with ourselves to believe it wholeheartedly. And so we grant a basic existence, but conditionally: only those who meet an arbitrary moral standard are permitted to live. Basic income recognizes that imposing that moral standard is itself immoral. If you agree that citizens have the right to not die in the streets, or at the least that it is unseemly for a wealthy society to permit such, then you cannot argue against a basic income with any degree of consistency.
Linkedin jobs has an Apply button, one-click. BOOM!

And it's currently still free to job-seekers, the service is covered by fees paid for by job posters. It does little to actually improve the the speed or quality of matching people to jobs.
The response to that, even, is pretty remarkable:

> I react badly to hypocrisy, a known weakness. You should be a maintainer for a week and decide for yourself :)

I'd say that's pattern matches as a humblebrag, except it's more of a... faux-humble pointed insult? "Apologizing" for tone and managing to call someone a hypocrite within so few words is... I struggle for words. Impressive? It leaves an impression.

Good for you for standing up.
18F is doing phenomenal work fixing government. I'll let the excessive PC-ness slide.

It's a bot. Ignore it.
Seems as though she undermines her whole point with the "Here’s what is true about the “open source is really well funded” myth" section.

The open source projects that people/businesses really care about are funded. Isn't a non-funded open source project just one an open source project that no one really cares about?

I think there is a really subtle line that she has missed by assuming all open source projects developers use are really important. There probably should be at least three categories: (1) really important projects (funded / managed), (2) projects that are not really that important (not funded / managed by community) and (3) those that are not important (not funded / not managed).
"Businesses would have to raise wages to above the living wage to attract people to what are currently lower-paid jobs – assuming that means they will have to pay living wage + 5%"

I could see the opposite happen. Assuming you also did away with minimum wages, people could engage in as much or as little casual employment as they wanted to, because they would have their basic income to cover essentials. Not unlike many US teenagers who pick up a summer job for spending money rather than for survival.
Except Microsoft and Apple are both in the business of making things and then selling them to people for more than they cost to make.
Medal is both HIPAA compliant and security-forward.

Medal works with one of the authors of HIPAA to ensure that we meet all current legislation and a security expert to ensure that we meet the highest standards of trusted data management. Furthermore, Medal goes above and beyond to create an environment of transparency (for example, we rewrite our releases in plain language).

Medal is based in San Francisco, but we perform installations nationwide.

If you would like to discuss an installation, please contact us at info@getmedal.com

You can learn more about our team, advisors, and represenation and our prior work here:

http://www.getmedal.com/team.html
http://www.getmedal.com/press.html

A few highlights of initiatives led & founded by Medal's team, legal representation, and advisors in the past:

Co-wrote Department of Health & Human Services National Interoperability Survey
http://www.goo.gl/K22VO3

Architected SHRINE, [Harvard Research Interchange, 70+ institutions, over 6 million patients]
http://journals.plos.org/plosone/article?id=10.1371/journal....

Co-wrote HIPAA
http://s3.gi.org/nataffairs/hipaa.pdf

Worked with Microsoft to repair a critical flaw in DNS
http://www.wired.com/2008/07/kaminsky-on-how/

Founded Open.Med
https://open.med.harvard.edu/
The majority of Norway's sovereign wealth is derived from oil exports, it does not scale with population.
Here's my biggest question posed yet again, because the paper does not provide an answer to it: The analysis requires that all mutable references be statically proven to not alias on function entry. So how do you call a function foo(T& a, T& b) as foo(x, y) where x and y are instances of shared_ptr<T>? (The problem persists even if a and b are of different types, because a might own b or vice versa.)

This is not a contrived example. It is precisely what kept hitting us in Rust with things like @mut and we took years to figure out the best solution (RefCell/Mutex). It comes up all the time because you can't get away from RC--large programs use reference counting a lot, and even if they don't one of the major use cases of systems languages is to interoperate with GC'd or RC'd systems (dynamic languages, COM, Core Foundation) where you don't statically know anything about aliasing. Forbidding these calls statically bifurcates functions into "those callable on shared_ptr" and "those callable on owned or stack-local objects", which is unusable in practice. The only solution we found is dynamic enforcement of the aliasing rules, scoped to reference counted pointers. This indeed works, but it requires overhead. You want this overhead to be opt-in in a low-level systems language, but existing code was not written to opt into this. So C++ will need to backwards incompatibly introduce RefCell/Mutex to support this.

The bottom line is that I see a dilemma. Either C++ makes it impossible to use shared_ptr with mutable references, severely damaging usability, or it breaks backwards compatibility by making shared_ptr immutable and requiring dynamic enforcement of the borrow rules for mutable shared_ptr. Either option has huge consequences for existing C++ code.
We were discussing income taxes; and income taxes existed before the 16th as well, based on other tax clauses until the courts ruled the direct taxes and thus unconstitutional. You're correct about the general welfare clause as the basis for most taxes, but it's not the basis for income taxes which is what "taxes" mean generally when people are discussing taxes.
The concept you are looking for is that of residency: because you are physically in a country doesn't mean you are a resident of that country. There are rules of residency even within the EU.
“I Plan to Be a Great Mathematician”: NFL Offensive Lineman Shows He’s One of Us [pdf]
I'm from Finland and the only place I keep hearing about this "plan" is from foreign media. Its just a experimental study. I'd be surprised if anything came out of it. Finland is not some utopia where magical things happen. We are in a long recession and the govt is cutting social benefits left and right. This thing is a fantasy only foreign media takes seriously.
AMSIX down
Starbucks / coffee house is nice when unprepared or meeting people.

The best Coffee is always made by yourself.

Coffee on the Go:
http://www.amazon.com/gp/search/ref=as_li_qf_sp_sr_tl?ie=UTF... src="https://ir-na.amazon-adsystem.com/e/ir?t=stratoptio09-20&l=u...

Coffee at home:
http://www.amazon.com/gp/search/ref=as_li_qf_sp_sr_tl?ie=UTF...
Where did Sam say that startups are "better." He might personally find them more interesting to work on and better suited to his skills, but that doesn't mean they are in general superior.

I wouldn't advise my mom to quit her business to make a "startup."
>> There should already be a not-so-huge wave of accomplishment coming from all these people. Not to belittle them and their abilities, but there isn't.

Two thoughts here:
1) What specifically do you mean by "wave of accomplishment"? How should that be measured?

2) You will need to cite some proof of this assertion. I can think of many anecdotes of successful people (J.K. Rowling, for instance) who achieved success while on welfare.

>>Modern Western societies are rich enough that smart, motivated individuals can mostly rise to the level of their own ability.

Not sure this true, but I'd like to see any data you have on this point as well. As it stands, social and economic mobility is limited by birth, see http://www.pewtrusts.org/en/research-and-analysis/reports/20...
Lots of comments and everyone is debating based on their intuition. Basic income is a fascinating idea, but it seems like advocates would love to see a huge place like the USA commit and pile in, when a small trial run would be much more sensible.

Finland would be a fantastic place to trial basic income. It's a rich sovereign nation with a population of under 6 million, a GDP of less than a quarter of a $trillion, and close cultural ties with lots of other rich countries. If basic income were the worst thing to ever happen and people were dying in the streets, friendly neighbours could bail the country out. And if all went well, it could be a nice template for larger countries to safely try. Ideally other countries where the idea has support should offer Finland a guarantee of support-if-needed in return for going first.
It is very common to send $0 invoices. Some instances I can think of are receiving replacement goods / tracking if a service was rendered but not billable / making sure an account is zero'ed and you are fully paid up / etc
The debate is very complex, with many people discussing orthogonal issues.

Some are the cypherpunks that want security at all costs. They see Bitcoin as a failure unless just about anyone can operate the network. They already see mining as a failure because it's too centralized, and are staunchly opposed to anything that might increase that centralization.

Ironically, I think increasing the block size would provide advantages to miners outside of the China firewall, which may have the effect of decentralizing mining a little. That's a very simple take on it, though, and only one of many factors.

Interestingly, many who hold this view argue that changes can only be made to the network through strict consensus, ultimately relying on very centralized development.

Others see Bitcoin as a currency that should be used at the consumer level, like cash. They want a network that grows and is predictable for investors. The possibility of expensive transactions is dangerous to business models and will stall adoption.

There are some focused on the technology, and what can be built on top of bitcoin. Recognizing the network effect (more users, more value), they see using Bitcoin as a settlement layer for the various implementations on top of that. Some of these require some changes to the Bitcoin protocol, and there's much controversy in what is permissible. Lightning Network, side chains, etc. could all operate at different frequencies of Bitcoin settlement transactions. Other services would like to store information on the blockchain, using a small transaction fee to pay for immutable information storage. This could be used for contracts of all sorts. Some would see this is spam on the network, and others a huge innovation and source of value.

Some will look to the early development for guidance. Satoshi wrote a lot about how the network might evolve, and it's quite clear that he thought network capacity would improve with technology. Basically, some use the argument that the 1MB limit was a stopgap, temporary limit that has passed its usefulness. The 'Bitcoin people signed up for' is one with a growing block size.

You can add to that concerns about many of the core developers working at Blockstream, so might have perverse incentives to cripple Bitcoin to generate demand for their products.

It's ... a little complex.
This does not explain things like openssl that are important to just about every app but still horribly underfunded.
> I'm cautiously enthusiastic about basic income. I want to believe that it really can change everything, until that nagging doubt of "but human nature just doesn't work that way!" inevitably kills the buzz.

I'm the same way. I'm excited that we as a species are testing it out, but I'm also glad that it's not my direct economy it's being tested on. I really hope it's successful, and I think it can be, but it's also quite risky.
I can see a lot of cases where you have a $0 legitimate transaction.
it's cash, when you buy something with cash you don't get to take it back after you get home

Well, sometimes you do, consumer protection law guarantees that if it's defective or not as described.

It's hard to sell things online when you have to deal with card fraud and charge backs

How widespread is this, quantitively?

people use cash every day without any fraud protection

Yes - in face to face transactions where you can inspect beforehand and complain afterwards. And people are advised not to send cash through the mail because - guess what - it'll get stolen.

The credit card and a bunch of related non-cash systems like traveller's cheques were invented because travelling with or doing large cash transactions is a risky hassle.
Could an economist weigh in on this?

Naively, this seems ridiculously expensive to me. If you wanted to eradicate poverty with this policy, say pay everyone 60% of the mean income, that means the gov't will need to raise taxes by some amount X, in order to provide a corresponding 10% of mean earnings to every member of the population. If you do the quick math for a 5% value of X that would mean an increase in taxes of 30% (on top of the already existing education, national security, health care taxes), so taxes could easily approach 60% or more, unless it is feasible to have a very small value for X mapping onto 10% mean income increase...

Anyway, I'm not an economist and would very much like to hear what one has to say about this idea, because it does seem to good to be true.