Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Joker_vD
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
481.
▲
by
Joker_vD
8mo ago
Eh, generics kinda do introduce a subtyping relation already. It's just that HM's Gen rule of e: σ implies e: ∀α.σ is restrictive enough that this subtyping relation can be checked (and inferred) by using just unification which is
482.
▲
by
Joker_vD
8mo ago
Some people just itch to use something custom and then to have to think about it. Which can bring amazing results, sure, but it can also bring spectacular disasters as well, especially when we're talking about crypto.
483.
▲
by
Joker_vD
8mo ago
...a long-lived HTTPS connection that manages to transfer >700 GiB of traffic, with no disconnects, and presumably has re-keying disabled? An interesting theoretical setup, I guess.
484.
▲
by
Joker_vD
9mo ago
That it doesn't pleases lots of its users I imagine. I, personally, certainly never enjoyed it but sometimes you don't have a realistic alternative and have to use C++ (or C). In which case your pleasure or displeasure doesn'
485.
▲
by
Joker_vD
9mo ago
The proposals for Boring C or "Friendly Dialect of C" or whatever has been around for a while. None went beyond the early design stages because, it turns out, no two experienced C programmers could agree on what parts of C are rea
486.
▲
by
Joker_vD
9mo ago
In the end it all boils to a very simple argument. The C programmers want the C compilers to behave one way, the C implementers want the C compilers to behave the other way. Since the power structure is what it is — the C implementers are t
487.
▲
by
Joker_vD
9mo ago
Wow, that's a very torturous reading of a specific line in a standard. And it doesn't really matter what Yodaiken thinks this line means because standard is written by C implementers for (mostly) C implementers. So if C compile wr
488.
▲
by
Joker_vD
9mo ago
Yeah, this approach has been proposed, in an even more aggressive form, see David W. Wall, "Global Register Allocation at Link Time", 1986 [0], specifically for machines with large number of registers: the paper straight up says
489.
▲
by
Joker_vD
9mo ago
Which is why Windows UI is littered with language like "number of rows: {n}".
490.
▲
by
Joker_vD
9mo ago
You know, I regularly lose or forget my baseball caps (at least once per Summer, and usually I go through 2 or 3). I wish there was a nationally-mandated register of headwear, with obligatory chipping at the points of sale. Not even entirel
491.
▲
by
Joker_vD
9mo ago
Why is almost no one in this comment thread is willing to face the scenario where the function call has to actually happen, and be an actual function call? The reactions are either "no-no-no-no, the call will be inlined, don't you
492.
▲
by
Joker_vD
9mo ago
But it's not Dutch secret, right? It's the USA's one, right? All in all, kinda makes me suspect that statement is simply untrue.
493.
▲
by
Joker_vD
9mo ago
Isn't public disclosure of military secrets a criminal offence? Ah well.
494.
▲
by
Joker_vD
9mo ago
Thanks for actually engaging with my argument. > assuming it’s a function call in the middle of a potentially large call stack with no knowledge of its surroundings. Most of the decision logic/business logic lives exactly in functio
495.
▲
by
Joker_vD
9mo ago
> There's no reason `sizeof int` has to equal `sizeof intptr_t` Well, there is no reason `sizeof int` should be 4 on 64-bit platforms except for the historical baggage (which was so heavy for Windows, they couldn't move even lo
496.
▲
by
Joker_vD
9mo ago
Eh, pretty much nobody uses them (outside of OS kernels?); and mind you, RISC-V with its 32 registers has nothing similar to those, which is why 14-instruction long prologues (adjust sp, save lr and s0 through s12) and epilogues are not tha
497.
▲
by
Joker_vD
9mo ago
> You’re missing the fact that the compiler isn’t forced to fill every register in the first place. Temporaries start their lives in registers (on RISCs, at least). So if you have 40 alive values, you can use the same one register to cal
498.
▲
by
Joker_vD
9mo ago
You can't operate on stack variables without loading them into the registers first, not on RISCs anyway. My main point is that this memory-shuffling traffic is unavoidable in non-leaf functions, so an extremely large amount of availabl
499.
▲
by
Joker_vD
9mo ago
> Obviously, if you have 100 registers here, there’s no spilling at all. No, you still need to save/spill all the registers that you use: the call-invariant ones need to be saved at the beginning of the function, the call-clobbered
500.
▲
by
Joker_vD
9mo ago
> How is the publisher supposed to fund their operations let along make a profit. There used to be plenty newspapers sponsored by wealthy industrialists; the latter would cover the former's gaps between the costs and the sales, the
501.
▲
by
Joker_vD
9mo ago
The same way AMD added 8 new GPRs, I imagine: by introducing a new instruction prefix.
502.
▲
by
Joker_vD
9mo ago
No, I don't. I use a common "spill definitely reused call-invariant registers at the prologue, spill call-clobbered registers that need to survive a call at precisely the call site" approach, see the sibling comment for the a
503.
▲
by
Joker_vD
9mo ago
So, let's take a function with 40 alive temporaries at a point where it needs to call a helper function of, say, two arguments. On a 16 register machine with 9 call-clobbered registers and 7 call-invariant ones (one of which is the sta
504.
▲
by
Joker_vD
9mo ago
So every function call will need to spill even more call-clobbered registers to the stack! Like, I get that leaf functions with truly huge computational cores are a thing that would benefit from more ISA-visible registers, but... don't
505.
▲
by
Joker_vD
9mo ago
That's how variables are declared in BCPL, the language he designed and implemented in 1967. Keyword "LET", comma-separated list of names, "=", comma-separated list of expressions (that will be used to initialize th
506.
▲
by
Joker_vD
9mo ago
Every time I hear an argument "The Egyptian pyramids are still standing to this day", I'm taken aback. Like, what can a pyramid even crumble into, a pile of stones? It already is a pile of stones! Literally!
507.
▲
by
Joker_vD
9mo ago
But that's just associativity, not the order of evaluation? E.g. in C# expressions are evaluated strictly left to right, so if it had operator **, the order of evaluation would've been: tmp1 := x, tmp2 := y, tmp3 := z, tmp4
508.
▲
by
Joker_vD
9mo ago
Please forward your complaints to Martin Richards @ https://www.cl.cam.ac.uk/~mr10/ for making this decision. Also, why?
509.
▲
by
Joker_vD
9mo ago
My apologies, it should've been (if you insist on indentation) let a, b, c = 0, 1, 0 fb_start: writen(a) b +:= a a := b - a c +:= 1 if c < 100 do goto fb-star
510.
▲
by
Joker_vD
9mo ago
Which actually supports the OP's original argument that even with training and getting used to, this syntax reads harder than let a, b, c = 0, 1, 0 fb_start: writen(a) b +:= 1 a := b - a if
More ›