HN user

Joker_vD

7,075 karma
Posts1
Comments3,245
View on HN

stopping the Queen and others from enacting restrictive and harmful policy

Like regulating the production, sales, and use of opiates. Or tightly restricting the abortions. Or forcing people to wear seatbelts while driving (and two years ago on this very HN I've seen lots of people complaining about state-mandated vehicular safety, so no, the seatbelts are not an uncontroversial topic). There are many other examples of the authoritarian nanny states unduly restricting bodily autonomy of people.

Crucially, most of those policies aren't really based on truth or falsity of anything but simply on a value call. Forcing people to wear seatbelts may or may not actually reduce vehicular injuries (in fact, some research indicates that wearing seatbelts makes one more prone to reckless driving) — they're mandated anyhow, simply because some people believe it's the right thing to do.

The 4th, 5th, 7th do have such provisions. And despite the 1th amendment prohibiting the Congress from "abridging the freedom of speech, or of the press", both war-time censorship and prohibition of pacifist/anti-war propaganda has been found to be constitutional during the WWI.

Fixed point numbers to the rescue!

    > a diagram that shows that dividing 0x7F (127) by 243 and then multiplying by 256 results in 0x86 (134)
> Tada!

How... how does that help with anything?

Now digits can be easily extracted from the top two bits of the resulting 10-bit number when multiplying this 8-bit byte by 3.

What? Why? How? This is supposed to be the most insightful part of the post, and it's literally just "Behold!" from that one proof of Pythagorean theorem. Could someone please elaborate it for a non-genius like me?

No, not really. The macaroni are formed by squeezing the dough through the openings, while the cartridge cases are made by stretching small metallic disks into cylindrical shape (and then stamping the bottom to make it flat and have a proper rim), so it's impossible to repurpose the pasta-forming machines into the casing-making ones.

But it is an urban legend of sorts, along with "baby strollers with chain tracks instead of wheels", and shows how little most of us know about industrial manufacturing.

that sandboxing should be a first-class integral part of every harness,

Essentially, what you want is that the people who produce harnesses like OpenCode to also implement proper sandboxing and security. Why... why do you believe they'll do anything remotely satisfactory?

It's been empirically demonstrated, again and again, that at least 85% of software developers (and this is a very generous estimation) can not be trusted to bother about the security, so leaving the implementation of the security mechanisms and policies up to them simply doesn't work in practice. It just doesn't.

So is a pasta factory. Today it rolls and forms macaroni, tomorrow it makes bullets. Have you ever wondered why rigatoni are so wide? That's why.

The universality of "I want the rule of law!.. unless I dislike the laws, of course" stance is truly depressing. I swear, were it not for rather strict ground-level prohibitions in the constitutions, we'd all went back to allegedly enlightened monarchies ages ago. Perhaps we yet all will, things really are looking quite peculiar around the world right now.

I don't know if you've ever read any Bill/Declaration of Rights, but they all have "this right shall not be violated unless the law allows it" provisions. Many of them even have "oh, and requiring state licensing to exercise such right is not violating it" provisions (see e.g. "This Article shall not prevent States from requiring the licensing of broadcasting, television or cinema enterprises" in Article 10 of ECHR).

Do you not realize that this argument applies equally well both against pro-choice and against pro-lifers? It does, therefore it is entirely invalid and irrelevant.

Yes, those people with "false beliefs". Ah, if only we could force everyone to have true beliefs. And it's not against freedom of thought and consciousness, oh no! We're only against actually false beliefs. That, you know, have been proven wrong. Or at least for which the proofs of incorrectness exist that we believe are correct. But since our beliefs true, this is fine.

Every language has to decide if the calling convention is part of the function signature or not

Well, of course it is. If you get the calling convention wrong, then you can't actually reliably call the function. I've seen this in e.g. Win32 — pass the function with the wrong calling convention as your callback, and it will dutifully thrash your stack.

The only other option is "pretend that there is only single calling convention that everyone uses" which is apparently somewhat works on platforms that are not 32-bit x86, but only mostly.

The C++ standard decided to allow this,

Decided to prohibit, actually.

which actual C++ compiler implementers decided to ignore for whatever reason,

Because it's UB anyway so why bother detecting it, and it mostly works most of the time when people use it, so again, why bother prohibiting it? No promises on keeping things working in perpetuity, of course.

Eh, both are about the same? With the source-level API changes, you can patch the source code or, you know, just keep using the already existing binaries, or keep using the old compilers. But if you break ABI, you can't keep using those already existing binaries, you need to start upgrading in bulk. Using the new compilers. That also probably have some source-level API changes. Oh dear.

I always find this line of thought interesting. Because it implies the manufacturer has all the power. But they don't. The consumer does.

There is difference between the political power and the economical power. The economical power of the aggregate consumer is vast, but it's unconsolidated, and doesn't usually translate into the political power. The economical power of several centralized/monopolized producers is also vast, but it's consolidated and usually does translate into the political power. Plus, you know, class consciousness and all that — the gentlemen and the nobles in the Parliament may bicker and backstab each other, but the moment the peasants revolt against the Enclosure Acts, they put their differences behind them and start the hangings.

Ultimately the manufacturer wins the horse-shoe battle because they are cheaper.

Yeah, but they can speed their victory up by paying the legislature (or straight up being a large part of that legislature) to crack down on those small-scale manufacturers. License the blacksmithing itself, require obtaining certificates of quality for horseshoes for sale, and tax shoe-fitting unless it's done with the authorized horseshoes — and that's only barely scratching the surface.

And hey, almost a million blacksmiths displaced is a huge block of voters that any elected politician would be glad to capture! Although I struggle to recall any of the examples of something like this happening in the real-world history.

Depends on the overarching economical policies. During the British rule, the Indian textile weavers went out of manufacturing business and had to switch to sustenance farming, and then perish during one of the many famines. And the Parliament legally forbade the public relief efforts, such as fundraisers to buy and send corn to the affected regions, explicitly citing the concerns that such efforts would skew the market forces and unbalance the trade.

i've also been reading the c89 rationale document, and the source code for the 7th edition unix c compiler.

the original c compiler was a single-pass compiler.

No it was not. It was a two-pass compiler.

that was a necessity for a heavily memory-constrainted system like the ones they were working with.

Again, no. In fact, the compiler had two passes because of the memory constraints: it was impossible to fit the code (and the working data) for both passes into memory, so it was split, and the passes communicated by the way of temporary disk files. The same thing is true for the UNIX's as(1) assembler, it also had two passes.

But think of the jobs! There used to be a million people involved in horseshoe-making, now there is only a thousand, and the rest of that million now has to do something else! And since there is literally nothing else for them to do, they'll have to die out :(

The most bizarre thing about the economical systems is that there indeed were cases where former workers of the industries that collapsed/disappeared indeed went the way of the dodo.

How did the police in XIX and XX century even managed to investigate the crimes without having access to the records of criminals' communications, and with way worse forensics available? No, seriously, how?

One of the things they did is they investigated metadata: you know, witnesses who saw what people walked around? Today we have way more of such data, readily available for them, plus ubiquitous CCTV and the like. That's not enough, apparently? Also, the police used to employ informants among the criminals themselves, and even implant the cover agents. Apparently, this nowadays is too expensive/bothersome, compared to running a global search for the keywords in the text messages and the transcripts of all voice messages sent in the country during the last month.

A talk like this, but broader and including all kinds of human communications/interactions in general (including AFK/off-line interactions), will still be needed to happen between a girl and the girl's parents in the foreseeable future, due to the basics of human nature; it may as well include the online behaviour.

After all, there is a reason why "some random women will send you unsolicited vag pics just because you're a buy"-talk doesn't need to happen with boys.

...which treats it differently from non-empty buffers :)

But frankly, having a 1-byte buffer, pointer to which can serve as a sentinel value à la NULL (but dereferenceable!), and which you can pass to free() without it being deallocated is indeed rather useful.

I am suggesting that the whole keyboard can lock during the time the physical ball rotates; the comptometers and pinwheel arithmometers of the yore had this functionality: while the mechanism was performing the addition of the number just entered, the user was blocked from fiddling with the input mechanism.

Well, yeah. You can do this, you can take

    pub fn simple_func(fetch: fn(String) -> String) -> List(Int) {
        let keys = ["a", " b"]
        list.map(keys, fn(key) {
            let key = string.uppercase(key)
            let value = fetch(key)
            string.length(value)
        })
    }
and manually convert it into a code that, instead of performing this computation, builds essentially an AST that could be interpreted to perform this computation. But the whole point of the research into async/await, algebraic effects, etc. is so that you, the programmer, don't have to because your original program is already an AST that could be interpreted to perform the computation!

Your programming language already has semicolons, "foreach", and "return", so why force the programmer to use a combination of "continuation.then()", "continuation.each()", and "continuation.return()" instead? That's very much building a new programming language on top of an existing one and then solving the original problem at hand — well, perhaps the original programming language should just be better at solving the problems you want to solve?

Usually this would be done via an interpreter, so I'm not sure that it really requires unsafe either.

Well, I personally have written a const-expression evaluator that actually reuses the rest of the compiler: it compiles the expression in the current environment with some specific adjustments to the codegen settings, launches the temporary executable and gathers its output... frankly, it's more hassle than it's worth compared to writing a separate const-expression interpreter. Plus, of course, it also runs slower since most constant expressions are usually pretty trivial.

    if (scanf("%9lu",&len) < 1) barf();  /* >999999999 bytes is bad */
    if (getchar() != ':') barf();
    buf = malloc(len + 1);       /* malloc(0) is not portable */
    if (!buf) barf();
    if (fread(buf,1,len,stdin) < len) barf();
    if (getchar() != ',') barf();
Ah, the wonders of error-handling in C. Also, I wonder what's wrong with
    buf = malloc(len ? len : 1);

We've got a coin here! Let's ask a frequentist and a bayesian what they think about the probability that flipping it would make it land heads up?

Frequentist: How would I know? I haven't seen it flipped once, nor do I know how you've selected it from all the other coins that exist.

Bayesian: It's 50%!

Then we flip the coin 10,000 times and observes that it landed up heads exactly 5,000 times.

Frequentist: Huh, that's weird. You see, if the probability was 1/2, the expected deviation from the mean in this case would've been 50, so I'd expected to see either about 4'950, or 5'050 heads... still, MLE provides the answer of 1/2 bu-u-ut...

Bayesian: It's 50%!

This two-strawmen thought experiment clearly demonstrates the superiority of the Bayesian approach in learning useful information from the real-world observations.

It's really kinda shame that both personal certainties and physical probabilities follow the same algebraical rules while having entirely different nature; most of the time, you are not very interested in how much is someone is certain of some outcome, you're much more interested in the actual outcome or at least the actual probability of that outcome. Granted, most of the time you can only readily access someone's certainty of an outcome, but this is just a proxy for the quantity you're actually interested in knowing.

You are better saying that the probability distribution of the probability is β(65,35) or maybe β(65.5,35.5) or β(66,36)

s/probability/your personal certainty/g. The probability of the coin landing heads up is what it is, and it usually doesn't depend on any of your knowledge.

The original immigrants/colonists were Puritans and their approach to the governing and liberties, well, it can be arguably called proto-totalitarian. Remember, those were the same kind of people that managed, of all things, to push the Parliament to prohibit celebrations of Christmas and Easter during the English Interregnum, despite massive popular backlash. The Puritans in the American colonies had roughly the same attitude:

    Christmas observance was outlawed in Boston in 1659, with a fine of five shillings. The ban
    by the Puritans was revoked in 1681 by an English appointed governor, Edmund Andros; however,
    it was not until the mid-19th century that celebrating Christmas became fashionable in the
    Boston region. Before the Declaration of Independence in 1776, it was not widely celebrated
    in the American Colonies.
There is much written about the Puritans in the North America; their ideas, sadly, influenced the American political thinking and culture a lot.

maybe codesize don't matter?

Well, instruction cache still has limited size, and you still need to get your code into it. Paging in 512 KiB from the disk is faster than paging in 1 MiB from the disk.

like pre-decoding in Icache.

I'm fairly certain x64 also does that?

RVC is self synchronizing,

No, not really. You can still jump into the middle a 32-bit instruction, and it's possible it can be reinterpreted as a valid 32/16-bit instruction. Remember when people complained about how "overlapped instructions"/"hidden instruction streams" on x64 enable even more ROPs/gadgets than meets the eye? Don't worry, RISC-V has those too!