skysight-inc/HackerNews huggingface dataset:
> (0) Forward declarations are the only way not to explicitly reveal the representation of types, but you have to pay an indirection tax for it, whether you actually need indirection or don't.

If you don't want the indirection, you need to declare at least size and alignment requirements. So why not go ahead and just do that.

struct typename {
uchar xxx[THE_SIZE];
} __attribute__((aligned($your_alignment)));

If your compiler doesn't support such alignment specification, there are ways to work around that.

> (2) Again, without heavily abusing the preprocessor, there is no way to make common algorithms work on abstract data types that have a common interface.

There are. Look at any bigger C project to discover them. A common approach is the use of "ops" structures containing function pointers that are filled depending on the type in use.

Yes, doing all of this manually tends to be more cumbersome than it might be using other more modern languages. Just as manual memory management tends to be more painful than working in a proper garbage-collected environment.

If you still pick C for writing your program, you probably don't mind it or have some other reason for sticking with C.
Stop treating all student loans as equal. A loan to study humanities should have a higher interest rate than a loan to study mechanical engineering or become a doctor.

Charge rates based on the expected future cash flows, taking into account unemployment rates by degree, and kids will sort themselves out by choosing a field of study in-line with their risk appetite.
That if you keep winning they restrict your account.

> They kept this up for five months, placing $50 bets around 30 times a week. And they were winning. After five months the team had made a profit of $957.50 -- a return of 8.5 per cent. But their streak was cut short. Following a series of several small wins, the trio were surprised to find that their accounts had been limited, restricting how much they could bet to as little as $1.25.
Specific ARM boards might very well be easier, in that a lot of them are clean slate designs, so you're not dragging along nearly 40 years of PC history. But ARM CPU's themselves is plagued by the fact that OEMs can put pretty much whatever they want in there, so there is a proliferation of really weird beasts.
The US has been amending the constitution about once every generation or so the last amendment was in 1992.
Of course you CAN impact the world on $10k.

But the Gates Foundation doesn't run on $10k. You can found zero biotech companies on $10k. Money, alas, has value, believe it or not.
Just like the rake or the edge the house advantage of making the rules has always been the reality of betting. Online or offline. Forever. Get too successful and you’re no longer invited to bet.

Asymmetry of information has never been the bookmaker’s most powerful weapon. The book is.

Those who are successful at it accept this reality. They grumble and make peace with it - paying the super taxes and liquidising markets where they’re asked to.

Ultimately however, while it’s interesting to see how they do some of this (and there are plenty of practices not covered in the paper, I assure you) it’s a bit like complaining the DM won’t let you do something in dungeons and dragons - you’re dicing with the god of your domain so the rules can change at any minute.
We Know SUV Design Kills Pedestrians, But We Still Let Carmakers Sell Them

https://usa.streetsblog.org/2017/10/19/we-know-suv-design-ki...
There was a zero-day for Flash being exploited ITW just a few days ago.
Not only it is a bit annoying way to present the data, it tries to hide bs interpretations in it.

For instance, when Trump said that when he is going to reduce the taxes, jobs would come roaring back in. To prove how this wouldn't happen, pedal.tech tries to study the amount of growth, companies who currently pay less than 20% tax, showed. But that's a ridiculous way to see the merit of that argument.

Imagine if a teacher said, "I am going to reduce the amount of time people currently spend in doing homework from 3 hours to 2 hours. This will result in more well-round development of students as they will have more time to do other things.

Now of course not all students spend 3 hours doing homework, some spend more than 3 hrs, some 2 hrs, some no time at all. So according to pedal.tech, we need to look at any student who is spending only 2 hours and see what rounded development they are having, but that does not tell you what the students who spend 3 hours would do in their extra time, or what the students who only spend 2 hours would do (since now they are able to finish their homework).
Well, the Gates Foundation is funded by a monopoly that intentionally restricted competition and progress in the computing industry for at least a decade, so maybe there's a better way of obtaining it.
I had nightmares about this during the project. I am not even joking.
> Considering that many essential nutrients are provided by plants

None that I can think of that are proven "essential" in the absence of all carbs. "Phytonutrients" aren't proven essential. Vitamin C ("ascorbic acid") is 100% inessential & optional in the presence of plenty of the (actually essential) ascorbic molecules that are all furnished by fresh meat, including carnitine, creatine etc.

For homo sapiens, there is no essential carbohydrate and no essential plant food. Something to chew on!
...and it's worth noting that the VAT is very susceptible to judgement calls and therefore lobbying by special interests and weird edge cases where canned tomatoes get one tax rate and fresh ones another.
How do you know you havevsome intelligence? Youcan only explain a small part how it works. Ditto only replicate a few intelligent activites.
One use I like is having the lamp come on gradually about 20 minutes before my alarm in the morning.
3rd parameter is the modulus : power(a,b,c) = a^b % c
"Rigged" is the wrong word. What it essentially says is that all of the data that a professional could reasonably analyze is already baked into the odds that bookies initially set, and if those odds stayed the same until bets were no longer being taken on the event, sports betting would be consistently unprofitable because of the 10% "juice" that most bookmakers charge. However, the odds do not stay the same. Once they are posted and bets begin to come in, the market takes hold and begins swaying the odds one way or another, because bookies change the odds in order to try to balance their books such that they have little to no actual risk. It is in the swinging of the odds by the market, which has many unsophisticated participants - people betting on a team simply because they live in that city etc. - where money can be made, because there is an incredibly large amount of "dumb money" in the sports betting market.
Well. If people start to invest into public Infrastructure and Busses, Trams, trains. The quality will increase and more people will use it. The same thing with dedicated bike lanes. Not for every scenario. But it helps the people. The low and middle class and that is the best we can do. Help those who don't have the money.
I can't really wonder what it'd be like to have access to this stuff - I'm 17 myself, and am from a moderately wealthy family in the Bay Area so have had exposure to technology basically my whole life. I definitely think the culture of the area and growing up with a computer in my room contributed to my passion for tech.
> I guess technically you are right, even meat has some carbs in it because muscles hold some glycogen

Near-zero because muscle glycogen is used up upon death in a process called "rigor mortis" (not the case for liver glycogen however AFAIK). The fatty marbling luckily remains.
As I always say. The S in IOT stands for security.
Do you have a better reference, or can you indicate which portions are outdated? This is an interesting topic.
I lived in Belgium for almost eight years. I tried to learn French, many times over. But it is a language that goes in one ear and out the other for me.

However, in those nearly eight years, my wife and I visited Italy at least three or four times, for a total of maybe three weeks.

I swear to $DEITY that I learned and used more Italian in those three weeks than I did French for the entire time I lived in Belgium.

For me, there are just some languages that are harder than others, and are unlikely to ever stick. But maybe that’s just me.
>In that sense, a calorie is a calorie.

This has been thoroughly disproven for ages -- starting with the naive assumption that you can just eat X amounts of anything and it doesn't affect anything else in your health/apetite/metabolism.
Write up some smart contracts to keep your cryptocurrencies in the most vogue coin.
This would strongly encourage vertical integration. If a grocery store owns the dairy and the creamery, they can sell their cheese for significantly less than a grocery store that incurs tax when it buys cheese from the creamery that incurs tax when it buys milk from the dairy.
You can do an a1c test at home or in the doctor to identify chronically elevated glucose (prediabetes). It's insensitive to time of day or fasting status you can just take it every few years or so at your convenience.

Continuous blood sugar monitoring is probably overkill given how easy and cheap a1c tests are now.

Blood pressure, on the other hand, is still a nightmare. A good way of reliably and simply measuring resting blood pressure would be a game-changer.
The best equivalent to the let's verb conjugation in Japanese is adding 吧 to the end of sentences.
I could not follow why 「支」己 is to be translated as "Pay Pal".

不明白為什麼，把「『支』己」翻譯成「Pay Pal」。
Do you need to break your leg to know that would be painful?

Do you need to be a billionaire to have an opinion on billionaires or be aware of human behavior? Really rich people aren't a new thing.

What's inherently valuable about being a billionaire? What values and standards does the end goal of being a billionaire tend to produce in people?
Average CAC in terms of dollars depends entirely on your industry/product. A good number is all relative.
I had a lot of challenges running home-assistant. Wouldnt find devices properly, issues with devices falling out of the zwave network. Would constantly have to "re-sync".

I went and spent the money on HomeSeer and it has been so much better. Tons of great plugins that just work like MQ for the garage, IFTTT, etc. Has schedules, adhoc scripting integeration so you can run your own shell scripts on events, multi-event groups, a decent UI, logging and strong device support.

Its strangely written in VB but from a device support standpoint has been extremely solid and finding any device i throw at it quite easily.
Cuts both ways: Considering how non-US police operate, often without being armed, and trained to deescalate tense situations, and the outcomes they produce, it seems as likely if not more likely that disarming many US police would result is fewer dead cops and fewer dead people in general.
And if you are paranoid, don't wait for proper shutdown, but pull the power plug. Don't bother with the network plug, pull the power plug right away. Some powners don't like interrupts and have a nice easter egg in the shutdown or network down procedure, e.g. erasing stuff you might not have backupped (which, I am sure, you have, right?).
HN's design is utilitarian. 100% business. 0% party.

I LOVE HN's design.
So like an hyperloglog ?
Adobe is training AI to be a better photo and video editor
The word is “barter”, not “barttar”.

Now, maybe you want to use a particular spelling of the word for your website, that’s fine. But don’t lie to your potential customers about the word or it’s proper spelling.
Perhaps you removed bread?
I am not sure capturing variables by reference implements the expected behavior; what would the equivalent C++ code return for this Go example?

func a() {
i := 0
defer fmt.Println(i)
i++
return
}
'in python'

No one is ever going to even think of implementing a ray tracer in Python for anything more than fun or education.
How toxic is your car exhaust? It's not easy to find out
https://github.com/tianocore/tianocore.github.io/wiki/Gettin...

Also, see the "Resources" section of this:
https://github.com/tianocore/edk2

Every computer coming out these days should be on EDKII based UEFI Firmware
It is a study of 14 people that self reported how hungry they were and how much they ate on their own. I don't think we can get to advice stating "most people" should do anything from that. It is an example of how bad science gets translated to bad advice and bad behavior. Not picking on you, you are responding rationally to a headline or blurb about the study. But it is a worthless study.
My Kuna security cameras turn lights on at night and off at sun-up. My Nest already has presence detection and adjusts temps based on that.

More importantly, I didn't buy a Kuna for lights on and off with the sun, nor a Nest for presence detection, so I still don't see these functions as killer apps for HA.
Your comment only had one takeaway for me: len('M(ySQL|ariaDB)') > len('MySQL/MariaDB')
I think the answer to your question relates to the ability of the billionaire to do what he wants on his terms.

You have to ask yourself what are the implicating consequences of this kind of concentrated influence?

So I think in terms of consequentialism, you need to look bigger. Should the billionaire be further rewarded for philanthropic actions? What else would he have done with the money without those rewards? How do the rewards to big donors affect the donations and volunteering of smaller participators? What was the long lasting consequence of the big donation which awarded rewards to a big donor?

The answer to that is complicated, but could change the consequence of the system, so are relevent to a consequentialist perspective.

Of most noteworthy to me, I think is the idea that a single entity can have so much concentrated wealth in the first place, where we now need to put motivations in place for them to give it away. Why award so much wealth to that entity to begin with? What consequences does this has on the moral objective you're looking to get as a consequence of our system?

And so, if you believe having billionaires generates overall bad consequences, then you'll want to demotivate people to become one, thus you might start by shaming them for their wealth, by conveying to their ego that they are not special, loved or admired for those traits, and that their big donations is frowned upon, that we'd rather they just volunteered their time, because no one cares to know how much they were able to donate.

But, if you frame the problem in the small, and don't explore alternatives, or quesrion the consequences of the given frame, ya, a billionaire which gives hundreds of million to charity in exchange for a thousand of dollar statue is an all around good deal for the charity in terms of consequentialism.
Silicon Valley Mockumentary ‘Bubbleproof’
No, rigged is exactly the right word. From the paper:

> Our strategy proved profitable in a
10-year historical simulation using closing odds, a 6-month historical simulation using minute to
minute odds,

> and a 5-month period during which we staked real money with the bookmakers.

>

> Our results demonstrate that the football betting market is inefficient ‒ bookmakers can be
consistently beaten across thousands of games in both simulated environments and real-life
betting.

> We provide a detailed description of our betting experience to illustrate how the sports
gambling industry compensates these market inefficiencies with discriminatory practices against
successful​ ​clients.
As tech companies get richer, is it 'game over' for startups?
"Send enquires about this paper to our newly acquired private island in the Bahamas." :-)

One of the most depressing things I realized when I learned to count cards, and confer upon myself a small but meaningful advantage in the game of Blackjack, was that the casinos simply ask you to leave if you win too much. That put an upper limit on the rate at which one could win. The folks who figure out slot machines have a much better time of it because it takes longer for the casinos to figure out they are losing money.
Honey is made of sugar...
That's cool, I like that one, except the sun does that for me in my case. But if I needed to wake up earlier than the sun, I could see that being useful.
You are getting lost in semantics, because if you are saying:

there are calories ("sugars") which make it much easier to gain weight.

Then a calorie isn't a calorie.
The Alternative-Science Respectability Checklist
Wouldn't this work by reference? The referenced value would be the same in both contexts.

Honestly, am I missing something?
Link to the article, published in Nature, so we can judge it on its merits rather than via the NYT summary: https://www.nature.com/articles/s41467-017-00957-y

Either way awesome NYT article title.
Maybe the monorail plan will come back.[1]

[1] https://en.wikipedia.org/wiki/Seattle_Monorail_Project
I know we like to one up each other on HN, but you're just talking past the main point.

Calories matter. If you eat too many, you get fat. Some calories might be "better" than others, but they are a standard of unit of energy for a reason. A calorie is a calorie.

Would you like to try the butter diet? I can guarantee you you'll get fat.
Also, pull requests weren't "invented" by Github. Popularized, yes, but not invented.
This seems unnecessary and possibly even harmful.

In C++ the destructor handles this as part of the lifespan of the object. Making users of the object encapsulating the resource handle resource cleanup is an antipattern, which is why the standard library does this for you.
Log-structured file systems work by treating disk space as circular log. They only append and then wrap around. Snapshots are natural consequence.
I recently requested a copy of a cancelled check for proof of payment and they sent me a full color pdf of that check.
Medication is thruroughly tested and there are plenty of good painkillers that aren't as addictive. Many are synthetic of course, and still have known side effects.

The evil here isn't that the drug is addictive but that doctors and pharmaceutical companies prescribe it despite the known side effects. It's almost unheard of outside the US.
I cut out carbs (<20g per day) and am down 50lb in <1 year. YMMV, but keto worked for me.
If GS taught the same without claiming to be the son of god, then yes.
Sounds like being jettisoned into space orbit after death is right for you!
Nobody is in the business of giving money away.

So the bookmaker put controls on how and how much you can bet. There’s a reason why this stuff was illegal for a long time — gambling is always a vicious cycle for the player.
Remote computing setup with jupyter notebooks using your own server
It seems that this might be for only limited cases. I'm not that familiar with Go, but I suspect that due to coroutines, the deferral may not execute for quite some time, while in C++ this could be limited to the single-threaded flow of the calling method (unless you manually move the scoped object out of the call). To match Go's behavior, you would need to attach the object lifetime to whatever future/asynch mechanism you were using. One very nice implementation (if heavyweight) is Seastar's then chaining: http://docs.seastar-project.org/master/md_doc_tutorial.html
Why the Seattle Mystery Bookshop Must Close
As people say, once you turn to REs to solve a problem, you have two problems :)
I suppose it might differ per country.

Here in The Netherlands you can insure yourself for a lot of things. Life insurance is one of the insurances to consider; it is generally good idea. If you start with it from your youth you pay less per year than if you start paying on from say your mid 30s.

Its also interesting how the elder go to retirement homes here, while in the USA it is normal to have your (grand)parents live with you if they're old age. Basically unheard of here in NL.
I agree. For example, the consequence of the Koch brother’s philathropy is the normalization of their radical (belligerently anti-democratic) political agenda.
related :) http://purrprogramming.com/
now do a Tensorflow version!
That's true. I'm talking about that moment (or period of time) while your body is no longer your own and it's "transitioning" to death. That experience that a person has I am thinking could possibly be the most diverse of all experiences among living creatures. I wonder how could your DNA know how to alter that part of your life experience? And how could any of us really compare and contrast to know whether that is or isn't true, and / or select our partner according to how past relatives experienced death? There are "near death experiences", but how similar is their experience to the actual experience of dying?
Pretty cool.

I first learned about truncatable primes from Project Euler problem 37: "Find the sum of the only eleven primes that are both truncatable from left to right and right to left."

https://projecteuler.net/problem=37

(I have some rust code that solves this problem in ~300 microseconds on my laptop. I bet it's possible to get it faster though. Anyone want to try?)
Quick feedback:

Use at least C++11 and the thread and mutex types in the standard library become available. Of if you must use C++03, use boost for these. There's not a good reason to reinvent those wheels.

Importing names (`using std::vector`, etc.) at the global scope in a header is not a great idea. You likely won't get burned by it as a library author, but the people wanting to use your library will, eventually.

I like the simplicity of approach for the http_request and http_response types. Many libraries try to provide type safety (i.e., a way to define a UserLoginRequest), but this is best left to a higher level library, in my opinion.

Don't name your enums WITH_ALL_CAPS. Those sorts of names often get smashed by the preprocessor. Given enough use, your library will eventually have a name collision there. I prefer using 'enum class' enums from C++11 and normal variable names. The enum class syntax forces the name to be scoped, so you don't have to worry about ambiguity or name collisions (provided you don't use YELLING_CASE_NAMES). If you must use all caps for some reason, prefix with your almost-certainly-unique namespace, so something like RESTD_HTTP_STATUS_OK.
The home IoT world is broken - I got lots of devices (Sonos, Hue, Alexa, Roku, ...) and they don't play well with each other.

Shoutout for data and API integration layer for Home IoT.
I disagree. Google is much more "humanistic" today than it was years ago when they had a more "bare bone" design approach.
I strongly agree. We many never see a machine that can fool humans into think that machine is also human, but then again why do we actually want that? Just for novelty?

We look at a dolphin and we can say "that is an independently intelligent animal" that we can't really do much with. We look at a dog and say "that is a useful, trainable, intelligent animal" that we as humans couldn't have survived without during parts of the history of our species. A dolphin is far smarter, but it doesn't matter because there's only one intelligent animal we couldn't have lived without, and it's actually pretty dumb compared to a dolphin.

The question is, do we want an AI that is smart by itself, or do we want an AI that is smart and useful to us? Those don't have to be the same thing, as evidenced by the dolphin vs the dog.

Humans are really, really good at producing very efficient machines with strong intellect, we do it by accident all the time. We don't need more humans, humans are flawed and humans have a lot of undesirable traits to go along with the intelligence. Strong, general AI will be its own species, with its own unique way of thinking and its own quirks. Trying to replicate humans exactly is futile and worthless.

We want a machine that can learn and do useful stuff. We don't need a human made of silicon for that. We need a mechanical dog.
Go prints 0:

https://play.golang.org/p/kdi60DOln-