Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
planede
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
41 ms
·
511.
▲
by
planede
4y ago
> I didn't realize that the redefinition meant that avogadro's constant was no longer the ratio between daltons and grams No, I was wrong about that. It's still the ratio, but now this ratio is defined as an exact number.
512.
▲
by
planede
4y ago
Interesting! I'm actually tempted to put x32 Debian on a low-end netbook I have. I wonder if it's possible with multiarch and try with a few apps first.
513.
▲
by
planede
4y ago
32 bit mode has fewer registers and CPU extensions to use. On Linux there are experiments with an ABI with 32 bit pointers, but otherwise using the full feature set of AMD64, it's called the x32 ABI. https://en.wikipedia.org
514.
▲
by
planede
4y ago
The practical benefit of Avogadro's constant is to manage error bounds. The point is that we can measure the weight of atomic-scale objects very accurately in Daltons (1/12 the mass of a Carbon atom). The weight of macroscopic obj
515.
▲
by
planede
4y ago
> header only libraries don't really have an ABI This one is not really a header only library. It becomes a source file when you define a macro, to compile along your other source files. If you build a shared library with it, it mak
516.
▲
by
planede
4y ago
/permissive or not, ternary operators have some bugs in all compilers. My favorite MSVC one: https://developercommunity.visualstudio.com/t/wrong-type-of-...
517.
▲
by
planede
4y ago
Yep, also /permissive is super non-conforming. My favorite /permissive "feature": `false` is a null-pointer constant: https://godbolt.org/z/Mzjfba1en
518.
▲
by
planede
4y ago
Uh, I wanted to try it with GPL v3, but no way I'm paying $111 for it.
519.
▲
by
planede
4y ago
I wonder if the possibilities include "garbage, from some other register due to register renaming". Certainly not data leaked from some unmapped memory, but it can still be garbage.
520.
▲
by
planede
4y ago
Maybe it can be introduced gradually, making the reallocation an optional feature that a driver might support. Then drivers can independently implement the resource reallocation feature. Mainline drivers can move gradually. If they want to
521.
▲
by
planede
4y ago
That's runtime reflection. Compile time reflection AFAIK is available in D and Zig, and is planned for C++.
522.
▲
by
planede
4y ago
So what I’m arguing for is having a start-of-item token. Like this: ・1 ・2 ・3. Do we need to point an end of last token? As we’ll see next, that’s usually not the case. We have a special word for end-of-item token: terminator, but no starti
523.
▲
by
planede
4y ago
Ah, right, so `out_ptr` works with any unique_ptr and shared_ptr, doesn't have to hold the `default_deleter`. `default_deleter` would call `delete` down the line, which does not match up with `malloc`.
524.
▲
by
planede
4y ago
I would say that calling these "C APIs" is a bit misleading, as they have to call `new` for these helper types to be useful. I would call these legacy C++ APIs, although I have recently seen new APIs written with this horribly awf
525.
▲
by
planede
4y ago
This is correct for unsigned integers, but incorrect for signed. For x=INT_MIN+1 (0b1000...1) y=INT_MAX (0b01111...1) this gives INT_MIN (0b1000...0) instead of 0.
526.
▲
by
planede
4y ago
Very much relevant: CppCon 2019: Marshall Clow “std::midpoint? How Hard Could it Be?” https://www.youtube.com/watch?v=sBtAGxBh-XI
527.
▲
by
planede
4y ago
And wrong, since x=-1 and y=INT_MAX overflows.
528.
▲
by
planede
4y ago
> So, when this raises OSError or FileNotFoundError due to some botched assumption, I guess one just attaches pdb to it and now your job is to be a python expert Well, debugging cmake files is not any better, in my experience. And I can&
529.
▲
by
planede
4y ago
Isn't there an implicit trust on DNS already for domain validated certificates?
530.
▲
by
planede
4y ago
What's the license, are you allowed to distribute? Anyway, we already started using this in production, we expect some free support. /s
531.
▲
by
planede
4y ago
My recent gripe with CMake: the language toolchain is still a singleton. You can't easily use multiple C++ compilers in the same build. This doesn't feel like a language limitation. I also never got why we need DSLs for build syst
532.
▲
by
planede
4y ago
Karaoke usually implies no or suppressed vocal channel in the audio mix, doesn't it? It's "sing along" as it's still the original mix, I suppose. edit: I missed the "adjustable vocals" in the list of featu
533.
▲
by
planede
4y ago
Vendoring in is also reasonable, although it makes sense to only vendor in code that you understand and can maintain. I would still check the literature for base64 encode/decode in their place, it's not like they are the first who
534.
▲
by
planede
4y ago
As libcurl is used on a wide range of platforms, they do need a generic fallback implementation. But yeah, SIMD would make sense where it's available.
535.
▲
by
planede
4y ago
Not to play down on the improvement here, but I expected to see some comparisons to other base64 encode/decode implementations. There are many high-performance implementations out there with permissive license.
536.
▲
by
planede
4y ago
That's only the best strategy, if your opponent can make any chess move.
537.
▲
by
planede
4y ago
The original N game v1.0, released in 2004 [1] had fluid vector animation without stutter on a modest computer at the time. It's a pretty challenging platformer, and any stutter would have killed the gameplay. Later flash versions regr
538.
▲
by
planede
4y ago
There are limited cases where this is possible. Like a pure function that takes a single 32bit number as input. Just go over all the possible inputs.
539.
▲
by
planede
4y ago
> The equivalent would be units tests that cover every single possible input. That's what "exhaustive" means.
540.
▲
by
planede
4y ago
Mistakes in proofs are just as probable as mistakes in exhaustive tests. An exhaustive test is just one type of a machine verified proof.
More ›