Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
codeflo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
79 ms
·
901.
▲
by
codeflo
5y ago
I wonder what percentage of these Twitter posts are fake (“OMG so lucky LOL”).
902.
▲
by
codeflo
5y ago
None if that explains why it’s so, how do I put it, fiddly? A flexible tool could still have reasonable defaults. If you rent a managed K8s cluster from AWS, you’re of course fine, but why does deploying it yourself have to be so complicate
903.
▲
by
codeflo
5y ago
I think the article’s missing an important trick: Brainstorming establishes a shared understanding (depending on the group dynamics, you might call it a fiction) that the group , not any individual, came up with the idea. That sense of own
904.
▲
by
codeflo
5y ago
You probably know this, but for reference, while Rust doesn’t support implementation inheritance, it has inheritance and runtime polymorphism at the interface level. You put your dynamic components into references and smart pointers of the
905.
▲
by
codeflo
5y ago
“Wizard” is the right way to put it. There’s a certain kind of “experienced” developer who enjoys being the local guru way too much. Even regardless of technology, their projects are invariably set up in such a way that no one can do anythi
906.
▲
by
codeflo
5y ago
In my opinion, UIs back then where created with the expectation that users would learn them. Good designers made learning and discovery easy (bad ones failed, of course), but either way, learning was expected to happen. Nowadays, UIs are de
907.
▲
by
codeflo
5y ago
Genuinely wondering: Are we at the point where people feel nostalgic about early 2000s computing? As someone who was in their mid to late teens at the time, I find nostalgia for Windows XP in particular a bit funny because back then, people
908.
▲
by
codeflo
5y ago
I think Hyrum’s Law should be best understood as a warning for users rather than as handcuffs for implementors: don’t rely on non-obvious implementation details. I’ve seen software break due to a race condition when an upgrade made somethin
909.
▲
by
codeflo
5y ago
Everything in C++ is just there to solve a weird interaction between <feature that’s in your codebase> and <feature that’s also in your codebase>. The “just learn a subset” crowd is wrong, you really do need to know everything
910.
▲
by
codeflo
5y ago
If you’re dealing with pure data, reinterpret_cast/mem::transmute is fine, and for certain types of low-level code, necessary. In Rust, I’ve recently discovered the “bytemuck” crate, which offers ways to do that safely.
911.
▲
by
codeflo
5y ago
I don’t think so. According to https://stackoverflow.com/a/39382728 (the original SO answer that prompted the linked SO question, and which quotes the relevant parts of the spec), the allocation is not UB, but accessin
912.
▲
by
codeflo
5y ago
I think you have to do void some_func(foo *f) { new(f) foo { 5, 5 }; } because no assignment operator is generated for a struct with a const member.
913.
▲
by
codeflo
5y ago
I realize that, but no variable is const, only the field is. And you don’t need a const_cast to change the value, as the example in the question shows, some_func can do: void some_func(foo *p) { new(p) foo { 42 }; } That’s no
914.
▲
by
codeflo
5y ago
This confuses me even more than C++ usually does. From the first answer: > struct foo{ int const x; }; > void some_func(foo*); > int bar() { > foo f { 123 }; > some_func(&f); > return f.x; &g
915.
▲
by
codeflo
5y ago
I agree Apple is the bad guy here and even the public discussions were a clown show, who knows how much worse it was behind closed doors. But I’d rather have an inelegant standard than none at all, and I think the problems with WGSL can be
916.
▲
by
codeflo
5y ago
I, for one, am highly skeptical about the current wave of ML-enabled “discoveries” in physics and chemistry, where ML models replace simulations. ML can’t reliably extrapolate into never before seen territory in the way a simulation can. Th
917.
▲
by
codeflo
5y ago
Here’s a comment summarizing the official rationale: https://github.com/gpuweb/gpuweb/issues/847#issuecomment-642... TBH, I don’t find those arguments convincing, but then, WebGPU is largely a political compr
918.
▲
by
codeflo
5y ago
I don’t think it’s a matter of trends, we have to look at the particulars of each API. OpenGL/WebGL aren’t well enough aligned with modern hardware to serve as a cross-platform graphics layer. That’s where the newer APIs come in. Vulka
919.
▲
by
codeflo
5y ago
A surprising number of people seem to believe that Bitcoin pioneered all forms of cryptography.
920.
▲
by
codeflo
5y ago
It’s important that the “angle” isn’t directly the fraction of c, but tanh^-1(v/c). This number is also called “rapidity”, and goes to infinity as v -> c. Yes, hyperbolic angles aren’t limited to [0, 2 pi). You can’t rotate all the
921.
▲
by
codeflo
5y ago
> Not many car brands even diagnose you via submitted video record. Your post might contain a clue why that is.
922.
▲
by
codeflo
5y ago
You’re bending logic to the point where I have a very hard time assuming you’re arguing in good faith.
923.
▲
by
codeflo
5y ago
If you consider the compiler to be part of the platform, that’s mostly true. I think the hard problem in practice is that headers and templates make for a very fuzzy boundary between library code and client code. Calling C++ from Rust alrea
924.
▲
by
codeflo
5y ago
But C isn’t tied to POSIX any more than it is tied to the Windows API. The standards working groups weren’t stupid, they just tried to specify things in a way that wouldn’t force an inefficient UNIX emulation layer on everyone else.
925.
▲
by
codeflo
5y ago
I don't think that would work in general: trait methods can have signatures for which you can't synthesize an implementation for the sum type (something that takes a second Self as an argument, like std::ops::Add, comes to mind).
926.
▲
by
codeflo
5y ago
>> It also only works for end applications, as libraries cannot reasonably pin their own dependencies. > Really? At least not usefully if types from those dependencies appear on the API surface.
927.
▲
by
codeflo
5y ago
I'm not sure those are counterexamples. The discussion is about large standard libraries vs. package managers. C and C++ are even older languages that had neither. Back then, the idea of having a large abstraction layer between the lan
928.
▲
by
codeflo
5y ago
Actually, the "batteries included" school of library design was a 20th century idea; the trend in the 21st century in all other ecosystems very much goes in the opposite direction: fewer features in the stdlib to allow faster iter
929.
▲
by
codeflo
5y ago
The fact that the Rust project resists standardizing too early — which could lead to being stuck with a bad design — is in my opinion one of its virtues. But I agree that we’re past that point at least for simple async worker threads and si
930.
▲
by
codeflo
5y ago
For procedural code, async is fine. I still hate writing anything resembling a higher-order function (a function that takes or returns a function) in async Rust. The type constraints become longer than the code, and I can never seem to reme
More ›