HNHacker News
TopNewBestAskShowJobs

chronial

595 karma · joined June 24, 2013

submissionscomments
chronial··on Lisp-stick on a Python
> that's not what the GP was asking for in this case.

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?

chronial··on We built voice modulation to mask gender in technical interviews (2016)
> We really need to be more precise in our terminology here. "Sampling from a distribution" can mean a lot of things.

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.

chronial··on We built voice modulation to mask gender in technical interviews (2016)
> "Bernoulli distribution" (not a thing, btw)

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?

chronial··on We built voice modulation to mask gender in technical interviews (2016)
> I think I get what you're going for here -- you're trying to simulate a coin flip? -- but what you've actually done is made successive draws from a uniform random number generator. The software is designed to return numbers that fall along the interval [0,1) with equal probability. Thresholding the numbers and dividing their counts is not a meaningful transformation;

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.

chronial··on The hardest thing about engineering is requirements
The requirements and the spec are very different things. The requirements are exactly the thing that comes from the stakeholders. The spec is a way longer document that must match the requirements, but it is not the requirements.

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".

chronial··on The hardest thing about engineering is requirements
I really like "mining" here. At least for me the connotations fit really well. I think it's better than "inventing", because it's not like requirements come from thin air. They exist in a raw form buried in the stakeholder's minds / domain knowledge and they are extracted to a useable form through hard labor.
chronial··on Foobar2000
Ah, good times – I was the one who initially continued development after you left off. Thanks again for open sourcing it back then :).
chronial··on Writing a Linux-compatible kernel in Rust
I don't know Zig, Ada and D very well, but isn't Rust the only language that can guarantee huge amounts of safety with zero runtime overhead due to the burrow checker?

I think that is its differenciating property.

chronial··on Writing Python Extensions in Assembly
> What I meant is inline. So inside of a py file, you can rewrite the one function which you identified as the bottleneck. In C or another language.

Have a look at cython – it provides exactly that.

chronial··on Friendship ended with the garbage collector
There are versions of Python without RC: https://www.python.org/download/alternatives/. There is no doubt that Python would be better off without RC, the problem is that Python extensions rely on RC. So CPython (the main python implemenation) can't just do the switch.

If you want more information about this topic, there is a nice talk by Larry Hastings: https://www.youtube.com/watch?v=pLqv11ScGsQ

chronial··on Friendship ended with the garbage collector
Which real life experience are you referring to? Go has an extremely fast GC that has minimal pauses. Python still doesn't have "proper" multithreading because RC is too slow.

The problem with rc is not memory access but synchronization.

chronial··on Climate change: IPCC report is 'code red for humanity'
> The idea of societal benefit is very nebulous. [...] How do you measure something like societal benefit?

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.

chronial··on Climate change: IPCC report is 'code red for humanity'
Your analysis has one major flaw: It would only make sense if ice cream had as severe a climate impact as bitcoin. I have no reason to believe that it does.

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

chronial··on “Bush Hid the Facts”
I'm not 100% sure on this, but I don't backwards-compatibility mattered in this decision. They wanted memory-efficient and O(1)-indexable strings.
chronial··on Gravity is a double copy of other forces
Apparently I forgot to type the "go away" that was supposed to go between the "acceleration" and "while" in that sentence ^^.
chronial··on Gravity is a double copy of other forces
You misread. Your phone is accelerating upwards at 9.8m/s^2. That is also what it displays. If you have an accelerometer that displays a history (I recommend the app phyphox), you will also see that acceleration while your phone is falling.
chronial··on Linux Sucks 2021 [video]
Same here, but you can just skip through the video and look at the slides. There's not that many and they summarize his points quite succinctly.
chronial··on Overweight and healthy is a big fat lie, obesity study finds
Here's a non-paywalled article https://www.escardio.org/The-ESC/Press-Office/Press-releases... and it has a link to the study: https://academic.oup.com/eurjpc/advance-article/doi/10.1093/...
chronial··on Overweight and healthy is a big fat lie, obesity study finds
I think it's this one: https://academic.oup.com/eurjpc/advance-article/doi/10.1093/...
chronial··on Brazil scientists map forest regrowth keeping Amazon from collapse: Study
IMO "My income is more important than the environment" is not the correct summary. The actual situation is this:

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).

chronial··on C++ the Good Parts (2014)
At least for python, using is not more limited, but more complete: It allows to handle exceptions that are raised in the block and it also allows you to raise exceptions in the "destructor".

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.

chronial··on How HTTPS Works
The coffee shop router is the thread. Whether it's the coffee shop owner, an employee, somebody who hacked the router or just somebody who tricked you into going into their WiFi which is not actually the coffee shop's.
chronial··on Pygame Zero: Creating games without boilerplate
> However, a major concern I have for this architecture from a pedagogical perspective is it's reliance on the global namespace.

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.

chronial··on What’s New in Python 3.8
But the Julia syntax can not represent arguments that can be passed either positional or named, right?
chronial··on Ask HN: Cool stuff that's still completely unregulated?
> I think there is going to be a huge health revolution ...

How would any of what you listed help against cancer, aging and the obesity crisis?

chronial··on Spaghetti Sort (2018)
Asymptotic times usually have assumptions on the problem size. On computers, you assume that memory access is constant time, which violates the laws of physics for arbitrarily large N.
chronial··on Medical equipment pricing is completely broken when a sling costs $200
> Healthcare quality is basically the same in all first-world countries

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.

chronial··on It Shouldn't Be This Hard to Responsibly Fly a Drone
> When you fly a drone, you still constitute a danger to other aircraft and the people in it, or people on the ground. Why should you be subject to fewer rules, just because you are not aboard the aircraft, and thus not at risk?

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.

chronial··on Sunsetting Mercurial Support in Bitbucket
Unfortunately, on Linux, filenames are actually bytes, not utf-8.
chronial··on Sunsetting Mercurial Support in Bitbucket
> Is there any way to shorten the amount of keystrokes to use git?

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`.

← PreviousPage 2 of 10Next →