'It's a crisis': Facebook kitchen staff work multiple jobs to get by - <AUTHOR> https://www.theguardian.com/us-news/2019/jul/22/facebook-cafeteria-workers-protest <comment><USER3> Increasing wages will not help as they will be captured by rising rents. I hate to get all Georgist here, but landowners are not creating economic value. In fact, by supporting zoning laws they are vastly worse than landowners historically. They are leaching off the productivity of the city. The moustache-twirling villains are not the business owners nor even the corporations, it is the land owners who created nothing yet receive most the value these workers generate. Just because this is a tyranny of a majority who owns, this does not make their yoke any less evil.

From a policy perspective, I like federal land-value taxes that tax based on the counterfactual value of the land absent zoning restrictions, which would internalize the costs of zoning on landowners.

But almost no common law jurisdiction has escaped the zoning-law trap, save for Texas. So I don't see it getting better any time soon.

<comment><USER4> Increasing wages obviously would help. The other workers at Facebook (i.e., these people's coworkers) who make six figures are able to live comfortably.

I agree with you that our economic model for housing and land ownership needs to change though.

<comment><USER5> It might help short term, but I don't think its obvious it would work long term. The idea is that it wouldn't solve the structural problem.

The structural problem is that nothing prevents landowners from charging whatever the market will tolerate and so sucking all plausible value out of the people paying the rents -- even to the degree that renters are forced to work so much they do nothing else and should expect a shorter life. Since there's no structural impediment to doing so, if you pay the renters more, the landowners will take the value...at least eventually.

<comment><USER6> But it's supply and demand at work. Limit rents, and people will have to queue for housing.

<comment><USER5> Markets are a brilliant tool. We have to decide on the society we want, and use markets to shape it. Very few scenarios that make any sense would allow markets to function w/o purposeful shape.

I think managing a queue might be a better way to preserve everyone's dignity than letting raw market forces work it out. Either that or I think you'll end up paying engineers to make $50 sandwiches, which doesn't seem like it would generate maximal economic value for the parties involved.

</comment></comment></comment></comment></comment><comment><USER7> Many restaurant owners in the bay area are annoyed at Google and Facebook, because they keep on hiring away their line cooks and other staff with higher pay and better benefits.

I suppose this article is on the front page because it bashes tech companies though.

<comment><AUTHOR> So what you're saying basically is -- because (some of) the restaurant industry pays even worse than tech --

That the tech industry's pay levels are, ergo, no problem at all?

<comment><USER8> The parent is saying that if you're going to fight for labor you should probably start with the local restaurants, because they're the biggest problem. If that doesn't fit the "stick it to the big corp" thing then I guess things might be more complicated than that.

<comment><AUTHOR> Another way of looking at the issue is - we can also make a lot of progress if we set certain standards for those companies that are clearly able to pay more.

<comment><USER9> Or simple cut out the benefit altogether, which will depress the wage below what it is now plus increase unemployment.

</comment></comment></comment></comment></comment><comment><USER10> The bay area Housing situation is hopelessly screwed up. There's no way in we're going to be able to undo 50 years of political insanity and build enough housing for everyone in just a few years. It's time we accept that hiring in the bay area is no longer feasible. Right now, this isn't Facebook's problem. As long as there's still desperate people to hire, then they'll always be able to hire more.

We (the people that work for these companies and the voters within the city) need to take a stand, and start lobbying these companies to get out of the bay area. Or at the very least, we need to start asking for much higher salaries. 600k to 800k needs to be the norm to live in palo alto to afford an average house (2.5M - 3.5M).

Personally, I don't think people are going to be able to do it. There's such a vast oversupply of labor, that the employers have a much stronger bargaining position.

There's still many other cities with plenty of tech people to hire. i don't see why all tech companies have to be in the 1 place where local voters don't want any residential growth.

<comment><USER11> Employment has inelastic demand, people will work for anything to survive because they have to. It's that or get your way into disability, which an increasing number of people do.

</comment></comment><comment><USER12> I hope these people manage to get better pay. I hope the same thing happens all across the Bay Area in all service jobs, and I hope the pressure trickles up until the tech employees feel the squeeze of $25 burritos, plus even worse rents as the people making their lunches can afford to live in the city and compete for housing. Then I hope people either stop accepting tech jobs in the Bay Area, or companies decide it's a losing proposition to set up shop in a place where you have to pay $250k a year to a new grad.

We've got better communications and networks than any time in history. Why do software companies, which consume no raw materials and produce no physical product (both good reasons for setting up in a port city), all need to cluster in half a dozen spots? Think how much more runway you could get out of your seed funding if you set up shop in Missoula or Albuquerque, where you can rent a whole house for $1500/mo, can hire from the local university, and have beautiful outdoor recreation within a 15 minute drive?

<comment><USER11> I would be cool to see YC try remote cohorts or build a cohort in a cheaper location.

<comment><USER9> They've tried and found it very unsuccessful, unless they buil the entire batch-infrastructure.

But companies will definitely start opening more and more satelite offices everywhere. The same salary for the same company in SF or Seattle yields 2-3k a month more for a software employee, and housing costs 1/2\. Eventually the table turns and then SF won't be able to do anything about it.

</comment></comment></comment><comment><USER13> The answer of course is to distribute. Silicon Valley has an echochamber problem already, maybe it's time for these companies to spread out/move their HQs across the US. There's plenty of room.

What's so special about the bay area? Surely if FAANG move somewhere else their employees will follow.

<comment><USER14> Toyota moved their headquarters from LA to Dallas a couple years ago, and they retained 2/3's of their HQ employees in the move. FAANG isn't exactly the same but it's the closest example I could find of a recent large scale move from California.

If there is a point where the tech industry starts to grow less and be more stable, you'll probably see some companies trying to make the move. But right now it'd be too disruptive to potentially lose 1/3 of your HQ employees in a move and screw up any growth plans you had.

</comment></comment><comment><USER15> I have a huge amount of sympathy for these people. Clearly something is going wrong and they shouldn't be the ones dealing with it. That said...

> "When a company is trying to pay you the same rate that they pay in other > cities, we can't accept that." [said a line cook]

If it works for other cities, the problem clearly isn't the rate of pay. The problem is probably local politics of housing. Demands like that are not completely reasonable.

<comment><USER16> > If it works for other cities, the problem clearly isn't the rate of pay.

Ok. So if they earned 5 dollars a day, it would be ok because it works for cities in third world countries? I think it's obvious that the local cost of living is always a relevant factor in pay.

<comment><USER15> The US has a federal minimum wage of $7.25/hr. This isn't a comparison with the 3rd world, this is a comparison with civilised, livable and comfortable lifestyles in other US cities.

It is obvious that the cost of living is a relevant factor. The question is why are the costs of living higher in California than elsewhere? It isn't because rich people exist. It is because California doesn't have enough houses for the marginal house-hunter.

Paying the marginal buyer more isn't going to create more houses. If there wasn't a place for them to rent before, there still won't be when you pay them more. If it were possible to create more houses, the current prices would already be making it happen.

<comment><USER16> You've moved the goal posts a bit, but regardless:

> The US has a federal minimum wage of $7.25/hr. This isn't a comparison with > the 3rd world, this is a comparison with civilised, livable and comfortable > lifestyles in other US cities.

There is no where in this country where $7.25 is a liveable, comfortable wage. It is the lowest amount legally allowed. And very few work for that wage - <USER2> very few of them are independent adults. See [1]. Nowhere in the United States can a minimum wage worker (or even close to it) affording the average 2 br apartment (say, if they had kids); and there are only a few places in the country where someone working 40 hrs / week on minimum wage can afford a 1 br apartment [2].

> It is obvious that the cost of living is a relevant factor. The question is > why are the costs of living higher in California than elsewhere? It isn't > because rich people exist. It is because California doesn't have enough > houses for the marginal house-hunter.

I hope the above mentioned points make it clear that this is not a problem just in California, but nationwide. Which means wages are insufficient nationwide and cost of living is too high nationwide.

> Paying the marginal buyer more isn't going to create more houses. If there > wasn't a place for them to rent before, there still won't be when you pay > them more. If it were possible to create more houses, the current prices > would already be making it happen.

I'm going to assume you're arguing in good faith here and respectfully disagree. The problem isn't that there aren't homes for them to buy or rent; the problem is that those homes and rentals are at too high a price. At $20/hr maybe they can afford to live in .5% of available rental units; and at $30/hr maybe they could afford 5%. That's a tenfold increase in potential living spaces, without those living spaces becoming more affordable.

Yes, the other issues in the bay area exist, with the NIMBYism and such. But these problems still exist nationwide. There are a few potential ways for government to help solve this issue. The main ways (hopefully I didn't miss any obvious ones) are: increase minimum wage or average wages via law or other influence; increase taxes on home ownership, especially for non-residents; introduce rent control laws; provide incentives for and remove obstruction from building new construction, especially high density construction.

1\. [https://www.bls.gov/opub/reports/minimum- wage/2017/home.htm](https://www.bls.gov/opub/reports/minimum- wage/2017/home.htm) 2\. [https://www.citylab.com/equity/2019/06/affordable- housing-mi...](https://www.citylab.com/equity/2019/06/affordable-housing- minimum-wage-rent-apartment-house-rental/592024/)

</comment></comment></comment></comment><comment><USER17> Is this a Facebook-specific problem, or are most Bay Area food service workers in a similar situation?

<comment><USER18> This is not a Facebook specific problem, but FB is easy to pick on because they are sitting on so much cash.

But I agree, you could replace FB with almost any company down there.

Shit, I'd be willing to bet that line cook at FB pays quite a bit more than fast food, etc.

<comment><USER17> > FB is easy to pick on because they are sitting on so much cash.

It's also popular to pick on FB these days.

</comment></comment></comment><comment><USER14> I was kind of shocked when I saw the $23/hr, because that's a pretty high wage for a line cook. Like I could not imagine anywhere else except for maybe NYC where a line cook would protest with that rate.

According to the MIT Living Wage Calculator, he would be able to support himself on that but it'd be difficult if he had any dependents. [http://livingwage.mit.edu/metros/41860](http://livingwage.mit.edu/metros/41860)

</comment><comment><USER9> Its quite daunting that the employees find it easier to compel facebook to increase their salaries, maybe 10%, than to complain on city hall that puts the rules that made their rent 300% of what they were.

<comment><USER19> At ~500k/unit, neither municipal nor state government can afford to build public housing in any meaningful quantity. We just had a huge electoral battle over a measure that raises taxes for only a few thousand units (Prop C). Millions of them would be required. Rent control expansion is both popular and technically doable, but would require repealing Costa-Hawkins, which survived this year's challenge.

You will never see a left-leaning activist group representing the working class in California support a "let the market work" sort of policy like more for-profit development permits. Those ideas - public housing, rent control, increased supply - are pretty much _the_ policy levers, and none are going to happen at scale within this set of voter preferences.

<comment><USER20> >You will never see a left-leaning activist group representing the working class in California advocate for a market-based solution like permitting more for-profit development.

Is that really true? Elsewhere I have seen left-leaning activists advocate for higher density for-profit development housing so long as it is zoned to force developers to target all income groups in some manner, not just the most short term profitable ones. Is it really so different in California? You don't have to have a completely free market to have market based solution, after all. Which is a good thing as you're unlikely to ever see a truly free market there.

<comment><USER8> Developers could target low income housing by building a bunch of megacondos to suck programmers out of the old neighborhoods.

<comment><USER19> They call this "trickle down" and oppose it pretty strongly.

</comment></comment></comment></comment></comment><comment><USER21> On an economical level, what's a better solution? Facebook paying their kitchen staff more (than the current $23/hr), or SF taking steps to lower its cost of living so that "one job should be enough" to get by on minimum wage (currently $15/hr)? Or something else?

<comment><USER22> If you pay people more than the parties with the highest leverage will extract more rent from your employees.

<comment><USER8> Then why do software developers have more spending money than line cooks?

<comment><USER9> Because the day they don't, they won't be in SF at all.

</comment></comment></comment></comment><comment><USER23> Isnt this the common situation in most of Bay Area for service workers? Im in no way associated to Facebook, but I think its a bit unfair to call them out just to make the headline sensational. They're just another tenant in the Bay Area.

</comment><comment><USER24> The truth is that the only way to increase wages is to protest or to quit their jobs en masse so I support these workers protesting. The problem with low-skilled jobs is that there's probably someone waiting to take their job at $23/hr, but that's how the system works and unfortunately low-skilled jobs don't have a tremendous amount of value. This is the counter argument to allowing illegal immigrants - they are more willing to take these low-skilled jobs and to suppress wages much longer.

</comment><comment><USER10> Instead of creating a useless currency, Facebook should of allied itself with 20 other tech companies and created a brand new city, in the middle of nowhere. One that was built from the ground up to be sustainable and affordable where everyone can walk or scoot to work. A city unhindered by zoning or burdensome regulations. Then connect it to some of the existing cities with high speed trains or helicopter buses. It would be a win win situation for everyone involved.

</comment><comment><USER25> I've recently reached a personal finance threshold where I'm making a substantial return e.g. enough to live on on a relatively "low risk" mix of index funds/stock investments. It made me realize that being in a position where your money is "working" for you is really the starkest difference between the rich and the poor.

</comment><comment><USER26> San Francisco city council wants to solve this problem by banning corporate cafeterias:

[http://www.ktvu.com/news/sf-city-leaders-push-to-ban- company...](http://www.ktvu.com/news/sf-city-leaders-push-to-ban-company- cafeterias)

</comment><comment><USER27> This housing crisis is going on for long time. I was wondering why don't these tech giants build housing complex for their employees.

It would definitely solve a lot of issues, including controlled and balanced housing cost for the employees, group/public transport, and above all a vibrant community.

Is it a permit issue? Or something else?

<comment><USER28> They are. Both Google and Facebook are actively working on housing developments in the area.

[https://www.mercurynews.com/2019/02/08/facebook-unveils- new-...](https://www.mercurynews.com/2019/02/08/facebook-unveils-new-vision- for-big-willow-village-complex-in-menlo-park/)

[https://www.citylab.com/equity/2019/06/google-affordable- hou...](https://www.citylab.com/equity/2019/06/google-affordable-housing- california-real-estate-development/591991/)

</comment></comment><comment><USER29> When you live in a city/state that is pushing out the middle/lower classes through increased government regulations and taxes, this is what happens.

This is not a blueprint for the rest of the US. I hope voters take notice.</comment>


Another way to edit your Twitter experience: with mute - <AUTHOR> https://blog.twitter.com/2014/another-way-to-edit-your-twitter-experience-with-mute

<comment><USER2> Twitter already had a completely equivalent feature to "muting" – unfollowing. The fact that they're now allowing you to unfollow someone without actually unfollowing says to me that they're officially acknowledging the extent to which people game the system to gain followers, whether they are actually consuming content or not.

Basically the only use I can think of for this feature is to still engage in follow-back schemes without polluting your own timeline.</comment>


The PuzzlOR bimonthly operations research-related problems - <AUTHOR> http://www.puzzlor.com/ <comment><USER2> A simple, principled way of solving October's problem is to model it as a Markov chain with absorbing states (the "Finish" square, and the two invisible squares past it -- the two invisible squares are unnecessary as mentioned by jtsummers below), and compute the expected absorption time starting from the first square.

See e.g. [http://en.wikipedia.org/wiki/Absorbing_Markov_chain](http://en.wikipedia.org/wiki/Absorbing_Markov_chain)

<comment><USER3> Since this seems to only care about the probability of any transition would you need the 2 invisible squares, or wouldn't the "Finish" square suffice? That is, in any square that can advance to 12 (10, 11) 10 has a 1/3 probability of advancing to 11, and 2/3 of hitting 12/13\. While 11 has a probability of reaching 12 (or beyond) of 1.

Also, thanks for that link. Markov chains are something I know _about_ , but never really set to the task of learning. It's also a much quicker solution than my initial concept, and neatly handles the chute/ladder squares (that is, on square 5 you'd have a 1/3 chance of ending on 11, 1/3 on 2 and 1/3 on 8; 6 and 7 are never actually reached - which also means they can be eliminated from the set of states).

<comment><USER2> Yes, you're right. Good point.

</comment></comment></comment><comment><USER4> The puzzles are weird. Some of them could be a homework problem at a good elementary school (e.g. [http://www.puzzlor.com/2012-10_FarmOR.html](http://www.puzzlor.com/2012-10_FarmOR.html)). Others appear NP-hard, unless I'm mistaken (e.g. [http://www.puzzlor.com/2013-06_SelfDrivingCars.html](http://www.puzzlor.com/2013-06_SelfDrivingCars.html)). Is the author trying to make a point about the nature of OR?

<comment><USER3> Re: Author's point - I don't think so. This seems like toy problems about how to frame problems in an OR style. Absorptive Markov chains (for the linked puzzle) are an OR tool that solves the problem very efficiently. Even though it's a small puzzle and it can be solved by hand with other approaches reasonably efficiently, those approaches may not scale as well to larger variations of the problem or aren't as general a solution or don't tie in as well when connecting a number of different optimization/planning problems.

Regarding the wide-ranging difficulty of puzzles (perhaps it's just too late for me here, is that FarmOR one really an elementary school problem? EDIT: Just reread it, it's much easier than I originally thought because I misread it), it reminds me of the puzzles in CACM (I think it was that publication). They were generally math/CS puzzles, 3 at different levels of difficulty. The 3rd was - occasionally? often? - an open problem and all 3 would be similar, but different conditions (perhaps becoming more general) would increase the difficulty from puzzle to puzzle. On a given puzzle it might be trivial to solve 1 & 2 for a CS freshman, others might challenge seniors or grad students (depending on their domain at least). The author wasn't making a comment on the nature of CS, he (IIRC) was simply presenting puzzles and challenges. Some are easy, some are hard, some may be impossible without a lucky insight or domain familiarity.

</comment></comment><comment><USER4> What is Operations Research, and why is it related to this puzzle.

I found the puzzle easy enough. It's just a matter of calculating how many moves are needed from square 11, then square 10, and so on. The chutes complicate matters a little, but not much.

<comment><USER3> OR is a discipline that studies systems and processes, then optimizes them based on statistical and mathematical modeling. At least from a high level, that's the key. In industry, it's used for routing (see UPS, any big box store, Amazon) of goods, in airlines for management of passengers and routes. In industrial processes they take the various factors involved (material costs, personnel costs, time, safety, whatever) and develop models to enable better decision making. Many applications of it are, essentially, applied statistics and math modeling. EDIT: In a factory setting OR/IE types are heavily involved in layout of the environment, often modeled as a network. Workstations might be nodes, transit between them are edges. Various costs would be involved. Node A generates widget A at a rate of T_A, node B requires node A and item B - externally sourced - to produce widget B. Node B is the bottleneck, break it out into 3 worker processes... If this sounds like how we design distributed processes in software, it's because it's the same problem, fundamentally.

As to the puzzle, I guess it's about modeling the problem in a manner similar to other business processes. Consider the game as a business process model of handling a software CR. Each chute is a potential setback (crap, found an error during QA, send it back to testing for analysis) and the ladders could be things that advance a process unusually quickly (we got the data from the customer on the error, turned out it isn't with our code but documentation on how to use the program, update the manual and bypass testing/SQA). Collect data over time, optimize away inefficiencies or deficiencies that induce extra work or rework.

[1] [http://en.wikipedia.org/wiki/Operations_research](http://en.wikipedia.org/wiki/Operations_research)

EDIT 2: Not sure if tired or autocorrect, but manor and manner are not the same thing.

<comment><USER5> I like turtles.</comment></comment></comment>


Stealthy Military Startup Launches Neural Processor - <AUTHOR> http://www.eetimes.com/document.asp?doc_id=1329843 <comment><USER2> [http://www.nextplatform.com/2016/06/06/former-nasa-exec- brin...](http://www.nextplatform.com/2016/06/06/former-nasa-exec-brings- stealth-machine-learning-chip-light/) has a few more details</comment>


Roadmap update for real-time communications in Microsoft Edge - <AUTHOR> https://blogs.windows.com/msedgedev/2016/04/13/roadmap-update-for-real-time-communications-in-microsoft-edge/ <comment><AUTHOR> Exciting to see Microsoft embracing WebRTC! Now all we need is Apple to get on the bandwagon with iOS and Safari for Mac and the web will be a better place. #WebRTC

<comment><USER2> Apple is in too. [http://www.nojitter.com/post/240171589/apple-jumps-on-the- we...](http://www.nojitter.com/post/240171589/apple-jumps-on-the-webrtc- bandwagon)</comment></comment>


How an outsider bucked prevailing Alzheimer's theory, clawed for validation - <AUTHOR> https://www.statnews.com/2018/10/29/alzheimers-research-outsider-bucked-prevailing-theory/ <comment><USER2> One of things I like about the Howard Hughes Medical Institute (HHMI) is that they find great scientists and just fund them. The scientists can research whatever they want as long as they keep producing. I always wondered if a hybrid approach to funding would work well at the government level. The current, permission-based process would remain in place for new researchers to prove themselves, and then an HHMI-style process for researchers who have proven themselves. There would be checks in place and if the funded researchers stop performing then they have to go back to the normal process. There are several details that would have to be worked out to guard against politics, etc. I think this may overcome the government agencies tendency to reject truly new ideas especially when they contradict the prevailing theory.

<comment><USER3> Reminds me of Lockheed's Skunkworks. I've heard lots of businessmen say they're going to recreate skunkworks, but with improvements.

The improvements, of course, make it not a skunkworks and these efforts never deliver skunkworks performance.

Could the government create a skunkworks? Not likely, because they fought against Kelly Johnson constantly over how he ran it.

I bet Paul Allen could have done it, because he had a track record of funding competent people and letting them do what they wanted.

<comment><USER4> I'm in the midst of listening to the Skunk Works audiobook. And it's fascinating. It had been on my list of things to read but I just couldn't wait. I bit the bullet and bought the audiobook. It's worth every penny.

<comment><USER5> The book by Leo janos?

<comment><USER4> Yes, him and Ben R. Rich.

</comment></comment></comment></comment></comment><comment><USER6> This isn't a particularly surprising story considering the history of science. To give an example of how this sort of thing played out historically, Marshall Nirenberg was basically persona non grata (or at least dutifully ignored) at many scientific conferences prior to his postdoc's discovery of the codon for phenylalanine. At the time, he was working at the NIH, which was considered very low prestige by many contemporary scientists. Somewhat fortuitously, Francis Crick heard a lecture by Nirenberg at a conference in 1961 and considered it good enough to bring to the attention of the other key players of the day, and Nirenberg was elevated from obscurity to stardom. For whatever reason, Nirenberg's postdoc never really achieved stardom, despite being the individual who _actually_ made the discovery.

For more information:

[https://www.telegraph.co.uk/news/science/science- news/854683...](https://www.telegraph.co.uk/news/science/science- news/8546830/Genes-and-DNA-meet-the-first-man-to-read-the-book-of-life.html)

<comment><USER7> Semmelweis was literally thrown into an insane asylum and died not long after, following a beating by the guards. Einstein worked in a patent office, unable to get a university job like he wanted until after his theory was proven correct. It took years to get the evidence he needed.

[https://en.m.wikipedia.org/wiki/Ignaz_Semmelweis](https://en.m.wikipedia.org/wiki/Ignaz_Semmelweis)

</comment></comment><comment><USER7> Amyloid-beta is associated with sleep deprivation. This new research could suggest that sleep is an essential component of the immune system.

 _If so, then the plaques it forms might be the brain's last-ditch effort to protect itself from microbes, a sort of Spider-Man silk that binds up pathogens to keep them from damaging the brain. Maybe they save the brain from pathogens in the short term only to themselves prove toxic over the long term._

I really like the thinking here.

Similarly: In people with CF, calcium and glutathione build up in the cells. High levels of calcium are associated with cell death, so much of the CF community believes calcium is harmful.

I believe the calcium and glutathione are desperate efforts to buffer the cell in the face of deranged cell chemistry. I believe the high calcium is indicative of other things being really bad and the body trying desperately to compensate.

If this guy wants another outside-the-box research project, there you go. I would love to see that looked into.

Edit: Is it me, or does the article actually switch from saying _amyloid-beta_ to saying _beta-amyloid_ midway through?

 _This month, however, he got an unheard-of email from NIH: The agency had found some extra money lying around in its budget. Would he please respond to the reviewers and resubmit his proposal? An over-the-moon Moir did. He expects to hear back in a few weeks._

Yay! I hope he gets it.

<comment><USER8> That's really interesting. The correlation of amyloid plaques and alzheimers has always seemed to me like a classic case of the ambiguity of correlation and causality (i.e., cause or symptom?!). Sounds like the same deal with calcium in CF

</comment></comment><comment><USER9> This seems to be referencing the path to mainstream exposure for the infectious theory of Alzheimer's. Prior discussions (not the same link) on HN, posted for reference because they touch on the past research that was previously posted here:

[https://news.ycombinator.com/item?id=18306381](https://news.ycombinator.com/item?id=18306381) (this one's a comment I made associating the cortisol/Alz risk to the microbial Alz connection; it's nothing more than a hypothesis)

[https://news.ycombinator.com/item?id=17446016](https://news.ycombinator.com/item?id=17446016)

[https://news.ycombinator.com/item?id=17540512](https://news.ycombinator.com/item?id=17540512)

[https://news.ycombinator.com/item?id=17540094](https://news.ycombinator.com/item?id=17540094) (this is the parent link for the antiviral risk reduction study -- a good read, comments and source article)

There's a decent amount of reading when scholar-googling:

[https://scholar.google.com/scholar?q=hsv1+alzheimers](https://scholar.google.com/scholar?q=hsv1+alzheimers)

Moir's paper specifically: the relationship between β-Amyloid and viruses in the brain:

[https://www.cell.com/neuron/fulltext/S0896-6273(18)30526-9](https://www.cell.com/neuron/fulltext/S0896-6273\(18\)30526-9) (study link)

There's also research pointing to sleep's function as helping clear out plaques such as beta-amyloid.

[https://news.ycombinator.com/item?id=16026655](https://news.ycombinator.com/item?id=16026655)

Finally, there's at least a bit of research pointing to boosted susceptibility of herpes viral infections when carrying ApoE4:

[https://scholar.google.com/scholar?q=hsv1+apoe4](https://scholar.google.com/scholar?q=hsv1+apoe4)

The novel conclusion from all of this, which I suspect is being actively investigated, is that there's a potentially complicated interplay of an enhanced viral infection (HSV/HHV enabled by ApoE4) + evolutionary defense going into overdrive (β-Amyloid) + (potentially) sleep deprivation keeping the body from clearing out the residue -> disease.

\---

I'm particularly motivated to track this research because of its prevalence in my family background and because, from what I can tell, I've thus far managed to avoid the environmental trigger-pull. I can already tell you I'll probably go on (val)acyclovir lifetime if I'm ever diagnosed with any particular strain, as it looks like active infection, with outbreaks, is what's likely to act as the first domino to tip.

<comment><USER10> From a previous discussion, beta-ameloyd isn't well studied, but it appears to be a viral catch-all, attaching to many viruses. The reason herpes is so significant is because it uses time-release capsules to continually reinfect a host user, and continually caught in the beta-ameloid. So herpes sufferers have more beta-ameloid to clear away most nights.

<comment><USER9> Yup. Working thread here:

[https://news.ycombinator.com/item?id=18306921](https://news.ycombinator.com/item?id=18306921)

(between you and me, incidentally.)

</comment></comment></comment><comment><USER11> This all makes sense. APOE literally carries viruses around the body : [https://bit.ly/2oRVFSr](https://bit.ly/2oRVFSr)

</comment><comment><USER12> > Complaints about being denied NIH funding are as common among biomedical > researchers as spilled test tubes after a Saturday night lab kegger.

Comedy in science writing?

</comment><comment><USER13> > Complaints about being denied NIH funding are as common among biomedical > researchers as spilled test tubes after a Saturday night lab kegger

Is this supposed to mean complaints are common?

<comment><USER10> The article is littered with references to beer. As though the target demographic alcoholics who enjoy PopSci.

<comment><USER6> Scientific / conference culture has a somewhat concerning relationship with alcohol, which was a contributing factor to my ultimately leaving science. The amount of pressure to go out to a pub with your colleagues was much higher for me than it was in my current job, in large part because serious discussions and informal deals that could directly impact your academic career tend to happen in these sorts of contexts. I suspected that a lot of my co-workers in science were high functioning alcoholics.</comment></comment></comment>


Tesla will start enabling full self-driving features in August - <AUTHOR> https://www.engadget.com/2018/06/10/tesla-will-start-enabling-full-self-driving-features-in-august/ <comment><USER2> Can't wait to see what their excuse for Autopilot crashes will be then. Maybe something like:

"Yeah, we said we enabled full self-driving features, but we still didn't say you can't pay attention to the road anymore! Just because we're _offering_ the feature it doesn't mean you have to _use it_."

<comment><USER3> From the article, it is clear that after this future fix :

 _There may be some situations where it 's genuinely acceptable to let go off the steering wheel, even if it's limited to parking lots and other private spaces._</comment></comment>


Clojure Kata #3 – Roman Numerals - <AUTHOR> http://elegantcode.com/2014/04/29/clojure-kata-3-roman-numerals-2/

<comment><USER2> If you'd like to see interesting solutions to this problem, I recommend solving this 4clojure exercise:

[http://www.4clojure.com/problem/104](http://www.4clojure.com/problem/104)

and then looking at solutions by experienced Clojurians. Some are code golf but still worth understanding (e.g chouser's, who is one of the authors of The Joy of Clojure).

</comment><comment><USER3> "The reason I wanted to try the solution that I posted is that I didn't want to include IV, IX, XC, ... into the list of symbols as they are made up of base symbols (just for the sake of the exercise)."

An interesting choice - it seems to make the problem harder than it should be.

This is really solvable in about 6-8 lines of code otherwise.

</comment><comment><USER4> When learning a Lisp, you have to be careful of the habit of placing ending parenthesis/brackets on new lines like you would in C and Java.</comment>


Florida Airport to opt out of TSA screening - <AUTHOR> http://wdbo.com/localnews/2010/11/sanford-airport-to-opt-out-of.html <comment><USER2> I saw a report yesterday that Macon, Georgia, is also considering opting out.

Meanwhile in New York, a city council member has introduced legislation to ban the naked scanners: <http://www.wired.com/threatlevel/2010/11/scan-ban/></comment>


No, really, pi is wrong: The Tau Manifesto - <AUTHOR> http://tauday.com/tau-manifesto <comment><USER2> I am a graduate student, first-year, so I have a lot of problem sets to work on. I've been thinking about tau every so often since the last time this was posted here, and so every time I work a problem, I think to myself: would this be clearer if I used tau? And the answer is usually "no". Sometimes 2 is next to pi because of the natural reason appealed to in the tauifesto, and other times it's there for some other reason, other times it isn't there at all; there's usually a huge constant factor out front anyway, and often a single equation goes across the whole sheet of paper, so even making it one character shorter doesn't accomplish much.

Not that I haven't learned notation that _really_ helps. Gaussian units and Einstein notation are a _godsend_. If you could standardize introductory physics courses using these, I think it could help significantly, especially when people struggle to work out the curl of a cross product or some-such strenuous vector calculation. All hail the Levi-Civita tensor! But we haven't even been able to agree on this.

Furthermore, as a test grader of nearly-a-year, the work done by undergraduates is nigh-inscrutable in the maximally acceptable way _already_ , and so the tau "rebellion" promoted here would just make my job harder. It's not too much of an issue: only the technically-inclined, who already do pretty clear work, are likely to use it; still, telling people "just start doing your work like _this_ , let _them_ figure it out!" means that I have to know if that scribble is a tau or a T or what-have-you, two hundred times. Pi is a very recognizable character.

Plus, tau is the letter I reach for whenever I need to introduce an adjusted time of some sort, such as proper time; it's also the natural temperature in stat mech (though thermodynamic beta is itself more natural and usually better), it's torque, it's a common time constant, &c. People generally avoid pi as a character which does _not_ represent 3.14159, though it is the prime counting function and an adjusted momentum, in which case it usually has a half-arrow, so you can tell what it's doing. We don't avoid tau at all; it's everywhere.

So the tau-switch, as notational improvements go -- and math has had many over the years -- seems like a relatively large-pain, small-gain deal. Many things must change, since pi is all over the place, but few are greatly improved. So I don't see much reason to use tau in my work, or for my students to use it in theirs. If it works for you, though, good!

<comment> loup-vaillant The biggest advantage of Tau over Pi probably lies in learning trigonometry for the first time. That's not something you can judge for yourself, as you can't learn something for the first time _twice_.

We should perform experiments, but I strongly suspect that using Tau (or 2Pi as if it where a single symbol) would significantly reduce confusion in the heads of the pupils. That would count as a "big advantage" in my book.

Now does Tau have an actual disadvantage besides clashing with time constants and such? If not, we should keep in mind that switching is a one-time cost while the cost of using a worse notation is unbounded (proportional to the number of uses, actually).

I have to reckon however that making an effort to switch away from Pi probably shouldn't be our first priority. I don't know Gaussian units nor Einstein notation, but if they do "really help" then we probably should take care of that first.

<comment><USER3> _The biggest advantage of Tau over Pi probably lies in learning trigonometry for the first time. That's not something you can judge for yourself, as you can't learn something for the first time twice._

If you can live long enough, you could literally forget your trigonometry. After all, humans are not exactly the pantheon of long term memory or even...reliable memory.

<comment> loup-vaillant If we ever come to that, I want a brain update.

</comment></comment></comment></comment><comment><USER4> Nonsense!

The Leibniz sequence is the most simple way to describe the equivalence class under multiplication by non-zero rationals of numbers that contains both pi and tau:

1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + 1/13 - ...

which sums to equivalently pi/4 or tau/8.

The fundamental simplicity of the Leibniz sequence makes this value the only natural choice from that equivalence class. Let us call it lambda, for Leibniz.

Then the area of the unit circle is 4 lambda, the diameter of the unit circle is 8 lambda, the volume of the unit sphere is 16 lambda, the surface of the unit sphere is 16/3 lambda, etc.

Should I start selling the t-shirts?

<comment><USER5> I wouldn't call it nonsense. If the comparisons with the virial theorem and energy isn't enough to consider it at least as a reasonable choice, at least you should consider it as such because John Baez agrees with it.

And you don't mess with John Baez ;-)

<comment><USER4> I'm attempting irony. The tone of the manifesto is a bit breathless, putting up interesting enough considerations in a overwrought manner, with half- hearted efforts made at looking at the issues raised from more than one point of view.

Draft one of my lambda manifesto shows that the only consideration of conceivable value, namely ease of defining a transcendental by means of a convergent series, leads to only one possible choice of fundamental trigonometric constant, lambda.

Of course to gain widespread acceptance, I will have to cover up having written the indulgently tolerant <http://www.advogato.org/person/chalst/diary/275.html>

<comment><USER5> +1 for irony anyways...

</comment></comment></comment></comment><comment><USER6> I find the argument for tau very convincing. I remember having similar thoughts when I learned about radians and had a hard time understanding why they would define pi to be half of a turn, particularly since the diameter equation was d=2πr. The fact that A=πr² seemed like a counterargument, but the Tau manifesto makes a good case that having 1/2 in this equation helps show its similarity to other physics equations.

I think pi's best argument is that the area of the unit circle is pi. I actually find it very enlightening to think of the unit circle as having an area of pi but a turn of tau radians.

It makes sense to me to use both pi and tau; whichever makes a particular set of equations more clear. I certainly don't think that pi should be preferred just because it's older, or that pi's prevalence should prevent introduction of a new symbol.

<comment><USER7> Occam's razor to the rescue. Using two distinct constants which differ only by a factor of two sounds more confusing than choosing either one and sticking to it.

<comment><USER8> > Using two distinct constants which differ only by a factor of two sounds > more confusing than choosing either one and sticking to it.

Physics is _incredibly_ unusual in that it has very few overloaded terms, and so almost everything that is expressed in daily use is expressed with as much precision and as little ambiguity as possible. Most scientific disciplines are not so lucky.

It does still happens in physics (h and h-bar, as noted in another response below), but it happens _all the time_ in statistics, so much so that it's incredibly frustrating to read a new text for the first time.

𝜀? Probably refers to the error of a regression, assumed to have mean zero and be independent.

e? Uh-oh. Possibly refers to the error term in a regression, as above. But it could also refer to the residuals, which _always_ have mean zero and are _never_ independent. _Very_ different.

ê? Okay, once I see this, I know that the author _probably_ doesn't use 𝜀 as well, so this narrows it down somewhat. But not entirely.

And don't get me started about 'standard error'. I have heard that term used in reference to a sample mean, a sample mean divided by the square root of the population, or the standard error of a regression (which is more complicated than I care to describe in plain English).

Do you want to get started about economists, who often use π as a variable? Or computer scientists, who use it to refer to a process calculus?

How about Σ, which can be used to indicate a sum, but can also be used to indicate a covariance matrix? Which, by the way, can also be expressed in terms of either S or Q, depending on who you ask.

Ooh! How about Λ? That's the _precision matrix_ , so it has to be precise, right? Well, yes, except that all we're doing is writing the inverse of Σ, so it's an unnecesary letter altogether[1].

Right now, we're dealing only with conflicts _within a given field_ , but we could open Pandora's box and talk about the fact that λ is an anonymous function in computer science, but a constant that (partially) defines the stationary point for a given optimization problem.

Or letters that look like each other - can you really tell the difference between ν and v? Or ω and w? What about when I write them out by hand?

[1] Unless you're using the term to implicitly declare that the covariance matrix is invertible, but if you think that substituting one capital Greek letter for another is a clear way of telling me that a matrix is full-rank, we need to have a much longer conversation.

 __EDIT __I must say, I'm very impressed that HN handled all that unicode beautifully. Kudos to pg ( & co.?)!

<comment><USER9> Would you mind telling me these characters?

>the author probably doesn't use 𝜀 as well,

>𝜀? Probably refers to the error

I'd like to know which my browser (latest Chrome on up-to-date Win7) is failing to render.

<comment><USER10> It's a lowercase Epsilon character.

<comment><USER9> Thank you.

</comment></comment></comment></comment></comment></comment><comment><USER11> I always enjoy these little diatribes.

However tau will never beat out pi because of one very important reason. The chicken scratch that passes for writing these days makes tau unreadable. Tau can be a: r, 7, t, tau, etc...

For the sanity of TAs everywhere, please stop this madness.

<comment><USER12> It's just a pi with one leg in the middle. It's pretty easy to read. Also engineers (who don't have very good writing) have been using tau for things like a time constant (among other uses) for a long time.

The bad handwriting problem is solved very easily, TAs should complain to the professor to make it a requirement that if you guys can't read it, it's wrong. I've had classes like this, I just use LaTeX.

<comment><USER11> I did a symbolic dynamics course that required the letter xi ad nauseum in lowercase. I _still_ can't write that damn letter.

<comment><USER13> One of my math profs in grad school called lower case xi "a scribble". And when he had to write it on the board, it was.

<comment><USER14> Pic: <http://en.wikipedia.org/wiki/File:Xi_uc_lc.svg>

</comment></comment></comment></comment></comment><comment><USER15> <http://www.thepimanifesto.com/>

<comment><USER16> Be sure to check out the rebuttal.

[http://tauday.com/tau- manifesto#sec:the_pi_manifesto_a_rebut...](http://tauday.com/tau- manifesto#sec:the_pi_manifesto_a_rebuttal)

<comment><USER17> That's hardly a meaningful rebuttal.

      C = 2 * Pi * r = Tau * r
      A = Pi * r ^2 = Tau / 2 * r

PS: When dealing with radians Tau is fine, but I like showing +Pi and -Pi both point away from 0.

<comment><USER18> > I like showing +Pi and -Pi both point away from 0.

What would be cool is to see two different points showing what the direction is.

c = Pi/2

+c would point upwards, -c would point downwards. 4c is a pizza.

</comment></comment></comment></comment><comment><USER19> The revision of _The Tau Manifesto_ that launched today includes a wealth of new material, including a rebuttal of the "Pi Manifesto" ([http://tauday.com/tau- manifesto#sec:the_pi_manifesto_a_rebut...](http://tauday.com/tau- manifesto#sec:the_pi_manifesto_a_rebuttal)) and a new section on the volume of a hypersphere:

<http://tauday.com/tau-manifesto#sec:volume_of_a_hypersphere>

If you thought the original quadratic-form argument for circular area was good, prepare to be blown away by _n_ -dimensional spherical volumes.

</comment><comment><USER20> For a quick overview of the pedagogical significance of tau, compare figures 6, 7, and 8. I learned figure 6 in high school trig, but by "learn" I mean I basically memorized it without a deep understanding of what was going on. Figures 7 & 8 unveil what I had been missing.

</comment><comment><USER21> As a mechanical engineer by training, I will be a sad panda if you use tau for something other than torque.

EDIT: And shear stress. Derp. That's why I write software now. :)

<comment><USER22> Tau is used for tons of other things already. <http://en.wikipedia.org/wiki/Tau#Modern_usage>

I wish each letter could have only one use, but sadly that isn't possible (like some notorious equation from my plasma physics days that forced us to use different versions of P and Rho for density, pressure, charge density, and momentum).

<comment><USER12> I'm more of a fan of having multi-character symbols than to try and pigeonhole every concept into one symbol. Have full or partial names, just like we do in programming. We started down that path with writing things like sin x, cos t, div f, |rad|, etc. We should continue! If people really have problems distinguishing we can go the Perl route and add sigils.

<comment><USER23> Now that I have been programming for longer than doing maths, I just must wonder why math community seem so entrenched in using single letter variable/function names. How confusing larger source codes would be if programmers did the same.

<comment><USER21> You've never looked at academic or numerical code, have you? It's totally fugly. Go skim the first edition of Numerical Recipes in C--it'll give you nightmares.

</comment></comment></comment></comment></comment><comment><USER24> Email me your address for a free* patch if you're the type to wear one.

<http://www.kickstarter.com/projects/ianterrell/say-no-to-pi>

*Free if I can get it to you with a stamp in the US.

<comment><USER25> Why not make another one, "say no to tau", and see which gets the most buyers? :)

I'd buy a "say no to tau" patch.

</comment></comment><comment><USER26> The best part of this is the area of a circle, which is the integral with respect to r of r _tau, or tau_ r^2/2.

Sure, pi*r^2 is nice and easy to remember, but also remember even the mnemonic is wrong... pies are round!

<comment><USER27> It's also easier to remember that the area of a unit circle is pi.

Also, e ^ (-i * pi) + 1 = 0

<comment><USER5> What's the kinetic energy of a unit speed, unit mass?

What's the potential energy of a unit distance unit spring constant?

What's the energy of a unit mole, unit temperature in Boltzmann units?

:-)

</comment></comment></comment><comment><USER28> TL; DR: "Let τ=2π"

It's a simple substitution, and it should be used "when it's convenient to".

I really don't see any innovation in the article as everything in it is directly derived from the above mentioned substitution.

<comment><USER29> It isn't innovation from a math sense, it's innovation in a pedagogical sense. Once you've internalized pi (and math in general) it is pretty hard to see what is so difficult about it (a well studied issue with expert knowledge and teaching things to novices). However a simplification from the point of view of the novice who doesn't "just get it" is a good thing.

<comment><USER30> _However a simplification from the point of view of the novice who doesn't "just get it" is a good thing._

Questions about mathematics pedagogy are inherently empirical, and should be answered by observation of actual learners. So where is the evidence that learners who don't get how to use π will be better able to learn mathematics if they use τ to tackle the same problems?

<comment><USER29> I don't know. Perhaps they are still at the "convince someone to actually try it for an entire n-year math curriculum" stage? It's not like using Tau is something that you can do in class for a week and expect better results. Even if you try the lesser "here's tau, always substitute 2pi with tau" every couple years on a group of students and track them through their math learning, it takes time and a lot of effort to get those numbers.

In the mean time, there is lots of anecdotal evidence of people understanding a lot of concepts easier with it, suggesting these studies be done in a scientific way.

</comment></comment></comment></comment><comment><USER31> pi is "wrong" in the same way that mobile electrons being the carrier of negative charge is "wrong"

<comment><USER5> Nope. Although they are both conventions, in the electric charge there is really no natural choice. While mathematicians can argue whether or not a factor of 2 is a natural choice for a convention.

<comment><USER31> Isn't the "natural" choice to have the direction moving charged particles to be the same as a moving charge? In everyday life it is electrons, not protons that move. When we say "charge is moving from high voltage to low voltage" we are actually saying "electron particles are moving from a position of low voltage to high voltage"--the exact opposite. How is that natural?

Even if that weren't the case, it's still a matter of opinion. Minus signs show up in a number of pretty unnatural positions as a result of the negative electric charge. The convention in Physics is that minus signs convey semantic information (reversal in direction, slowing down, etc.). The negative electric charge upsets this convention, resulting in un-semantic minus signs.

<comment><USER5> I use a different definition of natural. The fact that the electrons, negatively charged, were moving wasn't known when they assigned the positive- negative labels. But still, although what you are saying is certainly true in proton/electron systems, it would be completely reversed in antiproton/positron systems, where the charge would be moving together with the particles. Also, don't forget of ions, or particles in space, or in particle physics experiments, where both charges move.

The point is that the natural choice that you assign would be natural just because of some contingent conventions, but it's not more natural in terms of some more fundamental/mathematical meaning. While the pi vs. tau is.

</comment></comment></comment></comment><comment><USER32> The benefit of the easier formulas tau might provide. _Minus._ The confusion of having different generation of students being taught differently.

Is it worth it?

The author tries to dismiss this by saying "it's easy, they'll get it quickly, we don't need to rewrite all textbooks if you can just say 'let tau = 2pi'". But it seems he's rushing in that conclusion. The imagine the confusion between trying to convince students who are used to a whole set of formulas to use new ones will be huge. The confusion caused by different generations trying to communicate seems huge. You might not need to burn old books but you would need to write new ones, which again does sound like a huge endeavor.

I'm not even questioning whether he's right about tau formulas being easier. That seems irrelevant to me. Just the problems you're creating with the confusion seems not worth the small benefits. It just doesn't seem the pros outweigh the cons.

</comment><comment><USER33> Is it that time of year again?

<comment><USER34> Nope, this is about 3 and a half months early.

<comment><USER21> well played good sir/madam

</comment></comment></comment><comment><USER35> Tau in Python: <http://bugs.python.org/issue12345> (rejected)

Tau in Ruby: <http://bugs.ruby-lang.org/issues/4897> (ignored)

:(

</comment><comment><USER36> Yeah, yeah, and degrees are wrong for expressing angles, and steering wheels are wrong for driving cars.

Incidentally, there's already a symbol for \tau: 2\pi. Same number of syllables and characters as 14, so what's the problem?

<comment><USER36> Why tau, BTW? Why not winnie, after the Wonder Years character portrayed by the eminent mathematician Danica McKellar?

</comment></comment><comment><USER37> Hi posted this earlier, but it didn't get any traction. I guess the people here might be interested.

<http://www.visnos.com/demos/pi#launch>

</comment><comment><USER38> pi is "wrong" in the same way as imperial measurements are "wrong".

<comment><USER39> pi is "wrong" in the same way as non-Planck units are "wrong". SI is almost as arbitary as imperial.

<comment><USER38> As in - because pi is a unit-less ratio? Plank units are still units (albeit a special case), so I don't agree with your syllogism.

However, what I meant was the human processing overhead in converting between units. I mean, pi is correct, for what it is. Tau would simply be easier for humans to use, much like SI units.

<comment><USER39> Tau is better than pi because a lot of useful expressions have 2pi as a term; SI is better than imperial because we happen to have ten fingers. Tau is a universal simplification like Planck units; SI is merely an anthropocentric simplification.

<comment><USER40> I think the greatest advantage of the SI system is that it's exponential. I don't care _that_ much about what base is used, but switching is just confusing (12" = 1', 3' = 1yd).

</comment></comment></comment></comment></comment><comment><USER41> In math, you see 2π everywhere, for example in the Fourier Transform. So in that regard it'd make more sense if that was the constant.

Visually it looks wrong, pi looks like 2 tau, not the reverse.

</comment><comment><USER42> math background and then studying robotics for a bit, where all we have are models of the reality, I now laugh at such comparisons.

Both Tau and Pi are models for mathematics that work- to argue which is true is nonsense. They are both correct but neither is true, or god-chosen. We made them up, folks!

</comment><comment><USER43> _π_ is not "wrong", that doesn't make any sense. However, I agree with the author that expressing things by using _π_ is more complicated and not as elegant as expressing things with _τ_.

<comment><USER44> Fourth paragraph:

> It should be obvious that π is not "wrong" in the sense of being factually > incorrect; the number π is perfectly well-defined, and it has all the > properties normally ascribed to it by mathematicians. When we say that "π is > wrong", we mean that π is a confusing and unnatural choice for the circle > constant.

<comment><USER43> Yes, the article is correct and I agree with it, I just feel the wording is unfortunate.

<comment><USER45> The wording is marketing.

<comment><USER19> True, and it's not even my marketing; it comes from Bob Palais' original article "Pi Is Wrong!".

</comment></comment></comment></comment></comment><comment><USER46> Sometimes I just feel stupid. Reading this article is one of those times :)

Kudos to author though, I think most of mathematicians out there just take math as it is. Lack of entrepreneurial spirit I'd say.

<comment><USER47> > I think most of mathematicians out there just take math as it is.

Really? People whose job is continually creating new math daily are just taking math as it is?

<comment><USER48> Sure, creating new stuff doesn't necessarily imply throwing everything out each time you make an addition or change.

It would be like a startup guy re-inventing alarm clocks and breakfast every morning, followed by re-inventing showering, shaving, dressing, opening the door, entering the car, starting the car, what lane you drive in, etc.

You'd never get to your workplace to do whatever it is that your startup is creating ("We Are Re-inventing Innovation!" -- you might think I'm joking but that's a common tagline even PARC used it).

Some stuff you take as it is (a baseline) and you create around it.

Maybe tau is something to consider more seriously but pi has done pretty well for itself and many don't consider changing it to be a big priority.

</comment></comment></comment><comment><USER13> #define tau 6.2831853

If you haven't gotten around to it, today's a good day.

<comment><USER49> Wouldn't it be better to do

        #define M_TAU = (2.0*M_PI)

instead, so that it's clear that it's a math constant instead of a local variable? Also, I suspect that the math.h pi constant is accurate to more than 8 decimal places, so this way you don't lose precision.

<comment><USER13> Whatever is appropriate in your context. :)

What I really mean is this: use it. If you're a tauist, but tau isn't in your header file / constant library / whatever you use, today might be a good day to put it there.

</comment></comment></comment><comment><USER50> Both pi and tau form infinite strings of prime numbers with their digits. See if you can get the first twelve!

</comment><comment><USER51> Good article, and your arguments are strong. As long as we're being contentious, though, I would like to point out that e is a more interesting number than τ or π. Sure, you can make circles with π (or τ) and do angular calculations galore, but without e you've really got nothing more than that. Rate of growth? Compound interest? Hidden things of the universe? Fuhgedaboutit.

<comment><USER19> _The Tau Manifesto_ author here. Don't yell it too loudly, but I strongly agree: _e_ is by far the most important of these numbers. But _e_ is the natural choice, so I don't have any bone to pick with it. (Bob Palais made an analogy in "Pi Is Wrong!" Suppose _e_ were defined as 1/2.718281828... Then there would be confusing negative signs everywhere. Exponential decay would have a _positive_ exponent, etc. Such is the case with τ and π, with a factor of 2 in place of a factor of -1.)

</comment></comment><comment><USER52> Aw dang, I missed Pi Day again! Stupid timezone. I guess tau will be getting my support this year ...

</comment><comment><USER53> The next 100 years people will ask "what is tau?" and one will say "it's 2pi".

</comment><comment><USER54> So π is a reduced version of τ?

</comment><comment><USER55> Euler's identity: e ^ (i * pi) = -1 will be uglier: e ^ (i * tau/2) = -1

<comment><USER24> Maybe read the linked page? Maybe see section 2.3?

</comment></comment><comment><USER56> This argument gets pretty complex, but the thing I like about pi is that it is fundamental. Sure 2 * pi might occur more commonly in important expressions, but 2 * pi is only special because pi is special.

<comment><USER24> Is it circular reasoning to suggest pi is only special because 1/2 tau is special?

See what I did there?</comment></comment>


Russian "troll" describes interview for meddling in elections - <AUTHOR> https://www.recode.net/2018/2/18/17025216/russia-troll-factory-facebook-election-hillary-clinton <comment><USER2> At the end he makes an interesting point: that this worked in the US not because it has a lot of stupid people (which Russia presumably has too) but because it has a lot of stupid people _who have not been lied to too much._

"Who really reads the comments under news articles, anyway?," he said when asked whether the tactics worked in Russia. "Especially when they were so obviously fake."

"But for Americans, it appears it did work," he continued. "They aren't used to this kind of trickery. They live in a society in which it's accepted to answer for your words."

<comment><USER3> When I moved to United States from a semi-communist country this was one the things that I found amazing about American Society. If you someone tells you something people just belive it. For example even CEO's have fake resumes[1], because people just believe what you tell them. In the country where I grew up, people are so used to lying and scheming that people just assume everyone is a cheat by default unless proven otherwise.

It was just an amazing feeling to be a part of higher trust society like USA. Things are just easier and less stressful, you are not constantly worried about someone trying to get you.

1\. [http://www.businessinsider.com/successful-executives-who- hav...](http://www.businessinsider.com/successful-executives-who-have-lied-on- their-resumes-2015-7)

<comment> 52-6F-62 Having grown up in North America, I think I can say that the kind of higher trust society you're speaking to only exists at certain strata.

If you were born into a lower strata, upward movement will sometimes be viewed with suspicion. If you were born high, you'll not likely sink below your level.

In short, I think that's a privilege of the upper-middle classes and above.

</comment></comment></comment><comment><USER4> Non blogspam link: [https://www.washingtonpost.com/news/worldviews/wp/2018/02/17...](https://www.washingtonpost.com/news/worldviews/wp/2018/02/17/a-former- russian-troll-speaks-it-was-like-being-in-orwells- world/?utm_term=.a90b3c0d86ed)

</comment><comment><AUTHOR> The interesting bit to me is that the guy didn't make the cut. ML based methods are way behind humans at this point, but how far off is the day that we could train something to pass? 5 years? 3? Less? Especially for the sort of short-form comments on news articles, it seems possible to me to at least insert high-confidence "sounds American, but false" today-ish.

<comment><USER5> So this is an entirely out of my ass theory but here goes...

The reason something like ML is failing here is because what the russian trolls are trying to do is fundamentally change how discourse occurs, how people in the US receive and process information, and the tone of the conversation. ML is great are reproducing things that already exist. That's why they get accused of being racist...because they are reproducing patterns in data. The russians were trying to cause things to happen by changing the conversation.

That's fundamentally different and I haven't seen a lot of ML systems where one can dictate a goal like that and have the system work out the response. From what I know, that seems like one of the differences in the 'older' schools of AI and the newer schools that let the field actually have such an explosion of success nowadays...they got way more comfortable with backward vs. forward looking learning.</comment></comment>


The Potential of StatusNet Properly Explained [Federated Microblogging] - <AUTHOR> http://siliconangle.net/ver2/2009/10/27/the-potential-of-statusnet-properly-explained-federated-microblogging/ <comment><USER2> Of course we need a federated Twitter like service. Let's get moving!

</comment><comment><AUTHOR> .. in which I rehash my theory as to how a federated microblogging network could supplant Twitter, as well as correct the truly puzzling analysis from Erick Schonfeld.</comment>


Using Reading Strategies to Help Computer Science Students - <AUTHOR> https://gse.gmu.edu/research/tr/articles/cloze <comment><USER2> Personal rant:

Wow. No joke, this article is written by my 9th-grade geometry teacher. The same one that actively campaigned to remove me from of our school's gifted- and-talented mathematics track because I "asked too many questions" (despite being a consistent top performer in her class).

After high school I went on to earn a BS, MS, and PhD in mathematics and computer science (and successfully taught computer science to hundreds of students at a top-tier U.S. university) before moving on to an entrepreneurial career in the tech industry.

My experience is obviously personal and nothing but anecdotal, but I wouldn't trust this teacher to come to any conclusions about what does or doesn't work in computer science education without first attempting to control for her own lack of comprehension regarding the perceptions she has of her students (something she repeatedly relies on in this teacher research project).

Edit: to give credit where it is due, I did have two excellent and encouraging computer science teachers at that same high school.</comment>


S3 now manages 40 billion objects - <AUTHOR> http://perspectives.mvdirona.com/2009/02/25/FAST2009KeynoteAWSS3.aspx

<comment><AUTHOR> Couldn't find the pdf linked anywhere else more 'official'.

Looks like the new information is mostly the stats, the Dynamo paper and other old things are still where any details are.</comment>


Why I Sold Most of My Slack Stock This Week - <AUTHOR> https://keithbrown.com/sold-my-slack-stock/ <comment><USER2> > But here's what companies with superior products do. Win. They don't > complain that their opponent isn't playing fair.

Sure let me just distribute pirated copies of MS Office, and expect not to get sued by MS, because "Companies with superior products win. They don't complain."</comment>


Cafe Mediterraneum - <AUTHOR> https://en.wikipedia.org/wiki/Caffe_Mediterraneum <comment><USER2> When I lived in Berkeley (1959-1966) the Med was my home away from home. It was a unique and happening place suitable for procrastinating and doing homework.

</comment><comment><USER3> I only frequented the Cafe Mediterraneum a handful of times while at Cal, usually because of the stifling smell of bleach, etc. Now Wall Berlin, or Cafe Intermezzo, on the other hand, was much more my jam.

<comment><USER4> Wall Berlin was indeed lovely! I believe they called their house brew "rocket fuel." As I recall there was also an unholy drink involving milk, sprite, and melon Torani syrup?

And the people at the tables outside were a key part of the Berkeley scenery there on Durant!

I also was big into Caffe Strada.

Similarly, I never really felt strongly about Cafe Med, even when I lived near Dwight (Unit 2 and environs) and it was nominally on my way to/from campus.

<comment><USER3> I worked there for a short time in college, mainly so that I could get unlimited free drinks, and rocket fuel was actually brewed twice...some folks ordered it with a shot added. Oye.

The people that sat outside were always entertaining. There was a young man with a foot fetish that would constantly be asking women if he could see there feet. Unlike Oakland, Berkeley also had some of the most interesting bums.

</comment></comment></comment><comment><USER5> Since comments are enumerating other Berkeley cafe choices, I recall Brewed Awakening was a common choice among CS/engineering folks on the north side of campus. Much more your basic coffee house meets study hall.

</comment><comment><USER6> I walked down telegraph when I returned to Berkeley for Juliacon a few years ago. I was shocked to see the Med shut down.

Berkeley was a great place to be a student, kind of magical for a magical time I suppose.</comment>


Ahead in the Cloud - <AUTHOR> http://www.slate.com/id/2275571/

<comment><USER2> A stunningly bad article, given it's use of Netflix as an example.</comment>


Adult Swim Singles - <AUTHOR> https://www.adultswim.com/music/singles-2018 <comment><USER2> Click trapped (and non-functional) on Chrome, at least.</comment>


Stop Memsetting Structures - <AUTHOR> https://www.anmolsarma.in/post/stop-struct-memset/ <comment><USER2> Does that also zero the padding that may exist between elements of the structure (or at its end)? Because if not, not memset'ing will open you up to all kinds of info leaks, _especially_ if you plan to send that struct over the network (or to another process, or from kernel to userspace...).

EDIT: Actually I have to apologize, because I'm not certain what the C standard says about whether the padding bytes can change when changing members of the structure (126.96.36.199):

 _6 When a value is stored in an object of structure or union type, including in a member object, the bytes of the object representation that correspond to any padding bytes take unspecified values. 51)_

If that means that the padding can actually also change when just assigning individual members (which I think it does, but footnote 51 only calls out copying the whole struct by assignment, and I'm not 100% sure that "including a member object" means what I think in this context), then that means that copying an unpacked structure across information boundaries is technically _always_ unsafe, because any change of a value in the struct might leak information by changing the padding to undefined values. It's safe with explicitly packed structs, though (which should be the majority of the cases, as you'd have a representation independent of the architecture), but then so is what the author describes. I'd appreciate if someone could clear this up! memset'ing can still help you getting a structure quickly into a well-defined state, though.

<comment><USER3> Sending structures that include padding or that you don't know the exact layout of over the network is another thing you shouldn't do, period.

Code doing that may break with a compiler change or a compilation flag change on one end of the connection, even if you can guarantee both ends use the same CPU.

<comment><USER4> This kind of issue happens all the time with structs that a kernel, driver etc. expose to userspace: [https://j00ru.vexillium.org/papers/2018/bochspwn_reloaded.pd...](https://j00ru.vexillium.org/papers/2018/bochspwn_reloaded.pdf)

Not sending the structure over the network is insufficient, and rigorous memset is a clear solution to this problem.

Also, C structure layout for a specific ABI is strictly determined; if that weren't the case you couldn't compile two C compilation units with different flags/compilers and expect them to work.

<comment><USER5> Also don't expect memset() to actually be a library call at all.

<comment><USER6> And most importantly dont expect memset to be executed at all. Most -O2 compilers happily optimize the memset away if if doesn't care about the sideeffects. Therefore there exists the "secure" memset variants, which are the insecure variants adding a simple compiler barrier, so it isn't optimized away.

And there exists the very few really secure memset_s variants with a real memory barrier which guarantees memset to be executed in load and store order, flushing the cache, so that Spectre attacks are mitigated. security-relevant crypto libraries, like openssl and variants don't care about that, because memory barriers are "too slow". only the Linux kernel does it properly. It's still a mess.

<comment><USER7> you can write your own memset that bypasses all of that. Its just 2 lines of code.

<comment><USER6> I don't trust any memset at all. Literally every single memset I looked at was either broken, too slow or insecure. Mostly the wellknown glibc, freebsd, msvcrt and compiler implementations.

<comment><USER8> That's quite a bold claim. Care to explain further?

<comment><USER6> I already explained it. Noone implements memory barriers in its safe variants, only compiler barriers. And the trivial variants work byte-wise, not word- wise, which is usually 8x slower.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> My favourite trick with designated initialisers is using them with array indices and enums, e.g.

      enum color {RED, GREEN, BLUE};
      char *color_name[] = {
        [RED] = "Red",
        [GREEN] = "Green",
        [BLUE] = "Blue"
      };

      printf("%s",color_name[RED]);

This means you don't have to ensure ordering is the same between the enum and the array, which can be a pain for more complex tables. It's a shame C++ doesn't support this, more details: [https://eli.thegreenplace.net/2011/02/15/array- initializatio...](https://eli.thegreenplace.net/2011/02/15/array- initialization-with-enum-indices-in-c-but-not-c)

<comment><USER10> Why would you ever want to do something like this in c++?

What you are implementing is a map. Just use std::map.

<comment><USER11> Lookup time is widely different if you use std::map. But you can use std::vector in a similar fashion.

</comment></comment></comment><comment><USER12> _Because it's 2019!_

It really irritates me when people give arguments like this. I seriously don't care what year it is, I care that the code I write works. A lot of projects still use C89 because they want the widest portability. C99 isn't very new, but especially in the embedded and other niche industries, C89 (often with some extensions) is all you get.

That said, "= { 0 };" is almost always usable instead of a memset() _and_ works in C89 too.

 _And finally, there is absolutely no reason to check if a pointer is NULL just before calling free() on it_

This is advice I agree with. The nullcheck is in free() itself (IMHO a good design decision --- especially along error-handling and cleanup paths.)

<comment><USER13> > _but especially in the embedded and other niche industries, C89 (often with > some extensions) is all you get._

Embedded and niche industries are forcing their programmers to work with 30 year old tooling? (Instead of 20 year tooling?)

I think at some point, writing yourself a transpiler from C99 to C89 becomes profitable… (The JS community did it for a lot less than that w/ babel…)

<comment><USER12> _Embedded and niche industries are forcing their programmers to work with 30 year old tooling? (Instead of 20 year tooling?)_

Why does how old it is mean anything at all? I personally choose C89 because of its wider compatibility, and I don't think I'm any worse off because of it. As the saying goes, "it's not about the tool, but how you use it." Incidentally, the best programmers I've worked with have also been the ones with the most conservative choice of tools.

 _I think at some point, writing yourself a transpiler from C99 to C89 becomes profitable… (The JS community did it for a lot less than that w / babel…)_

If anything, I think the JS community could learn a lot from the "C community" (a _very_ loosely defined term...) --- the huge amount of churn with anything related to JS and web stuff in general turns me off.

</comment></comment></comment><comment><USER14> Am I the only one who finds this

        int yes=1;
        setsockopt(listener, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof (yes)) ;

much cleaner than this

        setsockopt(listener, SOL_SOCKET, SO_REUSEADDR, &(int) {1}, sizeof(int));

    ?

<comment><USER15> I agree anything is better than a magic number, but really only if the variable is properly descriptive.

What are we saying 'yes' to?

<comment><USER16> Definitely agree that calling it `reuse_local` makes more sense, but OP was just quoting the blogpost.

<comment><AUTHOR> And the blog post was just quoting Beej.

</comment></comment></comment></comment><comment><USER17> I disagree with this author on both counts. 1\. Zero filling is theoretically unnecessary, yes. But theory is not often reality. Zero filling is a defensive measure that protects you from other code that makes unhealthy assumptions. Code external to yours may make assumptions about what lies in your padding, either by doing memcmp's, or adding new fields in a later version of the struct and intending it to be ABI compatible between modules. I'll prefer safe and evolvable code over your nitpick about how it's initialized, thank you very much. 2\. Consider yourself lucky that you only use free() in your code. In more complex code bases, custom allocators are used. They do not always follow the same semantics as are dictated for free(). Maybe instead of saying "this perfectly valid thing drives me nuts", ask why people do it. It's not because they don't know better.

<comment><USER18> > Code external to yours may make assumptions about what lies in your padding, > either by doing memcmp's, or adding new fields in a later version of the > struct and intending it to be ABI compatible between modules.

The content of the padding between members can arbitrarily change during assignments of members, so code relying on the content of it is broken anyways. In the case of an extended struct both methods are equally broken if you don't recompile your module with the updated definition of the struct. Your memset will still have the old size of the struct as the third argument.

<comment><USER19> If you use:

      sizeof(struct_instance)

the compiler will automatically update the size passed to memcpy. (I like passing the instance to sizeof and not the type, just in case the type of the thing being copied changes in a future version of the code.)

<comment><USER18> That is exactly what I said:

> ...if you don't recompile your module with the updated definition of the > struct...

And once you recompiled, the C99 version with the pretty initializer is fixed as well, so there is no advantage in using memset regarding this.

</comment></comment></comment></comment><comment><USER20> > Cue the Rust Evangelism Strike Force chiming in to say that there is really > no reason to be writing new C code in 2019.

Even as a member of the Force (RIIR 1st brigade), I laughed pretty heartily at this. :)

<comment><USER21> Same. But also, I feel like _most_ of The Force's efforts are directed at C++. I could be wrong.

<comment><USER22> C++ programmers need to be converted. C programmers just need sympathy.

<comment><USER23> We don't really need sympathy, we get paid a lot and can afford to drown our sorrows.

<comment><USER22> At least until the next zero-day caused by a buffer overrun. (Kidding, kidding.)

<comment><USER23> I know you're kidding, but C programmers also get paid to provide security fixes. There's plenty of C code out there that doesn't interface with untrusted data/input, or does it in a safe way. So I'm not really in fear of losing my job over a simple buffer overflow.

</comment></comment></comment></comment></comment></comment><comment><USER24> C99 designated init doesn't work for C code that also needs to compile in C++ mode (...yet, a limited subset of designated init is coming in C++20, clang also seems to be more relaxed about this and allows the full C99 designated init also in C++ right now).

For code that only needs to compile as C, I agree. It's one of the best (if not _the_ best addition) to the C language. A nice addition would be default values for struct members in the declaration with compile-time constants.

<comment><USER3> My C++ is rusty (no pun intended), but if your code also has to compile as C++, I think this will work instead of memset:

      struct addrinfo hints = {0};

If C++ requires

      struct addrinfo hints = {};

instead, you could create a macro, and write

      struct addrinfo hints = ALL_ZEROES;

<comment><USER25> Sure. C++ has initializers ({1,2,3}), it just doesn't have C99 designated initializers ({.a = 1, .b = 2, .c = 3}). This is one of the main pain points around C++ not being a true superset of C.

<comment><USER19> G++ actually says "sorry" when it bails on that.

The other (bigger) pain point is that malloc returns void*, and C++ requires a cast.

</comment></comment></comment></comment><comment><USER26> Don't use C99 initializers, or not directly. Write a macro:

      struct point {
        double x, y;
      }

      #define init_point(x, y) { (x), (y) } /* C90 */

      #define init_point(x, y) { .x = (x), .y = (y) } // C99

      struct point p = init_point(0.5, 1.5);

The macro is superior because macro calls are checked for number of arguments. If you have a structure in which certain members must be initialized (to a non-default value), and such members can be added over time, that will save your butt. How? Because when you add a new member that must not be zero/null, you add a parameter to the macro. Then, the compiler will tell you all the places where the macro is called with too few parameters.

Designated initializers eliminate some of the error-prone aspects of C90 style, but don't help enforce the discipline of initializing all members, or a certain subset of members.

Functional abstraction with checked arguments beats fancy new syntax.

</comment><comment><USER27> Another reason to not memset structures: In the code

        struct foo {
            void * bar;
        } baz;

        ...

        memset(&baz, 0, sizeof(struct foo));
        assert(baz.bar == NULL);

it's possible for the assertion to fail, since NULL it not guaranteed to be represented in memory by a zero bytes.

<comment><USER28> > _it 's possible for the assertion to fail, since NULL it not guaranteed to > be represented in memory by a zero bytes._

Technically correct (which is of course the best kind of correct) but you'd be hard pressed to find a system in 2019 where NULL != (void*)0. The most recent machines with non-zero NULL in the C FAQ entry on the matter ([http://c-faq.com/null/machexamp.html](http://c-faq.com/null/machexamp.html)) date back to the mid '90s.

<comment><USER29> The literal `0` is guaranteed to be the null pointer value when used as a pointer, so by definition

        NULL == (void*)0.

But given

        void *p = 0;
        intptr_t i = 0;

it is _not_ guaranteed that `memcmp(&i, &p, sizeof(p)) == 0`.

<comment><USER30> > it is not guaranteed that `memcmp(&i, &p, sizeof(p)) == 0`.

Even less intuitively, it is not guaranteed that `(void*)i == p` since `i` is not an integer constant expression, even if the value is known to be 0.

</comment></comment></comment></comment><comment><USER31> Most interesting to me is that

      &(int) {1}

is equivalent to

      int one = 1;
      &one

How did I not know about this? I'll be using it from now on.

</comment><comment><USER32> The article gives very dangerous advice, especially for networking code. Padding will not be overwritten and when transmitting the struct (provided there is no attribute packed or the compiler ignores it) information will leak.

Yes, someone will point out that there are languages that do not have such problems. However, when still using C, one has to be extremely careful...

<comment><USER33> I am reasonably certain that any code that happens to transmit padding bytes (or observe them in any way) is abusing at the very least implementation- defined behavior.

</comment></comment><comment><USER26> > _While we're on the topic of little annoyances, another pattern I often see > is using a variable just to pass what is effectively a literal to > setsockopt():_

      int yes=1;
      setsockopt(listener, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof (yes)) ;

_> Which can instead be written as:_

      setsockopt(listener, SOL_SOCKET, SO_REUSEADDR, &(int) {1}, sizeof(int));

_>_

I'm sorry, no it cannot. Or, rather, not without

1\. Switching C90 code to C99; or

2\. Switching C++ code to C99.

Good luck with 2.

GCC and Clang support this in C++ as an extension; then you're not writing in standard C++ any longer.

1 is a nonstarter in project that mandates C90.

In other words, there may be valid reasons why the code is that way other than ignorance of compound literals.

</comment><comment><USER34> > Elements that are not specified are initialized as if they are static > objects: arithmetic types are initialized to 0; pointers are initialized to > NULL.

That's actually not true. It is the case when initializing arrays, but for structs (and unions) any non-named member has "indeterminate value" (see paragraph 9, section 6.7.8 of ISO/IEC 9899:1999; unchanged in C11 and C18). Well, at least according to the standard - GCC, Clang and MSVC all happen to make it zero, but it's not guaranteed by the C language.

The trick with avoiding a variable when passing an address to a literal value is nice though, I didn't know that. There are some places in my code that could use it ;)

<comment><USER35> Para 9 is talking about members that do not have names in the struct definition. Missing initializers are covered later:

21 If there are fewer initializers in a brace-enclosed list than there are elements or members of an aggregate, or fewer characters in a string literal used to initialize an array of known size than there are elements in the array, the remainder of the aggregate shall be initialized implicitly the same as objects that have static storage duration.

</comment></comment><comment><USER36> The memsetting code is more obvious for older programmers and probably more compatible too. I don't want to start a flame or something, but if you want shiny new programming features and initialisation you should probably look away from C and try javascript ot something similar. One of the reasons we love C is that the same code compiles and works cleanly on the latest linux, a freebsd 4.11. or PIC16.

</comment><comment><USER37> A new edition of K&R that is edited to address the new features that have been added since C89. I suppose that some might argue that there isn't much need for a new edition because anyone who can grok C89 could probably grok the rest themselves Internet-based self-teaching, but I would pay good money to have all those resources in consolidated into one printed resource.

</comment><comment><USER38> After debugging undefined padding bytes breaking per-byte pod type hashes, I'll hang on to my memset, thank you very much! :)

</comment><comment><USER39> This is mostly a matter of taste, but if the first example makes sense, the second example looks less clear, because, for someone quickly skimming through the code, a variable which have a somewhat clear meaning "yes" (that could be improved) is replaced with a magic number who have no intrinsic meaning.

<comment><USER40> I agree. I'm also not a fan of doing `sizeof(typename)` as it can hide intent

</comment></comment><comment><USER41> I'll stop memsetting structures as soon as you support designated initializer lists in C++.

<comment><USER42> Apparently it's in C++20, so feel free to stop memsetting whenever you update your C++ compiler next (clang needs a flag to enable it, gcc has had it as part of it's c++2a support for 2 years)

</comment></comment><comment> GuB-42 It is C99 code.

It is worth noting that many C projects go for extreme portability. That's why C is used in the first place, and sometimes C99 is too much. I still sometimes work with compilers that barely support C89. That's for the aerospace industry BTW. There are even some libc that don't accept free(NULL).

If you know the platform you are writing for is not ancient, that's fine but if you are writing portable code, you have to realize these ancient platforms are still alive.

I think ditching K&R C is fine though. I've seen some of it but never encountered a case where it was the only thing the compiler supported.

<comment><USER33> > There are even some libc that don't accept free(NULL).

That's pretty much the completely opposite of portable, since it violates the C standard.

<comment><USER43> The "extreme portability" he's talking about is portability of projects to compilers and libc implementations that behave badly, possibly in standards- violating ways like this.

</comment></comment></comment><comment><USER44> Interesting, I was under the impression that compound literals of form (type){value} were illegal and the correct form was (type []){value} but apparently not!

</comment><comment><USER45> There were a few old free implementations which misbehaved when given null. Maybe they are all gone now, but there was a reason to do it.

<comment><USER46> Indeed, I recall getting messages along the lines of "error: freeing a null pointer" or something like that. On the other hand, what are the chances of some freshly-written C being built with an old compiler? (possibly moderately high in the embedded world?).

</comment></comment><comment><USER47> Last I checked C99 initializers require constants, so they don't generalize, whereas the pattern shown does. I'd prefer if the initializers pattern did allow variables on the right-hand side for this reason.

<comment><USER48> Not true, designated initializers expect the same kind of expressions are variable initialization (which is limited at global scope, but arbitrary when initializing local variables).

</comment></comment><comment><USER49> Oh? I think I reviewed a few Linux kernel patches this week that used memsets to fix up messed up aggregate or designated initialization which is the most concise way of initializing the padding.

</comment><comment><USER50> Frankly, use the style that is idiomatic to your code base is what is the most important. Keeping things consistent is what matters.

And if you start a new project, just use the style you prefer and enforce it :)

</comment><comment><USER51> -Wclass-memaccess is a warning emitted by newer g++ versions. It's led me to use safer/better, if less convenient, options. (That being said, it's only applicable to C++.)

</comment><comment><USER52> We use Crystal for networking code, and it has nice C binding semantics. Haven't had to drop down to pure C much because Crystal just works, and doesn't have the learning curve or un/boxing hoops of rust. It's basically Ruby-like but with rudimentary type-inference, like what Ruby 3 wants to be but Crystal already exists... and orders-of-magnitude more performant.

</comment><comment><USER53> Interestingly enough, Clang (but not GCC) appears to embed memset for you despite the code using initializers: [https://godbolt.org/z/khJQLV](https://godbolt.org/z/khJQLV)

The author of the article should file a bug report. After all, if they wanted to memset, they'd just do it themselves.

<comment><USER25> The compiler knows the representation of NULL on the targeted platform and if it is safe to use memset. It is perfectly valid for the compiler to make this transformation if the platform represents NULL as zero.

<comment><USER53> My post is sarcasm, I just find it humorous that one's efforts to eliminate explicit memset doesn't stop the compiler from going one step backwards and embedding it just the same. If you replace the initialization with memset, it still generates identical code for both Clang and GCC.

<comment><USER54> I don't think the point was to eliminate "code that looks like memset at the assembly level", but to eliminate memset at the source level, which the author considers cleaner.

Under the covers, one would hope a good optimizing compiler could choose the same assembly for both, which may very well look "memset like" since fewer, wide writes are generally more efficient.

</comment></comment></comment></comment><comment><USER55> Ugh, what do you do when the structure definition is updated and you now have uninitialized values?

If there's no explicit initializer I think memset,calloc or ={0} is just fine thanks.

<comment><USER46> Unclear to me why you've been downvoted; I've seen many cases where a structure has had elements added which would be end up uninitialised. A memset(&struct,0,sizeof(struct)) seems pretty reasonable to me.

<comment><USER42> Probably because the article specifically addresses this issue and C99 specifically initializes any members who are not named in the initializer form to either zero or NULL.

</comment></comment></comment><comment><USER56> If you only use super simple structures maybe. It is quite common to zero out a structure and use only parts of it. It is also quite common to have to pragmatically fill in the structure.

<comment><USER57> > It is quite common to zero out a structure and use only parts of it.

That point is addressed in TFA.

</comment></comment><comment><USER58> memset() heads off the dreaded "I added more fields, but forgot to add the initializers everywhere" bugs. Well, it will still be a bug, but at least it won't be a heisenbug.

<comment><USER48> The point of the article is that C99 initialization does the same.

</comment></comment><comment><USER59> Because of c spec idiocy it isn't event sufficient to use memset anymore, you need to use memset_s.

But "stop memsetting" is clearly nonsense if you care about security.

<comment><USER60> Surely you only need memset_s if you're doing this for security reasons, as if memset is optimized away it's because the compiler can prove the observable semantics are the same.

<comment><USER59> Nope, memset will often be "optimized" such that padding is not zeroed. It's not because the compiler sees that padding isn't observed, it's because reading from padding is undefined. Because reading from padding is undefined the write (also undefined) by definition has no observable side effects.

Memset_s is the only way to guarantee that padding is actually zeroed, well memset or bzero_s obviously.

It's critically important for people to understand that if the C spec says doing X is undefined, then current compiler writers interpret this as allowing them to do anything they want, even when it clearly introduces security vulnerabilities.

<comment><USER61> are you sure that the padding is not zeroed by memset?

[1] says that memset_s exists because it is not optimized away if it just clears a variable that will not be used after the call (unlike memset)

On the other end: people who do this for security reasons say not to trust memset_s is 'an optional feature of c11 and not really portable' [2]

[1] [https://en.cppreference.com/w/c/string/byte/memset](https://en.cppreference.com/w/c/string/byte/memset)

[2] [https://www.cryptologie.net/article/419/zeroing-memory- compi...](https://www.cryptologie.net/article/419/zeroing-memory-compiler- optimizations-and-memset_s/)

<comment><USER33> I don't think memset is required to zero out any padding, because the effects of this are not observable.

<comment><USER61> The function memset gets the length of the area to overwrite, how is it to know where the padding is?

<comment><USER33> The compiler knows the layout of your structure and can choose to elide memset calls or replace them with equivalent code.</comment></comment></comment></comment></comment></comment></comment>


Website plot sun position / daylight that will reach a Google map point. - <AUTHOR> http://www.suncalc.net/

<comment><USER2> How did you draw the arc overlays to trace the sun's position? Is it just via the google maps API?

Also, when I zoom in and out of the map, the arcs don't seem to appropriately scale. Maybe I'm confused</comment>


Harbour Air completes world's first electric aircraft test flight - <AUTHOR> https://vancouverisland.ctvnews.ca/mobile/harbour-air-completes-world-s-first-electric-aircraft-test-flight-1.4723636 <comment><USER2> Uh, first commercial aircraft electric test flight.

There are plenty of custom experimental electric airplanes that have already flown with humans on board, but so far as I know none of them have been standard commercial general aviation aircraft that are outfitted with high power electric motors and batteries.</comment>