Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
jcranmer
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
61.
▲
by
jcranmer
2mo ago
The short answer is you need fast-math flags to allow optimizations that may change floating-point results, and you also need to guarantee an implementation of sinpi/cospi (these were added in C23, so they're not all that common i
62.
▲
by
jcranmer
2mo ago
If you're being technical, it's usually not a Taylor series, it's a minimax series. (The difference is that Taylor series minimize error at a given value, whereas minimax is trying to minimize maximum error in a range). In mo
63.
▲
by
jcranmer
2mo ago
I'm not sure C++26 reflection is sufficiently well-baked to actually allow it to be used for serialization boilerplate in codebases. What matters is not what the standard says, but what the compilers implement, and the compiler impleme
64.
▲
by
jcranmer
2mo ago
The stream-of-consciousness is only hard to read because it lacks paragraph breaks, sometimes sentence breaks, and there's so many misspelled words. If you just tweak it to fix that stuff, it becomes fairly readable, like most internet
65.
▲
by
jcranmer
2mo ago
x86-64 mandates SSE2 as a minimum requirement because it uses the SSE registers in the ABI for implementing float (which requires SSE) and double (which requires SSE2) arithmetic. (The x87 unit, which is what the 32-bit x86 ABI uses, can on
66.
▲
by
jcranmer
2mo ago
The main difficulty in support isn't actually making the changes (which is going to be largely defining various tables and other boilerplate, unless your ISA is really weird and does something unusual), it's in doing all of the po
67.
▲
by
jcranmer
2mo ago
A C++ lambda that doesn't close over anything can be converted to a function pointer: https://eel.is/c++draft/expr.prim.lambda#closure-12 This feature does turn out to be useful if you need to pun a C++ interfac
68.
▲
by
jcranmer
2mo ago
In this context: Nested functions have a different ABI from regular C functions, due to the invisible static chain register that needs to be set up. C has no way of indicating this different ABI, so GCC happily lets you cast a nested functi
69.
▲
by
jcranmer
2mo ago
When you want to use lambdas, but your language doesn't have lambdas, so you reach for the nearest thing instead.
70.
▲
by
jcranmer
2mo ago
The opcode is 5 maps (8, actually, but only 5 are occupied) of 10-bit opcodes, with the presence or absence of 66/F2/F3 prefixes providing 2 of those bits. If you ignore how the manual describes prefixes and look at it like that (
71.
▲
by
jcranmer
2mo ago
> because the X86 instruction set is a much bigger mess. One of the things I've been playing with off and on in my spare time is poking at the x86 ISA. And yet, while the ISA does have some weirdness to it, it is a lot less weird th
72.
▲
by
jcranmer
2mo ago
This is a load of bullshit that largely exists as copium to explain how x86 did the impossible and made a superscalar CISC processor. x86 is doing the same thing that (to my knowledge) all high-end processors do, yet no one tries to call ou
73.
▲
by
jcranmer
2mo ago
I'm not an embedded programmer myself, but from what I've heard... it's actually a pretty big assumption that the software people know what model hardware they're running on. Especially consider the possibility that a pr
74.
▲
by
jcranmer
2mo ago
Floating-point division requires 53 bits instead of 64 bits for integers. A lot of the increased latency comes from the wider datatypes.
75.
▲
by
jcranmer
2mo ago
> It's just a rhetorical device! It's a rhetorical device that I have yet to see used to good effect. The kind of rhetorical device that undercuts the argument rather than strengthens it.
76.
▲
by
jcranmer
2mo ago
A large chunk of the book is philosophizing about AI and the nature of the mind and intelligence. And when it's betting on the AI that existed pre-AI winter... yeah, that part is quite dated.
77.
▲
by
jcranmer
2mo ago
We had a dedicated QA team and an extensive test base... which we fired to reduce headcount, and we've trimmed back because we don't have the hardware resources to run those tests sufficiently expeditiously.
78.
▲
by
jcranmer
2mo ago
There are, I think, three big hurdles for freshmen in college: First, college can be a very abrupt shift from "someone is watching over you" to "you, and only you, are responsible for yourself." If you slack off in high
79.
▲
by
jcranmer
2mo ago
The main selling point that people tout for using rational numbers over floating-point is their exactness, and the main thing people complain about floating-point is their approximate nature. Introduce the ability to do sqrt on rational num
80.
▲
by
jcranmer
2mo ago
> The problem is that people (and languages) default to floating-point without understanding the consequences. If you were to insist on there being only one numeric data type in a language, then floating-point turns out to be the best co
81.
▲
by
jcranmer
2mo ago
I did a deep dive a while back into the floating-point semantics of many languages, included JIT'd languages, which mostly uncovers that very few languages are particularly precise in their specification. The tl;dr for the relevant lan
82.
▲
by
jcranmer
2mo ago
> Console business has always operated this way. Actually, I think the practice of selling the console at a loss only started with roughly the PS2 or PS3 generation. (The PS3 and later were very definitely sold for a loss, but I've
83.
▲
by
jcranmer
2mo ago
The post is kind of vague on the IR you're targeting. Can you give some examples of what the SIMD-ized IR looks like, and how it maps to the target PTX?
84.
▲
by
jcranmer
2mo ago
To have a theory of success, you have to also be able to explain failure. Why did object-oriented C (aka C++) take off but object-oriented Pascal (aka Delphi) not, despite the fact that Pascal was as prevalent as C in those days? Why was Py
85.
▲
by
jcranmer
2mo ago
Citing from the Behind the Bastards podcast, it seems that the guy who started Seal Team 6 wrote a book about his time in special ops (which was mostly lies, AIUI) after he left the military, made a lot of military, and so everybody who h
86.
▲
by
jcranmer
2mo ago
It's worth pointing out that Cyan made 6 Myst games (not counting remakes), and people only really talk about the first two. That gives you some idea of the staying power of the franchise... I recently played the remakes, and I have 8
87.
▲
by
jcranmer
2mo ago
AFAIK, sandsifter did find a halt-and-catch-fire instruction on one of the CPUs, but I haven't seen anyone announce which CPU model it was.
88.
▲
by
jcranmer
2mo ago
Honestly, my first thought watching this video is "I want a root beer float." Something in the way the icefalls as the iceberg is flipping over just makes me think of that...
89.
▲
by
jcranmer
2mo ago
No, ABI is not part of the C++ standard, although there are parts of C++ that do go "this is an ABI thing" (e.g., [[no_unique_address]]). ABI is more of OS-level thing. Most systems these days follow the SysV ABI, which is largely
90.
▲
by
jcranmer
2mo ago
Cut that graph to the last decade, and they don't look like they've been getting better.
More ›