The debate around the original asian exclusion acts is kind of interesting to read. A lot of articles from the time are reproduced online. The common sentiment was that white americans didn't want to compete with people willing to work 16 hour days. The fear was a generally compromised quality of life. Of course all this nuance gets boiled down to mere "toxic racism" by the NYT. I mean it's not like large numbers of asians willing to study huge numbers of hours a week have had any affect on quality of life or opportunities for today's students...
The important word being "compete". As far as I know Americans are fine with poor people working multiple jobs for minimum wage. In fact the sentiment often seems to be that they are not working hard enough. If you want to avoid a "race to the bottom" you raise the bottom.
I wish someone like Bill Gates would stop doing sisyphean third world do-gooder junk and fund some long term, large controlled studies on humans instead. It seems to me that to do actual science on human health you need space program like money. So instead we get all this observational garbage.
> anything other than differences in levels of exercise/activity
I've seen claims that having few friends shows up in mortality worse than than a pack-a-day smoking habit. Of course that's all hand-wavy statistical controls, but then again so is the stuff on exercise and calories.
Food prep is by far the most time consuming and drudge heavy daily task, but it remains pretty much impossible to eat healthily if you don't cook daily. Short of paying a personal chef or landing a full time housewife there doesn't seem to be a solution. Restaurants and prepared food just don't have the economic incentive to use high quality ingredients.
About food, I remember reading a post on HN some time ago about how someone had found somebody on Craigslist to cook for him and his family. The lady would bring food three times a week or something like that and everything was homemade and of the season.
Personal chef makes it sound like it would be somewhat fancy, and thus expensive, but in that post it was just somebody who was cooking at home but make more and bring it to them. That could be something to look into if you're really interested.
My bachelor buddy does that. Two ladies come every couple weeks, cook and freeze dozens of entres, chat and leave. Everybody happy, he doesn't frequent Wendys any more.
Good god, man. What are you cooking? As a student I cooked meat, rice & vegetables (mixing around the meat & veggies as needed) for literally months, and it doesn't take more than a few minutes to get everything going.
I mean, sure, if you want some fancy-pants meal you're going to have to put in some effort. But if you don't want to spend time and still want something healthy, it doesn't take long. (Heck, how long does it take to make a sandwich?).
Frankly, anybody suggesting a personal chef must be off their rocker or living on a different planet than me. It's not hard to cook, even if you're lazy.
Get a bag of quinoa, few cans of chickpeas, a bag of lentils, and a can of mixed beans. Cook the lentils and the quinoa (google for good instructions on the lentils). Mix in the chickpeas (already cooked in can) and mixed beans. Store.
Bulk bake some fish, chicken, whatever, for protein (or your favorite vegetable protein source). Store.
One of the healthiest dinners imaginable (quinoa, chickpeas, and lentils are wonderful) is now as easy as placing these two items on a plate and microwaving.
Sure, you'll get bored after a while, but just mix it up next time.
Similarly, some people really enjoy running, or sitting at a desk working in excel, and some people consider either of those to be horrific experiences undertaken only through pure necessity. This isn't news.
The trick is to make simpler meals, and ones that are freezer / fridge friendly; you can make a large amount, store it as leftovers, and alternate -- that way you don't eat the same thing twice in a row. I think I & my SO only cook maybe 3-4 unique meals a week. Bonus: you get a hot meal to bring to work for lunch, which doesn't require separate prep!
One solution that I've heard about, but never used, is a personal chef that cooks for you once a week, and packages meals to be trivially reheated during the week. That way, you have control over the ingredients, preparation methods, and the details of the menu, and it's a few hours of labor cost.
OurChef: You want good dinners, and you want a life. We want to sell you good dinners. OurChef is your personal caterer, with authentic quality ingredients.
One of my previous employer's clients was a company that did exactly this. I don't remember their name, or how well they were doing, but I thought that the idea was a pretty good one.
The only problem I saw was that their meals were typically fairly expensive, to the point where you could probably eat out every day for less money.
That depends on what you are cooking I think. Most things I am normally inclined to cook require me to attend to them while they are cooking. Slow-cookers eliminate that and do other things instead, like go to work.
Even if you are cooking something relatively hands off in your oven.. how often do you leave your home while your oven is on? You are locked down to that location for the duration of the cooking time.
A digital electric pressure cooker is a better option than a slow cooker in my experience. I use one. Pretty much everything cooks inside 20 minutes, even a whole frozen chicken. I cook tons of stuff straight from frozen.
But still, preparing the food once or twice a day is a distracting pain. It would be great if I could just stop off at street vendors or fast food stores and eat well, but as it is that stuff will kill you.
Yes it does eliminate prep time. You put a bunch of stuff into a slow cooker, add a can of soup like cream of mushroom for flavor, and it comes out amazing when you get home. Just don't end up eating too much meat this way. Use a lot of vegetables.
You don't have to stand over a stove watching stuff fry. You only have to clean one dish. You make enough for leftovers too.
I've had the experience of trying to read Nabakov and Nietzsche and in both cases being sure most of it was sailing way over my head. I kind of enjoyed the stuff anyway, but as a working adult I don't have time to screw around with secret decoder rings. Wish I did.
I tried to do a couple coursera courses and found the video lectures highly inefficient; very needlessly time consuming, even watching them sped up. All I really want is a glorified text book with quiz grading and a final.
It sounds terribly privileged to say so, but I'm afraid I have to agree. Also, quite often the quizzes are directly based on the videos ("What did line A represent in ~ graph?"), while I find I self learn better through reading.
It depends on how much you value your time. Lectures usually are shorter than 2 hours per week. (There are some that have longer videos, but I think more than 2 hours is suboptimal.) I know that before courses I was wasting this time on hacker news or reddit, so I don't value my time that much. On the other hand I do now, and that's because I need to watch the lectures and do the home work. And really these lectures perform the same role in the learning process as the real lectures. You could graduate from university only with text books, but you might not get some insight that lecturers have.
Isn't this to some degree a matter of fixating on consumer brands? To my understanding Japan still runs a massive trade surplus in high tech equipment and parts and has many super profitable firms making that stuff. The parts that go into or make your phone or TV comes from Japan. This is just what I hear.
m_numLoadedAssets is a member of some unnamed class the snipet of code is extracted from. When you call the method, it is likely deeper in the stack than any local variable, or even in the heap.
It depends where *this is allocated. In the worst case, it is allocated in main memory while you wanted to stay in the graphic memory, or something.
A naive compiler would then access memory (or the cache) instead of using registers. A Sufficiently Advanced Compiler would guess that calling ++ many times is the same as incrementing in one go, and hoist that out of the loop, but apparently this one is a bit cruder.
Now the same could be said about m_numAssets, but this one isn't written to, so the compiler only have to put a copy in a register, which I guess is a simpler optimization to do.
To answer your question, that particular situation would be better in any language that forces you to explicit the reference to "this" (or "self"). Imagine how we could modify C++:
void member_function() {
int local_variable++;
local_variable++; // This is okay
member_variable++; // That should not be allowed
this->member_variable++; // This should be written instead
}
Applied to the example in the GGP above:
void load(Assets* a) {
for (int j=0; j<this->m_numAssets; j++) {
loadAsset(a[j]);
this->m_numLoadedAssets++;
}
}
We see that every non-local access is prefixed by something ("this->" and "a[" here). The heavier syntax suggests a heavier cost, so the programmer will more easily think of hoisting those out of the loop, if possible (either manually or through compiler optimizations).
Any language that gave you more explicit insight into cache spilling, pipeline stalls, DMA wait etc. would be better. Maybe the solution there is better tools, but if you've ever written a C++ parser you might agree that C++ tooling is a language issue. :-)
> the biggest gains are made on an algorithmic level
I have had a few experiences of simply porting something rather directly to C++ and seeing 10X speed and memory improvements. The 'hidden costs' in other languages are loads of unavoidable heap allocations and pointer indirection that really don't happen with C++. And C++ compilers do a ton of very smart optimization these days.
With the generic programming constructs and static polymorphism approaches in C++ you can often get really big performance increases over what's practical in C or Java. std::sort in C++, for example, has often been found a few times faster than stdlib.h qsort. It's because of compile time optimizations that languages like C and Java can't do.
Just a nitpick: sorting is a bad example because qsort could be made just as fast if it were defined in the header and marked inline. C++ provides more flexibility (you don't have to make everything inline, you can have a family of "real" functions indexed by type), but it isn't really necessary for sorting.
I thought I was depressed and anxious for almost two years. It turned out I just had a chronic sinus infection.
I'm suspicious that a lot of what gets considered as psychiatric problems are really physical health problems. Anecdotally, a lot of people switch to a nutrient dense diet and cut out potential allergens and wind up feeling all better.
Not just anecdotally -- plenty of studies confirm this. Some people -- 30% of the people by some estimates -- simply suffer from fructose malabsorption. This means that when they eat foods with excess fructose (even fruit), they fail to properly absorb nutrients.
Tryptophan is a serotonin precursor, so to anyone who has ever taken an SSRI, it intuitively makes some sense that it could be related to happiness.
Sadly, no one wants to be told that their diet is a problem, or that they have to do all the hard work of changing their diet. They just go for a pill. Which wouldn't even be so bad, if the pills we made were truly effective and side-effect free. But they aren't.
My dad last year suffered from a mix of dizziness, nausea, depression and if he got too nervous, muscular contractions.
Went to a bunch of doctors, each one gave a different pill, and his situation wasn't improving. I had to research the internet looking for symptoms and possible causes.
Then, in the end, talking with a generalist doctor, it ended up being a thyroid disfunction (he was taking pills for that) and magnesium deficiency. After a year taking kelated magnesium and cutting the thyroid medicine (the doctor told to), he's 100% again.
Any time I have mentioned that someone should change their diet to help them deal with any number of problems (weight, mild depression, seasonal affective disorder, overall energy levels), I am universally met with disbelief and dismissal.
The fad diet industry has ruined people's ability to think clearly about the topic of diet. The part that gets to me the most is that I have had profound changes in my life due to diet and exercise changes, and they know that. They still won't even try.
Possibly because there are many people out there with any number of problems (weight, depression, asthma, acne, diarrhea, rising of the lights,...) who, when mentioning those problems, are universally met with suggestions to change their diet. From someone who has no idea what diet the sufferer has.
But I'm with you, there, buddy. It's like these people don't even know rutabagas exist and supply all of the particulas vitae necessary for human existence.
I also have some anxiety problems and from time to time my sinusitis shows up. What do you mean you just had a chronic sinus infection (instead of anxiety/depression)? What kind of symptoms are you talking about? This might be relevant to me...
It happened 18 years ago. I never thought it had any effect until 4-5 years ago, when I started getting chronic nosebleeds. 2 years ago I went to a doctor and had the surgery setup, but canceled it cause I wasn't comfortable with the doctor. Going to another doctor in the near future.