Walmart Node.js Memory Leak - <AUTHOR> http://www.joyent.com/blog/walmart-node-js-memory-leak <comment><USER2> I'm actually looking into a segfault issue deep in the bowels of a C++ addon we have in node.js (anyone in #node.js will have seen me over the past few weeks ask about it), but what reading this makes me realize is how woefully underequipped I am to hunt for problems of this nature.

My problem is likely in one of our addons, but this _kind_ of debugging, this whole genre of problem solving is entirely beyond me. How do I get to this level? What do I need to learn? To study?

It's just a little depressing to read something like this and see how far the road ahead goes, despite how far I've already traveled...

<comment><USER3> Debugging severe memory corruption or memory leaks is annoying, and can occasionally take a lot of time, but it's not necessarily _that_ bad. Here are some pointers that may be helpful.

Tools: valgrind and gdb are obvious. But don't forget your compiler! Crank up the warnings, and look through LLVM-clang's -fsanitize=<foo> and warning options. (Also, if you're already on OpenBSD, check out the "S" flag to malloc; if you're on Solaris, check out, well, the blog post.) Finally, Boehm's conservative garbage collector has a "find memory leaks" mode, which _looks_ useful for those cases where you can't get valgrind working. If all else fails, shovel through the memory dump looking for repeated patterns.

Testing: try to reproduce the problem; the first iteration may look something like "it runs out of memory after 36 hours". Then simplify: for instance, the author of the article could have asked "does this still happen if the server closes the connection immediately, without sending any data" and would have found the bug very quickly. (Of course, you're likely to ask a lot of wrong questions before hitting on the right one; experience and a full knowledge of the system you're working on is useful but not sufficient.) Questions like "does this happen more quickly if we ping 100 times per second instead of once every ten minutes" are often useful as well. (Finally, just printing memory usage every N seconds is helpul.)

Coding: be careful when writing code. The usual ways of improving code quality (e.g. code reviews) work to reduce memory leaks, too. Try to run a multiple- hour soak test every so often during development (preferably on a CI server); it's a lot easier to debug "hey, we suddenly run out of memory after yesterday's commits" than "well, something goes wrong in production". If you're doing new development, consider alternatives to malloc() - arena/pool allocation (e.g. libtalloc) is convenient and very fast if your memory use is tree-like (e.g. a connections owns a request owns some memory to sort the data before returning it). In C, goto a single chunk of cleanup-and-return code rather than duplicating the cleanup at every place where you exit from the function.

<comment><USER4> > _Tools: valgrind and gdb are obvious._

The fact that someone is saying they don't know where to start seems to indicate this isn't true.

</comment></comment></comment><comment><USER5> I looked at node.js for a system I'm involved with creating, but ultimately we went with Erlang just because it's been around a lot longer and is more stable in terms of things like this. We're working on a semi-embedded system that will not always be on-line or accessible for debugging. We also considered Go, which probably would have been more familiar to C++ guys, but it was also deemed a bit immature even if it seems like a very pleasant language to work with.

Cool writeup though!

<comment><USER6> 2 or 3 years ago I hit memory leak in Erlang's stdlib's httpc... just saying.

<comment><USER7> This is impressive work by the Joyent team!

I've seen two sources of memory leaks in Erlang based systems: 1) unbounded process message queues, and 2) passing binaries across process (pid) boundaries.

Many beginning erlangers run into these, and they're relatively easy to identify and correct. With a little practice, these become easy patterns to recognize and avoid.

As far as httpc, I'm unaware of that bug -- but I can say that I recently worked on a commercial product that leveraged httpc as a core component of the service, and it worked fine.

<comment><USER6> > As far as httpc, I'm unaware of that bug -- but I can say that I recently > worked on a commercial product that leveraged httpc as a core component of > the service, and it worked fine.

It was fixed soon after discovered.

</comment></comment></comment></comment><comment><USER8> Thank you, I really enjoy detailed write-ups like this. It is fascinating to see how an engineer approaches an elusive problem.

</comment><comment><USER9> I'd like to read more about how we can prevent this class of error going forward. Could stronger typing or RAII or some other feature or trick have made the bug apparent at compile time?

I made a very basic Node.js module in C++ with V8 and it was surprisingly difficult to make a good (idiomatic JS behaviour, believably bug-free) wrapper for a straightforward class and factory method. I say this coming from Boost Python and Luabind, where there are some tricky parts to bind complex classes, but simple ones are easy enough, and once written, obviously correct.

</comment><comment><USER10> I've been running an extremely simple Node application on 0.10.18 for a while now and it has a very gradual memory leak. My code is just a few dozen lines, and it all seems pretty innocent. I am also using Hapi, so I thought maybe Hapi has a leak in it somewhere. Now I wonder if I have the same leak as Walmart here. I just now upgraded to 0.10.22 and am curious to see where I end up. If the leak goes away then hot damn, I got lucky :)

</comment><comment><USER11> And a one-line fix. Damn that must be satisfying.

<comment><USER12> Reminds me of that old joke:

The office photocopier broke down, so the manager called in a repairman. The repairman takes one look at the machine, draws an 'X' at the problem part, and hands the manager a bill for $500. The manager was shocked at the price, and demanded an itemized bill. The repairman simply wrote:

        Marking the 'X'              -   $1
        Knowing where to put the 'X' - $499

<comment><USER13> I started Googling the Picasso "principle" about it being a lifetime to know how to do it, but it turned into Googling this one instead. Found a snippet, "Karl Steinmetz (German-born, U.S citizen), the well known electrical engineer who worked out many details of a.c. theory and was responsible largely for the adoption of a.c. for commercial use, was once called in by the General Electric Company to examine a poorly performing transformer. After a few minutes, Steinmetz marked an x on the transformer core and said, "It will work if you take off the turns from this x to the end." The prescription worked well, and Steinmetz later sent G.E. a bill for his service of $10,000. The company official thought the bill excessive and asked for the itemization. Steinmetz then sent them a more detailed bill: For putting x on transformer core : $1; for knowing where to put the x: $9999." It's funny that in today's world, both Picasso and Steinmetz take "minutes" to do this, but in perhaps earlier tellings, it took hours for Picasso to do his work and days for Steinmetz: [http://edisontechcenter.org/CharlesProteusSteinmetz.html](http://edisontechcenter.org/CharlesProteusSteinmetz.html)

<comment><USER14> Never happened.

[http://www.snopes.com/business/genius/where.asp](http://www.snopes.com/business/genius/where.asp)

That page does suggest a possible origin for the (equally apocryphal) Picasso fable, though, in a quote from James McNeill Whistler.

<comment><USER15> Snopes provides no citation for the Whistler story. That prompted me to look it up:

[http://en.wikipedia.org/wiki/James_Abbott_McNeill_Whistler#R...](http://en.wikipedia.org/wiki/James_Abbott_McNeill_Whistler#Ruskin_trial)

I had no idea that this quote has such a delightful and well-documented origin. I'd only heard the story told about Picasso (and various mechanics and engineers). A great example of how these things morph over time.

The story is delightful because it pitted two great Victorian aesthetes against one another. Ruskin had said this about Whistler:

      I have seen, and heard, much of Cockney impudence before now;
      but never expected to hear a coxcomb ask two hundred guineas
      for flinging a pot of paint in the public's face.

So Whistler sued for defamation and was examined by Ruskin's lawyer:

      Holker: Did it take you much time to paint the Nocturne in Black and Gold?
              How soon did you knock it off?
      Whistler: Oh, I 'knock one off' possibly in a couple of days – one day
                to do the work and another to finish it.
      Holker: The labour of two days is that for which you ask two hundred guineas?
      Whistler: No, I ask it for the knowledge I have gained in the work of a lifetime.

The insinuation in the lawyer's question ("how soon did you knock it off?") is hilarious!

Whistler, by the way, was a great wit and had a famous skirmish with Oscar Wilde:

[http://quoteinvestigator.com/2013/09/05/oscar- will/](http://quoteinvestigator.com/2013/09/05/oscar-will/)

... which inspired this Monty Python classic:

[http://www.youtube.com/watch?v=UxXW6tfl2Y0](http://www.youtube.com/watch?v=UxXW6tfl2Y0)

</comment></comment></comment></comment></comment><comment><USER16> FYI, a typo -- "illusive" -> "elusive". (haven't read further yet, just wanted to let you know).

</comment><comment><USER17> Wonderful blog post; major props for the engineering time expenditure. But, why do you have an Olark chat widget that says "Contact Sales". I don't want to have anything to do with those schlubs! If anything, I want to talk to serious engineers like you!

Perhaps a better call to action would be:

* Talk to us about how we can solve your problems

* Chat with us

* We can help you too

* What's up?

</comment><comment><USER18> Ironically, this page hangs Chrome indefinitely when I try to load it. Luckily it only hangs the tab so I can still close it. I guess I'll fire up Firefox to see if I can actually read the article.

Edit: Actually, it loads fine in a private browsing tab, so it must be a bad interaction with some extension. Oh well.

<comment><USER19> I am curious why you find this ironic? What is your definition of irony?

<comment><USER20> Chrome uses V8. Chrome is the primary user of V8.

Not supporting OP's definition of irony, whatever it is, just speculating how OP could've thought of it.

<comment><USER19> I have a strange hang-up/interest in people's concept of irony. I am not sure Alanis Morissete would be able to find any irony in this situation.

<comment><USER21> I find the interest in how irony is identified and (mis)used much more interesting than the actual use or misuse itself.

I guess you could say I have a hang-up about your hang-up, or an interest in your interest. ;)

<comment><USER19> "Ironically" is a word that you see and hear frequently in everyday english. I think its interesting how varied people's concept of irony is for such a common word. From what I can tell most people's definition is something between "serendipity's evil twin" and "partially related." It seems in this case OP thinks the definition is the latter. I think that sooner or later "ironically" is going to have the same fate as "randomly," ("It is so random we ran into you, we were just talking about you.) which I think has zero meaning in conversational english.

To be honest i think most people's definition of irony is largely shaped by Alanis Morissette's terribly misinformed but catchy song and the hipster d-bag that says he has an "ironic mustache."

I think it is the evolution of language that is interesting? It seems like we have a case of the more a word is used the definition becomes less concise until it carries no meaning. There has to be some linguistic jargon for this type of situation.

<comment><USER21> Before I posted that I googled "define irony" and was surprised to see the first definition as something that sounded like sarcasm. The definition appears to already be changing, making hipsters retroactively correct, which is just another reason we can all hate them. ;)

</comment></comment></comment></comment></comment></comment></comment><comment><USER22> That is pretty impressive - I love how they could use DTrace to scope out what was going on.

</comment><comment><USER23> I've always loved the debugging tools in solaris (smartos or whatever now).

</comment><comment><USER24> Can anyone tell me if there is reason for this in bash?

         DEST=~~/public/walmart.graphs

<comment><USER25> Not bash. '~~' gets replaced by the MANTA_USER environment variable by the manta command line tool mput.

</comment></comment><comment><USER26> I assume that they can restart the server at intervals or use load balancing. A few months of developer timer for something like this seems excessive unless he was working on something else as well.

<comment><USER27> As a former software engineer at Walmart I can tell you that a few months for something like that is nothing to them. They employ several thousand devs at the home office. Having one of them focus on a bug like this isn't an issue in terms of time or money. In their minds its worth it given the scale of the enterprise.

</comment></comment><comment><USER28> I think there are still quite a few C and C++ programmers out there. To me this is a great example of why it is better software engineering to write a server in something like Node.js. Because rather than having a million code bases with potential memory leaks like this one, there is just the Node code. In ordinary JavaScript code its impossible to cause a problem just that.

<comment><USER29> It is fairly easy to create a long running server in a GC'd language that will continually consume more memory. Some don't like to call it a memory leak, which is why I put it the way I did, but the effect is the same.

At the end of the day, the more that you think this is impossible the more likely your programs will experience it. So please don't think that your program is immune to this because you use Javascript.

<comment><USER30> Good example might be a server process which never releases memory, so the longer it runs the more memory it "consumes". That is, the maximum memory required to handle any previous request.

This might be a well known solved problem, but I have heard it mentioned before.

<comment><USER31> I have an apache box that runs a bunch of PHP and flat HTML sites. I have to set it to only use 10 processes, and to kill them every half hour, because they all gradually swell up to 35MB each (which I imagine is where they've loaded pretty much all the PHP on my server, independently of each other).

Without the number limit, or the kill policy, the server runs out of RAM and crashes. (it's only a cheap one, with 512MB RAM.) Luckily it's a very low traffic set of sites, so these limits don't break the experience. I'm glad I didn't have to solve this problem any deeper!

<comment><USER32> Have you enabled the GC? Some default configs disable the PHP GC because it's SOP to run temp startups (eg mod_php) or restart them on a regular basis (like you).

<comment><USER31> ooh, no, thanks for the tip :)

I haven't had to log in for a while (about a year), so I've been happy to leave it as it is. When I migrate over to DigitalOcean (which I've been intending to do for ages now) I'll look into that instead!

</comment></comment></comment></comment></comment></comment><comment><USER33> Excellent details on the sleuthing that went on to find this error. I think it's great that there are great tools available to debug errors like this and your write up helps me in learning more about how to go about properly debugging my Node apps.

</comment><comment><USER34> cool writeup. while not a node.js user, i love these sorts of tours of system internals - i always learn a lot, both specific tools and also processes of using them.

thanks for the details, very articulate and useful stuff.

</comment><comment><USER35> we know that node.js is a bad piece of software, you don't need to remind us about it all the time

(down vote me)</comment>


Microsoft could surpass AWS in cloud revenue this year - <AUTHOR> http://www.investopedia.com/news/microsoft-could-surpass-amazon-cloud-computing-year-amzn-msft/ <comment><USER2> When do investors start talking about AWS being distracted.</comment>


Multi-core cryptography for Node.js - <AUTHOR> https://github.com/nodejs/node/issues/678#issuecomment-269466849 <comment><USER2> > Seriously, we really need to ensure together that Node can competently > handle concurrent multi-core HMAC on 4GB files, or it's pretty quickly going > to fade into irrelevance.

I am getting really tired of the tendency of engineers to do this: take an argument that "technology X should behave like Y", get some pushback/criticism about it, and then extremitize that argument to "if technology X does not support _this one specific use case_ which requires it to behave like Y, technology X is _completely useless_ ".

Like, I think I come down towards your side on making sensible heruistics for when to offload CPU-intensive work to other available hardware. I can see a lot of potential drawbacks (implementation-wise and operationally), but it would be a useful capability to have. But falling back to "Node will become irrelevant if you don't do this!" when people don't want to incorporate the library he built into core is both rude and not constructive.

<comment><AUTHOR> I purposefully tried to make the comment constructive and inclusive, hence the "we" and "together".

Hashing 4GB files may roll some eyes but I don't think it's helpful for Node to be shying away from it or dismissing it out of hand. I don't think that's a positive attitude for Node to have as a community going forward. Stress tests like this should only improve Node. What's there to lose? We should be saying "4GB, bring it on!"

Positively speaking, there's so much more we could be doing that we're not. We should be pushing the multi-core data plane side of Node far more than we are. There's so much potential for SIMD etc. in many APIs. Node is C++ under the hood after all. Javascript is just the control plane, not the data plane. And I actually do think Node has been lagging slightly in the performance department, and I don't mind if people call that out. This issue in particular has been open since 2012 (going back to the archives).

Lastly, my intention is definitely not to incorporate crypto-async into core. Core crypto has a completely different streaming crypto api. crypto-async was designed more as a stopgap for us at Ronomon in the meantime, but also as a proof-of-concept, to get the ball rolling and show people that the issue was worth pursuing.

So I stand by the remark and hope the issue will be a catalyst and wake-up call. Node has had some spectacular success but there's alot of work still to be done.

<comment><USER3> A lot of pushback is just a kneejerk, but a lot of it is also by people who have a really good mental model how Node works. Changing models is hard and takes time.

Personally, I'm all for "multi-core data plane", but done responsibly with future design in mind and over a longer period of time. Great that conversation is happening.

</comment></comment></comment><comment><USER4> Something that scares me here--where is the awareness of emergent security errors arising from multi-threaded cryptography?

As an example, consider a multithreaded streaming crypto API which consumes a symmetrically-encrypted data stream with an HMAC at the end. If multiple threads are simultaneously decrypting this stream, then how do they synchronize and verify their respective HMACs (let alone one shared one)? Frequently, in my experience, the answer is never--they just pass results blindly to an application thread which then operates on this data. By the time some last thread has belatedly realized that the entire stream was forged,the attacker has already been able to force the application to run malicious code.

</comment><comment><USER5> Everything in the comment chain from the node core devs seemed very reasonable. Add async crypto support as an option, investigate further whether async crypto should be the default by looking at performance numbers from real-world apps that are using it.

Not exactly sure what the issue is beyond that progress is going pretty slow, but no one has actually submitted a PR for it yet so you'd be arguing for priorities instead of whether they want to support it at all.

</comment><comment><USER6> Some very impressive and practical performance gains... Main repo for the project with further details:

[https://github.com/ronomon/crypto- async#performance](https://github.com/ronomon/crypto-async#performance)

<comment><USER7> Thanks for the link!

"While crypto-async is a fraction slower per call than crypto (possibly because of the overhead of interacting with the threadpool), for buffers larger than 1024 bytes it shines and provides N-cores more throughput. crypto- async achieves up to __3x more throughput __. "

</comment></comment><comment><USER8> Microsoft's Bing group customized Node.js for CPU-bound tasks: [https://github.com/Microsoft/napajs/wiki/Why- Napa.js](https://github.com/Microsoft/napajs/wiki/Why-Napa.js)

Napa.js: A multi-threaded JavaScript runtime [https://news.ycombinator.com/item?id=15498219](https://news.ycombinator.com/item?id=15498219) (Nov 2017)

Their deal-breaker against using node-cluster was a need to use shared memory for IPC.

</comment><comment><USER9> Imagine if using CUDA/C++ with OpenMP for crypto!

<comment><USER10> I doubt we could benefit much from that. That approach would significantly increase latency because of PCI overhead. As mentioned in the OP, most crypto operations are small chunks of data.</comment></comment>


Why Cutting Carbs Is So Tough - <AUTHOR> https://www.nytimes.com/2017/07/19/well/eat/are-you-a-carboholic-why-cutting-carbs-is-so-tough.html <comment> nathan-wailes Preface: Over the past 12+ years I have spent a fair amount of time learning about foods/diets, at first to try to get rid of my acne (which I was successful at), but then later to stay lean and stop any diet-related dips in my mood (which I was also successful at).

What I want to say:

Cutting carbs is difficult for most people because of two things: 1) withdrawal from the sugar-high that you get from eating high-glycemic-load food (like bagels / pasta), and 2) your body _needs_ * some amount of carbs, and people are cutting bad carbs without replacing them with good carbs, and thus experiencing an _inescapable_ craving for carbs.

The vast majority of people in the US equate "carbs" with "grains/sugars/starches", and so when they "cut carbs", they stop consuming almost any carbs (like the author of this article says he did), they then experience discomfort because of the two factors I listed above, and if they get past the sugar-high withdrawal, the constant _inescapable /healthy_ cravings for carbs eventually push them to begin eating grains/sugars/starches again.

My daily diet (when I'm eating "properly") has me consuming carbs in the form of two bags of "steam-in-bag" broccoli and a bag of carrots. Every day. When you've eaten that many vegetables, you experience no craving whatsoever for unhealthy carbs. But for most people, the idea of consuming that many vegetables per day has probably never entered their minds, and that's why they have trouble "cutting carbs".

I highly recommend that people who are interested in this topic watch this video: [https://www.youtube.com/watch?v=M74Ao6y4vfg](https://www.youtube.com/watch?v=M74Ao6y4vfg)

\</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>--

*I'm using 'need' in the sense of "your body needs glucose, and the typical way to get it is from carbs, and so if you eat almost no carbs, you may experience some 'healthy' level of craving for carbs".

<comment><USER3> > your body _needs_ a fair amount of carbs every day

This is factually wrong. The human body ~100 grams of protein, ~10 grams of fat, and zero carbs to stay healthy. The minimal amount of glucose required for brain function can be synthesized from protein intake. And carb deficiency is not associated with any impairment or disease.

<comment><USER4> > The human body ~100 grams of protein, ~10 grams of fat, and zero carbs to > stay healthy

Could you provide source (studies not blogposts or youtube videos) on this matter?

Also what is your opinion on 80/10/10 or Okinawa diet? Okinavians used to get most of their calories from carbs and they had one of the longest lifespans in the world.

All things considered I am not against the keto diet but the food that people on it eat. Animal based fats, usually heavily processed meats like bacon, sausages etc on which there are peer reviewed studies that show their correlation to cancer and heart deceases. Most of the information can be found here: [https://nutritionfacts.org/](https://nutritionfacts.org/) the videos linked have their sources provided in the description. And those are mostly peer reviewed studies as well!

<comment><USER5> It's probably genetic. Some people can eat a high carb diet and feel fine, and not suffer the metabolic damage that others would. But that's definitely a minority of the world population. The Okinawans seem to eat a lot of a certain type of purple sweet potato which contains a good balance of vitamins and minerals, but they also have a strong social element - elders are highly respected and given responsibilities that keep them focused - and naturally they exercise a lot due to the terrain, so it's not just the food.

<comment><USER6> Every time I go to Okinawa, like anywhere in Japan, I see people eating either noodles or white rice with nearly every single meal. People often even have rice (and an egg) for breakfast.

</comment></comment></comment></comment></comment><comment><USER3> I've posted these numbers before, but I'll post them again because they are so low as to be totally unintuitive:

Normal human blood sugar [1]: 70-100 milligrams per deciliter of blood.

Blood volume of average human [2]: 5.5 liters

Thus, total blood sugar in non-diabetic human: 3.85 to 5.5 grams

Density of glucose: 1.54 grams per cubic centimeter

Thus, total volume of sugar in average human: 2.5 to 3.6 milliliters

Volume of teaspoon: ~5ml

Your body does its best to cap the amount of sugar flowing through you at about _one-half teaspoon_. A 12 ounce can of coke has 39 grams of sugar, or 7-10 times what the human body considers normal. It's a tremendous shock to the system - the resulting insulin response sends your body on a roller coaster of hormone regulation.

[1] [https://www.virginiamason.org/whatarenormalbloodglucoselevel...](https://www.virginiamason.org/whatarenormalbloodglucoselevels)

[2] [http://www.medicinenet.com/script/main/art.asp?articlekey=21...](http://www.medicinenet.com/script/main/art.asp?articlekey=21474)

<comment><USER7> That's interesting. I regularly drink soft drinks, and written on the can is the government-mandated notice of how much of my "daily recommended intake" is in the can. For sugar, it says 40%. How does that figure relate to your one- half teaspoon metric? Does it mean that one of the figures is wrong?

<comment><USER8> Just an observation, but if a soda has 10 times more sugar than you need in your body, and it is about half the daily value of sugar you need, then I suppose it is a rate problem. Drinking a whole soda at once puts way too much sugar into your system, but it may be possible to drink a sip an hour.

<comment><USER9> Only the glucose part of the sugar would end up in the blood stream though, the fructose part gets converted into liver fat directly. So you'd need to keep the time between sips long enough to start converting that liver fat into glucose, and that could take longer than a day.

</comment></comment></comment></comment><comment><USER10> The trick is to force yourself to do it for at least two weeks. Afterwards, pizza and bread will look disgusting. I experienced this when I followed a strict low-carb/paleo diet for 4 months. Many of my low carb friends have experienced the same thing. I lost 35lbs and got a six pack without working out. As soon as you introduce processed carbs back though, the addiction starts up again.

<comment><USER11>
      Afterwards, pizza and bread will look disgusting.

YMMV. I went on a low/no carb diet for 3-4 weeks last year, never had terrible _cravings_ or _crashes_ , and still love me some carbs. I just love bread, pasta, pizza, etc. (e.g., food in general) too much, but it's a good way to monitor what you eat.

<comment><USER12> Most people have been on a moderately high carb diet for most of their lifetime. It's gonna take a little more than 3-4 weeks to shift your perspective.

<comment><USER11> Probably true. This was in response to the parent [emphasis mine]: "The trick is to force yourself to do it for at least _two weeks_. Afterwards, pizza and bread will look disgusting."

</comment></comment></comment></comment><comment><USER13> When I lived alone it was easy. I simply didn't buy any at the grocery store and as such didn't eat any. It's nearly impossible, now living with my wife who adores pasta and everything potato based.

<comment><USER14> > _[...] living with my wife who adores pasta_

And who can blame her? I suppose you could live without pasta, but would you call that living? :)

<comment><USER15> If a life without pasta isn't worth living, then I'd rather die than get back on the blood sugar roller coaster that pasta puts me on.

This is like telling an alcoholic that life isn't worth living without tequila. You know what? Turns out you can live a meaningful life without it if you have to.

<comment><USER16> What were the effects of this "blood sugar rollercoaster"? I eat 55% carbs and don't experience this... What am I missing?

<comment><USER17> Can you skip a meal without going through a withdrawal? A spike in blood sugar from a carb-heavy meal causes an insulin spike and, in turn, it drops the blood sugar below the healthy level, which is experienced as a feeling of hunger and a need to have the next meal or a snack (which in turn spikes sugar again, causing another insulin burst etc. etc.)

<comment><USER14> If I skip a meal I get hungry, but beyond extraordinary circumstances (like being extremely busy or fasting before a blood analysis), why would I want to do that?

> _which is experienced as a feeling of hunger and a need to have the next > meal or a snack_

Why is this bad or surprising? Isn't this how things work? You don't eat ==> you get hungry. Similarly with water and thirst. I'm not being flippant, I genuinely want to know why someone would think this is surprising.

<comment><USER17> I am not dispensing life-style advise here but merely describing the effect of sugar/insulin rollercoaster.

Personally I don't like feeling of hunger so I don't do that. Getting hungry just a few hours after a meal is surprising when you got more than enough energy to last you several days already and your body has stored several months worth of energy in fat.

If you're limiting your calorie intake and have no weight issues then it is not, of course. You have used up all the energy from the food you have -> you will starve if you won't get more.

</comment></comment></comment></comment></comment></comment></comment><comment><USER18> Being an Indian, I was raised on a diet with the major macro-nutrient as carbohydrates (wheat and rice), it was hard to switch to a low carb ketogenic diet. But once I switched the health benefits were tremendous - 30lb weight loss and prediabetic symptoms gone.

Also, ketogenic doesn't mean you completely give up on carbs. I take about 2-3 cups of green vegetables everyday. These veggies have very low amount of carbs < 10-20gms. Rest is fiber which has no glycemic load. Also, once you are keto- adapted, all the craving for carb goes away as your brain is well fed on Ketones - much cleaner fuel when compared to glucose.

<comment><USER19> Curious - what does a low-carb Indian/vegetarian diet look like? It seems like one simply can't avoid rice and _roti_.

<comment><USER18> It's hard. You can keep curries and meat appetizers. Although you'd need to add greens which most indians don't consume regularly like kale, broccolli, spinach etc

</comment></comment></comment><comment><USER20> Two topics I rarely see addressed in the context of nutrition are _moderation_ and _taste_ , both summarized in the notion of savoring.

Full disclaimer: I'm part French. But that's a traditional notion in French culture (and many others): food intake is not just some mechanical action we do before getting on with better things in life; it's an art to itself.

When viewed as an art, moderation is actually a form of balance. We balance quantity with richness and intensity of flavor. I am always amazed at seeing someone who can devour a giant bowl of noodles probably totalling about 1,500 KCal and yet devoid of taste. Mediocre wheat flour topped with sauces made with various commoditized (and bland) ingredients, spiked with sweeteners resulting in an overall bland dish.

Contrast with some real Italian pasta in a small proportion, made with good ingredients and assembled in a way to maximize the taste, as if to assemble a work of art. The nutritional analysis per 100g may be worse than the previous bowl of noodles, but two things stand out: (1) the portion is way smaller and (2) the taste leaves you satisfied. You also consummed that dish slowly, paying attention to the taste and eating it slower than that large bowl.

Now of course everyday life is not made of high-end culinary adventures—most of use can't afford that. But even at a modest scale, one can pay attention to the quality of a simple tomato, a simple loaf of bread, butter from cows grazing fields... eating items slowly so as to appreciate their taste.

Then it's no longer about numbers or labels, it's about taste. Eat your hamburger, but make it with good ingredients and savor it. Eat your fries but slowly and look for the taste of the potato itself. Can't find it? Use better potatoes.

As for soda? Sure, enjoy it but sip a reasonable glass of it like wine, _over the course of a meal_ instead of gulping a large amount with a straw. Of course once you get in the habit of sipping it, you might move on to other beverages that taste better when sipped... :)

</comment><comment><USER21> Because they are delicious. Life is too short, not to enjoy one of life's simple pleasures. Obviously moderation is key, but it's silly not to take advantage of being human.

<comment><USER22> "Moderation" doesn't mean anything, obviously.

<comment><USER23> Moderation is usually a thought-terminating cliche. Whenever there's a conversation among of those looking to examine the details, someone is around to dismiss the inquiry with "everything in moderation".

<comment><USER7> Sort of similar how in political discussions, there's always someone around to dismiss grievances with "left and right both suck, I'm in the center". I've taken to calling these people "enlightened centrists". They will usually mumble something about "horseshoe theory" while they are at it, too.

</comment></comment></comment></comment><comment><USER24> I think a lot of people tend to over-think the whole cutting on carbs thing. Trying to count grams, check for ketons and so on.

I decided to give the low carb thing a try about 4-5 months ago. I cut out all bread, pasta, rice, starches and sugar I could find on my menu. Replaced it with more meat and learned to love zucchini and cauliflower. I'm far from being on the perfect low carb/keto/paleo diet. I eat cheese, have a morning latte at work, and eat a fruit or two every day. I had few "cheat meals", about once a month.

The scale now shows 10kg less. I was surprised by the ease of the process. I like it.

</comment><comment><USER25> What is so annoying about articles like this is that they start out saying 'calorie intake has nothing to do with obesity! lol all you idiots! look at how enlightened I am!' and then go on to say that carbs mess with insulin levels so that it becomes hard to not eat more calories. Duh, that's what all those others say too, but just not highlighting that aspect as much.

In the end, it's still calories. I get it, these people have books and speaking engagements to sell, but please. If they'd just say 'not eating carbs makes it easier to stick to a low calorie diet', it'd be fine. It's the deliberate obtuseness that's so annoying.

I mean, if it's not about calories, please:

\- show me someone who can eat 1000 Cals a day and not loose weight. \- show me someone who can eat 5000 Cals of bacon a day and not gain weight.

Until then - meh.

<comment><USER26> > calorie intake has nothing to do with obesity

who is saying that?

> that's what all those others say too

where? the author is talking about energy balance disorder vs insulin hypothesis. first stops at "expend more than you intake and everything will be ok", second goes further and explores difference between sources of calories and why it's wrong to say that caloric number is all you need to care about.

> show me someone who can eat 1000 Cals a day and not loose weight

> show me someone who can eat 5000 Cals of bacon a day and not gain weight

except those are not the claims being made. that's a second strawman in your comment, you really should read up on ketogenic diet before criticizing it.

<comment><USER25> "who is saying that?"

"The conventional thinking, held by the large proportion of the many researchers and clinicians I've interviewed over the years, is that obesity is caused by caloric excess." "The minority position in this field — one that Dr. Ludwig holds, as do I after years of reporting — is that obesity is actually a hormonal regulatory disorder, and the hormone that dominates this process is insulin."

5 or so paragraphs in. Waffling and innuendo about how it's really not about calories, while when you look deeper, it is - but they never acknowledge it as such because if they would, WTF would be so special about it?

"second goes further and explores difference between sources of calories and why it's wrong to say that caloric number is all you need to care about."

Caloric number _is_ all you need to care about. It's just easier to control when your blood sugar levels don't swing all over the place.

Caloric intake is like the first oscillation on a 1D Perlin noise function; cutting back specific foods (not 'sources of calories', but specific compounds that have a certain effect on the body) are a second oscillation, transposed on the first one. So you can cut back all the carbs you want, if you don't get your daily energy intake below your energy expenditure, you'll never lose weight. There are other ways of losing weight too, that would work for everybody, but they're mentally hard(er). You can lose weight by eating a McD hamburger and small portion of fries each day, as long as you don't eat anything else (actually, after those two, you still have a 1000 cal budget left, which you could expend on another two portions of fries, or pure sugar if you'd like, and you'd _still_ loose weight).

"you really should read up on ketogenic diet before criticizing it."

I'm not critizing the low carbs diet itself; it's well-known that cutting back on carbs is a relatively easy way to loose weight. When I used to fight and had to cut weight, it was standard advise to the point that it was obvious to everybody who'd spend any time in the gym, even those who had been doing it since the '80s at least. What I'm critizing is these shysters who peddle this sort of 'advise' as something or somehow magical or more than a trick to make it easier to get you calorie intake down. Because that's all it is. A good trick, sure, but still just a way to get your calorie intake down.

<comment><USER26> > obesity is actually a hormonal regulatory disorder, and the hormone that > dominates this process is insulin

where exactly in this sentence did you read "calories don't matter"?

> Caloric number _is_ all you need to care about

no it is _not_. calorie source is important. some sources spike your insulin, some don't. insulin spikes are bad.

> just a way to get your calorie intake down

no, it's a way to lower blood glucose and remove insulin spikes. healthy caloric deficit is important for sustainable weight loss, but avoiding foods that cause insulin roller coaster is _also_ important. and to get into ketosis it's literally _the only thing that matters_.

<comment><USER25> "where exactly in this sentence did you read "calories don't matter"?"

Oh please. 'Sure I called him a no-good cotton picker, but where did I say he's a lesser human? How dare you call me racist!' It's blatantly obvious that the spin the OP is putting on his message is that it's not the calories that matter, but rather 'where those calories came from', whatever that means. If you're going to play word games (the lowest form of debate), we have nothing to talk about here.

"some sources spike your insulin, some don't. insulin spikes are bad."

 _Insulin spikes do not cause your weight to go up_. They lead to eating more, which is what makes your weight go up.

"but avoiding foods that cause insulin roller coaster is also important."

OK then please describe what is important about it that does not lead back to eating less. And don't say 'just google keto diet' because it's all the same - words and words and more words to not have to deal with the elephant in the room which is caloric intake.

Again, I'm not saying low carb diets don't work. They obviously do, and they're easier for many people to stick to than other diets. What I'm arguing against is the mysticism around a subset of them, the refusal to just call things for what they are. It's a cult thing, it seems.

<comment><USER26> > the spin the OP is putting on his message is that it's not the calories that > matter, but rather 'where those calories came from'

you're implying that the rest of the message is "eating 1k calories is not going to make you lose weight" and "eating 5k calories is not going to make you gain weight" which is frankly completely false.

the message begins with "given reasonable amount of calories _it matters where they come from_ and here's how".

> Insulin spikes do not cause your weight to go up. They lead to eating more, > which is what makes your weight go up.

well you've basically just agreed with OPs thesis here. eating more makes you fat, but the ultimate reason _why you eat more_ is hormonal disorder.

> what is important about it that does not lead back to eating less

eating less

a) reduces your BMR which cancels out a good amount of mental effort you've put in restricting your calories

b) the weight you _are_ losing is in more muscle mass than fat mass due to body's conservation mechanics

and that's not even mentioning all the nasty consequences of spiking insulin, most of which are putting people on a fast track to diabetes (read - <USER2> obesity, more health damage, etc).

on keto you can eat the same volume of food and same caloric intake but have increased BMR, effectively burning fats quicker. fat foods are denser in calories so you have more volume for things like fiber. i'm oversimplifying a lot here, but you told me to not just say "google it".

</comment></comment></comment></comment></comment></comment><comment><USER27> Is it proved that Carbs are harmful? Don't want to cut down on them only so that a study 10 years down the line lists out Carb-diet benefits just like Fat ones these days.

<comment><USER28> It's not carbs _per se,_ whats proven is this: Insulin spikes in your body drive fat storage.

"Foods with lots of carbs" are a very good approximation of the nature of foods that tend to do that. (More accurately, foods with a high glycemic load/glycemic index)

So offhand we can say foods that contain a lot of carbs tend to have a high gylcemic index, some more than others. Eating raw sugar is different than slowly eating _al dente_ pasta with other foods in the mix like butter, cheese, etc, even though they both "have carbs." Think about approximately how long it takes different foods to break down. I hope that's intuitive as an example.

So "carbs are harmful" isn't quite the right picture. You can eat carbs, they're not going to harm you. But if you want to easily maintain a healthy weight, eat mostly fat and lots of protein. And being overweight is harmful, obviously.

(No such thing as fat but fit: [https://www.theguardian.com/society/2017/may/17/obesity- heal...](https://www.theguardian.com/society/2017/may/17/obesity-health-no- such-thing-as-fat-but-fit-major-study))

<comment><USER29> An interesting point (which you bring up) is how complex the behaviour of the glycemic load is. It's dependent on the combination of food stuffs (as you point out), but also on things like the physical shape of the food.

In Sweden we have something called "snabbmakaroner", which is basically macaronis but smaller and with thinner walls to shorten the time needed to boil them. Regular "makaroner", with the thicker walls has a lower GI compared to these thinner-walled ones. Even though they have the same exact ingredients and nutrients. I did a report on this during highschool when I tested it out on a bunch of willing classmates, and I was able to confirm it.

</comment></comment></comment><comment><USER30> And none of this even goes into how much modern food is designed and engineered to be as addictive as possible. Every snack food is built practically from the molecule up to hit as many of the addiction-causing transmitters as possible, from the texture of the food, to the shape of the salt they use, to the size of the serving, all of it is designed to make you want more, perpetually, and as much more as possible.

The average consumer is not even remotely prepared in a fight against a food industry with thousands of PhD's working to make the food as addictive as possible, the fight isn't even remotely fair. And then we get mad at everyone who fails, and wonder why so many are so horribly obese.

<comment><USER31> When I was in graduate school many foreign students noted that American food was too sweet and put in extra effort to find food that more resembled that from their home countries. This seems at odds with humans "naturally" loving sweetness-everywhere.

The other thing that makes the "carbs are fattening us" story seem incomplete (though not necessarily _wrong_ ) is that a generation or two ago obesity rates were much lower even in countries where people ate/eat carbohydrate-rich foods routinely (noodles, rice, tortillas, bread). It's not like everyone in Italy was on a ketogenic diet in the 1980s.

It seems like there must be multiple overlapping causes for the rise in obesity rates because all of the One Big Thing stories I've read about it have obvious counterexamples.

<comment><USER30> Your foreign friends were onto it; the problem is that those carb-rich foods in the US are by and large CRAMMED with sugar, which doubles down the effect; carbs to trigger the insulin response, and sugar that the body can convert extremely efficiently to fat. Homemade pasta is incredibly healthy; you still should meter your intake of course, but for the most part it's very good for you (especially if you're doing a lot of exercise). Look at the ingredients in most box pasta sold in the US, however, and you see so much added sugar and corn syrup.

It's not One Big Thing. It's several fairly big things, most of which are concentrated heavily in the USA.

<comment><USER31> I was more questioning statements like _The average consumer is not even remotely prepared in a fight against a food industry with thousands of PhD 's working to make the food as addictive as possible_ \-- food from the laboratories of Chef Boyardee is not alluring for people who haven't already acquired the taste. If you're not conditioned to it, it's repulsive to eat otherwise-bland food that's sweet and salty. I find much prepared American food unappealing-to-disgusting and I've lived here all my life.

But obesity rates are rising in America and across the world, and many people obviously have a hard time giving up this lousy food. So it seems like there's a fairly complicated feedback loop around how people acquire/retain tastes for foods and what they find "irresistible." I love garlic bread, french fries, and popcorn but I eat them only a few times a month and don't feel deprived on days that I don't. Pancakes with syrup: yuck, I'd rather go hungry for breakfast. I don't know why I don't experience carb-cravings or have to exercise any particular willpower to avoid sweets while others struggle mightily.

<comment><USER30> > food from the laboratories of Chef Boyardee is not alluring for people who > haven't already acquired the taste.

And that's the most insidious part (and why obesity tends to paradoxically trend up toward lower income households). This cheap, shitty food is extremely attractive to the people most vulnerable to the addictive behaviors; people who already lack most luxuries, are often short on extra time or energy (i.e. working two jobs), and people who work with children in the household (often too tired or want time/energy to devote to their children) and don't cook. You can call it irresponsible or what have you (as many do) but I mean, you go out and work a 12 hour day and then go home and spend an hour prepping a healthy meal. Then do it tomorrow. And the next day. And the next day.

</comment></comment></comment></comment></comment><comment><USER32> Lots of replies to this story Encourage moderate eating. I have always had a tortured relationship with food and an utter inability to be moderate with it.

I've eaten a very low carb diet for ~3 years, lost over 100 pounds and have kept it off. I don't have cravings, and sticking with my odd diet is preferable to the alternatives (getting fatter by the day and then bulimia) for me.

"Moderation" doesn't work for me because I can't do it. So far in my 42 years, I've never been able to be moderate. This works.

My bloodwork is fine, btw. I have it checked regularly.

It's an immoderate diet for an immoderate guy. For some people, a healthy relationship with food and eating is just a fantasy.

</comment><comment><USER33> I think "carbs are bad" is sort of overgeneralizing the problem. The problem isn't carbs, it's processed carbs that are low in fiber - i.e. not vegetables.

That said, I've experienced all this same stuff with processed carbs and sugar. I'll beat it for a few months and then end up binging/getting right back hooked.

The best recipe I've found for managing weight (personally, since YMMV is super applicable when it comes to fitness) is low-carb, high protein/fat, and weightlifting 3-4 times a week.

<comment><USER34> > weightlifting 3-4 times a week

I don't really notice much fat being burned on a keto diet without regular exercise.

</comment></comment><comment><USER35> [Anecdotal] I have been on a 15-20g of carbs per day diet for 41 days. Giving up carbs feels like breaking an addiction and I treat it that way. I took it in stages so lessened the impact of keto-flu. I was gluten free for 2.5 years. Giving up all wheat oats, and barely products (accept beer and whiskey)was the hardest stage. After three weeks of withdrawal I lost all interest in bread/pasta/pastries/sweets. But I still ate substitutes like potatoes and rice. Four months ago I gave up beer/wine/whisky to address tension headaches (no improvement, thankfully). So when I was inspired to go ketogenic it was relatively easy. I don't find it difficult at all. Business meals invariably involve steak or fish. I am never hungry so long airplane rides can be addressed with maybe a handful of nuts and lots of water.

The author's claims of difficulty derive from treating himself to sweets on occasion. That is like a smoker being a social smoker. They never manage to quit and always have the cravings.

</comment><comment><USER36> I don't know if it's _exciting advancements in food science_ or something else, but I used to be able to make a bag of chips last a month. Now I just can't buy them because they disappear within a day.

What's weird is I can eat carb-rich foods and get a very different result from what the researchers in this article found. It seems to have more to do with the composition of the meal than the exact nutritional content. A tuna sandwich or a pot pie dumped on a baked potato (both options are ~500 calories) fills me up to the point where I don't even get hungry at a normal meal time.

You'd expect either of those to leave me desperate for more carbs based on the usual low-carb diet sales pitch. I tried the low-carb lifestyle. It left me hungry and tired, no matter how carefully I followed all the good advice or how long I stuck with it.

<comment><USER37> I used it twice to lose weight, and it worked perfectly. The hungry and tired problem goes away quickly and your body just switches to burning more fat.

But you're right about filling up - that's very simply the most important part. Don't eat lots of small high-calorie stuff. Eat a real meal that fills you up. In carbs that would be fiber-heavy, long chain carb stuff, protein does that pretty much by itself.

<comment><USER36> >> _The hungry and tired problem goes away quickly and your body just switches to burning more fat._

Didn't happen when I tried it for a couple of years. I guess it didn't help that this was the '90s when hype for the diet was making people irrational, and the people I was dependent on forced it on me. Stress and resentment make anything harder.

Maybe I'll give it another shot in the future. Right now, eating filling meals while avoiding random snacking is working.

<comment><USER34> When you tried it before, was it low-carb and high _fat_? Or high protein? The high fat versions were new to me a few years ago.

</comment></comment></comment></comment><comment><USER38> I cut carbs and have not looked back. I have even developed a dislike of them. Our stomachs adjust to what we eat and after a while, eating two slices of pizza just doesn't sit well.

I found always going for the lesser of two evils was a big help. Sweet potato over regular potatoes. Vanilla Haagen-Daz over Ben and Jerry's (has lower sugar and more fat). whole wheat wrap with some sort of high fat salad (e.g. chicken salad) over a roll with just turkey and cheese. You wind up just developing a preference that isn't necessarily one of exclusion.

<comment><USER39> Per 100 grams, there is little difference between potatoes and sweet potatoes.

The preparation and condiments will make a larger difference than the tuber.

<comment><USER40> This is pretty wrong. Take a look:

[http://www.precisionnutrition.com/regular-vs-sweet- potatoes](http://www.precisionnutrition.com/regular-vs-sweet-potatoes)

<comment><USER39> No, I said per 100 grams, that page compares a medium potato to an average sweet potato. Go find one that compares 100 grams of potato to 100 grams of sweet potato.

(I had looked at it before I posted)

</comment></comment></comment></comment><comment><USER41> My tip: whenever you crave carbs, eat a hard boiled egg. The protein will make the craving stop for a while.

</comment><comment><USER42> If you are going to cut out carbs, but then switch to binging on high calorie foods such as cheese (the true crack-cocaine of food addiction) or nuts, don't expect any results. Some claim that cutting carbs 'naturally' leads to taking in less energy. This might be true for some, but certainly not for all.

<comment><USER43> Ketogenic foods are very energy dense. But once you are in nutritional ketosis, you will naturally have a moderated appetite.

Yesterday, I ate 4 eggs fried in butter (~500 calories), and three cans of sardines (spot across lunch and dinner, ~1000 calories). I also walked about 20,0000 steps, about 10,000 of those was weighted with 30 lbs.

</comment></comment><comment><USER44> I am underweight by about 10 - 20lbs and I have a lot of trouble reconciling some of the advice around healthy eating with my attempts to gain weight. It seems all but impossible for me to gain weight without _heavy_ reliance on carbs. I think it's creating a bit of a dissonance because I feel damned if I do, damned if I don't. Either stay underweight (unhealthy) or rely on carbs to gain weight (also unhealthy?)

I have actually been drinking a lot of Soylent lately which seems very carb heavy, but people also report success with it in terms of overall health and ability to lose weight when used to control the total number of calories consumed.

</comment><comment><USER45> '"These studies represent the first rigorous scientific tests of the carb- insulin model in humans," Hall added. "The public needs to understand that this [insulin-carbohydrate] model now has pretty strong evidence against it."' [https://www.vox.com/2016/7/6/12105660/do-low-carb-diets- work](https://www.vox.com/2016/7/6/12105660/do-low-carb-diets-work)

</comment><comment><USER46> For me, the single biggest boost I found to help cut my carb cravings was cutting out diet soda and other artificial sweeteners.

</comment><comment><USER45> There's a lot of people here who are really into this, but this is really the opinion of a minority of nutrionists, without a large body of scientific evidence supporting them. Low-carb diets are being sold to the public on a ridiculous premise: the quality of foods can be identified based on their major macronutrients, and "carbs" consists of a coherent group of foods. This is ridiculous because it lumps refined sugars in the same category as nutritious vegetables.

When my brother-in-law tried a low-carb diet, he would come over to dinner and say that he couldn't eat lettuce, because lettuce is a carb. Well, it is, but it has few calories, it's mostly water, and it has relatively a lot of micronutrients. Avoiding high-satiety foods rich in micronutrients and antioxidants—such as cabbages, apples, and greens—because you're categorizing them with commercial soda seems insane to me.

People have psychological models of what a meal should consist of, and for most Americans it consists of a large piece of meat as the star, some refined starches on the side, and maybe a small amount of (probably overcooked) vegetables. This is not very healthy: a healthier diet would put vegetables as the base and star of the meal. There is plenty of good evidence that:

vegetable-centered diet > refined starch-centered diet

But where does meat-centered diet fit in there? What negative health consequences are there from these diets? There are individuals who advocate for this kind of diet, but is it really something that can be recommended to the mass public? There is virtually no major culinary traditions built around this style of eating, except maybe for people who subsist upon marine mammals. My brother-in-law ended up eating grilled chicken thighs by himself until he couldn't stand it anymore.

<comment><USER47> Just want to mention that there are always people who don't read the literature or properly follow a "diet plan" for lack of a better word to call it.

If you are doing the Ketogenic diet, right at the end of Gary Taubes' book entitled "Why we get fat and what to do about it" which is about the diet (and is the same the guy who wrote the linked article) it says this about your daily diet in regards to vegetables:

        FOODS THAT MUST BE EATEN EVERY DAY:

Salad Greens: 2 cups a day. Includes arugula, bok choy, cabbage (all varieties), chard, chives, endive, greens (all varieties, including beet, collards, mustard, and turnip), kale, lettuce (all varieties), parsley, spinach, radicchio, radishes, scallions, and watercress. (If it is a leaf, you may eat it.)

Vegetables: 1 cup (measured uncooked) a day. Includes artichokes, asparagus, broccoli, Brussels sprouts, cauliflower, celery, cucumber, eggplant, green beans (string beans), jicama, leeks, mushrooms, okra, onions, peppers, pumpkin, shallots, snow peas, sprouts (bean and alfalfa), sugar snap peas, summer squash, tomatoes, rhubarb, wax beans, zucchini.

The vegetables that he says you need to stay away from: "..."starchy" vegetables such as slow-cooked beans (pinto, lima, black beans), carrots, parsnips, corn, peas, potatoes, French fries, potato chips."

So clearly the guy who wouldn't eat lettuce didn't do his research or just heard "to cut all carbs is what you must do".

The book is a great read, very enlightening, and I've successfully done Keto several times and lost a lot of weight and body fat using it, all the while feeling better. I surely do not eat that many vegetables a day, if any, because I hate most allowed vegetables (I just have Caesar salads occasionally), but I still manage to feel good and lose weight. This feels like a lot of vegetables suggested for a "meat only" viewed diet, and it seems like more than I'm sure most people eat daily anyways, which I guess is probably sad, but hey.

One last pitch for reading the book, it's essentially just science of the body and fat and talk about the history of various studies and how they relate to the science you just learned until the very end where in the appendix it basically says, ok here is how you actually do it, if you didn't figure it out by now (at least that's how I remember it).

<comment><USER45> My point is how this is communicated to the public. It's nice that you have spend dozens or hundreds of hours reading ketogenic diet books, and have a clear idea about the limitations, tradeoffs, and risks of this.

Ordinary members of the public get the message "only eat chicken thighs, and don't eat lettuce". That's a long way from a diet that's healthy for ordinary people.

<comment><USER40> Come on. I've never heard (no one has) the phrase, "don't eat lettuce". I've heard don't eat processed carbs, don't eat bread, don't eat pasta, don't eat simple sugars, don't eat potatoes.

<comment><USER45> Maybe he was doing one of those "try a ketogenic diets for 30 days", or stumbled upon one of those keto advocates who only eats meat and lard.

If all you read about low-carb diets is the first paragraph about any popular news story about them, then what you know is that low-carb diets are the ones where you can eat lots of meat and you should shun any foods with sugar or starches.

</comment></comment></comment></comment></comment><comment><USER48> but why do you need to cut carbs? I eat cabs every day in the form of pasta and I'm lean and healty

</comment><comment><USER18> Most of the lifestyle diseases like obesity, diabetes, heart ailments are a manifestation of carbohydrate intolerance.

However, everyone has different tolerance to carbs so the pattern is not uniform, but as recent studies and data shows, most of us are not that lucky

</comment><comment><USER49> This concurs with my own experience precisely. If I take too much insulin I have to take sugar to counterbalance the dose but this is no hardship as I find I have an enormous, unstoppable craving for sweets beyond the physical necessity.

</comment><comment><USER18> A great video if you want to understand more on obesity - [https://www.youtube.com/watch?v=ZKC3hiyLeRc](https://www.youtube.com/watch?v=ZKC3hiyLeRc)

</comment><comment><USER50> It's really not hard to cut carbs, it's just a habit and exercise in minimal self control like almost anything else in life. Eat more meat and more vegetables, it's really that simple.

If you can't manage that because you love rice or pasta or bread, at least replace processed and refined carbs with whole grains and you'll be much better off.

And don't eat sweets or sugars, which are garbage. Have fruit or high quality dark chocolate if you want something sweet or indulgent.

</comment><comment><USER51> It is the Taubes / Lustig propaganda again.

<comment><USER18> How is it a propaganda and what would they gain from it ?

Carbs are the most commercially profitable food to produce - sourced from subsidized corn or wheat and have a high shelf life.

<comment><USER52> Book Sales and the Speaking Circuit, obviously.</comment></comment></comment>


MeshBird VPN SDN - <AUTHOR> https://meshbird.com <comment><USER2> The website is a bit light on the details, I see the repo has a bit more info: [https://github.com/gophergala2016/meshbird](https://github.com/gophergala2016/meshbird)

</comment><comment><AUTHOR> For some reason, [http://meshbird.com](http://meshbird.com) isn't being destroyed in my chrome browser like [https://](https://)

</comment><comment><AUTHOR> Meshbird create distributed private networking between servers, containers, virtual machines and any computers in different datacenters, different countries, different cloud providers.

</comment><comment><USER3> My name is Artem. I'm one of the Meshbird maintainer. Feel free to ask questions.

<comment><USER4> Hi Artem,

I notice that IP addresses changes each time the client is started. How are the addresses allocated? Is it possible to use static addresses?

Very cool project. I've been waiting for something like this to replace tinc. I love the simplicity!</comment></comment>


9 Ridiculous Ideas That Made People Ridiculously Rich - <AUTHOR> http://www.businessinsider.com/9-ridiculous-ideas-that-made-people-ridiculously-rich-2011-3?op=1

<comment><USER2> It's not about the product, it's about the passion behind it. I'm a classic example of this. I have some great ideas, but so far I always lack the attention span to see them through. And, sadly, it seems as I get older my projects end up dead a lot sooner than they used to _sigh_ or maybe I'm just gathering up experience points for when the big day comes :)

<comment><AUTHOR> I'm working on this about myself. Hope you do too.

Read this: [http://artofmanliness.com/2011/03/20/what-man-understands- th...](http://artofmanliness.com/2011/03/20/what-man-understands-that-he-is- dying-daily-this-is-your-life)

Woke me up :)

<comment><USER2> Thanks. It actually means a lot that you said 'hope you do too', it's nice to have someone out there who understands how this feels. Thanks for the link too :)</comment></comment></comment>


Square and Groupon: A New CRM for Merchants? - <AUTHOR> https://www.helpshift.com/blog/square-and-groupon-a-new-crm-for-merchants/

<comment><USER2> I implemented Square in our family business primarily for having a tight feedback loop with customers and the improved user experience. Digital receipts are an opportunity to improve the customer relationship and streamline operations. To me, this was the key reason.</comment>


Vote for the Net - <AUTHOR> http://voteforthenet.com/ <comment><USER2> For some reason, I refreshed the page after reading it, and noticed that the number of pledges increased drastically...

Turns out this is reporting a sign-up rate of over 100 pledges per minute!

A fairly impressive growth rate for email signatures I have to say. Good work!</comment>


Ask HN: Review App : Build Apps Online, over Google App Engine - <AUTHOR> http://creator.ifreetools.com

<comment><USER3> Can you give a running example of atleast one application built using this ? I tried creating something for a long time but couldn't do much.

<comment><AUTHOR> I do plan to provide default set of apps, which one can click to install. This is just off the oven and I could not wait to share.

You can have a look at the following walk-through, to have an overview of the app..

[http://ifreetools.blogspot.com/2010/01/build-apps-online- ove...](http://ifreetools.blogspot.com/2010/01/build-apps-online-over-google- app.html)

<comment><USER3> I am not talking about the default-set-of-apps. I am talking about seeing an app created using your tool in action. Would love to see what is the possibility.

<comment><AUTHOR> I understand that you are talking about simple demo access to apps, to get to know the features enabled.

Currently there is no demo/public access privilege for apps created using iFreeTools Creator. If it was available I could have gladly pointed you out to that demo app to check out the features.

Another option is install an app into your own account, choosing from a default set of apps and using it as a demo to check out the features of iFreeTools Creator - which I was referring to.

Also, the feature set in iFreeTools Creator is equivalent to those available in iFreeTools CRM - which uses default _System_ entities, instead of requiring _Custom_ entities, as in Creator. Both the apps are driven by the same framework. So, you may login into <http://crm.ifreetools.com> and check out the features.

I do not usually check old submissions at Hacker News for new comments and I am glad that I did today to find your recent comment. If you have any further queries, kindly send them directly to raj [at] sahasvat [dot] com.

</comment></comment></comment></comment><comment><USER4> Very cool, this was something I hoped/expected would happen with App Engine.

There's a lot of value (and hopefully some money) in making the answer to "I need a web presence" simple for non-hackers.

Some questions: Why comic sans? It looks goofy. Why iFreeTools? 'Free' in the name often projects an image of low-quality. How are you making money? Ads? If I make an app, will it have your ads in it? (And can I pay to remove them...)

<comment><AUTHOR> Thanks.

Agree about the font and 'free'.

Wanted to have a distinctly different font for the first part of the name which will be a brand/prefix to lot more apps like CRM, HRMS, Creator, etc.,. Open to suggestions for other web-safe fonts, which could address that need.

'Free' because I believed it will help with better adoption rates. The plan is to have it based on 'freemium' model. Free with restrictions on storage, number of mails, etc.,. and with ads. For higher resource requirements or for removing the ads, one can pay a nominal fee.

</comment></comment><comment><USER5> Building a web application without programming is a challenging task. It is relatively easy to support simple domain models that have a few entities. When a domain model starts having relationships, things get more complicated. Will you support relationships in future? Or your business strategy is to start with simple domain models and then redirect users to your custom-made apps?

<comment><USER6> It looks like he does support relationships ("References" field type), although I don't see how those are displayed on the related record.

<comment><AUTHOR> _It looks like he does support relationships ("References" field type), although I don't see how those are displayed on the related record._

As a link. Have a look at the screen-shots in the walk-through - <USER2> the last image.

Mapping and accessing links are actually easy - relatively speaking. What is more hard is having to work without "join", particularly if one comes in with RDBMS baggage. One will have to unlearn certain rules.

</comment></comment></comment><comment><USER7> Some input on your homepage:

Every database application I create is already online. A more descriptive headline would help.

Listing each cloud's contents in a vertical list will make them easier to read/digest.

It's nice that it's made for App Engine, but that doesn't deserve more prominence than your walk-through link.

<comment><AUTHOR> Thanks for the input.

Was trying to emphasize _Creating Online_. Updated the headline to "Build Customizable Database Apps. Online." (For those who may read this after the change : the earlier headline was "Create Database Applications, Online.")

Will see how I can improve the image or provide an alternate one. Suggestions welcome.

Agree. Made the walk-through link more prominent than before.

</comment></comment><comment><USER8> It looks like you took the ideas (CRM, Creator) from your previous employer (Zoho) and put them in Google AppEngine...

<comment><AUTHOR> Well I tried not to (compete), for a very long time (almost a year).

After which I had to turn towards projects, which lead to Grails, which in turn lead to iFreeTools CRM (you can read about it here : [http://rrajkumar.wordpress.com/2009/10/21/grails-to- ifreetoo...](http://rrajkumar.wordpress.com/2009/10/21/grails-to-ifreetools- crm/)). This in turn lead to the requirement of CRM to be customizable, which lead to Creator. And this post :-)

I do respect Zoho and lot of people in there.

Will be integrating with Zoho's online services where possible.

</comment></comment><comment><USER6> Wow, very similar to the app I'm working on right now (though mine is based on Django). Glad to see that other people are doing the same stuff, hopefully that means it's worthwhile, right? Good luck!

<comment><AUTHOR> Yes. I have been preached about this, by my prof. in start-up school : If an idea occurs to you, it very well has a possibility to have occurred to N other people, a few of those would already be working on them.

A little competition is good for everyone and makes life interesting. Bring it on :-).</comment></comment>


Intel is making a mockery of reshoring - <AUTHOR> https://asiatimes.com/2020/07/intel-is-making-a-mockery-of-reshoring/ <comment><AUTHOR> > _Intel's chief executive Bob Swan yesterday told industry analysts that the > former industry leader in chip manufacturing might quit the fabrication > business altogether, outsourcing its designs to Taiwan or South Korea > instead. The company's shock announcement called into question US efforts to > return critical manufacturing capacity to the United States, and came > despite semiconductor industry lobbying to secure federal subsidies for chip > production in the United States. Semiconductors are the building blocks of > the digital economy, and America's inability to slow the decline of onshore > chip fabrication is a strategic liability of the highest order._

Sounds like bad news. The diversity that remains of chip manufacturing must be preserved everywhere around the world, including the U.S, Europe, China and the rest of Asia. Not doing so would mean we're likely going to hit a dead end rather soon for current silicon.

> _Intel's 10-nanometer technology has just come into production, three years > after target, and is already obsolete. Once the industry leader, Intel lacks > the engineering expertise to stay ahead of Asian competition._

source seems biased?

</comment><comment><USER2> Seems overexaggerating.

> _Evidently that failed to impress Intel, which weighed the R &D costs of > success in the next generation of chip production against the likelihood of > a US government subsidy, and decided that outsourcing was the path of least > resistance._

Intel has said that they are considering partial or complete outsourcing if it becomes necessary to stay competitive. That's very different from what the article claims, and anything else would be economic madness. I'm not sure "Intel committed to making sub-standard products by not considering contracting with manufacturers having top-of-line capability if their own developments keep lagging" would be better for Intel and the US economy?

I suspect that for complete outsourcing, they're also going to have trouble finding the capacity.

Similarly,

> _Intel, America's aging national champion in the field, doesn't have the > ambition to compete against the Asians_

They certainly have the ambition, it's just not clear if they can.</comment>


A sort-middle architecture for 2D graphics - <AUTHOR> https://raphlinus.github.io/rust/graphics/gpu/2020/06/12/sort-middle.html <comment><USER2> See discussion from 2 days ago about the follow-up blog post, [https://news.ycombinator.com/item?id=23512897](https://news.ycombinator.com/item?id=23512897)</comment>


Mind tricks and other hacks - <AUTHOR> http://seclists.org/fulldisclosure/2014/Aug/37

<comment><USER2> Hire psychopaths! Apparently :)</comment>


On Recursion, Continuations and Trampolines - <AUTHOR> http://eli.thegreenplace.net/2017/on-recursion-continuations-and-trampolines/ <comment><USER2> In node.js (v8) at least, generators introduce substantial CPU overhead (but not much memory overhead) compared to trampolines. Trampolines, in turn, are a good bit slower than straight recursion. There seems to be robust TCO in recent releases, or support for extremely deep stacks, at least. Try this with a recent release (see the comment at the bottom of the script):

[https://gist.github.com/michaelsbradleyjr/d1b104137e8e00468d...](https://gist.github.com/michaelsbradleyjr/d1b104137e8e00468d83)

Despite the overhead, using generator `yield` semantics (giving args to pass to an indicated function, instead of calling directly, and then resuming execution with a value provided by iter.next) one can "salvage" algorithms that are cleanly expressed with non-tail recursive calls between, say, a handful of functions. It takes a little work to setup the state machine to serve as the plumbing, but it's not too difficult really.</comment>