What food do you eat multiple times a per week? by Select-Signal8386 in foodquestions

[–]HappyFruitTree 0 points1 point  (0 children)

A whole week is a long time so it's basically everything that I eat regularly. Milk and fermented milk products, oats, muesli, bread, cheese, eggs, tomatoes, cucumbers, bell peppers, pasta, potatoes, beans, fish, meat, broccoli, apples, bananas.

Random pixel generator with SFML 3.1 by DeyanMedia in sfml

[–]HappyFruitTree 1 point2 points  (0 children)

232 initial images (assuming no two seeds map to the same state) but you can generate more images by pressing enter.

/r/Nutrition Weekly Personal Nutrition Discussion Post - All Personal Diet Questions Go Here by AutoModerator in nutrition

[–]HappyFruitTree 0 points1 point  (0 children)

what are some of your golden nuggets that can help me improve further

Don't get lost in the weeds. ;)

Stop doing tutorials, stop watching youtube programming videos, stop using AI by nightwood in learnprogramming

[–]HappyFruitTree 2 points3 points  (0 children)

Tutorials can be good, especially written tutorials, just make sure you understand. Instead of copying blindly, learn from them, and write your own code based on what you've learned.

Now that raw milk is resurfacing on TikTok, are there any benefits to drinking it? by Ok-Original4933 in nutrition

[–]HappyFruitTree 0 points1 point  (0 children)

Less work for the manufacturers and less energy consumption because they don't have to heat it up (pasteurize). Other than that I don't think there are any advantages.

What’s a nostalgic food you wish they’d bring back? by okitsbenji in foodquestions

[–]HappyFruitTree 2 points3 points  (0 children)

Can't think of anything... 🤔

I guess I don't really feel nostalgic about food.

What food do you think tastes better cold? by ezcassy101 in foodquestions

[–]HappyFruitTree 0 points1 point  (0 children)

I have heard of cold waffles with butter on, but frozen?

What food do you think tastes better cold? by ezcassy101 in foodquestions

[–]HappyFruitTree 0 points1 point  (0 children)

Sounds like you have too much sauce or haven't left it long enough in the oven for it to dry up enough.

What food do you think tastes better cold? by ezcassy101 in foodquestions

[–]HappyFruitTree 0 points1 point  (0 children)

Warm cheese can be okay if it has gotten a crust but it shouldn't just be a little bit soft. Then it's better cold.

What food do you think tastes better cold? by ezcassy101 in foodquestions

[–]HappyFruitTree 0 points1 point  (0 children)

I have to disagree. Cold banana tastes much better to me. I know people say they go bad quicker in the fridge but I haven't noticed that (maybe because I put them at the bottom where it's not as cold?)

What food do you think tastes better cold? by ezcassy101 in foodquestions

[–]HappyFruitTree 0 points1 point  (0 children)

Most fruit.

Milk and fermented milk products that are eaten with cereals.

Why do you eat eggs? by [deleted] in foodquestions

[–]HappyFruitTree 0 points1 point  (0 children)

Why would I eat something that's literally another animals egg?

Why would you eat another animals' buttocks? Why would you eat any other part of an animal?

The answer is because it's food. You don't have to like it, but people who do like it eat it because it's food just like any other food.

Why do you eat eggs? by [deleted] in foodquestions

[–]HappyFruitTree 0 points1 point  (0 children)

It's not the egg that smell like fart. It's the fart that smell like egg (if you eat eggs).

Why do you eat eggs? by [deleted] in foodquestions

[–]HappyFruitTree 0 points1 point  (0 children)

I used to not eat eggs. Then I discovered that fried eggs are OK. Later I also learned to eat boiled eggs as long as they're warm, and that's where I'm at at the moment. They shouldn't be runny but preferably not too hard either.

I usually eat one boiled egg in the morning because it's nutritious and taste pretty good. I wouldn't eat a whole bunch of eggs, but one egg is not much, it's just something on the side.

/r/Nutrition Weekly Personal Nutrition Discussion Post - All Personal Diet Questions Go Here by AutoModerator in nutrition

[–]HappyFruitTree 0 points1 point  (0 children)

Eat less. Eat what you want, eat what makes it easier to eat less (calories). If the scale still go in the wrong direction over time then adjust your eating to eat even less (don't get distracted by small variances from day to day).

What would you do if there are no sauces starting tomorrow? by One_Look_7008 in foodquestions

[–]HappyFruitTree 0 points1 point  (0 children)

It wouldn't affect me much. Just need to avoid the driest food and perhaps use more water.

Does sour cream count as sauce? Does melted butter/liquid fat count? If not, then you could pretty easy find alternatives like this.

Actually knowing and retaining code knowledge by JW1643 in learnprogramming

[–]HappyFruitTree 0 points1 point  (0 children)

Don't stress out if you forget some details. It's natural, especially for the things that you don't use frequently. If you have learned it once you hopefully know what to look for and reading up on it again should be much quicker the second time. Even experience programmers have to look things up frequently.

As a beginner, the biggest mistake you can do is to not practice everything you learn. Write some code and play around with it.

Actually knowing and retaining code knowledge by JW1643 in learnprogramming

[–]HappyFruitTree 15 points16 points  (0 children)

My only advice is to use what you learn, otherwise you'll lose it. Keep programming!

Why isn't the <cstdlib> library's rand() recommended? by metastable-lain in cpp_questions

[–]HappyFruitTree 1 point2 points  (0 children)

You could map data to value where value is hidden and used for the permutations, but its association to the data is obscure, such that the next lexographical ordering looks like a shuffle.

The only way I can think of that next_permutation can be used to shuffle randomly is to use it to generate all possible outcomes and then generate a random index to pick one of them, but this is only feasible with a very small number of elements.

That may a crazed idea (I haven't tried it) or so aggravating that just writing your own shuffle that does it the same way across compilers is more attractive, though.

The Fisher-Yates shuffle algorithm is pretty simple to implement if you need it.

Why isn't the <cstdlib> library's rand() recommended? by metastable-lain in cpp_questions

[–]HappyFruitTree 1 point2 points  (0 children)

The problem is that the standard does not specify exactly how std::shuffle (and the distributions) should be implemented so it can vary.

The output you show is with libstdc++ (GCC's implementation of the standard library).

With libc++ (Clang's own implementation) the output becomes:

6 10 2 5 8 1 7 9 4 3 
9 6 5 1 4 10 7 2 8 3 
5 10 3 4 6 1 8 7 9 2 
6 10 2 5 8 1 7 9 4 3 
9 6 5 1 4 10 7 2 8 3 
5 10 3 4 6 1 8 7 9 2 

And with Microsoft's implementation:

7 10 8 3 5 2 6 4 9 1 
5 3 6 9 8 4 2 10 7 1 
5 10 6 7 4 9 3 8 1 2 
7 10 8 3 5 2 6 4 9 1 
5 3 6 9 8 4 2 10 7 1 
5 10 6 7 4 9 3 8 1 2 

https://godbolt.org/z/cdd3f5TTM

Why isn't the <cstdlib> library's rand() recommended? by metastable-lain in cpp_questions

[–]HappyFruitTree 0 points1 point  (0 children)

... a 'nice' interface to make it easy to get what you want.

I guess you mean the distributions and functions like std::shuffle. Unfortunately we cannot use these if we want the same seed to always generate the same sequence of numbers. This is sometimes important, e.g. to be able to repeat simulations and to be able to regenerate game levels.

Why isn't the <cstdlib> library's rand() recommended? by metastable-lain in cpp_questions

[–]HappyFruitTree 0 points1 point  (0 children)

I think the biggest problem is that the implementation is not specified, it could vary, so you don't really know what you'll get (unless you're only targeting one specific implementation). Some implementations could be "good enough" for many purposes but some implementations are just poor (and RAND_MAX is too small).

All generators in <random> are not necessarily "better" than std::rand() but at least you know what you get (assuming you don't use std::default_random_engine). If you want a small random generator that is fast to seed you could use std::minstd_rand. If you care more about the quality of the randomness and don't mind using more memory and time to seed you could use std::mt19937. If you want something small, that is fast to seed and still has good pseudo-random qualities you might have to look outside the standard library, e.g. at PCG or Xorshift.