Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
codeflo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
26 ms
·
631.
▲
by
codeflo
4y ago
> i.e. it's what high-level functions get compiled down to in actual code Yes, the Command pattern is what I vaguely alluded to in my message. The thing is, using a lower-level representation in something that’s meant to be an abst
632.
▲
by
codeflo
4y ago
Not being intuitive isn’t the strongest argument against specialized notation. Programming languages aren’t intuitive either, yet we learned them. The rationale is that the arrow goes into the direction the #include or import would go. So i
633.
▲
by
codeflo
4y ago
Just so I get this right, she made a play based on an error, and got lucky? I mean, stuff like that happens, and is usually a great story. Watching humans play games is exciting precisely because we aren’t robots.
634.
▲
by
codeflo
4y ago
> Copernicus and Galileo being harangued by the Church of their time, and stifling progress of the obvious, is more popular myth than historical fact. I’m not sure why it has suddenly become so popular to claim that every single historic
635.
▲
by
codeflo
4y ago
It’s obviously 129 to 127 inclusive, hoping that the implied unsigned overflow has the correct consequences. ;)
636.
▲
by
codeflo
4y ago
I mean, strongly typed flag values are a solved problem. It’s not rocket science, just bothersome to do in C++.
637.
▲
by
codeflo
4y ago
> Instead, let’s just say arithmetic on INT_NAN is undefined behavior; sanitizers can then insert assertions in debug mode. I mean, if using that value is supposed to be UB anyway, then the current behavior if standard ints conforms to t
638.
▲
by
codeflo
4y ago
Was there a rationale?
639.
▲
by
codeflo
4y ago
Yes, but we’re discussing the article, not the mind of the physicist. Stating “Surely they have an answer” doesn’t give the answer.
640.
▲
by
codeflo
4y ago
I consider APIs that use degrees essentially broken. (And similarly, APIs that express ratios as numbers in [0, 100].) But you have to consider that a lot of game engines and related tools are intended for an audience without a strong progr
641.
▲
by
codeflo
4y ago
In JavaScript, I’d stay with floating-point (don’t fight the language if you don’t have to) and use something like x => x - Math.floor(x) to normalize.
642.
▲
by
codeflo
4y ago
Many are of the listed items are merely being deprecated. These shouldn’t really qualify as breaking changes. In fact, the ability to migrate away incrementally is precisely the point of deprecating instead of removing a feature. What surpr
643.
▲
by
codeflo
4y ago
> rasterization, i.e. painting 2D triangles As I explained in a sister comment, there's a lot more going on with rasterization, even back then, than "painting 2D triangles" might imply. Yes, only the XY coordinates determi
644.
▲
by
codeflo
4y ago
I’m sure it can be emulated efficiently enough nowadays, but I don’t think the mapping is very direct: Glide was mostly imperative and synchronous, Vulkan is declarative and explicitly asynchronous. Both are low-level, but for hardware that
645.
▲
by
codeflo
4y ago
Being 2D rasterizers was arguably true for some cheap early graphics chips like that of the PS1. For Voodoos, there was no point in the pipeline after which rendering is “only 2D” in any relevant sense. At the time, the Z coordinate was pas
646.
▲
by
codeflo
4y ago
Yes, I believe what language implementation would want to do is to use the lowest-level API that’s supported and stable. On Linux, that happens to be syscalls, on BSD and macOS, that’s libc, and on Windows, that’s the so-called “Win32” API
647.
▲
by
codeflo
4y ago
One interesting feature of ML-based image encoders is that it might be hard to evaluate them with standard benchmarks, because those are likely to be part of the training set, simply by virtue of being scraped from the web. How many copies
648.
▲
by
codeflo
4y ago
From the outside perspective of a younger democracy, the fact that the US political system treats this ancient legal document with the same reverence that one might pay to the biblical stone tablets, where it would be sacrilegious to even c
649.
▲
by
codeflo
4y ago
I got that e-mail too, on a decade-old test account: first an e-mail that reads like my account simply "expires" if I don't update. Then an invoice. Here's what I don't get: After a stunt like this, any reputation&#
650.
▲
by
codeflo
4y ago
> Being a dificult language to work with (as in at the other end of niceness like say Ruby) it is not even justifyable as a hobby lang. Obviously, there's a growing number of people who use Rust professionally, but that's not e
651.
▲
by
codeflo
4y ago
Of course, it would be unjust to judge academic research from a one-line summary that a journalist wrote. But at least on the surface, this is unconvincing: > D’Huy is applying these methods to study how ancient myths can inform what we
652.
▲
by
codeflo
4y ago
Those colors never looked great, but I remember them being a lot less jarring back then. At least some of the colors weren't pure binary RGB values as claimed in the article. For example, "dark yellow" was closer to a brown #
653.
▲
by
codeflo
4y ago
I don’t understand why it’s seen as a given that component names can’t be changed. All the given examples are public project names, where there’s a point to be made. For internal components though, where are your refactoring tools?
654.
▲
by
codeflo
4y ago
Honest question: Why is this kind of retro programming at all attractive to younger people who didn’t grow up with that hardware? For people like me, it’s clearly childhood nostalgia. But to be honest, 8-bit programming was so painful that
655.
▲
by
codeflo
4y ago
That “traditional” site doesn’t actually load the data from disk, in practice. It does once, after a reboot, but that’s true for this solution’s executable file as well.
656.
▲
by
codeflo
4y ago
The short answer is yes. The long answer is that it’s not so clear what an “in place addition” even means at the level of CPU instructions after you consider register allocation. For example, if you have v = x; v += y; f(v);
657.
▲
by
codeflo
4y ago
Not to turn this into an evangelism subthread, but I think GP is right. The performance optimization could apply, but the bug as described should be prevented by the borrow checker. In fact you can do neither x = … nor x += … when anything
658.
▲
by
codeflo
4y ago
That’s true, I’d add something more. Your reasoning about hardware differences would only justify implementation-defined behavior, not undefined behavior. The distinction is important here: undefined behavior is when the compiler can make s
659.
▲
by
codeflo
4y ago
Define "machine". All kinds of microcontrollers are programmed with C.
660.
▲
by
codeflo
4y ago
The ISA might force someone to extend a value to 32 bits (debatable, but let’s go with it). It never forces you to treat an unsigned int as signed. It also doesn’t require inserting UB into the process.
More ›