HackerTrans
TopNewTrendsCommentsPastAskShowJobs

carstimon

no profile record

comments

carstimon
·5 เดือนที่ผ่านมา·discuss
Sorry, this was incorrect. In this integral we're just calculating the geometrical question, what is is the 5d volume of the collection of 3 points whose circumcenter is on {(x, 0) : x in [0, 1]}. So the "overall" probability of the problem has nothing to do with it.
carstimon
·5 เดือนที่ผ่านมา·discuss
You pointed out one error in your own answer, here's another. I haven't figured out the adjustments, but presumably they cancel.

You've done

∫₀¹ ∫₀¹⁻ᶜ (2π r)³ dr dc

However,

- the `dr` integral is assuming that the radii are uniformly likely in [0, r]

- the `dc` integral is assuming that the centers are uniformly likely in [0, c]

You need to wait these integrals by the conditional probability distributions.
carstimon
·7 เดือนที่ผ่านมา·discuss
A blog post for it from a prominent c++er https://herbsutter.com/2013/04/05/complex-initialization-for...
carstimon
·12 เดือนที่ผ่านมา·discuss
You've made the choice of (Locked Door, Open Window) ~ (Good SQL usage, XSS Vulnerability) which seems to be an incorrect rebuttal. Your example doesn't contradict "only as strong as its weakest link", here the weakest link is the XSS Vuln.

The "house analogy" can also support cases where the potential damage is not the same, e.g. if the open window has bars a robber might grab some stuff within reach but not be able to enter.
carstimon
·3 ปีที่แล้ว·discuss
I think this is in response to

> Why should my Dog be able to check out the internal StomachContents of another Dog

This seems to be interpreting the purpose of visibility as controlling the access that actual things represented by objects have. (There could be a non oop-as-real-world-things example here; `UserProfile.equals(UserProfile other)` might access secrets of `UserProfile` that the different actual users are not supposed to see between each other.)

The reason Dog can check the internal details of another Dog is, there's a single file that controls the usage of the fields. If you decide you want to change the semantics of the stomachContents field, you can check all the usages in that file. That's the simple practical reason. The StomachContents thing seems like a confusing analogy, like most that compare OOP to Real World Categorization.
carstimon
·3 ปีที่แล้ว·discuss
To add on to the defense in another comment,

I don't think the point of the article is a rust-v-python comparison. Sure, unoptimized-python2rust2optimized rust was a part of the clickbait 180,000x title but... - the author explicitly says the python2rust bit is only a factor of 8. - the Python bit is just one section of a pretty long article - the author says they typically start implementing something in Python so... why wouldn't they include their initial implementation?

I don't think this article should be dismissed just for including a simple python implementation- that isn't the point.