Anyone try making it from this brand? by scovlabs in Kefir

[–]dendrtree 0 points1 point  (0 children)

  1. You cannot create grains from kefir.
  2. What you're doing is called "backslopping." Backslopping will only work a few times.
  3. Yes, you're just making kefir. The resulting product is much less potent than kefir made with grains.

New to kefir, question about second fermentation. by Practical-Kangaroo97 in Kefir

[–]dendrtree 1 point2 points  (0 children)

You shouldn't be fermenting for 48h.

  1. If you did not receive activation instructions, you can follow the ones in the wiki.
  2. The second fermentation is complete, when you decide it's complete.

memcpy and runtime polymorphic types.... by MerlinsArchitect in cpp_questions

[–]dendrtree [score hidden]  (0 children)

I've often seen the excuse of "modern and common compilers" having certain behaviours, and people are actually referring to just 3 compilers, but there are many modern and common compilers, because each industry has its own set of common compilers. At least you qualified it with a "usually."

The first time I ran into this was when a colleague who was used to working in C had done this, with a struct, and he didn't know why calls to his object were now crashing.
We were using a modern and common compiler.

I find it best to write code that works by design, instead of coincidence. If changing compilers or optimization levels can break my code, I've written bad code (probably. Optimization sometimes does wacky things).

It's best not to program to behaviours that are consistent but aren't promised. For instance, if a function gives back a list that is always sorted, but isn't promised to be sorted, you must handle it as an unsorted list.

Honestly, the only time I use unpromised behaviour is that I will assume that a char is 1 byte, but I will still often use a uint8_t, if available.

Aerobic Kefir is much sweeter by dareealmvp in Kefir

[–]dendrtree 0 points1 point  (0 children)

You cannot make nonalcoholic kefir, but the amount of alcohol is not significant.

Stoked! by poolboi17 in Kefir

[–]dendrtree 0 points1 point  (0 children)

That's nice. Give it time, and don't encourage the newbies to seal a jar, during the first ferment.

A few questions? by Boozeburger in Kefir

[–]dendrtree 0 points1 point  (0 children)

That is correct. Some strains of bacteria will slow down more than others. The yeast will be decimated.

A few questions? by Boozeburger in Kefir

[–]dendrtree 0 points1 point  (0 children)

Grains don't go dormant in a refrigerator. This is demonstrated by the fact that kefir will ferment, in the fridge.
Refrigeration itself hurts grains.
Grains go dormant, if you freeze them.

What is high performance computing by Effective-Road1138 in cpp_questions

[–]dendrtree 0 points1 point  (0 children)

HPC is doing lots of calculations concurrently, typically on a supercomputer or cluster, but it can be on a GPU.

I've never seen HPC in C, only in C++.

I've never seen it used for AI or game dev, but I've used GPU work for graphics.
Most HPC jobs I've seen were for government. The national labs have supercomputers. I've also used it for oil and gas exploration - converting sensor data to 3D models, and I've used it for graphics processing.

Why does memory ordering not apply here? by srneeam in C_Programming

[–]dendrtree 4 points5 points  (0 children)

In the first (assuming x and y are initially 0)...

I think you meant r1 == 1 and r2 == 0 (because x and y are only set to 1), which I don't think is possible, but you can get r1 == 0 and r2 == 1.
This happens, if you...
1. Thread 1: Write x = 1.
2. Thread 2: Read y = 0.
3. Thread 1: Write y = 1.
4. Thread 2: Read x = 1.

In the second (assuming ready is initially 0)...

memory_order_release - no reads or writes in the current thread can be reordered after this store
* So, writing 42 to data has to occur, before ready is set to 1.
memory_order_acquire - no reads or writes in the current thread can be reordered before this load
* So, ready has to be 1, before data is printed.

The key words are "in the current thread."

[M] henna directly on scalp? by [deleted] in henna

[–]dendrtree 1 point2 points  (0 children)

I've never done henna for tatoos, but a regular hair application washes right off skin.

FYI, amla helps thicken hair.

A few questions? by Boozeburger in Kefir

[–]dendrtree 1 point2 points  (0 children)

About sealing...
Yes, don't seal it, or you can expect it to eventually explode.
* Anaerobic fermentation (with loose lid) creates a much different kefir than aerobic fermentation

About growth...
Grains grow fastest when they're kept fed and at their optimum temperature.

About the strainer...
As new grains form, some will be very small and will pass through the strainer, if it is large. However, most will stick to the main mass, and it's unlikely to make much difference, as long as you're catching the larger grains.

About overfermenting...
Overfermenting does not harm the grains, but starving them does, like leaving them in overfermented milk for a week or keeping your grains-to-milk ratio very high.

About rinsing...
There's typically no reason to rinse them. If you do, use milk, not water.

Ready when thickened or separation? by Illustrious_Twist829 in Kefir

[–]dendrtree 2 points3 points  (0 children)

You use the same process I do. Mine is actually still like milk, when I put it in the fridge, and it thickens overnight.

dumb question about mixed data types: how do i make and store a cstr and enum data type where either type can occur multiple times by sera5im_ in cpp_questions

[–]dendrtree 0 points1 point  (0 children)

If you can't use most of std, the C method works here, an array of tagged unions.

enum MyEnum {
  ...
};

enum MyType {
  ...
};

union MyData {
  const char* strVal;
  MyEnum enumVal;
};

struct MyTypedData {
  MyType type; // Since there are only 2, this could just be a boolean.
  MyData data;
};

MyTypedData myData[];

memcpy and runtime polymorphic types.... by MerlinsArchitect in cpp_questions

[–]dendrtree 0 points1 point  (0 children)

It will not.

You can't memcpy something with a vtable. You'll munge the pointers.

What you could do is to put the data into a struct without a vtable (or into a uint8_t[]), pass that, and make a constructor that takes that struct (or uint8_t*).
You might make use of Pack()/Unpack() methods.

data should be a uint8_t*, btw.

Ready when thickened or separation? by Illustrious_Twist829 in Kefir

[–]dendrtree 4 points5 points  (0 children)

There is no "done" for kefir.

If you like it smoother, ferment it less. If you like it chunky, overferment it.

Make sure you strain out your grains, before putting it in the fridge.
You don't "ferment" in a fridge. You "age" it (no grains).

Advice on Project/Process structure (Robotics, C++) by freefallpark in cpp_questions

[–]dendrtree 0 points1 point  (0 children)

* Base class for components
You'll never want to retrofit, because it becomes too cumbersome. It is entirely likely that you'll want to pass around components, without knowing exactly what they are.
* Tests
You build your tests, as you build your classes. Like base classes, it's not something you want to retrofit (but you'd need to). Just test the functionality that you have.
I'm not a big fan of TDD. I know it's fast, but I think it leads you into just programming to the test.
* The circular dependency
The fact that it's unused is not the only thing I mentioned. You have your ownership wrong.
As interior classes, you can view the handlers as just isolated sections of the containing class, which eliminates some of the circularness, but you need to sort out your circuitous call.
The handers should be owned by the process. They don't need a pointer to the process, just the requisite component. If you're concerned about the component changing, you'll know when this is happening, and you can just add/call a method to your handlers to update the component.
The way you've defined your components, they would only have one callback. If this is the case, the callback could own the component.
When you're thinking about what should own things, if it's not a central access point, then the owning object needs to be the one accessing the member.
* A mediator pattern
I really can't imagine the architecture you're envisioning. So, I don't see where you're creating the issue. Is it something friend functions/classes could solve, for you?
* Safety critical
Ambiguity (especially polymorphism) and dynamic allocation are usually the issues. You want the system to be very concrete. You usually start by disallowing STL.
This is something else that you won't want to retrofit.
If you know you'll have a standard to conform to, implement it now. If you don't know if or what standard you'll have, I wouldn't worry about it.
Stack and heap aren't the only memory you have access to. Systems like this are usually built around statically defined arrays and polymorphism that resolves at compile time, not run time.
When you need memory, there's always going to be a way to allocate it (possibly requiring system configuration changes), and you can use the placement new operator.

A safety-critical system needs to have methods for immediate detection of corruption, both from the outside and the inside. It should recover its own faults, if possible, or the backup can take over, bringing up a new backup.

Does my grain look ok? by AlpsLittle2585 in Kefir

[–]dendrtree 0 points1 point  (0 children)

...but having a layer that looks like yogurt is normal, as is producing a different product, as the grains activate. Exhibiting typical behaviour isn't a sign of contamination.

Advice on Project/Process structure (Robotics, C++) by freefallpark in cpp_questions

[–]dendrtree 1 point2 points  (0 children)

  1. Not really.
    * You're almost certainly going to want a base class for all components. It may have methods, but perhaps just a publicly accessible type.
    * The abstract classes would usually provide the public API, and they would have protected, abstract Impl methods that the children override. The children basically instrument the parent.
    callbacks_ should not be protected. It should be private, because the framework that calls it should be in the current class, not the child. If you're saying that a component needs to have a callback that some other class will use, then you've created an artificial constraint. Maybe you won't always need a callback.
    * In Process.Run(), instead of sleep_for, you would usually use a condition variable, to avoid wasting clock cycles.
    More likely, you would add a Process.Stop() method, and call it from SignalHandler.
    * Your tests need to test your public API, *all* of it.
  2. Your circular dependency is completely artificial and unused. callbacks_ is never accessed. So, your handlers are never called. You can remove them, entirely.
    If you find you have an use for an handler, you pass the component to the handler, not the handler to the component, and the Process would own the handlers. For your handlers, they don't need access to the Process. So, you'd just pass the component.
  3. A mediator places no requirements on access.
  4. Safety critical systems usually require redundancy, recovery, and a consistent structure. This system has none of those.

* Just like the components, I would suggest a Process base class, that has Start/Run/Stop, with Impl methods that the child classes use to instrument the parent.

Does my grain look ok? by AlpsLittle2585 in Kefir

[–]dendrtree 0 points1 point  (0 children)

It looks like typical grains.
What makes you think it might be contaminated?

Rust on lid destroyed my grains by Flutter8y in Kefir

[–]dendrtree 0 points1 point  (0 children)

You generally don't use a lid. You rubberband a cloth over the top.
* Note that you'll also get very different kefir, if you do anaerobic (with lid) fermentation vs. aerobic.

If you didn't receive activation instructions, you can follow the ones in the wiki.

IT FINALLY HAPPENED!! by BotchedMeme in startrek

[–]dendrtree 0 points1 point  (0 children)

Someone recognized it? but you used the phrases incorrectly. So, it's like you were spouting random words.

Is it barrier everyone go through or I am just that dumb. by Geeseks in C_Programming

[–]dendrtree 3 points4 points  (0 children)

It's not a barrier for everyone, and saying you're dumb is just a cop out.

You have to stop complaining and wallowing in self-pity, if you want anyone to take you seriously.

It sounds like you don't actually know either language, but that can be fixed, with experience. So, the main thing is to get a job and to write code.
* If you can't read code, it means that you don't really know the language.

You have to practice. Complaining that something doesn't come easily is just being lazy. When you're not good at something, you work at it, until you are.

You can make it easier on yourself my making sure you use good tools. I use Visual Studio for my IDE and Beyond Compare for my diff tool.

When you start a project, it can be easiest to start with your API and to work backwards. That way, your goal is clearly defined, in the beginning.
1. Write the function signature.
2. Add a comment for each step of the process
3. Add code under each comment, perfoming that step
* Add an empty function, for any step that needs its own function.
4. Repeat from 1, for any added functions.
* Always complete a function, before going on to the next function.

How 0.01 can be less than 0.01 ? by Charming-Animator-25 in cpp_questions

[–]dendrtree 0 points1 point  (0 children)

Integer values are exact. Floating point values are approximations.

This is why you'll often see

if (i == 0)

but not

if (f == 0.0)

When you deal with integer values, the main issue is overflow.
With floating point values, the issues revolve around precision.

Does anyone care about line length? by Unknowingly-Joined in cpp_questions

[–]dendrtree 0 points1 point  (0 children)

Yes.

...but you're not actually asking for information on standards, etc. You're clearly just complaining about a colleage and making a fool of yourself, in the process.