Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
codeflo
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
32 ms
·
691.
▲
by
codeflo
4y ago
As a general principle, I think low-level APIs shouldn’t provide abstractions that are both expensive and have no clear “best” design: in those cases, you want your applications to have the ability to make different trade-offs, rather than
692.
▲
by
codeflo
4y ago
I agree unwrap is tragically overused in example code, and any non-logic error should use a Result instead — even early in a project. This isn’t a huge overhead. Even in “prototypey” code, it’s not hard to make everything return an anyhow::
693.
▲
by
codeflo
4y ago
I have to wonder where this person’s school circumstances. For example, why was the triangle area formula only memorized and not demonstrated to them? I thought this should be standard everywhere in the world? Maybe they just don’t remember
694.
▲
by
codeflo
4y ago
I hope this Imgur link works, here are two shots of what I assume is the same room. You can't possibly be serious: https://imgur.com/a/IGPhFtd
695.
▲
by
codeflo
4y ago
Taste is certainly subjective, and I'm also not complaining that styles evolve. But can somebody explain to me what the art style is even trying to do? I mean this purely on an intellectual level, regardless of personal preferences. Be
696.
▲
by
codeflo
4y ago
"Non-contrived" is a matter of definition; it's almost necessary to give toy examples, but I hope you can be convinced that the same structural pattern can appear in real code. I hope Clang on x86_64 is common enough for you
697.
▲
by
codeflo
4y ago
It's dangerous to assume that you know better than someone like Raymond Chen, the author of the article the GP linked. This is not a Clang bug, it's just the nature of UB optimizations we're talking about. :) I've found
698.
▲
by
codeflo
4y ago
In addition to the spacebar issue, the fact that the rows aren’t shifted, which by row 3 means the Z is below the Q instead of below the W, will make your brain melt.
699.
▲
by
codeflo
4y ago
I have a clarification: Dereferencing a null pointer in C++ doesn’t reliably crash anymore, unfortunately, and if you still believe it does, then I do not want to run your C++ code. I assume that the author understands this and is only tr
700.
▲
by
codeflo
4y ago
Context? Edit: Thanks! This submission was incomprehensible on its own.
701.
▲
by
codeflo
4y ago
I don’t know anything about particular political distortions in the US, though I wouldn’t be surprised if they exist, at least on a small scale. What I can tell you is that electric energy is traded on complicated spot markets that are desi
702.
▲
by
codeflo
4y ago
The text tries to introduce the idea of a “narrow waist” as an architecture pattern. But I don’t fully understand how the author distinguishes this concept from similar ones, and some of the examples even seem to contradict the principles.
703.
▲
by
codeflo
4y ago
If the colonies were fed human cells, I’d agree.
704.
▲
by
codeflo
4y ago
To be clear I understand you correctly, you think there was a chance that Intel would add a CPU instruction that is "more performant" than ADD? In fact, significantly so, to the extent that this would justify the overhead of a dyn
705.
▲
by
codeflo
4y ago
Wow, that comment must have hit a nerve.
706.
▲
by
codeflo
4y ago
Not sure why you mention Intel extending their instruction set, the addition of stuff like SIMD never changed the behavior of anything that existed before. Very few programs ran on non-x86 back then anyway. Some people used to argue that wr
707.
▲
by
codeflo
4y ago
The function is dynamically linked from kernel32.dll, compiler inlining is irrelevant here.
708.
▲
by
codeflo
4y ago
I love how this shows some of the problems with unnecessary dependencies even back in 1995. Let’s say you really only cared about the sign of the result — freeing a resource when a refcount reaches 0 is a plausible use-case for that. But in
709.
▲
by
codeflo
4y ago
That’s only an implementation/optimization difference, I think it’s also relevant to understand why that’s the case. At the API level, the important distinction is that a Mutex an be shared between processes. This is great when you nee
710.
▲
by
codeflo
4y ago
As the comment you reply to states: “INC/DEC don’t give you a copy of the value to examine. (…) If you want that, you need a second instruction.” Here’s what you might be missing: Even on a single processor machine, if you have multipl
711.
▲
by
codeflo
4y ago
I’m sure the thing you quoted is technically true, the existing features are still there somewhere. But it’s not a great experience if some of the most prominent buttons in the VS Code UI now open the GitKraken account page. YMMV; I persona
712.
▲
by
codeflo
4y ago
It’s a real problem. GitLens[0] comes to mind, which used to be a decent free extension, but now gives me flashbacks to the shareware nag screens of old. I’m also not against selling software on principle. Downgrading a free piece of softwa
713.
▲
by
codeflo
4y ago
I’m fully with you. This greatly simplifies tooling by making transpilers entirely optional, meaning you don’t need a complicated setup just to get going. Developers get convenience, users aren’t affected, that’s a win all around. People ma
714.
▲
by
codeflo
4y ago
True, but if you’re just listening and not for some reason updating your whole library, we’re talking about one block write every three minutes or so. That’s negligible compared to everything else the system is doing.
715.
▲
by
codeflo
4y ago
To be technically correct, it’s called a finalizer in that case to distinguish it from deterministic destructors. For resources like memory, where it’s merely a question of performance, I would agree. But some resources have correctness imp
716.
▲
by
codeflo
4y ago
I wish this also contained an alternative suggestion. Where else should I hide the link to the privacy statement and the button for opting out of data collection?
717.
▲
by
codeflo
4y ago
BTW, a lot of people in this thread compare destructors to Java's try-with-resource (similarly, C#'s using), or Go's defer. Here's one important difference: Destructors work in standard data structures. If for whatever r
718.
▲
by
codeflo
4y ago
Rust doesn’t have initializers in the C++ sense. And I mean, even in C++ many classes like shared_ptr or even lock_guard have constructors that don’t acquire the resources yet. When the resource is acquired is an API design concern; the imp
719.
▲
by
codeflo
4y ago
I think the points you mention are easily noticed by people who lived in that era as anachronisms. At least that's true for me. And yet, Minecraft does all of those things and more, and I liked its style. I think it really depends on h
720.
▲
by
codeflo
4y ago
1. It’s a bit of a straw man to claim that’s the only reason or measurement of success for sanctions. 2. The violence on the vulnerable is inflicted by the sanctioned regime, not the sanctioners. As another commenter noted, these regimes ef
More ›