You really think that when they mentioned the dynamically allocated `Vec` in Rust (which has fixed-sized arrays) and "manual memory management" in C, what they were actually talking about was a static array?
595 karma · joined June 24, 2013
You really think that when they mentioned the dynamically allocated `Vec` in Rust (which has fixed-sized arrays) and "manual memory management" in C, what they were actually talking about was a static array?
I know it to mean only one thing: Generating a value in such a way, so that if that process were to be repeated, the generated values follow the given distribution. How exactly this is done is irrelevant, as long as the distribution is correct. See also https://en.wikipedia.org/wiki/Pseudo-random_number_sampling.
> [...] it seems like they were trying (?) to sample from the binomial CDF.
This is technically unclear usage of terminology. You can not actually sample from a CDF. But it is clear that you are referring to Inverse transform sampling (https://en.wikipedia.org/wiki/Inverse_transform_sampling) – where you sample from a Uniform distribution and use that sample to generate a sample form a non-uniform distribution using that distribution's CDF.
> The code OP posted was just taking the ratio of two binomial random variables. It's not "sampling from a binomial", except (perhaps) in the sense that each of those random variables was the result of independent coin flips.
Once again: Since the Binomial distribution is the distribution of a series of independent coin flips, doing a series of independent coin flips is a perfectly valid way of sampling the binomial distribution.
> Based on the sibling comments, it seems like they were trying (?) to sample from the binomial CDF.
As they explain in the sibling comment, they generate two samples from the binomial distribution and compare them to each other the same way the original authors did. What they achieve by this is sampling from the same random variable that the original authors were implicitly sampling from. They then took multiple samples from that variable in order to get a feel for its distribution, to confirm their original point: That 3% is not an uncommonly big value under that distribution.
> Setting this aside, my high-level point was OPs calculation doesn't have anything to do with error distributions.
So I don't quite now what you mean by "error distribution". I assume you mean the distribution of the random variable that had the value of 3% in the article? If so, then OPs calculation does – as explained – have a lot to do with that distribution. It does not calculate that distribution, but it samples from it, which is a useful way to get a feel for a distribution without having to do any fancy mathematics or research.
So this Wikipedia article is a fever dream? https://en.wikipedia.org/wiki/Bernoulli_distribution
> they calculated the ratio of two binomial random variables, and presented that as a percentage.
Ok, now I'm confused. I 100% agree with that statement. I thought your whole point was that OPs code was not a valid way to sample from a binomial distribution?
But then what is your criticism? Are you arguing that the Binomial distribution does not model the original experiment correctly?
This is wrong. That is a very meaningful transformation. It is the standard way (https://stats.stackexchange.com/questions/240338) to turn a uniform distribution into a Bernoulli distribution.
Getting a single value with Bernoulli distribution is called a Bernoulli trial (https://en.wikipedia.org/wiki/Bernoulli_trial). Repeating this gives you a Binomial distribution (see your own wikipedia link).
Long story short: GPs code is a perfectly valid way of sampling the Bernoulli distribution. It is inefficient because it needs so many random values, but it mimics the actual process happening in real life making it easier to understand than generating a Binomial sample from the Binomial distribution's CDF.
Also, the requirements for a spaceship are only "must travel to the moon" if your customer is a 5 year old child. The real list of requirements is way longer and includes things like "must be compatible with our existing launch infrastructure".
I think that is its differenciating property.
Have a look at cython – it provides exactly that.
If you want more information about this topic, there is a nice talk by Larry Hastings: https://www.youtube.com/watch?v=pLqv11ScGsQ
The problem with rc is not memory access but synchronization.
That is indeed a very hard problem and one of the mayor challenges of any society. But that doesn't mean that any endeavor that includes this notion is to be avoided. You gave the example of eradicating disease.
> I can guarantee we have different opinions about the value of things. That's why we should be free to make our own choices. We don't need everyone in the world to help define what "societal benefit" is for them, they can do it every time they pay for something out of their own pocket.
But now you are not arguing about ice cream anymore. You seem to be just generally skeptical of a strong centralized government. And you can of course argue that and there are no simple answers here. I was just pointing out that your ice cream argument doesn't hold water.
Unless it is "Any kind of government interference is bad. This is why we shouldn't ban ice cream. Therefore we also shouldn't ban bitcoin." If that is your stance, then ice cream and bitcoin are indeed equivalent for your. But that is probably not the worldview of the people asking for bitcoin to be banned. Then your post does not argue against their view, but against your version of their view.
You would have to find a list of things that people enjoy but don't bring societal benefit that add up to bitcoin's climate impact. I assume that list will then either:
• contain things that should actually be banned or
• add up to way more utility for way more people than bitcoin
1) A youtuber needs a certain amount of income to be able to afford the time to create their content. 2) Selling merch works way better than asking for donations 3) The positive impact of having the informational videos far outweighs the negative impact of creating and shipping the merch.
You can of course criticize the viewers for (2) and if you think spreading information has a low impact, you can question (3).
That is something that you actually need rather frequently. For example a db transaction wrapper might want to rollback instead of commit if we leave the block via an exception. You also want the "destructor" of that block to raise if the transaction can't be committed.
The only thing that the c++ method does really well is memory management (e.g. unique_ptr), because free() can't fail. But that use case is of course not a thing in gc languages.
Regarding the composition: Everything that's not memory management usually has side-effects and often wants to do something with regards to exceptions. So it's a good thing for the caller to know that the "RAII" is happening. Allowing you to complete hide that in your class is not a benefit.
C++ paints a distorted picture here, because its method is great for memory handling issues, but only OKish for everything else. But most of your RAII issues in C++ are memory related, so you don't notice the problems that much.
Their concerns are not specific to pygame. They are trying to teach their students to not have global state and are afraid that using pygame in its current form would undermine those teachings.
How would any of what you listed help against cancer, aging and the obesity crisis?
While this statement is correct, my understanding is that there are still small quality differences, and the US is in fact the word leader in quality. Thinking about it, this also makes sense – if you are willing to pay extreme amounts to doctors, you should also see at least some improvements in quality.
But we are talking something like <1% better quality for +100% the cost, so this is clearly not worth it. But if I was a billionaire with a difficult disease, I would definitely at least consider going to the US for treatment.
Because a drone is a lot smaller and thus constitutes a heavily reduced risk.
> Imagine remote controlled cars on the road. Should we allow some drunk kids without license on their computer at home to control cars on the road (and endanger everyone else), just because they are not in danger? Of course not.
So, to borrow your imagery here: A bicycle is a lot less risky to traffic and people than a car is and thus you are allow to drive it without a license and punishments for violations are in general lower than for cars.
Sure, you can just set up aliases in your shell and in git. Set an alias in your shell for git → g and in git for commit → c and you can commit with `g c`.