Recent submissions

Comment · 6 years ago
I don't know if you can really fix 'electricity in Africa', there are ~56ish countries depending on which you recognize, all with competing interests and governments. Some have reasonable electrical systems and no real motive to potentially lose that by tying into some larger grid. As a whole Africa has a lot of sunlight and potential for solar power, it also has a huge amount of coastline with the potential for offshore wind and tidal energy.

I would think the issue would be how large it is, and how many tiny settlements there are that are detached from the cities. It would take a lot of effort to build out electrical lines to all of them. And the people who have the least access are the least likely to be able to afford to pay enough for it to be worth it to a company.

Comment · 6 years ago
I like the idea of color coding the components as chunks. I think it might be even easier for a beginner to understand that way compared with syntax highlighting.
Comment · 6 years ago
Somewhat interestingly it can be applied to distributions as well.

This anecdote in the article, was also pretty interesting: > The form L = λW was first published by Philip M. Morse where he challenged readers to find a situation where the relationship did not hold.

Comment · 6 years ago
You can use https://www.wireshark.org to see HTTP traffic and MITM yourself for HTTPS(https://unit42.paloaltonetworks.com/wireshark-tutorial-decry...). That will only work for the data that you send to them yourself. You can't possibly see any data that they send to third parties that they send through their servers.
Comment · 6 years ago
Comment · 6 years ago
>"phat pointers"

I don't know if that is a typo given you normally call them "fat pointers", but they are "pretty hot and tempting".

Comment · 6 years ago
C2x is expected to gain the char8_t type and almost certainly will not gain any new string handling routines. In the year 2030 I am expecting to still see more rounds of posts comparing string libraries for C. With more than 4 decades of development, we still don't have a great solution to string handling in C.

Every library like this is incompatible and most make slightly odd choices like in this library ownership of the string is denoted by a bit in the info/size field. Not that that is a bad choice or anything, but it is one reason someone might decline to use it and decide to write their own.

The lack of namespacing in C doesn't help, this library chooses str_ as its prefix, which is a bit likely to collide with other libraries. It also makes it harder to try to write libraries that allow for the string library to be switched out.

Comment · 6 years ago
If you wanted to slice at an arbitrary point, then you would either have to lose some data in the original string, move or copy the original string to make space for the extra delimiter/null character, or have set up the string ahead of time to contain the delimiter in the desired position. If you are using strtok.
Comment · 6 years ago
I mean it never said you could continue to upload for a lifetime, just that you could store a lifetime of memories. The old photos don't count against your storage.
Comment · 6 years ago
I think part of the reason why pain is so often used as a proxy is that it is universal and it is often very visible. If there were another way for people to show effort aside from sweating, then it would probably be used less often.
Comment · 6 years ago
I don't think I have seen one, but if you can add some other delimiter yourself or modify the file that might help. You can always use a binary(non-line) based diff. I think cperciva's thesis was on one that became bsdiff.
Comment · 6 years ago
It would be nice if C++ could really settle on one single error handling system like this. I know the contracts proposals have been shot down several times, but those I think would help a lot. People will only really code defensively if there is a some gain. Having the compiler enforce and use contracts for optimization would be the only way to ensure adoption. If people thought they could get a 5% speed boost, they would annotate their code with more of their assumptions.
Comment · 6 years ago
Totally crazy that they didn't know where they were for 20 years and now call them stolen.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton