Lurker News
I've been studying viruses lately, and have found that the line between virus/exosome/self is much more blurry than I realized. But, given the niche interest in the subject, most articles are not written with an overview in mind.

What sorts of topics make you feel this way?

Comments (813) 149 threads

Earlier comments
zarkov992 replies#
Coroutines in C++.
ncmncm1 reply#
Coroutines are most easily understood as a way to write a state machine in a way that looks like a function. I.e., it's just a notational trick to make one function do different things according to when it's called.

To see it, imagine you have a struct with a data member for each local variable of your function, and replace your function with a member function that has no local variables, but uses "this" to get at what was local data.
Add one more data member, a number that is set differently right before each place the function returns.
Finally, insert some code at the start of the function that, according to the number, jumps to just after the last return statement executed.
Then, each time you call the function, what happens depends on what happened last time.
There are more details, but that is the gist.
You can write that yourself in C++98, with the body of the function inside a switch statement. Getting it past code review would be the real challenge.

zarkov991 reply#
I think I get coroutines in theory. It's the C++ specific complexity that is the hardest barrier. Thanks for the explanation though
ncmncm#
Yes, a lot of extra junk is needed to make them actually work, but the extra junk goes a long way toward obscuring what you actually need to know.

Ultimately, though, you are right that you have to understand it all, once, even if you can't remember it all a month later. The explanations I find online are not good at presenting just the details you need when you need them, and building up to the full picture.

Rerarom#
Try to understand them in Simula first, since that's where C++ drew its original inspiration from.
foreigner1 reply#
The Coriolis Force
cygx#
Drag a marker with a constant radial velocity (from your perspective) across a spinning disk. It'll trace out a curved line, so from the perspective of an observer on the disk, an acceleration must have been present.

The full 3d Coriolis force is more complicated than that (eg accounting for the Eötvös effect): The spinning disk example only gets you to the -2vω term (where v denotes radial velocity and ω angular velocity).

kbradero#
celullar replication and virus code insertion
aaronblohowiak5 replies#
Orbital mechanics
antognini#
I've been meaning to do a bit of blogging about this since my thesis work was on gravitational dynamics. Is there anything in particular you would be interested in seeing explained?
ghostpepper#
Have you heard of / played the game Kerbal Space Program?

I believe even folks at NASA have even said it helped cement their mathematical knowledge with a better intuitive understanding.

OkayPhysicist#
Fall and miss the ground forever.

Load more comments